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} else { 126 ohos_source_set("interaction_client_crossplatform") { 127 include_dirs = [ 128 "//third_party/cJSON", 129 "${device_status_root_path}/interfaces/innerkits/interaction/include", 130 "${device_status_root_path}/intention/prototype/include", 131 "${device_status_root_path}/services/interaction/drag/include", 132 "${library_utils_path}/base/include", 133 "${plugins_media_path}/media/mock", 134 "${file_dfx_hilog_path}/interfaces/native/innerkits/include", 135 "${device_status_root_path}/utils/common", 136 "${device_status_root_path}/utils/common/include", 137 "${file_framework_root_path}/window_manager/dm/include", 138 "${file_framework_root_path}/window_manager/interfaces/innerkits/dm", 139 "${file_arkui_root_path}/ace_engine/frameworks", 140 "${file_framework_root_path}/window_manager/interfaces/innerkits/wm", 141 "${file_framework_root_path}/window_manager/utils/include", 142 "${file_arkui_root_path}/ace_engine", 143 "${foundation_graphic_path}/graphic_surface/interfaces/inner_api/surface", 144 ] 145 146 sources = [ 147 "${device_status_root_path}/frameworks/native/interaction/src/interaction_manager.cpp", 148 "${device_status_root_path}/utils/common/src/animation_curve.cpp", 149 "${device_status_root_path}/utils/common/src/util.cpp", 150 "${device_status_root_path}/utils/common/src/utility.cpp", 151 "src/drag_data_manager.cpp", 152 "src/drag_drawing.cpp", 153 "src/drag_manager.cpp", 154 ] 155 156 defines = device_status_default_defines 157 158 if (target_os == "android") { 159 defines += [ "ANDROID_PLATFORM" ] 160 include_dirs += [ 161 "${file_arkui_root_path}/ace_engine/adapter/android/entrance/java/jni", 162 ] 163 } else if (target_os == "ios") { 164 defines += [ "IOS_PLATFORM" ] 165 include_dirs += 166 [ "${file_arkui_root_path}/ace_engine/adapter/ios/entrance" ] 167 } 168 169 public_configs = [ ":interaction_drag_public_config" ] 170 171 if (defined(use_rosen_drawing) && use_rosen_drawing) { 172 defines += [ "USE_ROSEN_DRAWING" ] 173 } 174 175 deps = [ 176 "${foundation_graphic_path}/graphic_2d/rosen/modules/render_service_client:librender_service_client_static", 177 "${foundation_input_path}/input/frameworks/proxy:libmmi-client-crossplatform", 178 "${foundation_media_path}/image_framework/interfaces/innerkits:image_native", 179 "//third_party/libxml2:static_libxml2", 180 ] 181 182 external_deps = [ "cJSON:cjson" ] 183 184 subsystem_name = "${device_status_subsystem_name}" 185 part_name = "${device_status_part_name}" 186 } 187} 188