1# Copyright (c) 2021-2022 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("//foundation/multimodalinput/input/multimodalinput_mini.gni") 16event_filter_path = "${mmi_path}/service/filter" 17 18config("mmi_event_filter_config") { 19 include_dirs = [ 20 "//foundation/multimodalinput/input/interfaces/native/innerkits/common/include", 21 "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", 22 "//foundation/multimodalinput/input/service/event_handler/include", 23 "//foundation/multimodalinput/input/util/common/include", 24 "${event_filter_path}/include", 25 ] 26} 27 28ohos_source_set("mmi_event_filter_service") { 29 part_name = "input" 30 subsystem_name = "multimodalinput" 31 sources = [ 32 "${event_filter_path}/src/event_filter_service.cpp", 33 "${event_filter_path}/src/event_filter_stub.cpp", 34 ] 35 36 configs = [ ":mmi_event_filter_config" ] 37 38 external_deps = [ 39 "hiviewdfx_hilog_native:libhilog", 40 "ipc:ipc_core", 41 "safwk:system_ability_fwk", 42 ] 43} 44 45ohos_source_set("mmi_event_filter_proxy") { 46 part_name = "input" 47 subsystem_name = "multimodalinput" 48 sources = [ 49 "${event_filter_path}/src/event_filter_death_recipient.cpp", 50 "${event_filter_path}/src/event_filter_handler.cpp", 51 "${event_filter_path}/src/event_filter_proxy.cpp", 52 ] 53 54 configs = [ ":mmi_event_filter_config" ] 55 56 defines = [] 57 58 if (input_feature_keyboard) { 59 defines += [ "OHOS_BUILD_ENABLE_KEYBOARD" ] 60 } 61 if (input_feature_touchscreen) { 62 defines += [ "OHOS_BUILD_ENABLE_TOUCH" ] 63 } 64 if (input_feature_mouse) { 65 defines += [ "OHOS_BUILD_ENABLE_POINTER" ] 66 } 67 if (input_feature_touchscreen) { 68 defines += [ "OHOS_BUILD_ENABLE_TOUCH" ] 69 } 70 71 external_deps = [ 72 "hiviewdfx_hilog_native:libhilog", 73 "ipc:ipc_core", 74 "safwk:system_ability_fwk", 75 ] 76} 77