• 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/root_scene_session.cpp",
56    "host/src/scb_system_session.cpp",
57    "host/src/scene_persistence.cpp",
58    "host/src/scene_persistent_storage.cpp",
59    "host/src/scene_session.cpp",
60    "host/src/session.cpp",
61    "host/src/sub_session.cpp",
62    "host/src/system_session.cpp",
63    "host/src/ui_extension/host_data_handler.cpp",
64    "host/src/ws_ffrt_helper.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}/utils:libwmutil_base",
75    "${window_base_path}/window_scene/common:window_scene_common",
76    "${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager",
77    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
78    "${window_base_path}/window_scene/screen_session_manager:screen_session_manager_client",
79    "${window_base_path}/window_scene/session:screen_session",
80  ]
81
82  external_deps = [
83    "ability_base:base",
84    "ability_base:session_info",
85    "ability_base:want",
86    "ability_runtime:ability_manager",
87    "ability_runtime:ability_start_setting",
88    "ability_runtime:process_options",
89    "ability_runtime:start_window_option",
90    "c_utils:utils",
91    "eventhandler:libeventhandler",
92    "ffrt:libffrt",
93    "graphic_2d:librender_service_client",
94    "hilog:libhilog",
95    "hisysevent:libhisysevent",
96    "hitrace:hitrace_meter",
97    "image_framework:image_native",
98    "init:libbegetutil",
99    "input:libmmi-client",
100    "ipc:ipc_single",
101    "preferences:native_preferences",
102  ]
103  public_external_deps = [
104    "accessibility:accessibility_common",
105    "accessibility:accessibility_interface",
106    "input:libmmi-napi",
107  ]
108  defines = []
109
110  if (defined(global_parts_info) &&
111      defined(global_parts_info.barrierfree_accessibility)) {
112    external_deps += [ "accessibility:accessibility_common" ]
113  }
114
115  if (defined(global_parts_info) &&
116      defined(global_parts_info.powermgr_power_manager)) {
117    external_deps += [ "power_manager:powermgr_client" ]
118    defines += [ "POWER_MANAGER_ENABLE" ]
119  }
120
121  if (defined(global_parts_info) &&
122      defined(global_parts_info.resourceschedule_resource_schedule_service)) {
123    external_deps += [ "resource_schedule_service:ressched_client" ]
124    defines += [ "RES_SCHED_ENABLE" ]
125  }
126
127  if (device_status_enable) {
128    external_deps += [ "device_status:devicestatus_client" ]
129    defines += [ "DEVICE_STATUS_ENABLE" ]
130  }
131
132  if (!defined(global_parts_info) ||
133      defined(global_parts_info.inputmethod_imf)) {
134    imf_enable = true
135  } else {
136    imf_enable = false
137  }
138  print("imf_enable: ", imf_enable)
139  if (imf_enable == true) {
140    external_deps += [ "imf:inputmethod_client" ]
141    defines += [ "IMF_ENABLE" ]
142  }
143
144  if (build_variant == "root") {
145    defines += [ "ACCESSIBILITY_DUMP_FOR_TEST" ]
146  }
147
148  innerapi_tags = [ "platformsdk" ]
149  part_name = "window_manager"
150  subsystem_name = "window"
151
152  if (build_variant == "user") {
153    defines += [ "IS_RELEASE_VERSION" ]
154  }
155}
156
157ohos_shared_library("screen_session") {
158  branch_protector_ret = "pac_ret"
159  sanitize = {
160    cfi = true
161    cfi_cross_dso = true
162    cfi_vcall_icall_only = true
163    debug = false
164  }
165  sources = [
166    "screen/src/screen_property.cpp",
167    "screen/src/screen_session.cpp",
168  ]
169
170  public_configs = [ ":session_public_config" ]
171
172  deps = [
173    "${window_base_path}/utils:libwmutil",
174    "${window_base_path}/utils:libwmutil_base",
175  ]
176
177  external_deps = [
178    "c_utils:utils",
179    "graphic_2d:librender_service_client",
180    "hicollie:libhicollie",
181    "hilog:libhilog",
182    "hisysevent:libhisysevent",
183    "hitrace:hitrace_meter",
184    "init:libbegetutil",
185    "ipc:ipc_single",
186  ]
187  public_external_deps = [
188    "accessibility:accessibility_common",
189    "input:libmmi-napi",
190  ]
191
192  innerapi_tags = [ "platformsdk" ]
193  part_name = "window_manager"
194  subsystem_name = "window"
195}
196