1# Copyright (c) 2023 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("../../windowmanager_aafwk.gni") 16 17config("session_public_config") { 18 include_dirs = [ 19 "${window_base_path}/window_scene", 20 "${window_base_path}/window_scene/intention_event/service/anr_manager/include", 21 "${window_base_path}/window_scene/intention_event/framework/anr_handler/include", 22 "${window_base_path}/window_scene/intention_event/utils/include", 23 "${window_base_path}/interfaces/innerkits/dm", 24 25 # for window_manager_hilog 26 "${window_base_path}/utils/include", 27 "${window_base_path}/window_scene/common/include", 28 29 # for WMError Code 30 "${window_base_path}/interfaces/innerkits/wm", 31 32 # for mouse style 33 "${multimodalinput_path}/input/util/common/include", 34 35 #for element 36 "${accessibility_path}/common/interface/include/parcel", 37 "${accessibility_path}/interfaces/innerkits/common/include", 38 ] 39} 40 41ohos_shared_library("scene_session") { 42 branch_protector_ret = "pac_ret" 43 sanitize = { 44 cfi = true 45 cfi_cross_dso = true 46 debug = false 47 } 48 sources = [ 49 "container/src/window_event_channel.cpp", 50 "container/src/zidl/session_stage_proxy.cpp", 51 "container/src/zidl/session_stage_stub.cpp", 52 "container/src/zidl/window_event_channel_proxy.cpp", 53 "container/src/zidl/window_event_channel_stub.cpp", 54 "host/src/extension_session.cpp", 55 "host/src/main_session.cpp", 56 "host/src/move_drag_controller.cpp", 57 "host/src/root_scene_session.cpp", 58 "host/src/scb_system_session.cpp", 59 "host/src/scene_persistence.cpp", 60 "host/src/scene_persistent_storage.cpp", 61 "host/src/scene_session.cpp", 62 "host/src/session.cpp", 63 "host/src/sub_session.cpp", 64 "host/src/system_session.cpp", 65 "host/src/zidl/session_proxy.cpp", 66 "host/src/zidl/session_stub.cpp", 67 ] 68 69 public_configs = [ ":session_public_config" ] 70 71 deps = [ 72 "${window_base_path}/dm:libdm", 73 "${window_base_path}/utils:libwmutil", 74 "${window_base_path}/window_scene/common:window_scene_common", 75 "${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager", 76 ] 77 78 public_deps = 79 [ "${window_base_path}/window_scene/interfaces/innerkits:libwsutils" ] 80 81 external_deps = [ 82 "ability_base:base", 83 "ability_base:session_info", 84 "ability_base:want", 85 "ability_runtime:ability_start_setting", 86 "accessibility:accessibility_interface", 87 "c_utils:utils", 88 "eventhandler:libeventhandler", 89 "graphic_2d:librender_service_client", 90 "hilog:libhilog", 91 "hisysevent:libhisysevent", 92 "hitrace:hitrace_meter", 93 "image_framework:image_native", 94 "init:libbegetutil", 95 "input:libmmi-client", 96 "ipc:ipc_single", 97 "preferences:native_preferences", 98 ] 99 100 defines = [] 101 102 if (defined(global_parts_info) && 103 defined(global_parts_info.barrierfree_accessibility)) { 104 external_deps += [ "accessibility:accessibility_common" ] 105 } 106 107 if (defined(global_parts_info) && 108 defined(global_parts_info.powermgr_power_manager)) { 109 external_deps += [ "power_manager:powermgr_client" ] 110 defines += [ "POWER_MANAGER_ENABLE" ] 111 } 112 113 if (defined(global_parts_info) && 114 defined(global_parts_info.resourceschedule_soc_perf)) { 115 external_deps += [ "soc_perf:socperf_client" ] 116 defines += [ "SOC_PERF_ENABLE" ] 117 } 118 119 if (!defined(global_parts_info) || 120 defined(global_parts_info.inputmethod_imf)) { 121 imf_enable = true 122 } else { 123 imf_enable = false 124 } 125 print("imf_enable: ", imf_enable) 126 if (imf_enable == true) { 127 external_deps += [ "imf:inputmethod_client" ] 128 defines += [ "IMF_ENABLE" ] 129 } 130 131 innerapi_tags = [ "platformsdk" ] 132 part_name = "window_manager" 133 subsystem_name = "window" 134} 135 136ohos_shared_library("screen_session") { 137 branch_protector_ret = "pac_ret" 138 sanitize = { 139 cfi = true 140 cfi_cross_dso = true 141 debug = false 142 } 143 sources = [ 144 "screen/src/screen_property.cpp", 145 "screen/src/screen_session.cpp", 146 ] 147 148 public_configs = [ ":session_public_config" ] 149 150 deps = [ "${window_base_path}/utils:libwmutil" ] 151 152 external_deps = [ 153 "c_utils:utils", 154 "graphic_2d:librender_service_client", 155 "hilog:libhilog", 156 "hitrace:hitrace_meter", 157 "init:libbegetutil", 158 ] 159 160 innerapi_tags = [ "platformsdk" ] 161 part_name = "window_manager" 162 subsystem_name = "window" 163} 164