• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-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/config/components/multimodalinput/cursor_config.gni")
15import("//build/ohos.gni")
16import("../../../device_status.gni")
17
18config("interaction_drag_public_config") {
19  include_dirs = [ "include" ]
20
21  if (is_arkui_x) {
22    include_dirs +=
23        [ "${device_status_interfaces_path}/innerkits/interaction/include" ]
24  }
25}
26
27if (!is_arkui_x) {
28  ohos_shared_library("interaction_drag") {
29    sanitize = {
30      integer_overflow = true
31      ubsan = true
32      boundary_sanitize = true
33      cfi = true
34      cfi_cross_dso = true
35      debug = false
36    }
37
38    branch_protector_ret = "pac_ret"
39
40    include_dirs = [
41      "include",
42      "${device_status_interfaces_path}/innerkits/interaction/include",
43      "${device_status_utils_path}/include",
44      "${device_status_service_path}/context/include",
45      "${device_status_service_path}/interaction/drag/include",
46      "${device_status_service_path}/native/include",
47    ]
48
49    sources = [
50      "src/collaboration_service_status_change.cpp",
51      "src/display_change_event_listener.cpp",
52      "src/drag_data_manager.cpp",
53      "src/drag_drawing.cpp",
54      "src/drag_hisysevent.cpp",
55      "src/drag_manager.cpp",
56      "src/drag_smooth_processor.cpp",
57      "src/drag_vsync_station.cpp",
58      "src/event_hub.cpp",
59      "src/state_change_notify.cpp",
60    ]
61
62    defines = device_status_default_defines
63
64    public_configs = [ ":interaction_drag_public_config" ]
65
66    if (defined(use_rosen_drawing) && use_rosen_drawing) {
67      defines += [ "USE_ROSEN_DRAWING" ]
68    }
69
70    if (defined(input_ext_feature_magiccursor) &&
71        input_ext_feature_magiccursor) {
72      defines += [ "OHOS_BUILD_ENABLE_MAGICCURSOR" ]
73    }
74
75    deps = [
76      "${device_status_root_path}/etc/drag_icon:device_status_drag_icon",
77      "${device_status_root_path}/intention/prototype:intention_prototype",
78      "${device_status_root_path}/utils/ipc:devicestatus_ipc",
79      "${device_status_utils_path}:devicestatus_util",
80    ]
81
82    external_deps = [
83      "ability_base:want",
84      "cJSON:cjson",
85      "c_utils:utils",
86      "common_event_service:cesfwk_innerkits",
87      "device_info_manager:distributed_device_profile_common",
88      "device_info_manager:distributed_device_profile_sdk",
89      "device_manager:devicemanagersdk",
90      "dsoftbus:softbus_client",
91      "eventhandler:libeventhandler",
92      "graphic_2d:libcomposer",
93      "graphic_2d:librender_service_base",
94      "graphic_2d:librender_service_client",
95      "graphic_2d:window_animation",
96      "hilog:libhilog",
97      "hisysevent:libhisysevent",
98      "hitrace:hitrace_meter",
99      "image_framework:image_native",
100      "init:libbegetutil",
101      "input:libmmi-client",
102      "ipc:ipc_single",
103      "libxml2:libxml2",
104      "qos_manager:concurrent_task_client",
105      "qos_manager:qos",
106      "samgr:samgr_proxy",
107      "udmf:udmf_client",
108      "window_manager:libdm",
109      "window_manager:libwm_lite",
110    ]
111
112    if (device_status_hisysevent_enable) {
113      external_deps += [ "hisysevent:libhisysevent" ]
114      defines += [ "MSDP_HIVIEWDFX_HISYSEVENT_ENABLE" ]
115    }
116
117    if (device_status_udmf_enabled) {
118      defines += [ "MSDP_FRAMEWORK_UDMF_ENABLED" ]
119      external_deps += [ "udmf:utd_client" ]
120    }
121
122    subsystem_name = "${device_status_subsystem_name}"
123    part_name = "${device_status_part_name}"
124  }
125  if (device_status_enable_universal_drag) {
126    ohos_shared_library("universal_drag_wrapper") {
127      sanitize = {
128        integer_overflow = true
129        ubsan = true
130        boundary_sanitize = true
131        cfi = true
132        cfi_cross_dso = true
133        debug = false
134      }
135
136      branch_protector_ret = "pac_ret"
137
138      include_dirs = [ "include" ]
139
140      sources = [ "src/universal_drag_wrapper.cpp" ]
141
142      defines = device_status_default_defines
143
144      public_configs = [ ":interaction_drag_public_config" ]
145
146      deps = [
147        "${device_status_root_path}/etc/drag_icon:device_status_drag_icon",
148        "${device_status_root_path}/intention/prototype:intention_prototype",
149        "${device_status_root_path}/utils/ipc:devicestatus_ipc",
150        "${device_status_utils_path}:devicestatus_util",
151      ]
152
153      external_deps = [
154        "graphic_2d:librender_service_client",
155        "input:libmmi-client",
156        "window_manager:libdm",
157      ]
158
159      subsystem_name = "${device_status_subsystem_name}"
160      part_name = "${device_status_part_name}"
161    }
162  }
163} else {
164  ohos_source_set("interaction_client_crossplatform") {
165    include_dirs = [
166      "//third_party/cJSON",
167      "${device_status_root_path}/interfaces/innerkits/interaction/include",
168      "${device_status_root_path}/intention/prototype/include",
169      "${device_status_root_path}/services/interaction/drag/include",
170      "${library_utils_path}/base/include",
171      "${plugins_media_path}/media/mock",
172      "${file_dfx_hilog_path}/interfaces/native/innerkits/include",
173      "${device_status_root_path}/utils/common",
174      "${device_status_root_path}/utils/common/include",
175      "${file_framework_root_path}/window_manager/dm/include",
176      "${file_framework_root_path}/window_manager/interfaces/innerkits/dm",
177      "${file_arkui_root_path}/ace_engine/frameworks",
178      "${file_framework_root_path}/window_manager/interfaces/innerkits/wm",
179      "${file_framework_root_path}/window_manager/utils/include",
180      "${file_arkui_root_path}/ace_engine",
181      "${file_arkui_root_path}/ace_engine/interfaces/inner_api/ace_kit/include",
182      "${foundation_graphic_path}/graphic_surface/interfaces/inner_api/surface",
183    ]
184
185    sources = [
186      "${device_status_root_path}/frameworks/native/interaction/src/interaction_manager.cpp",
187      "${device_status_root_path}/utils/common/src/animation_curve.cpp",
188      "${device_status_root_path}/utils/common/src/util.cpp",
189      "${device_status_root_path}/utils/common/src/utility.cpp",
190      "src/drag_data_manager.cpp",
191      "src/drag_drawing.cpp",
192      "src/drag_manager.cpp",
193    ]
194
195    defines = device_status_default_defines
196
197    if (target_os == "android") {
198      defines += [ "ANDROID_PLATFORM" ]
199      include_dirs += [
200        "${file_arkui_root_path}/ace_engine/adapter/android/entrance/java/jni",
201      ]
202    } else if (target_os == "ios") {
203      defines += [ "IOS_PLATFORM" ]
204      include_dirs +=
205          [ "${file_arkui_root_path}/ace_engine/adapter/ios/entrance" ]
206    }
207
208    public_configs = [ ":interaction_drag_public_config" ]
209
210    if (defined(use_rosen_drawing) && use_rosen_drawing) {
211      defines += [ "USE_ROSEN_DRAWING" ]
212    }
213
214    deps = [
215      "${foundation_graphic_path}/graphic_2d/rosen/modules/render_service_client:librender_service_client_static",
216      "${foundation_input_path}/input/frameworks/proxy:libmmi-client-crossplatform",
217      "${foundation_media_path}/image_framework/interfaces/innerkits:image_native",
218      "//third_party/libxml2:static_libxml2",
219    ]
220
221    external_deps = [ "cJSON:cjson" ]
222
223    subsystem_name = "${device_status_subsystem_name}"
224    part_name = "${device_status_part_name}"
225  }
226}
227