• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# oh_window_comm.h
2
3## Overview
4
5The file declares the common enums and definitions of the window manager.
6
7**File to include**: <window_manager/oh_window_comm.h>
8
9**Library**: libnative_window_manager.so
10
11**System capability**: SystemCapability.Window.SessionManager
12
13**Since**: 12
14
15**Related module**: [WindowManager](capi-windowmanager.md)
16
17## Summary
18
19### Structs
20
21| Name| typedef Keyword| Description|
22| -- | -- | -- |
23| [WindowManager_Rect](capi-windowmanager-rect.md) | WindowManager_Rect | Describes the window rectangle, including the window position, width, and height.|
24| [OH_PixelmapNative](capi-struct.md) | OH_PixelmapNative | Describes the pixel image information.|
25| [WindowManager_WindowProperties](capi-windowmanager-windowproperties.md) | WindowManager_WindowProperties | Describes the window properties.|
26| [WindowManager_AvoidArea](capi-windowmanager-avoidarea.md) | WindowManager_AvoidArea | Describes the avoid area.|
27
28### Enums
29
30| Name| typedef Keyword| Description|
31| -- | -- | -- |
32| [WindowManager_ErrorCode](#windowmanager_errorcode) | WindowManager_ErrorCode | Enumerates the status codes returned by the window manager interface.|
33| [WindowManager_AvoidAreaType](#windowmanager_avoidareatype) | WindowManager_AvoidAreaType | Enumerates the avoid area types.|
34| [WindowManager_WindowType](#windowmanager_windowtype) | WindowManager_WindowType | Enumerates the window types.|
35
36## Enum Description
37
38### WindowManager_ErrorCode
39
40```
41enum WindowManager_ErrorCode
42```
43
44**Description**
45
46Enumerates the status codes returned by the window manager interface.
47
48**Since**: 12
49
50| Enum Item| Description|
51| -- | -- |
52| OK = 0 | Operation successful.|
53| WINDOW_MANAGER_ERRORCODE_NO_PERMISSION = 201 | No permission.<br>**Since**: 15|
54| WINDOW_MANAGER_ERRORCODE_INVALID_PARAM = 401 | Invalid parameter.<br>**Since**: 15|
55| WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED = 801 | Not supported by the device.<br>**Since**: 15|
56| INVAILD_WINDOW_ID = 1000 | Invalid window ID.|
57| SERVICE_ERROR = 2000 | Service error.|
58| WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL = 1300002 | Abnormal window status.<br>**Since**: 15|
59| WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL = 1300003 | Abnormal window manager service.<br>**Since**: 15|
60| WINDOW_MANAGER_ERRORCODE_PIP_DESTROY_FAILED = 1300011 | Failed to destroy the PiP window.<br>**Since**: 20|
61| WINDOW_MANAGER_ERRORCODE_PIP_STATE_ABNORMAL = 1300012 | Abnormal PiP status.<br>**Since**: 20|
62| WINDOW_MANAGER_ERRORCODE_PIP_CREATE_FAILED = 1300013 | Failed to create the PiP window.<br>**Since**: 20|
63| WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR = 1300014 | An internal error occurs in PiP. Possible causes:<br>1. The window on which the PiP feature depends is abnormal. For example, the window is empty. 2. The PiP controller is abnormal.<br>**Since**: 20|
64| WINDOW_MANAGER_ERRORCODE_PIP_REPEATED_OPERATION = 1300015 | Repeated PiP operation.<br>**Since**: 20|
65| WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM = 1300016 | Incorrect parameter. Possible causes:<br>1. The parameter value range is invalid. 2. The number of parameters is invalid. 3. The parameter type is invalid.<br>**Since**: 20|
66
67### WindowManager_AvoidAreaType
68
69```
70enum WindowManager_AvoidAreaType
71```
72
73**Description**
74
75Enumerates the avoid area types.
76
77**Since**: 15
78
79| Enum Item| Description|
80| -- | -- |
81| WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM = 0 | System avoid area.|
82| WINDOW_MANAGER_AVOID_AREA_TYPE_CUTOUT = 1 | Cutout area.|
83| WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM_GESTURE = 2 | System gesture area.|
84| WINDOW_MANAGER_AVOID_AREA_TYPE_KEYBOARD = 3 | Keyboard area.|
85| WINDOW_MANAGER_AVOID_AREA_TYPE_NAVIGATION_INDICATOR = 4 | Navigation bar area.|
86
87### WindowManager_WindowType
88
89```
90enum WindowManager_WindowType
91```
92
93**Description**
94
95Enumerates the window types.
96
97**Since**: 15
98
99| Enum Item| Description|
100| -- | -- |
101| WINDOW_MANAGER_WINDOW_TYPE_APP = 0 | Child window.|
102| WINDOW_MANAGER_WINDOW_TYPE_MAIN = 1 | Main window.|
103| WINDOW_MANAGER_WINDOW_TYPE_FLOAT = 8 | Floating window.|
104| WINDOW_MANAGER_WINDOW_TYPE_DIALOG = 16 | Modal window.|
105