1 Star 0 Fork 756

郭旭/multimodalinput_input_3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
multimodalinput_mini.gni 15.69 KB
一键复制 编辑 原始数据 按行查看 历史
baoshubei 提交于 2024-11-18 19:47 . Add long press event listening
# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/config/components/multimodalinput/cursor_config.gni")
import("//build/ohos.gni")
mmi_part_name = "input"
mmi_subsystem_name = "multimodalinput"
mmi_path = "//foundation/multimodalinput/input"
graphics_path = "//foundation/graphic/graphic_2d/rosen/modules"
preferences_path = "//foundation/distributeddatamgr/preferences"
ability_runtime_path = "//foundation/ability/ability_runtime"
security_component_path = "//base/security"
c_utils_root = "//commonlibrary/c_utils"
hilog_root = "//base/hiviewdfx/hilog"
declare_args() {
hitrace_enabled = false
call_manager_service_enabled = false
resource_schedule_service_enabled = false
screenlock_manager_enabled = false
input_feature_product = "default"
input_feature_enable_pgo = false
input_feature_pgo_path = ""
input_feature_combination_key = false
input_feature_pointer_drawing = true
input_feature_interceptor = true
input_feature_monitor = true
input_feature_keyboard = false
input_feature_switch = true
input_feature_mouse = true
input_feature_joystick = true
input_feature_touchscreen = true
input_feature_input_device = true
input_feature_short_key = true
input_feature_coverage = false
input_ext_feature_anco = false
input_ext_feature_fingersense = true
input_ext_feature_gesturesense = true
input_feature_fingerprint = false
input_feature_crown = false
input_feature_move_event_filters = false
input_shortcut_key_manager_enabled = true
input_shortcut_key_rules_enabled = true
input_new_knuckle_dynamic_enabled = true
input_feature_virtual_keyboard = false
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {
resource_schedule_service_enabled = true
}
if (defined(global_parts_info) &&
defined(global_parts_info.theme_screenlock_mgr)) {
screenlock_manager_enabled = true
}
if (is_emulator) {
input_feature_pointer_drawing = false
}
uinput_inject_sources = [
"uinput/hdf_device_event_dispatch.cpp",
"uinput/hdf_device_event_manager.cpp",
"uinput/inject_thread.cpp",
"uinput/keyboard_inject.cpp",
"uinput/virtual_device.cpp",
"uinput/virtual_keyboard.cpp",
"uinput/virtual_touch_screen.cpp",
]
libmmi_common_sources = [
"events/src/axis_event.cpp",
"events/src/input_device.cpp",
"events/src/input_event.cpp",
"events/src/key_event.cpp",
"events/src/key_option.cpp",
"events/src/pointer_event.cpp",
]
libmmi_client_sources = [
"event_handler/src/anr_handler.cpp",
"event_handler/src/bytrace_adapter.cpp",
"event_handler/src/client_msg_handler.cpp",
"event_handler/src/input_device_impl.cpp",
"event_handler/src/input_handler_manager.cpp",
"event_handler/src/input_manager_impl.cpp",
"event_handler/src/long_press_event_subscribe_manager.cpp",
"event_handler/src/multimodal_event_handler.cpp",
"event_handler/src/scene_board_judgement.cpp",
"events/src/input_manager.cpp",
"module_loader/src/mmi_client.cpp",
"module_loader/src/mmi_fd_listener.cpp",
]
libmmi_service_sources = [
"$mmi_path/frameworks/proxy/event_handler/src/bytrace_adapter.cpp",
"$mmi_path/frameworks/proxy/event_handler/src/scene_board_judgement.cpp",
"app_state_manager/src/app_state_observer.cpp",
"delegate_task/src/delegate_interface.cpp",
"delegate_task/src/delegate_tasks.cpp",
"device_config/src/device_config_file_parser.cpp",
"device_manager/src/input_device_manager.cpp",
"device_state_manager/src/device_event_monitor.cpp",
"dfx/src/dfx_hisysevent.cpp",
"event_dispatch/src/event_dispatch_handler.cpp",
"event_dump/src/event_dump.cpp",
"event_dump/src/event_statistic.cpp",
"event_handler/src/anr_manager.cpp",
"event_handler/src/event_normalize_handler.cpp",
"event_handler/src/input_event_handler.cpp",
"event_handler/src/key_auto_repeat.cpp",
"event_handler/src/key_event_value_transformation.cpp",
"event_handler/src/key_map_manager.cpp",
"fingersense_wrapper/src/fingersense_wrapper.cpp",
"gesturesense_wrapper/src/gesturesense_wrapper.cpp",
"hardware_cursor_pointer_manager/src/hardware_cursor_pointer_manager.cpp",
"key_command/src/setting_datashare.cpp",
"key_command/src/setting_observer.cpp",
"libinput_adapter/src/hotplug_detector.cpp",
"libinput_adapter/src/libinput_adapter.cpp",
"message_handle/src/authorization_dialog.cpp",
"message_handle/src/authorize_helper.cpp",
"message_handle/src/client_death_handler.cpp",
"message_handle/src/inject_notice_manager.cpp",
"message_handle/src/server_msg_handler.cpp",
"module_loader/src/app_debug_listener.cpp",
"module_loader/src/mmi_service.cpp",
"module_loader/src/multimodal_input_preferences_manager.cpp",
"module_loader/src/uds_server.cpp",
"module_loader/src/watchdog_task.cpp",
"nap_process/src/nap_process.cpp",
"permission_helper/src/permission_helper.cpp",
"timer_manager/src/timer_manager.cpp",
"window_manager/src/input_display_bind_helper.cpp",
"window_manager/src/input_windows_manager.cpp",
]
infraredemitter_sources = [ "src/js_register_module.cpp" ]
inputdevice_sources = [
"src/js_event_target.cpp",
"src/js_input_device_context.cpp",
"src/js_input_device_manager.cpp",
"src/js_util.cpp",
"src/native_register_module.cpp",
]
inputmonitor_sources = [
"src/js_input_monitor.cpp",
"src/js_input_monitor_manager.cpp",
"src/js_input_monitor_module.cpp",
]
patch_gen_libinput_third_mmi_sources = [
root_out_dir + "/diff_libinput_mmi/src/evdev-debounce.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-fallback.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-joystick.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-privacy-switch.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-middle-button.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-buttons.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-edge-scroll.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-gestures.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-tap.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-thumb.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-tablet-pad-leds.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-tablet-pad.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-tablet.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-totem.c",
root_out_dir + "/diff_libinput_mmi/src/evdev-wheel.c",
root_out_dir + "/diff_libinput_mmi/src/evdev.c",
root_out_dir + "/diff_libinput_mmi/src/filter-custom.c",
root_out_dir + "/diff_libinput_mmi/src/filter-flat.c",
root_out_dir + "/diff_libinput_mmi/src/filter-low-dpi.c",
root_out_dir + "/diff_libinput_mmi/src/filter-mouse.c",
root_out_dir + "/diff_libinput_mmi/src/filter-tablet.c",
root_out_dir + "/diff_libinput_mmi/src/filter-touchpad-flat.c",
root_out_dir + "/diff_libinput_mmi/src/filter-touchpad-x230.c",
root_out_dir + "/diff_libinput_mmi/src/filter-touchpad.c",
root_out_dir + "/diff_libinput_mmi/src/filter-trackpoint-flat.c",
root_out_dir + "/diff_libinput_mmi/src/filter-trackpoint.c",
root_out_dir + "/diff_libinput_mmi/src/filter.c",
root_out_dir + "/diff_libinput_mmi/src/libinput-util.c",
root_out_dir + "/diff_libinput_mmi/src/libinput.c",
root_out_dir + "/diff_libinput_mmi/src/path-seat.c",
root_out_dir + "/diff_libinput_mmi/src/quirks.c",
root_out_dir + "/diff_libinput_mmi/src/timer.c",
root_out_dir + "/diff_libinput_mmi/src/util-list.c",
root_out_dir + "/diff_libinput_mmi/src/util-prop-parsers.c",
root_out_dir + "/diff_libinput_mmi/src/util-ratelimit.c",
root_out_dir + "/diff_libinput_mmi/src/util-strings.c",
]
patch_gen_libmtdev_third_mmi_sources = [
root_out_dir + "/diff_libmtdev_mmi/src/caps.c",
root_out_dir + "/diff_libmtdev_mmi/src/core.c",
root_out_dir + "/diff_libmtdev_mmi/src/iobuf.c",
root_out_dir + "/diff_libmtdev_mmi/src/match.c",
root_out_dir + "/diff_libmtdev_mmi/src/match_four.c",
]
event_injection_sources = [
"src/device_base.cpp",
"src/get_device_node.cpp",
"src/get_device_object.cpp",
"src/injection_event_dispatch.cpp",
"src/injection_tools_help_func.cpp",
"src/input_parse.cpp",
"src/manage_inject_device.cpp",
"src/processing_finger_device.cpp",
"src/processing_game_pad_device.cpp",
"src/processing_joystick_device.cpp",
"src/processing_keyboard_device.cpp",
"src/processing_mouse_device.cpp",
"src/processing_pad_device.cpp",
"src/processing_pen_device.cpp",
"src/processing_touch_screen_device.cpp",
]
libmmi_virtual_device_sources = [
"src/virtual_crown.cpp",
"src/virtual_device.cpp",
"src/virtual_finger.cpp",
"src/virtual_fingerprint_key.cpp",
"src/virtual_fingerprint_mouse.cpp",
"src/virtual_gamepad.cpp",
"src/virtual_joystick.cpp",
"src/virtual_keyboard.cpp",
"src/virtual_keyboard_consumer_ctrl.cpp",
"src/virtual_keyboard_ext.cpp",
"src/virtual_keyboard_sys_ctrl.cpp",
"src/virtual_knob.cpp",
"src/virtual_knob_consumer_ctrl.cpp",
"src/virtual_knob_mouse.cpp",
"src/virtual_knob_sys_ctrl.cpp",
"src/virtual_mouse.cpp",
"src/virtual_pc_switch.cpp",
"src/virtual_pc_touchpad.cpp",
"src/virtual_pen.cpp",
"src/virtual_pen_keyboard.cpp",
"src/virtual_pen_mouse.cpp",
"src/virtual_remote_control.cpp",
"src/virtual_single_finger.cpp",
"src/virtual_single_touchscreen.cpp",
"src/virtual_stylus.cpp",
"src/virtual_touchpad.cpp",
"src/virtual_touchscreen.cpp",
"src/virtual_trackball.cpp",
"src/virtual_trackpad.cpp",
"src/virtual_trackpad_mouse.cpp",
"src/virtual_trackpad_sys_ctrl.cpp",
"src/virtual_uwb_remote_control.cpp",
]
libmmi_util_sources = [
"common/src/input_event_data_transformation.cpp",
"common/src/klog.cpp",
"common/src/util.cpp",
"network/src/circle_stream_buffer.cpp",
"network/src/net_packet.cpp",
"network/src/stream_buffer.cpp",
"socket/src/uds_client.cpp",
"socket/src/uds_session.cpp",
"socket/src/uds_socket.cpp",
]
}
if (input_feature_joystick) {
input_feature_mouse = true
}
print("input_feature_combination_key = ${input_feature_combination_key}")
print("input_feature_pointer_drawing = ${input_feature_pointer_drawing}")
print("input_feature_monitor = ${input_feature_monitor}")
print("input_feature_interceptor = ${input_feature_interceptor}")
print("input_feature_keyboard = ${input_feature_keyboard}")
print("input_feature_switch = ${input_feature_switch}")
print("input_feature_mouse = ${input_feature_mouse}")
print("input_feature_joystick = ${input_feature_joystick}")
print("input_feature_touchscreen = ${input_feature_touchscreen}")
print("input_feature_input_device = ${input_feature_input_device}")
print("input_feature_short_key = ${input_feature_short_key}")
print("input_feature_move_event_filters = ${input_feature_move_event_filters}")
input_default_defines = []
if (input_new_knuckle_dynamic_enabled) {
input_default_defines += [ "OHOS_BUILD_ENABLE_NEW_KNUCKLE_DYNAMIC" ]
}
if (input_feature_pointer_drawing) {
input_default_defines += [ "OHOS_BUILD_ENABLE_POINTER_DRAWING" ]
}
if (input_feature_interceptor) {
input_default_defines += [ "OHOS_BUILD_ENABLE_INTERCEPTOR" ]
}
if (input_feature_keyboard) {
input_default_defines += [ "OHOS_BUILD_ENABLE_KEYBOARD" ]
}
if (input_feature_switch) {
input_default_defines += [ "OHOS_BUILD_ENABLE_SWITCH" ]
}
if (input_feature_monitor) {
input_default_defines += [ "OHOS_BUILD_ENABLE_MONITOR" ]
}
if (input_feature_touchscreen) {
input_default_defines += [ "OHOS_BUILD_ENABLE_TOUCH" ]
}
if (input_feature_mouse) {
input_default_defines += [ "OHOS_BUILD_ENABLE_POINTER" ]
}
if (input_feature_joystick) {
input_default_defines += [ "OHOS_BUILD_ENABLE_JOYSTICK" ]
}
if (input_feature_short_key) {
input_default_defines += [ "OHOS_BUILD_ENABLE_SHORT_KEY" ]
}
if (input_feature_fingerprint) {
input_default_defines += [ "OHOS_BUILD_ENABLE_FINGERPRINT" ]
}
if (input_feature_crown) {
input_default_defines += [ "OHOS_BUILD_ENABLE_CROWN" ]
}
if (!defined(global_parts_info) ||
defined(global_parts_info.security_security_component_manager)) {
security_component_enable = true
} else {
security_component_enable = false
}
if (security_component_enable) {
input_default_defines += [ "OHOS_BUILD_ENABLE_SECURITY_COMPONENT" ]
}
if (input_ext_feature_fingersense) {
input_default_defines += [ "OHOS_BUILD_ENABLE_FINGERSENSE_WRAPPER" ]
}
if (input_ext_feature_gesturesense) {
input_default_defines += [ "OHOS_BUILD_ENABLE_GESTURESENSE_WRAPPER" ]
}
if (input_feature_move_event_filters) {
input_default_defines += [ "OHOS_BUILD_ENABLE_MOVE_EVENT_FILTERS" ]
}
if (input_ext_feature_anco) {
mmi_ext_path = "//vendor/huawei/foundation/multimodalinput/input_ext"
input_default_defines += [ "OHOS_BUILD_ENABLE_ANCO" ]
libmmi_client_sources +=
[ "${mmi_ext_path}/anco_uds_manager/src/input_manager_ext.cpp" ]
libmmi_service_sources += [
"${mmi_ext_path}/anco_uds_manager/src/anco_uds_manager.cpp",
"${mmi_ext_path}/anco_uds_manager/src/input_windows_manager_ext.cpp",
"${mmi_ext_path}/anco_uds_manager/src/mmi_service_ext.cpp",
]
if (input_feature_product != "pc") {
libmmi_service_sources += [ "${mmi_path}/service/infrared_emitter/src/infrared_emitter_controller.cpp" ]
}
}
if (input_feature_product == "pc") {
input_default_defines += [ "OHOS_BUILD_ENABLE_HARDWARE_CURSOR" ]
input_default_defines += [ "OHOS_BUILD_MOUSE_REPORTING_RATE" ]
}
if (input_ext_feature_magiccursor) {
mmi_ext_path = "//vendor/huawei/foundation/multimodalinput/input_ext"
g2d_ext_path = "//foundation/graphic/graphic_2d_ext"
g2d_path = "//foundation/graphic/graphic_2d"
surface_path = "//foundation/graphic/graphic_surface"
input_default_defines += [ "OHOS_BUILD_ENABLE_MAGICCURSOR" ]
libmmi_service_sources += [
"${mmi_ext_path}/magic_cursor/src/dfx_hisysevent_ext.cpp",
"${mmi_ext_path}/magic_cursor/src/lru_cache.cpp",
"${mmi_ext_path}/magic_cursor/src/magic_pointer_drawing_manager.cpp",
"${mmi_ext_path}/magic_cursor/src/magic_pointer_drawing_manager_ext.cpp",
"${mmi_ext_path}/magic_cursor/src/magic_pointer_velocity_tracker.cpp",
"${mmi_ext_path}/magic_cursor/src/render_context_gl.cpp",
]
}
if (defined(global_parts_info.multimedia_player_framework)) {
enable_player_framework = true
input_default_defines += [ "PLAYER_FRAMEWORK_EXISTS" ]
} else {
enable_player_framework = false
}
if (enable_player_framework) {
libmmi_service_sources +=
[ "module_loader/src/input_screen_capture_agent.cpp" ]
}
if (input_shortcut_key_rules_enabled) {
input_shortcut_key_manager_enabled = true
}
if (defined(global_parts_info) &&
defined(global_parts_info.telephony_call_manager)) {
call_manager_service_enabled = true
input_default_defines += [ "CALL_MANAGER_SERVICE_ENABLED" ]
}
if (defined(global_parts_info) &&
defined(global_parts_info.hiviewdfx_hitrace)) {
hitrace_enabled = true
input_default_defines += [ "HITRACE_ENABLED" ]
}
if (input_feature_virtual_keyboard) {
input_default_defines += [ "OHOS_BUILD_ENABLE_VKEYBOARD" ]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/guoxu111/multimodalinput_input_3.git
git@gitee.com:guoxu111/multimodalinput_input_3.git
guoxu111
multimodalinput_input_3
multimodalinput_input_3
master

搜索帮助