• 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      "${device_status_root_path}/utils/json_parser/include",
48      "${device_status_root_path}/utils/custom_config/include"
49    ]
50
51    sources = [
52      "src/collaboration_service_status_change.cpp",
53      "src/display_change_event_listener.cpp",
54      "src/drag_data_manager.cpp",
55      "src/drag_drawing.cpp",
56      "src/drag_hisysevent.cpp",
57      "src/drag_manager.cpp",
58      "src/drag_smooth_processor.cpp",
59      "src/drag_vsync_station.cpp",
60      "src/event_hub.cpp",
61      "src/state_change_notify.cpp",
62    ]
63
64    if (device_status_pullthrow_enable) {
65      sources += ["src/pull_throw_listener.cpp"]
66    }
67
68    if (device_status_enable_internal_drop_animation) {
69      sources += ["src/drag_internal_animation_wrapper.cpp"]
70    }
71
72    defines = device_status_default_defines
73
74    public_configs = [ ":interaction_drag_public_config" ]
75
76    if (defined(use_rosen_drawing) && use_rosen_drawing) {
77      defines += [ "USE_ROSEN_DRAWING" ]
78    }
79
80    if (defined(input_ext_feature_magiccursor) &&
81        input_ext_feature_magiccursor) {
82      defines += [ "OHOS_BUILD_ENABLE_MAGICCURSOR" ]
83    }
84
85    deps = [
86      "${device_status_root_path}/etc/drag_icon:device_status_drag_icon",
87      "${device_status_root_path}/intention/prototype:intention_prototype",
88      "${device_status_root_path}/utils/ipc:devicestatus_ipc",
89      "${device_status_utils_path}:devicestatus_util",
90      "${device_status_root_path}/utils/custom_config:custom_config_parser",
91      "${device_status_root_path}/utils/json_parser:json_parser"
92    ]
93
94    external_deps = [
95      "ability_base:want",
96      "cJSON:cjson",
97      "c_utils:utils",
98      "common_event_service:cesfwk_innerkits",
99      "data_share:datashare_consumer",
100      "device_info_manager:distributed_device_profile_common",
101      "device_info_manager:distributed_device_profile_sdk",
102      "device_manager:devicemanagersdk",
103      "dsoftbus:softbus_client",
104      "eventhandler:libeventhandler",
105      "graphic_2d:libcomposer",
106      "graphic_2d:librender_service_base",
107      "graphic_2d:librender_service_client",
108      "graphic_2d:window_animation",
109      "graphic_2d:2d_graphics",
110      "hilog:libhilog",
111      "hisysevent:libhisysevent",
112      "hitrace:hitrace_meter",
113      "image_framework:image_native",
114      "init:libbegetutil",
115      "input:libmmi-client",
116      "ipc:ipc_single",
117      "libxml2:libxml2",
118      "qos_manager:concurrent_task_client",
119      "qos_manager:qos",
120      "samgr:samgr_proxy",
121      "udmf:udmf_client",
122      "window_manager:libdm",
123      "window_manager:libwm_lite",
124    ]
125
126    if (device_status_hisysevent_enable) {
127      external_deps += [ "hisysevent:libhisysevent" ]
128      defines += [ "MSDP_HIVIEWDFX_HISYSEVENT_ENABLE" ]
129    }
130
131    if (device_status_udmf_enabled) {
132      defines += [ "MSDP_FRAMEWORK_UDMF_ENABLED" ]
133      external_deps += [ "udmf:utd_client" ]
134    }
135
136    subsystem_name = "${device_status_subsystem_name}"
137    part_name = "${device_status_part_name}"
138  }
139
140  if (device_status_enable_universal_drag) {
141    ohos_shared_library("universal_drag_wrapper") {
142      sanitize = {
143        integer_overflow = true
144        ubsan = true
145        boundary_sanitize = true
146        cfi = true
147        cfi_cross_dso = true
148        debug = false
149      }
150
151      branch_protector_ret = "pac_ret"
152
153      include_dirs = [ "include" ]
154
155      sources = [ "src/universal_drag_wrapper.cpp" ]
156
157      defines = device_status_default_defines
158
159      public_configs = [ ":interaction_drag_public_config" ]
160
161      deps = [
162        "${device_status_root_path}/etc/drag_icon:device_status_drag_icon",
163        "${device_status_root_path}/intention/prototype:intention_prototype",
164        "${device_status_root_path}/utils/ipc:devicestatus_ipc",
165        "${device_status_utils_path}:devicestatus_util",
166      ]
167
168      external_deps = [
169        "graphic_2d:librender_service_client",
170        "input:libmmi-client",
171        "window_manager:libdm",
172      ]
173
174      subsystem_name = "${device_status_subsystem_name}"
175      part_name = "${device_status_part_name}"
176    }
177  }
178} else {
179  ohos_source_set("interaction_client_crossplatform") {
180    include_dirs = [
181      "//third_party/cJSON",
182      "${device_status_root_path}/interfaces/innerkits/interaction/include",
183      "${device_status_root_path}/intention/prototype/include",
184      "${device_status_root_path}/services/interaction/drag/include",
185      "${library_utils_path}/base/include",
186      "${plugins_media_path}/media/mock",
187      "${file_dfx_hilog_path}/interfaces/native/innerkits/include",
188      "${device_status_root_path}/utils/common",
189      "${device_status_root_path}/utils/common/include",
190      "${file_framework_root_path}/window_manager/dm/include",
191      "${file_framework_root_path}/window_manager/interfaces/innerkits/dm",
192      "${file_arkui_root_path}/ace_engine/frameworks",
193      "${file_framework_root_path}/window_manager/interfaces/innerkits/wm",
194      "${file_framework_root_path}/window_manager/utils/include",
195      "${file_arkui_root_path}/ace_engine",
196      "${file_arkui_root_path}/ace_engine/interfaces/inner_api/ace_kit/include",
197      "${foundation_graphic_path}/graphic_surface/interfaces/inner_api/surface",
198      "${device_status_root_path}/utils/json_parser/include",
199      "${device_status_root_path}/utils/custom_config/include",
200    ]
201
202    sources = [
203      "${device_status_root_path}/frameworks/native/interaction/src/interaction_manager.cpp",
204      "${device_status_root_path}/utils/common/src/animation_curve.cpp",
205      "${device_status_root_path}/utils/common/src/util.cpp",
206      "${device_status_root_path}/utils/common/src/utility.cpp",
207      "${device_status_root_path}/utils/custom_config/src/product_name_definition_parser.cpp",
208      "${device_status_root_path}/utils/custom_config/src/special_input_device_parser.cpp",
209      "${device_status_root_path}/utils/json_parser/src/json_parser.cpp",
210      "src/drag_data_manager.cpp",
211      "src/drag_drawing.cpp",
212      "src/drag_manager.cpp",
213    ]
214
215    defines = device_status_default_defines
216
217    if (target_os == "android") {
218      defines += [ "ANDROID_PLATFORM" ]
219      include_dirs += [
220        "${file_arkui_root_path}/ace_engine/adapter/android/entrance/java/jni",
221      ]
222    } else if (target_os == "ios") {
223      defines += [ "IOS_PLATFORM" ]
224      include_dirs +=
225          [ "${file_arkui_root_path}/ace_engine/adapter/ios/entrance" ]
226    }
227
228    public_configs = [ ":interaction_drag_public_config" ]
229
230    if (defined(use_rosen_drawing) && use_rosen_drawing) {
231      defines += [ "USE_ROSEN_DRAWING" ]
232    }
233
234    defines += [ "CROSS_PLATFORM" ]
235
236    deps = [
237      "${foundation_graphic_path}/graphic_2d/rosen/modules/render_service_client:librender_service_client_static",
238      "${foundation_input_path}/input/frameworks/proxy:libmmi-client-crossplatform",
239      "${foundation_media_path}/image_framework/interfaces/innerkits:image_native",
240      "//third_party/libxml2:static_libxml2",
241    ]
242
243    external_deps = [ "cJSON:cjson" ]
244
245    subsystem_name = "${device_status_subsystem_name}"
246    part_name = "${device_status_part_name}"
247  }
248}
249