1# Copyright (c) 2021-2024 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 source = "multimodalinput.cfg" 40 relative_install_dir = "init" 41 part_name = "input" 42 subsystem_name = "multimodalinput" 43} 44 45ohos_executable("uinput_inject") { 46 install_enable = true 47 48 sources = uinput_inject_sources 49 branch_protector_ret = "pac_ret" 50 sanitize = { 51 cfi = true 52 cfi_cross_dso = true 53 debug = false 54 } 55 56 include_dirs = [ 57 "${mmi_path}/service/nap_process/include", 58 "${mmi_path}/util/common/include", 59 "${mmi_path}/interfaces/native/innerkits/common/include", 60 ] 61 62 external_deps = [ 63 "c_utils:utils", 64 "drivers_interface_input:libinput_proxy_1.0", 65 "hilog:libhilog", 66 ] 67 68 defines = [ "MMI_DISABLE_LOG_TRACE" ] 69 70 cflags = [ 71 "-fstack-protector-strong", 72 "-Oz", 73 ] 74 75 part_name = "input" 76 subsystem_name = "multimodalinput" 77} 78 79group("multimodalinput_mmi_base") { 80 deps = [] 81} 82 83group("multimodalinput_mmi_frameworks") { 84 deps = [ "frameworks/proxy:libmmi-client" ] 85} 86 87group("multimodalinput_mmi_service") { 88 deps = [ 89 "service:libmmi-server", 90 "tools/inject_event:uinput", 91 "util/screen_capture:libmmi-screen_capture", 92 ] 93} 94 95group("input-third-mmi") { 96 external_deps = [ 97 "libevdev:libevdev", 98 "libinput:libinput-third-mmi", 99 "mtdev:libmtdev-third-mmi", 100 ] 101} 102 103group("input_jsapi_group") { 104 deps = [] 105 if (support_jsapi) { 106 deps += [ 107 "frameworks/napi/gesture_event:gestureevent", 108 "frameworks/napi/intention_code:intentioncode", 109 "frameworks/napi/joystick_event:joystickevent", 110 "frameworks/napi/key_code:keycode", 111 "frameworks/napi/key_event:keyevent", 112 "frameworks/napi/mouse_event:mouseevent", 113 "frameworks/napi/touch_event:touchevent", 114 ] 115 if (input_feature_monitor) { 116 deps += [ "frameworks/napi/input_monitor:inputmonitor" ] 117 } 118 if (input_feature_mouse) { 119 deps += [ "frameworks/napi/pointer:pointer" ] 120 } 121 if (input_feature_keyboard) { 122 deps += [ 123 "frameworks/napi/input_consumer:inputconsumer", 124 "frameworks/napi/input_event_client:inputeventclient", 125 ] 126 } 127 if (input_feature_input_device) { 128 deps += [ "frameworks/napi/input_device:inputdevice" ] 129 } 130 if (input_feature_short_key) { 131 deps += [ "frameworks/napi/short_key:shortkey" ] 132 } 133 deps += [ "frameworks/napi/infrared_emitter:infraredemitter" ] 134 } 135} 136 137group("mmi_tests") { 138 testonly = true 139 deps = [ 140 "common/anco/comm:AncoChannelStubTest", 141 "frameworks/native/input:OHInputManagerTest", 142 "frameworks/proxy:InputHandlerManagerTest", 143 "frameworks/proxy:InputManagerFilterManualTest", 144 "frameworks/proxy:InputManagerImplTest", 145 "frameworks/proxy:InputManagerInjectTest", 146 "frameworks/proxy:InputManagerManualTest", 147 "frameworks/proxy:InputManagerTest", 148 "frameworks/proxy:KeyEventTest", 149 "frameworks/proxy:PointerEventTest", 150 "frameworks/proxy:ut-mmi-proxy-out", 151 "libudev:test", 152 "service:AccountManagerTest", 153 "service:ApplicationStateObserverTest", 154 "service:ConnectManagerEXTest", 155 "service:ConnectManagerProxyEXTest", 156 "service:ConnectManagerTest", 157 "service:DelegateTaskTest", 158 "service:DeviceConfigTest", 159 "service:DeviceManagerTest", 160 "service:DfxHisysEventTest", 161 "service:DisplayStateManagerTest", 162 "service:EventDumpTest", 163 "service:EventFilterDeathRecipientTest", 164 "service:EventFilterHandlerTest", 165 "service:EventHandlerTest", 166 "service:EventNormalizeHandlerTest", 167 "service:InfraredEmitterTest", 168 "service:InputWindowsManagerEXTest", 169 "service:InputWindowsManagerTest", 170 "service:InterceptorTest", 171 "service:JoystickTest", 172 "service:KeyAutoRepeatExTest", 173 "service:KeyEventNormalizeTest", 174 "service:KeyEventValueTransformationTest", 175 "service:KeyShortcutManagerTest", 176 "service:KnuckleDivergentPointTest", 177 "service:KnuckleDrawingManagerTest", 178 "service:KnuckleDynamicDrawingManagerTest", 179 "service:KnuckleGlowPointTest", 180 "service:KnuckleGlowTraceSystemTest", 181 "service:LibinputAdapterTest", 182 "service:LongPressSubscribeHandlerTest", 183 "service:ModuleLoaderTest", 184 "service:MonitorTest", 185 "service:NapProcessTest", 186 "service:PointerDrawingManagerExTest", 187 "service:PointerDrawingManagerTest", 188 "service:ServerMsgHandlerTest", 189 "service:StylusKeyTest", 190 "service:StylusKeyTest", 191 "service:SubscriberTest", 192 "service:TimerManagerTest", 193 "service:TouchDrawingManagerAiTest", 194 "service:TouchDrawingManagerTest", 195 "service:event_resample_test", 196 "service:mmi-service-tests", 197 "service/crown_transform_processor/test:CrownTransformProcessorTest", 198 "service/mouse_event_normalize/test:MouseEventNormalizeTest", 199 "service/subscriber/test:mmi_subscriber_tests", 200 "service/touch_event_normalize/test:TouchEventNormalizeTests", 201 "service/touch_event_normalize/test:TouchGestureAdapterTest", 202 "test/fuzztest:test", 203 "test/unittest/interfaces:InputNativeHotkeyTest", 204 "test/unittest/interfaces:InputNativeTest", 205 "tools/inject_event:InjectEventTest", 206 "util:UdsClientTest", 207 ] 208 209 if (input_feature_switch) { 210 deps += [ "frameworks/proxy:SwitchEventInputSubscribeManagerTest" ] 211 } 212 213 if (input_ext_feature_anco) { 214 deps += [ "${mmi_path}/frameworks/proxy/events/test:InputManagerAncoTest" ] 215 } 216 217 if (input_feature_touch_drawing) { 218 deps += [ 219 "service:TouchDrawingManagerAiTest", 220 "service:TouchDrawingManagerTest", 221 ] 222 } 223} 224 225group("examples_group") { 226 deps = [ "examples/input_device_display_bind:input_device_display_bind" ] 227} 228