• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "host/include",
20    "${window_base_path}/window_scene",
21    "${window_base_path}/window_scene/intention_event/service/anr_manager/include",
22    "${window_base_path}/window_scene/intention_event/framework/anr_handler/include",
23    "${window_base_path}/window_scene/intention_event/utils/include",
24    "${window_base_path}/interfaces/innerkits/dm",
25    "${window_base_path}/wm/include/zidl",
26
27    # for window_manager_hilog
28    "${window_base_path}/utils/include",
29    "${window_base_path}/window_scene/common/include",
30
31    # for WMError Code
32    "${window_base_path}/interfaces/innerkits/wm",
33  ]
34}
35
36ohos_shared_library("scene_session") {
37  branch_protector_ret = "pac_ret"
38  sanitize = {
39    cfi = true
40    cfi_cross_dso = true
41    cfi_vcall_icall_only = true
42    debug = false
43  }
44  sources = [
45    "container/src/window_event_channel.cpp",
46    "container/src/zidl/session_stage_proxy.cpp",
47    "container/src/zidl/session_stage_stub.cpp",
48    "container/src/zidl/window_event_channel_proxy.cpp",
49    "container/src/zidl/window_event_channel_stub.cpp",
50    "host/src/ability_info_manager.cpp",
51    "host/src/extension_session.cpp",
52    "host/src/keyboard_session.cpp",
53    "host/src/main_session.cpp",
54    "host/src/move_drag_controller.cpp",
55    "host/src/multi_instance_manager.cpp",
56    "host/src/pc_fold_screen_controller.cpp",
57    "host/src/pc_fold_screen_manager.cpp",
58    "host/src/root_scene_session.cpp",
59    "host/src/scb_system_session.cpp",
60    "host/src/scene_persistence.cpp",
61    "host/src/scene_persistent_storage.cpp",
62    "host/src/scene_session.cpp",
63    "host/src/session.cpp",
64    "host/src/sub_session.cpp",
65    "host/src/system_session.cpp",
66    "host/src/ui_extension/host_data_handler.cpp",
67    "host/src/ws_ffrt_helper.cpp",
68    "host/src/zidl/session_proxy.cpp",
69    "host/src/zidl/session_stub.cpp",
70  ]
71
72  public_configs = [ ":session_public_config" ]
73
74  deps = [
75    "${window_base_path}/dm:libdm",
76    "${window_base_path}/utils:libwmutil",
77    "${window_base_path}/utils:libwmutil_base",
78    "${window_base_path}/window_scene/common:window_scene_common",
79    "${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager",
80    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
81    "${window_base_path}/window_scene/screen_session_manager_client:screen_session_manager_client",
82    "${window_base_path}/window_scene/session:screen_session",
83  ]
84
85  external_deps = [
86    "ability_runtime:ability_manager",
87    "ability_runtime:ability_start_setting",
88    "ability_runtime:app_context",
89    "ability_runtime:process_options",
90    "ability_runtime:start_window_option",
91    "bundle_framework:appexecfwk_base",
92    "bundle_framework:appexecfwk_core",
93    "bundle_framework:libappexecfwk_common",
94    "c_utils:utils",
95    "eventhandler:libeventhandler",
96    "ffrt:libffrt",
97    "graphic_2d:librender_service_base",
98    "graphic_2d:librender_service_client",
99    "graphic_2d:window_animation",
100    "hilog:libhilog",
101    "hisysevent:libhisysevent",
102    "hitrace:hitrace_meter",
103    "image_framework:image_native",
104    "init:libbegetutil",
105    "input:libmmi-client",
106    "ipc:ipc_single",
107    "samgr:samgr_proxy",
108  ]
109  if (!(host_os == "linux" && host_cpu == "arm64")) {
110    external_deps += [ "preferences:native_preferences" ]
111  }
112  public_external_deps = [
113    "ability_base:base",
114    "ability_base:session_info",
115    "ability_base:want",
116    "accessibility:accessibility_common",
117    "accessibility:accessibility_interface",
118    "input:libmmi-napi",
119  ]
120  defines = []
121
122  if (defined(global_parts_info) &&
123      defined(global_parts_info.barrierfree_accessibility)) {
124    external_deps += [ "accessibility:accessibility_common" ]
125  }
126
127  if (defined(global_parts_info) &&
128      defined(global_parts_info.powermgr_power_manager)) {
129    external_deps += [ "power_manager:powermgr_client" ]
130    defines += [ "POWER_MANAGER_ENABLE" ]
131  }
132
133  if (defined(global_parts_info) &&
134      defined(global_parts_info.resourceschedule_resource_schedule_service)) {
135    external_deps += [ "resource_schedule_service:ressched_client" ]
136    defines += [ "RES_SCHED_ENABLE" ]
137  }
138
139  if (device_status_enable) {
140    external_deps += [ "device_status:devicestatus_client" ]
141    defines += [ "DEVICE_STATUS_ENABLE" ]
142  }
143
144  if (!defined(global_parts_info) ||
145      defined(global_parts_info.inputmethod_imf)) {
146    imf_enable = true
147  } else {
148    imf_enable = false
149  }
150  print("imf_enable: ", imf_enable)
151  if (imf_enable == true) {
152    external_deps += [ "imf:inputmethod_client" ]
153    defines += [ "IMF_ENABLE" ]
154  }
155
156  if (build_variant == "root") {
157    defines += [ "ACCESSIBILITY_DUMP_FOR_TEST" ]
158  }
159
160  innerapi_tags = [ "platformsdk" ]
161  part_name = "window_manager"
162  subsystem_name = "window"
163
164  if (build_variant == "user") {
165    defines += [ "IS_RELEASE_VERSION" ]
166  }
167}
168
169ohos_shared_library("screen_session") {
170  branch_protector_ret = "pac_ret"
171  sanitize = {
172    cfi = true
173    cfi_cross_dso = true
174    cfi_vcall_icall_only = true
175    debug = false
176  }
177  sources = [
178    "screen/src/screen_property.cpp",
179    "screen/src/screen_session.cpp",
180  ]
181
182  public_configs = [ ":session_public_config" ]
183
184  deps = [
185    "${window_base_path}/utils:libwmutil",
186    "${window_base_path}/utils:libwmutil_base",
187  ]
188
189  external_deps = [
190    "c_utils:utils",
191    "graphic_2d:librender_service_base",
192    "graphic_2d:librender_service_client",
193    "hicollie:libhicollie",
194    "hilog:libhilog",
195    "hisysevent:libhisysevent",
196    "hitrace:hitrace_meter",
197    "init:libbegetutil",
198    "ipc:ipc_single",
199  ]
200  public_external_deps = [
201    "ability_base:base",
202    "ability_base:want",
203    "accessibility:accessibility_common",
204    "input:libmmi-napi",
205  ]
206
207  defines = []
208  if (window_manager_feature_screen_color_gamut) {
209    defines += [ "WM_SCREEN_COLOR_GAMUT_ENABLE" ]
210  }
211
212  if (window_manager_feature_screen_hdr_format) {
213    defines += [ "WM_SCREEN_HDR_FORMAT_ENABLE" ]
214  }
215
216  if (window_manager_feature_screen_color_space) {
217    defines += [ "WM_SCREEN_COLOR_SPACE_ENABLE" ]
218  }
219
220  innerapi_tags = [ "platformsdk" ]
221  part_name = "window_manager"
222  subsystem_name = "window"
223}
224