1f857971dSopenharmony_ci# Copyright (c) 2023-2024 Huawei Device Co., Ltd. 2f857971dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3f857971dSopenharmony_ci# you may not use this file except in compliance with the License. 4f857971dSopenharmony_ci# You may obtain a copy of the License at 5f857971dSopenharmony_ci# 6f857971dSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7f857971dSopenharmony_ci# 8f857971dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9f857971dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10f857971dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11f857971dSopenharmony_ci# See the License for the specific language governing permissions and 12f857971dSopenharmony_ci# limitations under the License. 13f857971dSopenharmony_ci 14f857971dSopenharmony_ciimport("//build/config/components/multimodalinput/cursor_config.gni") 15f857971dSopenharmony_ciimport("//build/ohos.gni") 16f857971dSopenharmony_ciimport("../../../device_status.gni") 17f857971dSopenharmony_ci 18f857971dSopenharmony_ciconfig("interaction_drag_public_config") { 19f857971dSopenharmony_ci include_dirs = [ "include" ] 20f857971dSopenharmony_ci 21f857971dSopenharmony_ci if (is_arkui_x) { 22f857971dSopenharmony_ci include_dirs += 23f857971dSopenharmony_ci [ "${device_status_interfaces_path}/innerkits/interaction/include" ] 24f857971dSopenharmony_ci } 25f857971dSopenharmony_ci} 26f857971dSopenharmony_ci 27f857971dSopenharmony_ciif (!is_arkui_x) { 28f857971dSopenharmony_ci ohos_shared_library("interaction_drag") { 29f857971dSopenharmony_ci sanitize = { 30f857971dSopenharmony_ci integer_overflow = true 31f857971dSopenharmony_ci ubsan = true 32f857971dSopenharmony_ci boundary_sanitize = true 33f857971dSopenharmony_ci cfi = true 34f857971dSopenharmony_ci cfi_cross_dso = true 35f857971dSopenharmony_ci debug = false 36f857971dSopenharmony_ci } 37f857971dSopenharmony_ci 38f857971dSopenharmony_ci branch_protector_ret = "pac_ret" 39f857971dSopenharmony_ci 40f857971dSopenharmony_ci include_dirs = [ 41f857971dSopenharmony_ci "include", 42f857971dSopenharmony_ci "${device_status_interfaces_path}/innerkits/interaction/include", 43f857971dSopenharmony_ci "${device_status_utils_path}/include", 44f857971dSopenharmony_ci "${device_status_service_path}/context/include", 45f857971dSopenharmony_ci "${device_status_service_path}/interaction/drag/include", 46f857971dSopenharmony_ci "${device_status_service_path}/native/include", 47f857971dSopenharmony_ci ] 48f857971dSopenharmony_ci 49f857971dSopenharmony_ci sources = [ 50f857971dSopenharmony_ci "src/collaboration_service_status_change.cpp", 51f857971dSopenharmony_ci "src/display_change_event_listener.cpp", 52f857971dSopenharmony_ci "src/drag_data_manager.cpp", 53f857971dSopenharmony_ci "src/drag_drawing.cpp", 54f857971dSopenharmony_ci "src/drag_hisysevent.cpp", 55f857971dSopenharmony_ci "src/drag_manager.cpp", 56f857971dSopenharmony_ci "src/drag_smooth_processor.cpp", 57f857971dSopenharmony_ci "src/drag_vsync_station.cpp", 58f857971dSopenharmony_ci "src/event_hub.cpp", 59f857971dSopenharmony_ci "src/state_change_notify.cpp", 60f857971dSopenharmony_ci ] 61f857971dSopenharmony_ci 62f857971dSopenharmony_ci defines = device_status_default_defines 63f857971dSopenharmony_ci 64f857971dSopenharmony_ci public_configs = [ ":interaction_drag_public_config" ] 65f857971dSopenharmony_ci 66f857971dSopenharmony_ci if (defined(use_rosen_drawing) && use_rosen_drawing) { 67f857971dSopenharmony_ci defines += [ "USE_ROSEN_DRAWING" ] 68f857971dSopenharmony_ci } 69f857971dSopenharmony_ci 70f857971dSopenharmony_ci if (defined(input_ext_feature_magiccursor) && 71f857971dSopenharmony_ci input_ext_feature_magiccursor) { 72f857971dSopenharmony_ci defines += [ "OHOS_BUILD_ENABLE_MAGICCURSOR" ] 73f857971dSopenharmony_ci } 74f857971dSopenharmony_ci 75f857971dSopenharmony_ci deps = [ 76f857971dSopenharmony_ci "${device_status_root_path}/etc/drag_icon:device_status_drag_icon", 77f857971dSopenharmony_ci "${device_status_root_path}/intention/prototype:intention_prototype", 78f857971dSopenharmony_ci "${device_status_root_path}/utils/ipc:devicestatus_ipc", 79f857971dSopenharmony_ci "${device_status_utils_path}:devicestatus_util", 80f857971dSopenharmony_ci ] 81f857971dSopenharmony_ci 82f857971dSopenharmony_ci external_deps = [ 83f857971dSopenharmony_ci "ability_base:want", 84f857971dSopenharmony_ci "cJSON:cjson", 85f857971dSopenharmony_ci "c_utils:utils", 86f857971dSopenharmony_ci "common_event_service:cesfwk_innerkits", 87f857971dSopenharmony_ci "device_info_manager:distributed_device_profile_common", 88f857971dSopenharmony_ci "device_info_manager:distributed_device_profile_sdk", 89f857971dSopenharmony_ci "device_manager:devicemanagersdk", 90f857971dSopenharmony_ci "dsoftbus:softbus_client", 91f857971dSopenharmony_ci "eventhandler:libeventhandler", 92f857971dSopenharmony_ci "graphic_2d:libcomposer", 93f857971dSopenharmony_ci "graphic_2d:librender_service_base", 94f857971dSopenharmony_ci "graphic_2d:librender_service_client", 95f857971dSopenharmony_ci "graphic_2d:window_animation", 96f857971dSopenharmony_ci "hilog:libhilog", 97f857971dSopenharmony_ci "hisysevent:libhisysevent", 98f857971dSopenharmony_ci "hitrace:hitrace_meter", 99f857971dSopenharmony_ci "image_framework:image_native", 100f857971dSopenharmony_ci "init:libbegetutil", 101f857971dSopenharmony_ci "input:libmmi-client", 102f857971dSopenharmony_ci "ipc:ipc_single", 103f857971dSopenharmony_ci "libxml2:libxml2", 104f857971dSopenharmony_ci "qos_manager:concurrent_task_client", 105f857971dSopenharmony_ci "qos_manager:qos", 106f857971dSopenharmony_ci "samgr:samgr_proxy", 107f857971dSopenharmony_ci "udmf:udmf_client", 108f857971dSopenharmony_ci "window_manager:libdm", 109f857971dSopenharmony_ci "window_manager:libwm_lite", 110f857971dSopenharmony_ci ] 111f857971dSopenharmony_ci 112f857971dSopenharmony_ci if (device_status_hisysevent_enable) { 113f857971dSopenharmony_ci external_deps += [ "hisysevent:libhisysevent" ] 114f857971dSopenharmony_ci defines += [ "MSDP_HIVIEWDFX_HISYSEVENT_ENABLE" ] 115f857971dSopenharmony_ci } 116f857971dSopenharmony_ci 117f857971dSopenharmony_ci if (device_status_udmf_enabled) { 118f857971dSopenharmony_ci defines += [ "MSDP_FRAMEWORK_UDMF_ENABLED" ] 119f857971dSopenharmony_ci external_deps += [ "udmf:utd_client" ] 120f857971dSopenharmony_ci } 121f857971dSopenharmony_ci 122f857971dSopenharmony_ci subsystem_name = "${device_status_subsystem_name}" 123f857971dSopenharmony_ci part_name = "${device_status_part_name}" 124f857971dSopenharmony_ci } 125f857971dSopenharmony_ci} else { 126f857971dSopenharmony_ci ohos_source_set("interaction_client_crossplatform") { 127f857971dSopenharmony_ci include_dirs = [ 128f857971dSopenharmony_ci "//third_party/cJSON", 129f857971dSopenharmony_ci "${device_status_root_path}/interfaces/innerkits/interaction/include", 130f857971dSopenharmony_ci "${device_status_root_path}/intention/prototype/include", 131f857971dSopenharmony_ci "${device_status_root_path}/services/interaction/drag/include", 132f857971dSopenharmony_ci "${library_utils_path}/base/include", 133f857971dSopenharmony_ci "${plugins_media_path}/media/mock", 134f857971dSopenharmony_ci "${file_dfx_hilog_path}/interfaces/native/innerkits/include", 135f857971dSopenharmony_ci "${device_status_root_path}/utils/common", 136f857971dSopenharmony_ci "${device_status_root_path}/utils/common/include", 137f857971dSopenharmony_ci "${file_framework_root_path}/window_manager/dm/include", 138f857971dSopenharmony_ci "${file_framework_root_path}/window_manager/interfaces/innerkits/dm", 139f857971dSopenharmony_ci "${file_arkui_root_path}/ace_engine/frameworks", 140f857971dSopenharmony_ci "${file_framework_root_path}/window_manager/interfaces/innerkits/wm", 141f857971dSopenharmony_ci "${file_framework_root_path}/window_manager/utils/include", 142f857971dSopenharmony_ci "${file_arkui_root_path}/ace_engine", 143f857971dSopenharmony_ci "${foundation_graphic_path}/graphic_surface/interfaces/inner_api/surface", 144f857971dSopenharmony_ci ] 145f857971dSopenharmony_ci 146f857971dSopenharmony_ci sources = [ 147f857971dSopenharmony_ci "${device_status_root_path}/frameworks/native/interaction/src/interaction_manager.cpp", 148f857971dSopenharmony_ci "${device_status_root_path}/utils/common/src/animation_curve.cpp", 149f857971dSopenharmony_ci "${device_status_root_path}/utils/common/src/util.cpp", 150f857971dSopenharmony_ci "${device_status_root_path}/utils/common/src/utility.cpp", 151f857971dSopenharmony_ci "src/drag_data_manager.cpp", 152f857971dSopenharmony_ci "src/drag_drawing.cpp", 153f857971dSopenharmony_ci "src/drag_manager.cpp", 154f857971dSopenharmony_ci ] 155f857971dSopenharmony_ci 156f857971dSopenharmony_ci defines = device_status_default_defines 157f857971dSopenharmony_ci 158f857971dSopenharmony_ci if (target_os == "android") { 159f857971dSopenharmony_ci defines += [ "ANDROID_PLATFORM" ] 160f857971dSopenharmony_ci include_dirs += [ 161f857971dSopenharmony_ci "${file_arkui_root_path}/ace_engine/adapter/android/entrance/java/jni", 162f857971dSopenharmony_ci ] 163f857971dSopenharmony_ci } else if (target_os == "ios") { 164f857971dSopenharmony_ci defines += [ "IOS_PLATFORM" ] 165f857971dSopenharmony_ci include_dirs += 166f857971dSopenharmony_ci [ "${file_arkui_root_path}/ace_engine/adapter/ios/entrance" ] 167f857971dSopenharmony_ci } 168f857971dSopenharmony_ci 169f857971dSopenharmony_ci public_configs = [ ":interaction_drag_public_config" ] 170f857971dSopenharmony_ci 171f857971dSopenharmony_ci if (defined(use_rosen_drawing) && use_rosen_drawing) { 172f857971dSopenharmony_ci defines += [ "USE_ROSEN_DRAWING" ] 173f857971dSopenharmony_ci } 174f857971dSopenharmony_ci 175f857971dSopenharmony_ci deps = [ 176f857971dSopenharmony_ci "${foundation_graphic_path}/graphic_2d/rosen/modules/render_service_client:librender_service_client_static", 177f857971dSopenharmony_ci "${foundation_input_path}/input/frameworks/proxy:libmmi-client-crossplatform", 178f857971dSopenharmony_ci "${foundation_media_path}/image_framework/interfaces/innerkits:image_native", 179f857971dSopenharmony_ci "//third_party/libxml2:static_libxml2", 180f857971dSopenharmony_ci ] 181f857971dSopenharmony_ci 182f857971dSopenharmony_ci external_deps = [ "cJSON:cjson" ] 183f857971dSopenharmony_ci 184f857971dSopenharmony_ci subsystem_name = "${device_status_subsystem_name}" 185f857971dSopenharmony_ci part_name = "${device_status_part_name}" 186f857971dSopenharmony_ci } 187f857971dSopenharmony_ci} 188