1# Copyright (c) 2021-2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("./multimodalinput_mini.gni") 16 17config("coverage_flags") { 18 if (input_feature_coverage) { 19 cflags = [ 20 "--coverage", 21 "-Oz", 22 ] 23 ldflags = [ "--coverage" ] 24 cflags_cc = [ 25 "--coverage", 26 "-Oz", 27 ] 28 } 29} 30 31ohos_prebuilt_etc("mmi_uinput.rc") { 32 source = "mmi_uinput.rc" 33 relative_install_dir = "init" 34 part_name = "input" 35 subsystem_name = "multimodalinput" 36} 37 38ohos_prebuilt_etc("multimodalinput.rc") { 39 if (input_feature_watch_cfg_source) { 40 source = "watch/multimodalinput.cfg" 41 } else { 42 source = "multimodalinput.cfg" 43 } 44 relative_install_dir = "init" 45 part_name = "input" 46 subsystem_name = "multimodalinput" 47} 48 49ohos_executable("uinput_inject") { 50 install_enable = true 51 52 sources = uinput_inject_sources 53 branch_protector_ret = "pac_ret" 54 sanitize = { 55 cfi = true 56 cfi_cross_dso = true 57 debug = false 58 } 59 60 include_dirs = [ 61 "${mmi_path}/service/nap_process/include", 62 "${mmi_path}/util/common/include", 63 "${mmi_path}/interfaces/native/innerkits/common/include", 64 ] 65 66 external_deps = [ 67 "c_utils:utils", 68 "drivers_interface_input:libinput_proxy_1.0", 69 "hilog:libhilog", 70 ] 71 72 defines = [ "MMI_DISABLE_LOG_TRACE" ] 73 74 cflags = [ 75 "-fstack-protector-strong", 76 "-Oz", 77 ] 78 79 part_name = "input" 80 subsystem_name = "multimodalinput" 81} 82 83group("multimodalinput_mmi_base") { 84 deps = [] 85} 86 87group("multimodalinput_mmi_frameworks") { 88 deps = [ "frameworks/proxy:libmmi-client" ] 89} 90 91group("multimodalinput_mmi_service") { 92 deps = [ 93 "service:libcursor_drawing_adapter", 94 "service:libmmi-knuckle", 95 "service:libmmi-server", 96 "service/window_manager:mmi_touch_drawing_handler", 97 "tools/inject_event:uinput", 98 "util/screen_capture:libmmi-screen_capture", 99 ] 100} 101 102group("input-third-mmi") { 103 external_deps = [ 104 "libevdev:libevdev", 105 "libinput:libinput-third-mmi", 106 "mtdev:libmtdev-third-mmi", 107 ] 108} 109 110group("input_jsapi_group") { 111 deps = [] 112 if (support_jsapi) { 113 deps += [ 114 "frameworks/napi/gesture_event:gestureevent", 115 "frameworks/napi/intention_code:intentioncode", 116 "frameworks/napi/joystick_event:joystickevent", 117 "frameworks/napi/key_code:keycode", 118 "frameworks/napi/key_event:keyevent", 119 "frameworks/napi/mouse_event:mouseevent", 120 "frameworks/napi/touch_event:touchevent", 121 ] 122 if (input_feature_monitor) { 123 deps += [ "frameworks/napi/input_monitor:inputmonitor" ] 124 } 125 if (input_feature_mouse) { 126 deps += [ 127 "frameworks/ani/pointer:ani_pointer_package", 128 "frameworks/napi/pointer:pointer", 129 ] 130 } 131 if (input_feature_keyboard) { 132 deps += [ 133 "frameworks/ani/input_consumer:input_consumer_package", 134 "frameworks/napi/input_consumer:inputconsumer", 135 "frameworks/napi/input_event_client:inputeventclient", 136 ] 137 } 138 if (input_feature_input_device) { 139 deps += [ 140 "frameworks/ani/input_device:ani_input_device_package", 141 "frameworks/napi/input_device:inputdevice", 142 ] 143 } 144 if (input_feature_short_key) { 145 deps += [ "frameworks/napi/short_key:shortkey" ] 146 } 147 deps += [ "frameworks/napi/infrared_emitter:infraredemitter" ] 148 } 149} 150 151group("mmi_tests") { 152 testonly = true 153 deps = [ 154 "frameworks/native/input:OHInputManagerEXTest", 155 "frameworks/native/input:OHInputManagerTest", 156 "frameworks/proxy:InputDeviceImplTest", 157 "frameworks/proxy:InputHandlerManagerTest", 158 "frameworks/proxy:InputManagerFilterManualTest", 159 "frameworks/proxy:InputManagerImplTest", 160 "frameworks/proxy:InputManagerInjectTest", 161 "frameworks/proxy:InputManagerManualTest", 162 "frameworks/proxy:InputManagerTest", 163 "frameworks/proxy:InputMonitorManagerTest", 164 "frameworks/proxy:KeyEventInputSubscribeManagerTest", 165 "frameworks/proxy:KeyEventTest", 166 "frameworks/proxy:LongPressEventSubscribeManagerTest", 167 "frameworks/proxy:PointerEventExTest", 168 "frameworks/proxy:PointerEventNdkTest", 169 "frameworks/proxy:PointerEventTest", 170 "frameworks/proxy:PointerStyleTest", 171 "frameworks/proxy:ut-mmi-proxy-out", 172 "frameworks/proxy/event_handler/test:InputActiveSubscribeManagerTest", 173 "libudev:test", 174 "service:AccountManagerTest", 175 "service:ApplicationStateObserverTest", 176 "service:ConnectManagerProxyEXTest", 177 "service:CursorDrawingComponentTest", 178 "service:DelegateTaskTest", 179 "service:DeviceConfigTest", 180 "service:DeviceEventMonitorTest", 181 "service:DeviceManagerExTest", 182 "service:DeviceManagerTest", 183 "service:DfxHisysEventTest", 184 "service:DisplayStateManagerTest", 185 "service:EventDispatchTest", 186 "service:EventDumpTest", 187 "service:EventFilterDeathRecipientTest", 188 "service:EventFilterHandlerTest", 189 "service:EventHandlerTest", 190 "service:EventNormalizeHandlerTest", 191 "service:InfraredEmitterTest", 192 "service:InputDisplayBindHelperTest", 193 "service:InputEventHandlerTest", 194 "service:InputWindowsManagerEXTest", 195 "service:InputWindowsManagerOneTest", 196 "service:InputWindowsManagerTest", 197 "service:InterceptorTest", 198 "service:JoystickTest", 199 "service:KeyAutoRepeatExTest", 200 "service:KeyCommandTest", 201 "service:KeyEventNormalizeTest", 202 "service:KeyEventValueTransformationTest", 203 "service:KeyShortcutManagerTest", 204 "service:KeyUnicodeTransformationTest", 205 "service:KeymapMgrTest", 206 "service:KnuckleDivergentPointTest", 207 "service:KnuckleDrawingComponentTest", 208 "service:KnuckleDrawingManagerTest", 209 "service:KnuckleDrawingTest", 210 "service:KnuckleDynamicDrawingManagerTest", 211 "service:KnuckleGlowPointTest", 212 "service:KnuckleGlowTraceSystemTest", 213 "service:LibinputAdapterTest", 214 "service:LongPressSubscribeHandlerTest", 215 "service:ModuleLoaderTest", 216 "service:MonitorTest", 217 "service:NapProcessTest", 218 "service:PointerDrawingManagerExTest", 219 "service:PointerDrawingManagerSupTest", 220 "service:PointerDrawingManagerTest", 221 "service:ServerMsgHandlerTest", 222 "service:StylusKeyTest", 223 "service:StylusKeyTest", 224 "service:SubscriberTest", 225 "service:TimerManagerTest", 226 "service:event_resample_test", 227 "service:mmi-service-tests", 228 "service/crown_transform_processor/test:CrownTransformProcessorTest", 229 "service/fingerprint_event_processor/test:FingerprintEventProcessorTest", 230 "service/fingerprint_event_processor/test:XKeyEventProcessorTest", 231 "service/fingersense_wrapper/test:FingersenseWrapperTest", 232 "service/module_loader/test:ModuleLoaderTests", 233 "service/mouse_event_normalize/test:MouseEventNormalizeEXTest", 234 "service/mouse_event_normalize/test:MouseEventNormalizeTest", 235 "service/subscriber/test:mmi_subscriber_tests", 236 "service/touch_event_normalize/test:TouchEventNormalizeTests", 237 "service/touch_event_normalize/test:TouchGestureAdapterTest", 238 "test/fuzztest:test", 239 "test/unittest/interfaces:InputNativeHotkeyTest", 240 "test/unittest/interfaces:InputNativeTest", 241 "tools/inject_event:InjectEventTest", 242 "util:UdsClientTest", 243 "util/common:UtilCommonTest", 244 "util/json_parser:JsonParserTest", 245 ] 246 247 if (input_feature_switch) { 248 deps += [ "frameworks/proxy:SwitchEventInputSubscribeManagerTest" ] 249 } 250 251 if (input_ext_feature_anco) { 252 deps += [ "${mmi_path}/frameworks/proxy/events/test:InputManagerAncoTest" ] 253 } 254 255 if (input_feature_touch_drawing) { 256 deps += [ 257 "service:TouchDrawingManagerTest", 258 "service/window_manager:TouchDrawingHandlerTest", 259 ] 260 } 261} 262 263group("examples_group") { 264 deps = [ "examples/input_device_display_bind:input_device_display_bind" ] 265} 266