• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# WindowManager_WindowProperties
2
3
4## 概述
5
6窗口属性。
7
8**起始版本:** 15
9
10**相关模块:**[WindowManager](_window_manager___native_module.md)
11
12**所在头文件:** [oh_window_comm.h](oh__window__comm_8h.md)
13
14## 汇总
15
16
17### 成员变量
18
19| 名称 | 描述 |
20| -------- | -------- |
21| [WindowManager_Rect](_window_manager___rect.md)  [windowRect](#windowrect) | 窗口的位置和尺寸。 |
22| [WindowManager_Rect](_window_manager___rect.md)  [drawableRect](#drawablerect) | 窗口内可绘制区域的尺寸。 |
23| [WindowManager_WindowType](_window_manager___native_module.md#windowmanager_windowtype)  [type](#type) | 窗口类型。 |
24| bool [isFullScreen](#isfullscreen) | 窗口是否全屏模式。默认值为false。true表示窗口是全屏模式,false表示窗口是非全屏模式。 |
25| bool [isLayoutFullScreen](#islayoutfullscreen) | 窗口布局是否沉浸式。默认值为false。true表示窗口布局是沉浸式,false表示窗口布局是非沉浸式。 |
26| bool [focusable](#focusable) | 窗口是否能获取焦点。默认值为true。true表示窗口能获取焦点,false表示窗口不能获取焦点。 |
27| bool [touchable](#touchable) | 窗口是否可触。默认值为true。true表示窗口可触,false表示窗口不可触。 |
28| float [brightness](#brightness) | 窗口亮度值。该参数为浮点数,取值范围为[0.0, 1.0]或-1.0。1.0表示最亮,-1.0表示默认亮度。 |
29| bool [isKeepScreenOn](#iskeepscreenon) | 是否打开屏幕常亮。默认值为false。true表示屏幕常亮,false表示屏幕不常亮。 |
30| bool [isPrivacyMode](#isprivacymode) | 窗口是否打开隐私模式。默认值为false。true表示窗口打开隐私模式,false表示窗口关闭隐私模式。 |
31| bool [isTransparent](#istransparent) | 窗口是否透明。默认值为false。true表示窗口透明,false表示窗口非透明。 |
32| uint32_t [id](#id) | 窗口id。默认值为0,该参数为整数。 |
33| uint32_t [displayId](#displayid) | 窗口所在屏幕的id,默认返回主屏幕id,该参数为整数 |
34
35
36## 结构体成员变量说明
37
38
39### brightness
40
41```
42float WindowManager_WindowProperties::brightness
43```
44
45**描述**
46
47窗口亮度值。该参数为浮点数,取值范围为[0.0, 1.0]或-1.0。1.0表示最亮,-1.0表示默认亮度。
48
49
50### displayId
51
52```
53uint32_t WindowManager_WindowProperties::displayId
54```
55
56**描述**
57
58窗口所在屏幕的id,默认返回主屏幕id,该参数为整数。
59
60
61### drawableRect
62
63```
64WindowManager_Rect WindowManager_WindowProperties::drawableRect
65```
66
67**描述**
68
69窗口内可绘制区域的尺寸。
70
71
72### focusable
73
74```
75bool WindowManager_WindowProperties::focusable
76```
77
78**描述**
79
80窗口是否能获取焦点。默认值为true。true表示窗口能获取焦点,false表示窗口不能获取焦点。
81
82
83### id
84
85```
86uint32_t WindowManager_WindowProperties::id
87```
88
89**描述**
90
91窗口id。默认值为0,该参数为整数。
92
93
94### isFullScreen
95
96```
97bool WindowManager_WindowProperties::isFullScreen
98```
99
100**描述**
101
102窗口是否全屏模式。默认值为false。true表示窗口是全屏模式,false表示窗口是非全屏模式。
103
104
105### isKeepScreenOn
106
107```
108bool WindowManager_WindowProperties::isKeepScreenOn
109```
110
111**描述**
112
113是否打开屏幕常亮。默认值为false。true表示屏幕常亮,false表示屏幕不常亮。
114
115
116### isLayoutFullScreen
117
118```
119bool WindowManager_WindowProperties::isLayoutFullScreen
120```
121
122**描述**
123
124窗口布局是否沉浸式。默认值为false。true表示窗口布局是沉浸式,false表示窗口布局是非沉浸式。
125
126
127### isPrivacyMode
128
129```
130bool WindowManager_WindowProperties::isPrivacyMode
131```
132
133**描述**
134
135窗口是否打开隐私模式。默认值为false。true表示窗口打开隐私模式,false表示窗口关闭隐私模式。
136
137
138### isTransparent
139
140```
141bool WindowManager_WindowProperties::isTransparent
142```
143
144**描述**
145
146窗口是否透明。默认值为false。true表示窗口透明,false表示窗口非透明。
147
148
149### touchable
150
151```
152bool WindowManager_WindowProperties::touchable
153```
154
155**描述**
156
157窗口是否可触。默认值为true。true表示窗口可触,false表示窗口不可触。
158
159
160### type
161
162```
163WindowManager_WindowType WindowManager_WindowProperties::type
164```
165
166**描述**
167
168窗口类型。
169
170
171### windowRect
172
173```
174WindowManager_Rect WindowManager_WindowProperties::windowRect
175```
176
177**描述**
178
179窗口的位置和尺寸。
180