• 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  cflags = []
36  defines = []
37  if (window_manager_feature_asbng_path_enable) {
38    defines += [ "WINDOW_ATOMIC_SERVICE_ATTRIBUTION_ENABLE" ]
39    cflags += [ "-DACE_ENGINE_PLUGIN_PATH=\"${window_manager_feature_asbng_path}\"" ]
40  }
41}
42
43config("ui_effect_public_config") {
44  include_dirs = [
45    "${window_base_path}/window_scene/session/host/include",
46  ]
47}
48
49ohos_source_set("ui_effect_controller_client") {
50  branch_protector_ret = "pac_ret"
51  sanitize = {
52    cfi = true
53    cfi_cross_dso = true
54    cfi_vcall_icall_only = true
55    debug = false
56  }
57  sources = [
58    "host/src/ui_effect_controller_proxy.cpp",
59    "host/src/ui_effect_controller_client_stub.cpp",
60    "host/src/ui_effect_controller_client.cpp",
61  ]
62  public_configs = [":ui_effect_public_config"]
63  public_deps = [
64    "${window_base_path}/utils:ui_effect_controller_common",
65  ]
66  part_name = "window_manager"
67  subsystem_name = "window"
68}
69
70ohos_source_set("ui_effect_controller") {
71  branch_protector_ret = "pac_ret"
72  sanitize = {
73    cfi = true
74    cfi_cross_dso = true
75    cfi_vcall_icall_only = true
76    debug = false
77  }
78  sources = [
79    "host/src/ui_effect_controller_stub.cpp",
80    "host/src/ui_effect_controller.cpp",
81    "host/src/ui_effect_controller_client_proxy.cpp",
82  ]
83  public_configs = [":ui_effect_public_config"]
84  public_deps = ["${window_base_path}/utils:ui_effect_controller_common"]
85
86  deps = [
87    "${window_base_path}/window_scene/common:window_scene_common",
88  ]
89  part_name = "window_manager"
90  subsystem_name = "window"
91}
92
93ohos_shared_library("scene_session") {
94  branch_protector_ret = "pac_ret"
95  sanitize = {
96    cfi = true
97    cfi_cross_dso = true
98    cfi_vcall_icall_only = true
99    debug = false
100  }
101  sources = [
102    "container/src/window_event_channel.cpp",
103    "container/src/zidl/session_stage_proxy.cpp",
104    "container/src/zidl/session_stage_stub.cpp",
105    "container/src/zidl/window_event_channel_proxy.cpp",
106    "container/src/zidl/window_event_channel_stub.cpp",
107    "host/src/ability_info_manager.cpp",
108    "host/src/extension_session.cpp",
109    "host/src/keyboard_session.cpp",
110    "host/src/layout_controller.cpp",
111    "host/src/main_session.cpp",
112    "host/src/move_drag_controller.cpp",
113    "host/src/multi_instance_manager.cpp",
114    "host/src/pc_fold_screen_controller.cpp",
115    "host/src/pc_fold_screen_manager.cpp",
116    "host/src/root_scene_session.cpp",
117    "host/src/scb_system_session.cpp",
118    "host/src/scene_persistence.cpp",
119    "host/src/scene_persistent_storage.cpp",
120    "host/src/scene_session.cpp",
121    "host/src/session.cpp",
122    "host/src/session_change_recorder.cpp",
123    "host/src/session_coordinate_helper.cpp",
124    "host/src/sub_session.cpp",
125    "host/src/system_session.cpp",
126    "host/src/ui_extension/host_data_handler.cpp",
127    "host/src/ws_ffrt_helper.cpp",
128    "host/src/ws_snapshot_helper.cpp",
129    "host/src/zidl/session_proxy.cpp",
130    "host/src/zidl/session_stub.cpp",
131  ]
132
133  if (window_manager_feature_asbng_path_enable) {
134    sources += [ "host/src/atomicservice_basic_engine_plugin.cpp" ]
135  }
136
137  public_configs = [ ":session_public_config" ]
138
139  deps = [
140    "${window_base_path}/dm:libdm",
141    "${window_base_path}/utils:libwmutil",
142    "${window_base_path}/utils:libwmutil_base",
143    "${window_base_path}/window_scene/common:window_scene_common",
144    "${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager",
145    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
146    "${window_base_path}/window_scene/screen_session_manager_client:screen_session_manager_client",
147    "${window_base_path}/window_scene/session:screen_session",
148  ]
149
150  external_deps = [
151    "ability_base:configuration",
152    "ability_runtime:ability_manager",
153    "ability_runtime:ability_start_setting",
154    "ability_runtime:app_context",
155    "ability_runtime:process_options",
156    "ability_runtime:start_window_option",
157    "bundle_framework:appexecfwk_base",
158    "bundle_framework:appexecfwk_core",
159    "bundle_framework:libappexecfwk_common",
160    "c_utils:utils",
161    "eventhandler:libeventhandler",
162    "ffrt:libffrt",
163    "graphic_2d:librender_service_base",
164    "graphic_2d:librender_service_client",
165    "graphic_2d:window_animation",
166    "hilog:libhilog",
167    "hisysevent:libhisysevent",
168    "hitrace:hitrace_meter",
169    "hitrace:libhitracechain",
170    "image_framework:image_native",
171    "init:libbegetutil",
172    "input:libmmi-client",
173    "ipc:ipc_single",
174    "samgr:samgr_proxy",
175    "zlib:shared_libz",
176  ]
177  if (!(host_os == "linux" && host_cpu == "arm64")) {
178    external_deps += [ "preferences:native_preferences" ]
179  }
180  public_external_deps = [
181    "ability_base:base",
182    "ability_base:session_info",
183    "ability_base:want",
184    "accessibility:accessibility_common",
185    "accessibility:accessibility_interface",
186    "input:libmmi-napi",
187  ]
188  defines = []
189
190  if (defined(global_parts_info) &&
191      defined(global_parts_info.barrierfree_accessibility)) {
192    external_deps += [ "accessibility:accessibility_common" ]
193  }
194
195  if (defined(global_parts_info) &&
196      defined(global_parts_info.powermgr_power_manager)) {
197    external_deps += [ "power_manager:powermgr_client" ]
198    defines += [ "POWER_MANAGER_ENABLE" ]
199  }
200
201  if (defined(global_parts_info) &&
202      defined(global_parts_info.resourceschedule_resource_schedule_service)) {
203    external_deps += [ "resource_schedule_service:ressched_client" ]
204    defines += [ "RES_SCHED_ENABLE" ]
205  }
206
207  if (device_status_enable) {
208    external_deps += [ "device_status:devicestatus_client" ]
209    defines += [ "DEVICE_STATUS_ENABLE" ]
210  }
211
212  if (!defined(global_parts_info) ||
213      defined(global_parts_info.inputmethod_imf)) {
214    imf_enable = true
215  } else {
216    imf_enable = false
217  }
218  print("imf_enable: ", imf_enable)
219  if (imf_enable == true) {
220    external_deps += [ "imf:inputmethod_client" ]
221    defines += [ "IMF_ENABLE" ]
222  }
223
224  if (build_variant == "root") {
225    defines += [ "ACCESSIBILITY_DUMP_FOR_TEST" ]
226  }
227
228  innerapi_tags = [ "platformsdk" ]
229  part_name = "window_manager"
230  subsystem_name = "window"
231
232  if (build_variant == "user") {
233    defines += [ "IS_RELEASE_VERSION" ]
234  }
235}
236
237ohos_shared_library("screen_session") {
238  branch_protector_ret = "pac_ret"
239  sanitize = {
240    cfi = true
241    cfi_cross_dso = true
242    cfi_vcall_icall_only = true
243    debug = false
244  }
245  sources = [
246    "screen/src/screen_property.cpp",
247    "screen/src/screen_session.cpp",
248  ]
249
250  public_configs = [ ":session_public_config" ]
251
252  deps = [
253    "${window_base_path}/utils:libwmutil",
254    "${window_base_path}/utils:libwmutil_base",
255  ]
256
257  external_deps = [
258    "c_utils:utils",
259    "graphic_2d:librender_service_base",
260    "graphic_2d:librender_service_client",
261    "hicollie:libhicollie",
262    "hilog:libhilog",
263    "hisysevent:libhisysevent",
264    "hitrace:hitrace_meter",
265    "init:libbegetutil",
266    "ipc:ipc_single",
267  ]
268  public_external_deps = [
269    "ability_base:base",
270    "ability_base:want",
271    "accessibility:accessibility_common",
272    "input:libmmi-napi",
273  ]
274
275  defines = []
276  if (window_manager_feature_screen_color_gamut) {
277    defines += [ "WM_SCREEN_COLOR_GAMUT_ENABLE" ]
278  }
279
280  if (window_manager_feature_screen_hdr_format) {
281    defines += [ "WM_SCREEN_HDR_FORMAT_ENABLE" ]
282  }
283
284  if (window_manager_feature_screen_color_space) {
285    defines += [ "WM_SCREEN_COLOR_SPACE_ENABLE" ]
286  }
287
288  innerapi_tags = [ "platformsdk" ]
289  part_name = "window_manager"
290  subsystem_name = "window"
291}
292