Skip to main content

ohos_native_window_manager_sys/
lib.rs

1/* automatically generated by rust-bindgen 0.65.1 */
2
3#![allow(non_snake_case)]
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(clippy::missing_safety_doc)]
7// bindgen's bitfield accessors transmute/cast between identical types.
8#![allow(clippy::useless_transmute)]
9#![allow(clippy::unnecessary_cast)]
10pub use ohos_multi_modal_input_sys::{Input_KeyEvent, Input_MouseEvent, Input_TouchEvent};
11
12#[link(name = "native_window_manager")]
13unsafe extern "C" {}
14
15#[doc = " @brief Describes the pixel image information.\n\n @since 15"]
16#[repr(C)]
17#[derive(Debug, Copy, Clone)]
18pub struct OH_PixelmapNative {
19    _unused: [u8; 0],
20}
21#[cfg(feature = "api-26")]
22#[repr(C)]
23#[derive(Debug, Copy, Clone)]
24pub struct OH_WindowManager_FrameMetrics {
25    _unused: [u8; 0],
26}
27#[doc = " @brief Frame metrics callback type.\n\n @since 26.0.0"]
28#[cfg(feature = "api-26")]
29pub type OH_WindowManager_FrameMetricsMeasuredCallback = ::std::option::Option<
30    unsafe extern "C" fn(windowId: i32, metrics: *const OH_WindowManager_FrameMetrics),
31>;
32#[cfg(feature = "api-24")]
33#[repr(C)]
34#[derive(Debug, Copy, Clone)]
35pub struct OH_WindowManager_DensityInfo {
36    _unused: [u8; 0],
37}
38#[doc = " @brief Density info callback type.\n\n @since 24"]
39#[cfg(feature = "api-24")]
40pub type OH_WindowManager_DensityInfoCallback = ::std::option::Option<
41    unsafe extern "C" fn(windowId: i32, info: *const OH_WindowManager_DensityInfo),
42>;
43#[doc = " Successful."]
44pub const WindowManager_ErrorCode_OK: WindowManager_ErrorCode = 0;
45#[doc = " No permission.\n @since 15"]
46#[cfg(feature = "api-15")]
47pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_NO_PERMISSION: WindowManager_ErrorCode =
48    201;
49#[doc = " Invalid parameter.\n @since 15"]
50#[cfg(feature = "api-15")]
51pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_INVALID_PARAM: WindowManager_ErrorCode =
52    401;
53#[doc = " Not supported by the device.\n @since 15"]
54#[cfg(feature = "api-15")]
55pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED:
56    WindowManager_ErrorCode = 801;
57#[doc = " Invalid window ID."]
58pub const WindowManager_ErrorCode_INVAILD_WINDOW_ID: WindowManager_ErrorCode = 1000;
59#[doc = " Invalid window ID.\n @since 26.0.0"]
60#[cfg(feature = "api-26")]
61pub const WindowManager_ErrorCode_INVALID_WINDOW_ID: WindowManager_ErrorCode = 1000;
62#[doc = " Service error."]
63pub const WindowManager_ErrorCode_SERVICE_ERROR: WindowManager_ErrorCode = 2000;
64#[doc = " Abnormal window status.\n @since 15"]
65#[cfg(feature = "api-15")]
66pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL: WindowManager_ErrorCode =
67    1300002;
68#[doc = " Abnormal window manager service.\n @since 15"]
69#[cfg(feature = "api-15")]
70pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL:
71    WindowManager_ErrorCode = 1300003;
72#[doc = " Failed to destroy the PiP window.\n @since 20"]
73#[cfg(feature = "api-20")]
74pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_DESTROY_FAILED:
75    WindowManager_ErrorCode = 1300011;
76#[doc = " Abnormal PiP status.\n @since 20"]
77#[cfg(feature = "api-20")]
78pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_STATE_ABNORMAL:
79    WindowManager_ErrorCode = 1300012;
80#[doc = " Failed to create the PiP window.\n @since 20"]
81#[cfg(feature = "api-20")]
82pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_CREATE_FAILED:
83    WindowManager_ErrorCode = 1300013;
84#[doc = " An internal error occurs in PiP. Possible causes:<br>1. The window on which the PiP feature depends is abnormal.\n For example, the window is empty. 2. The PiP controller is abnormal.\n @since 20"]
85#[cfg(feature = "api-20")]
86pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR:
87    WindowManager_ErrorCode = 1300014;
88#[doc = " Repeated PiP operation.\n @since 20"]
89#[cfg(feature = "api-20")]
90pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_REPEATED_OPERATION:
91    WindowManager_ErrorCode = 1300015;
92#[doc = " Incorrect parameter. Possible causes:<br>1. The parameter value range is invalid.\n 2. The number of parameters is invalid. 3. The parameter type is invalid.\n @since 20"]
93#[cfg(feature = "api-20")]
94pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM:
95    WindowManager_ErrorCode = 1300016;
96#[doc = " @brief Enumerates the status codes returned by the window manager interface.\n\n @since 12"]
97pub type WindowManager_ErrorCode = u32;
98#[doc = " System avoid area."]
99#[cfg(feature = "api-15")]
100pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM:
101    WindowManager_AvoidAreaType = 0;
102#[doc = " Cutout area."]
103#[cfg(feature = "api-15")]
104pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_CUTOUT:
105    WindowManager_AvoidAreaType = 1;
106#[doc = " System gesture area."]
107#[cfg(feature = "api-15")]
108pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM_GESTURE:
109    WindowManager_AvoidAreaType = 2;
110#[doc = " Keyboard area."]
111#[cfg(feature = "api-15")]
112pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_KEYBOARD:
113    WindowManager_AvoidAreaType = 3;
114#[doc = " Navigation bar area."]
115#[cfg(feature = "api-15")]
116pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_NAVIGATION_INDICATOR:
117    WindowManager_AvoidAreaType = 4;
118#[doc = " @brief Enumerates the avoid area types.\n\n @since 15"]
119#[cfg(feature = "api-15")]
120pub type WindowManager_AvoidAreaType = u32;
121#[doc = " Child window.\n\n @since 15"]
122#[cfg(feature = "api-15")]
123pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_APP: WindowManager_WindowType = 0;
124#[doc = " Main window.\n\n @since 15"]
125#[cfg(feature = "api-15")]
126pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_MAIN: WindowManager_WindowType = 1;
127#[doc = " Global float window.\n\n @since 15"]
128#[cfg(feature = "api-15")]
129pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_FLOAT: WindowManager_WindowType = 8;
130#[doc = " Modal window.\n\n @since 15"]
131#[cfg(feature = "api-15")]
132pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_DIALOG: WindowManager_WindowType = 16;
133#[doc = " @brief Enumerates the window types.\n\n @since 15"]
134#[cfg(feature = "api-15")]
135pub type WindowManager_WindowType = u32;
136#[doc = " @brief The struct describes the window rectangle, including the window position, width, and height.\n\n @since 15"]
137#[cfg(feature = "api-15")]
138#[repr(C)]
139#[derive(Debug, Copy, Clone)]
140pub struct WindowManager_Rect {
141    #[doc = " X coordinate of the window, in px. The value is an integer."]
142    pub posX: i32,
143    #[doc = " Y coordinate of the window, in px. The value is an integer."]
144    pub posY: i32,
145    #[doc = " Window width, in px. The value is an integer."]
146    pub width: u32,
147    #[doc = " Window height, in px. The value is an integer."]
148    pub height: u32,
149}
150#[doc = " @brief Describes the configuration of the main window screenshot.\n\n @since 21"]
151#[cfg(feature = "api-21")]
152#[repr(C)]
153#[derive(Debug, Copy, Clone)]
154pub struct WindowManager_WindowSnapshotConfig {
155    #[doc = " Whether the existing screenshot of the main window should be used. The default value is **true**. When it is set\n to **true**, the system uses the existing screenshot of the main window, or captures the latest screenshot if no\n existing screenshot is saved. When it is set to **false**, the system captures the latest screenshot of the main\n window."]
156    pub useCache: bool,
157}
158#[doc = " @brief The struct describes the main window information.\n\n @since 21"]
159#[cfg(feature = "api-21")]
160#[repr(C)]
161#[derive(Debug, Copy, Clone)]
162pub struct WindowManager_MainWindowInfo {
163    #[doc = " ID of the display to which the main window belongs."]
164    pub displayId: u64,
165    #[doc = " Window ID. The default value is **0**, and the value is an integer."]
166    pub windowId: i32,
167    #[doc = " Foreground/Background status of the main window. **true** if the main window is in the foreground, **false**\n otherwise."]
168    pub showing: bool,
169    #[doc = " Pointer to the task name of the main window."]
170    pub label: *const ::std::os::raw::c_char,
171}
172#[doc = " @brief The struct describes the window properties.\n\n @since 15"]
173#[cfg(feature = "api-15")]
174#[repr(C)]
175#[derive(Debug, Copy, Clone)]
176pub struct WindowManager_WindowProperties {
177    #[doc = " Position and size of the window."]
178    pub windowRect: WindowManager_Rect,
179    #[doc = " Size of the drawable area within the window."]
180    pub drawableRect: WindowManager_Rect,
181    #[doc = " Window type."]
182    pub type_: WindowManager_WindowType,
183    #[doc = " Whether the window is in full-screen mode. The default value is **false**. **true** if in full-screen mode, **\n false** otherwise."]
184    pub isFullScreen: bool,
185    #[doc = " Whether the window layout is immersive. The default value is **false**. **true** if immersive, **false**\n otherwise."]
186    pub isLayoutFullScreen: bool,
187    #[doc = " Whether the window is focusable. The default value is **true**. **true** if focusable, **false** otherwise."]
188    pub focusable: bool,
189    #[doc = " Whether the window is touchable. The default value is **true**. **true** if touchable, **false** otherwise."]
190    pub touchable: bool,
191    #[doc = " Screen brightness of the window. The value is a floating-point number in the range [0.0, 1.0] or is set to **-1.\n 0**, where **1.0** indicates the brightest, and **-1.0** is the default brightness."]
192    pub brightness: f32,
193    #[doc = " Whether the screen is steady on. The default value is **false**. **true** if steady on, **false** otherwise."]
194    pub isKeepScreenOn: bool,
195    #[doc = " Whether privacy mode is enabled for the window. The default value is **false**. **true** if enabled, **false**\n otherwise."]
196    pub isPrivacyMode: bool,
197    #[doc = " Whether the window is transparent. The default value is **false**. **true** if transparent, **false** otherwise."]
198    pub isTransparent: bool,
199    #[doc = " Window ID. The default value is **0**, and the value is an integer."]
200    pub id: u32,
201    #[doc = " ID of the screen where the window is located. By default, the ID of the primary screen is returned. The value is\n an integer."]
202    pub displayId: u32,
203}
204#[doc = " @brief The struct describes the avoid area.\n\n @since 15"]
205#[cfg(feature = "api-15")]
206#[repr(C)]
207#[derive(Debug, Copy, Clone)]
208pub struct WindowManager_AvoidArea {
209    #[doc = " Top rectangle of the avoid area."]
210    pub topRect: WindowManager_Rect,
211    #[doc = " Left rectangle of the avoid area."]
212    pub leftRect: WindowManager_Rect,
213    #[doc = " Right rectangle of the avoid area."]
214    pub rightRect: WindowManager_Rect,
215    #[doc = " Bottom rectangle of the avoid area."]
216    pub bottomRect: WindowManager_Rect,
217}
218extern "C" {
219    #[doc = " @brief Sets whether to display the status bar in a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param enabled Whether to display the status bar. **true** to display, **false** otherwise.\n @param enableAnimation Whether to enable the show/hide animation of the status bar. **true** to enable, **false**\n     otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
220    #[cfg(feature = "api-15")]
221    pub fn OH_WindowManager_SetWindowStatusBarEnabled(
222        windowId: i32,
223        enabled: bool,
224        enableAnimation: bool,
225    ) -> i32;
226}
227extern "C" {
228    #[doc = " @brief Sets the color of the status bar in a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param color Color to set, in ARGB format.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
229    #[cfg(feature = "api-15")]
230    pub fn OH_WindowManager_SetWindowStatusBarColor(windowId: i32, color: i32) -> i32;
231}
232extern "C" {
233    #[doc = " @brief Sets whether to display the navigation bar in a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param enabled Whether to display the navigation bar. **true** to display, **false** otherwise.\n @param enableAnimation Whether to enable the show/hide animation of the navigation bar. **true** to enable, **false**\n     otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
234    #[cfg(feature = "api-15")]
235    pub fn OH_WindowManager_SetWindowNavigationBarEnabled(
236        windowId: i32,
237        enabled: bool,
238        enableAnimation: bool,
239    ) -> i32;
240}
241extern "C" {
242    #[doc = " @brief Obtains the avoid area of a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param type Type of the avoid area.\n @param avoidArea Pointer to the avoid area.\n @return Returns the result code.\n     {@link OK} the function call is successful, return avoid area ptr in avoidArea.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
243    #[cfg(feature = "api-15")]
244    pub fn OH_WindowManager_GetWindowAvoidArea(
245        windowId: i32,
246        type_: WindowManager_AvoidAreaType,
247        avoidArea: *mut WindowManager_AvoidArea,
248    ) -> i32;
249}
250extern "C" {
251    #[doc = " @brief Checks whether a window is displayed.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param isShow Pointer to the check result for whether the window is displayed. **true** if displayed, **false**\n     otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n @since 15"]
252    #[cfg(feature = "api-15")]
253    pub fn OH_WindowManager_IsWindowShown(windowId: i32, isShow: *mut bool) -> i32;
254}
255extern "C" {
256    #[doc = " @brief Shows a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
257    #[cfg(feature = "api-15")]
258    pub fn OH_WindowManager_ShowWindow(windowId: i32) -> i32;
259}
260extern "C" {
261    #[doc = " @brief Sets whether a window is touchable.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param isTouchable Whether the window is touchable. **true** if touchable, **false** otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
262    #[cfg(feature = "api-15")]
263    pub fn OH_WindowManager_SetWindowTouchable(windowId: i32, isTouchable: bool) -> i32;
264}
265extern "C" {
266    #[doc = " @brief Sets whether a window is focusable.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param isFocusable Whether the window is focusable. **true** if focusable, **false** otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
267    #[cfg(feature = "api-15")]
268    pub fn OH_WindowManager_SetWindowFocusable(windowId: i32, isFocusable: bool) -> i32;
269}
270extern "C" {
271    #[doc = " @brief Sets the background color of a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param color Pointer to the background color. The value is a string in hexadecimal RGB or ARGB color format.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n @since 15"]
272    #[cfg(feature = "api-15")]
273    pub fn OH_WindowManager_SetWindowBackgroundColor(
274        windowId: i32,
275        color: *const ::std::os::raw::c_char,
276    ) -> i32;
277}
278extern "C" {
279    #[doc = " @brief Sets the window brightness for the main window. The window brightness takes effect only when the window is in\n the foreground and has focus.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param brightness Screen brightness. The value is a floating-point number in the range [0.0, 1.0] or is set to **-1.\n     0**. The value **1.0** means the brightest, and **-1.0** means that the window brightness resets to the original\n     brightness set through Control Panel.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
280    #[cfg(feature = "api-15")]
281    pub fn OH_WindowManager_SetWindowBrightness(windowId: i32, brightness: f32) -> i32;
282}
283extern "C" {
284    #[doc = " @brief Sets whether to always keep the screen on for a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param isKeepScreenOn Whether to always keep the screen on. **true** to always keep the screen on, **false**\n     otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
285    #[cfg(feature = "api-15")]
286    pub fn OH_WindowManager_SetWindowKeepScreenOn(windowId: i32, isKeepScreenOn: bool) -> i32;
287}
288extern "C" {
289    #[doc = " @brief Sets whether to enable privacy mode for a window.\n\n @permission ohos.permission.PRIVACY_WINDOW\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param isPrivacy Whether to enable privacy mode. **true** to enable, **false** otherwise.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n     {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed.\n @since 15"]
290    #[cfg(feature = "api-15")]
291    pub fn OH_WindowManager_SetWindowPrivacyMode(windowId: i32, isPrivacy: bool) -> i32;
292}
293extern "C" {
294    #[doc = " @brief Obtains the properties of a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param windowProperties Pointer to the properties.\n @return Returns the result code.\n     {@link OK} the function call is successful, return window properties ptr in windowProperties.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n @since 15"]
295    #[cfg(feature = "api-15")]
296    pub fn OH_WindowManager_GetWindowProperties(
297        windowId: i32,
298        windowProperties: *mut WindowManager_WindowProperties,
299    ) -> i32;
300}
301extern "C" {
302    #[doc = " @brief Obtains the snapshot of a window.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n     If the window ID is invalid or the window has been destroyed, you cannot obtain the window snapshot. To\n     successfully obtain a snapshot, a valid window ID is required.\n     You can obtain a valid window ID by calling the ArkTS API {@link getWindowProperties()} on the window object\n @param pixelMap Pointer to the snapshot.\n @return Returns the result code.\n     {@link OK} the function call is successful, return pixel map ptr in pixelMap.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 15"]
303    #[cfg(feature = "api-15")]
304    pub fn OH_WindowManager_Snapshot(windowId: i32, pixelMap: *mut OH_PixelmapNative) -> i32;
305}
306extern "C" {
307    #[doc = " @brief Obtains the layout information array of all windows visible on a display. The layout information is arranged\n based on the current window stacking order, and the topmost window in the hierarchy is at index 0 of the array.\n\n @param displayId ID of the display. You can obtain a valid display ID by calling the ArkTS API\n     {@link getWindowProperties()} on the window object\n @param windowLayoutInfoList Double pointer to the layout information array of all windows visible. This parameter is\n     used as an output parameter.\n @param windowLayoutInfoSize Pointer to the length of the layout information array. This parameter is used as an\n     output parameter.\n @return Returns the result code.\n     {@link OK} the function call is successful, return Window layout info list.\n     {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error.\n     {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 17"]
308    #[cfg(feature = "api-17")]
309    pub fn OH_WindowManager_GetAllWindowLayoutInfoList(
310        displayId: i64,
311        windowLayoutInfoList: *mut *mut WindowManager_Rect,
312        windowLayoutInfoSize: *mut usize,
313    ) -> i32;
314}
315extern "C" {
316    #[doc = " @brief Releases the memory occupied by a window layout information array.\n\n @param windowLayoutInfoList Pointer to the layout information array of all windows visible on the display. You can\n     obtain the array pointer by calling {@link OH_WindowManager_GetAllWindowLayoutInfoList}.\n @since 17"]
317    #[cfg(feature = "api-17")]
318    pub fn OH_WindowManager_ReleaseAllWindowLayoutInfoList(
319        windowLayoutInfoList: *mut WindowManager_Rect,
320    );
321}
322extern "C" {
323    #[doc = " @brief Injects a multimodal touch event into the target window. This function is limited to injecting events into\n windows that belong to the same process. The injection does not affect window focus or stacking order, nor does it\n start window dragging. The event is forwarded directly to ArkUI. This function must be called after the target\n window has completed its UI loading.\n\n @param windowId Window ID. The default value is **0**. The value is an integer.\n @param touchEvent Pointer to the multimodal touch event. For details, see {@link Input_TouchEvent}. The event is\n     defined in **oh_input_manager.h**. Certain fields in this parameter have specific constraints. Specifically, **\n     action** should be an integer in the range [0, 3]; **id**, **displayX**, **displayY** should\n     be an integer greater than or equal to 0. If these constraints are not met, the function returns **\n     WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL**, indicating that the window manager service is abnormal.\n @param windowX X coordinate of the event relative to the target window. The value is an integer.\n @param windowY Y coordinate of the event relative to the target window. The value is an integer.\n @return Returns the result code.\n     {@link OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 20"]
324    #[cfg(feature = "api-20")]
325    pub fn OH_WindowManager_InjectTouchEvent(
326        windowId: i32,
327        touchEvent: *mut Input_TouchEvent,
328        windowX: i32,
329        windowY: i32,
330    ) -> i32;
331}
332extern "C" {
333    #[doc = " @brief Obtains the information about all main windows.\n\n @permission ohos.permission.CUSTOM_SCREEN_CAPTURE\n @param infoList Double pointer to the main window information list. This parameter is used as an output parameter.\n @param mainWindowInfoSize Pointer to the size of the main window information list. This parameter is used as an\n     output parameter.\n @return Returns the status code of the execution.\n     {@link WS_OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed.\n     {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 21"]
334    #[cfg(feature = "api-21")]
335    pub fn OH_WindowManager_GetAllMainWindowInfo(
336        infoList: *mut *mut WindowManager_MainWindowInfo,
337        mainWindowInfoSize: *mut usize,
338    ) -> i32;
339}
340extern "C" {
341    #[doc = " @brief Releases the memory used by the main window information list.\n\n @param infoList Pointer to the main window information list.\n @since 21"]
342    #[cfg(feature = "api-21")]
343    pub fn OH_WindowManager_ReleaseAllMainWindowInfo(infoList: *mut WindowManager_MainWindowInfo);
344}
345#[doc = " @brief Defines the callback used for receiving the main window screenshot list.\n\n @param snapshotPixelMapList Double pointer to the list of window screenshots.\n @param snapshotListSize Size of the window screenshot list.\n @since 21"]
346#[cfg(feature = "api-21")]
347pub type OH_WindowManager_WindowSnapshotCallback = ::std::option::Option<
348    unsafe extern "C" fn(
349        snapshotPixelMapList: *mut *const OH_PixelmapNative,
350        snapshotListSize: usize,
351    ),
352>;
353extern "C" {
354    #[doc = " @brief Obtains the screenshots of one or more main windows specified by **windowId**.\n\n @permission ohos.permission.CUSTOM_SCREEN_CAPTURE\n @param windowIdList Pointer to the main window ID list.\n @param windowIdListSize Size of the main window ID list.\n @param config Configuration for obtaining the window screenshot.\n @param callback Callback used to return the lists of window screenshots, in the order of the provided window ID\n     array.\n @return Returns the status code of the execution.\n     {@link WS_OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed.\n     {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 21"]
355    #[cfg(feature = "api-21")]
356    pub fn OH_WindowManager_GetMainWindowSnapshot(
357        windowIdList: *mut i32,
358        windowIdListSize: usize,
359        config: WindowManager_WindowSnapshotConfig,
360        callback: OH_WindowManager_WindowSnapshotCallback,
361    ) -> i32;
362}
363extern "C" {
364    #[doc = " @brief Releases the memory used by the main window screenshot list.\n\n @param snapshotPixelMapList Pointer to the list of window screenshots.\n @since 21"]
365    #[cfg(feature = "api-21")]
366    pub fn OH_WindowManager_ReleaseMainWindowSnapshot(
367        snapshotPixelMapList: *const OH_PixelmapNative,
368    );
369}
370extern "C" {
371    #[doc = " @brief Locks the mouse cursor within the specified window area and controls whether the cursor follows mouse\n movements. It is only supported by the window that currently has focus, and the lock is automatically released when\n the window loses focus.\n\n @permission ohos.permission.LOCK_WINDOW_CURSOR\n @param windowId Window ID. The value is an integer.\n @param isCursorFollowMovement Behavior of the mouse cursor when locked. If it is set to **true**, the cursor moves\n     along with the mouse. If it is set to **false**, the cursor remains stationary and does not follow mouse\n     movements.\n @return Returns the status code of the execution.\n     {@link WS_OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed.\n     {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 22"]
372    #[cfg(feature = "api-22")]
373    pub fn OH_WindowManager_LockCursor(windowId: i32, isCursorFollowMovement: bool) -> i32;
374}
375extern "C" {
376    #[doc = " @brief Clears the mouse cursor mode previously set for the window.\n\n @permission ohos.permission.LOCK_WINDOW_CURSOR\n @param windowId Window ID. The value is an integer.\n @return Returns the status code of the execution.\n     {@link WS_OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed.\n     {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally.\n @since 22"]
377    #[cfg(feature = "api-22")]
378    pub fn OH_WindowManager_UnlockCursor(windowId: i32) -> i32;
379}
380extern "C" {
381    #[doc = " @brief Check whether the current frame is the first frame.\n\n @param metrics Frame metrics data object.\n @param isFirstDrawFrame This parameter is the return value of the function,\n     indicating whether the current frame is the first frame.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 26.0.0"]
382    #[cfg(feature = "api-26")]
383    pub fn OH_WindowManager_FrameMetrics_IsFirstDrawFrame(
384        metrics: *const OH_WindowManager_FrameMetrics,
385        isFirstDrawFrame: *mut bool,
386    ) -> i32;
387}
388extern "C" {
389    #[doc = " @brief Get the time taken to process external input events in one frame.\n\n @param metrics Frame metrics data object.\n @param duration This parameter is the return value of the function,\n     indicating the time taken to process external input events in one frame, in nanoseconds.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 26.0.0"]
390    #[cfg(feature = "api-26")]
391    pub fn OH_WindowManager_FrameMetrics_GetInputHandlingDuration(
392        metrics: *const OH_WindowManager_FrameMetrics,
393        duration: *mut u64,
394    ) -> i32;
395}
396extern "C" {
397    #[doc = " @brief Get the time taken for layout measurement in one frame.\n\n @param metrics Frame metrics data object.\n @param duration This parameter is the return value of the function,\n     indicating the time taken for layout measurement in one frame, in nanoseconds.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 26.0.0"]
398    #[cfg(feature = "api-26")]
399    pub fn OH_WindowManager_FrameMetrics_GetLayoutMeasureDuration(
400        metrics: *const OH_WindowManager_FrameMetrics,
401        duration: *mut u64,
402    ) -> i32;
403}
404extern "C" {
405    #[doc = " @brief Get the start timestamp of the current frame.\n\n @param metrics Frame metrics data object.\n @param timestamp This parameter is the return value of the function,\n     indicating the start timestamp of the current frame, in nanoseconds.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 26.0.0"]
406    #[cfg(feature = "api-26")]
407    pub fn OH_WindowManager_FrameMetrics_GetVsyncTimestamp(
408        metrics: *const OH_WindowManager_FrameMetrics,
409        timestamp: *mut u64,
410    ) -> i32;
411}
412extern "C" {
413    #[doc = " @brief Registers a callback for window frame metric change events.\n This API depends on the loading of the window page content. That is, this API can be called only after the **\n loadContent()** or **setUIContent()** API in ArkTS takes effect.\n The callback is triggered only when the client UI content is redrawn (for example, page switching, interaction with\n responsive components, or background color and opacity setting).\n  To cancel the registration, call the {@link OH_WindowManager_UnregisterFrameMetricsMeasuredCallback} API.\n\n @param windowId Window ID.\n @param callback Callback used to return the result.\n @return Returns the status code of the execution.\n     {@link WS_OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. Possible cause:\n     1. The window is not created or destroyed;\n     2. This window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n     1. Invalid parameter range.\n @since 26.0.0"]
414    #[cfg(feature = "api-26")]
415    pub fn OH_WindowManager_RegisterFrameMetricsMeasuredCallback(
416        windowId: i32,
417        callback: OH_WindowManager_FrameMetricsMeasuredCallback,
418    ) -> i32;
419}
420extern "C" {
421    #[doc = " @brief Unregisters the callback for window frame metric change events.\n This API depends on the loading of the window page content. That is, this API can be called only after the **\n loadContent()** or **setUIContent()** API in ArkTS takes effect.\n  To register such a callback, call the {@link OH_WindowManager_RegisterFrameMetricsMeasuredCallback} API.\n\n @param windowId Window ID.\n @param callback Callback used to return the result.\n @return Returns the status code of the execution.\n     {@link WS_OK} the function call is successful.\n     {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. Possible cause:\n     1. The window is not created or destroyed;\n     2. This window state is abnormal.\n     {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n     1. Invalid parameter range.\n @since 26.0.0"]
422    #[cfg(feature = "api-26")]
423    pub fn OH_WindowManager_UnregisterFrameMetricsMeasuredCallback(
424        windowId: i32,
425        callback: OH_WindowManager_FrameMetricsMeasuredCallback,
426    ) -> i32;
427}
428extern "C" {
429    #[doc = " @brief Gets the system default display size scaling factor of the screen where the window is located.\n\n @param info Display size scaling factor information for the current window.\n @param density System default display size scaling factor\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
430    #[cfg(feature = "api-24")]
431    pub fn OH_WindowManager_DensityInfo_GetDefaultDensity(
432        info: *const OH_WindowManager_DensityInfo,
433        density: *mut f32,
434    ) -> i32;
435}
436extern "C" {
437    #[doc = " @brief Gets the system display size scaling factor of the screen where the window is located.\n\n @param info Display size scaling factor information for the current window.\n @param density System display size scaling factor\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
438    #[cfg(feature = "api-24")]
439    pub fn OH_WindowManager_DensityInfo_GetSystemDensity(
440        info: *const OH_WindowManager_DensityInfo,
441        density: *mut f32,
442    ) -> i32;
443}
444extern "C" {
445    #[doc = " @brief Gets the custom display size scaling factor of the window.\n\n @param info Display size scaling factor information for the current window.\n @param density Custom display size scaling factor of the window. A return value of -1 indicates that no custom\n     display size scaling factor has been set, or it has been reset.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
446    #[cfg(feature = "api-24")]
447    pub fn OH_WindowManager_DensityInfo_GetCustomDensity(
448        info: *const OH_WindowManager_DensityInfo,
449        density: *mut f32,
450    ) -> i32;
451}
452extern "C" {
453    #[doc = " @brief Get the system display size scaling factor, the system default display size scaling factor,\n     and the custom display size scaling factor information of the screen where the current window is located.\n\n @param windowId WindowId when window is created.\n @param info Display size scaling factor information for the current window.\n     A return value of NULL means this interface is not supported on the current device.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. Possible cause:\n             1. The window is not created or destroyed;\n             2. This window state is abnormal.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
454    #[cfg(feature = "api-24")]
455    pub fn OH_WindowManager_GetDensityInfoCopy(
456        windowId: i32,
457        info: *mut *const OH_WindowManager_DensityInfo,
458    ) -> i32;
459}
460extern "C" {
461    #[doc = " @brief Listen for changes in the display size scaling factor information of the window. The callback function is\n     triggered when any of the system display size scaling factor, system default display size scaling factor, or\n     custom display size scaling factor of the screen where the window resides changes.\n     To unlisten for changes in the display size scaling factor information of the window, call\n     OH_WindowManager_UnregisterDensityInfoChangeCallback.\n\n @param windowId WindowId when window is created.\n @param callback Callback used to return the result of density information.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. Possible cause:\n             1. The window is not created or destroyed;\n             2. This window state is abnormal.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
462    #[cfg(feature = "api-24")]
463    pub fn OH_WindowManager_RegisterDensityInfoChangeCallback(
464        windowId: i32,
465        callback: OH_WindowManager_DensityInfoCallback,
466    ) -> i32;
467}
468extern "C" {
469    #[doc = " @brief Unlisten for changes in the display size scaling factor information of the window. The callback function is\n     triggered when any of the system display size scaling factor, system default display size scaling factor, or\n     custom display size scaling factor of the screen where the window resides changes.\n     To listen for changes in the display size scaling factor information of the window, call\n     OH_WindowManager_RegisterDensityInfoChangeCallback.\n\n @param windowId WindowId when window is created.\n @param callback Callback used to return the result of density information.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. Possible cause:\n             1. The window is not created or destroyed;\n             2. This window state is abnormal.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
470    #[cfg(feature = "api-24")]
471    pub fn OH_WindowManager_UnregisterDensityInfoChangeCallback(
472        windowId: i32,
473        callback: OH_WindowManager_DensityInfoCallback,
474    ) -> i32;
475}
476extern "C" {
477    #[doc = " @brief Releases the memory occupied by DensityInfo.\n\n @param info Display size scaling factor information for the current window.\n @return Returns the status code of the execution.\n         {@link WS_OK} the function call is successful.\n         {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} Parameter error. Possible cause:\n             1. Invalid parameter range.\n @since 24"]
478    #[cfg(feature = "api-24")]
479    pub fn OH_WindowManager_DensityInfo_Release(info: *const OH_WindowManager_DensityInfo) -> i32;
480}
481#[doc = " @brief Defines a function for filtering multimodal key events.\n @param keyEvent multimodal key event. For details, see {@link Input_KeyEvent}.\n @return Returns whether to filter this event. Returning true prevents the window from dispatching it further;\n         Returns false indicates that the event is not intercepted.\n @since 12"]
482pub type OH_NativeWindowManager_KeyEventFilter =
483    ::std::option::Option<unsafe extern "C" fn(keyEvent: *mut Input_KeyEvent) -> bool>;
484extern "C" {
485    #[doc = " @brief Registers a function for filtering multimodal key events.\n\n @param windowId ID of the window.\n @param keyEventFilter Filter function for multimodal key event.\n @return Returns the status code of the execution.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} if the keyEventFilter is invalid.</li>\n     <li>Returns {@link SERVICE_ERROR} if the window manager service error occurs.</li>\n     </ul>\n @since 12"]
486    pub fn OH_NativeWindowManager_RegisterKeyEventFilter(
487        windowId: i32,
488        keyEventFilter: OH_NativeWindowManager_KeyEventFilter,
489    ) -> WindowManager_ErrorCode;
490}
491extern "C" {
492    #[doc = " @brief Unregisters a function for filtering multimodal key events.\n\n @param windowId ID of the window.\n @return Returns the status code of the execution.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link SERVICE_ERROR} if the window manager service error occurs.</li>\n     </ul>\n @since 12"]
493    pub fn OH_NativeWindowManager_UnregisterKeyEventFilter(
494        windowId: i32,
495    ) -> WindowManager_ErrorCode;
496}
497#[doc = " @brief Defines a function for filtering multimodal mouse events.\n @param mouseEvent multimodal mouse event. For details, see {@link Input_MouseEvent}.\n @return Returns whether to filter this event. Returning true prevents the window from dispatching it further;\n         returning false indicates that the event is not intercepted.\n @since 15"]
498#[cfg(feature = "api-15")]
499pub type OH_NativeWindowManager_MouseEventFilter =
500    ::std::option::Option<unsafe extern "C" fn(mouseEvent: *mut Input_MouseEvent) -> bool>;
501extern "C" {
502    #[doc = " @brief Registers a function for filtering multimodal mouse events.\n\n @param windowId ID of the window.\n @param mouseEventFilter Filter function for multimodal mouse event.\n @return Returns the status code of the execution.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} if the mouseEventFilter is invalid.</li>\n     <li>Returns {@link SERVICE_ERROR} if the window manager service error occurs.</li>\n     </ul>\n @since 15"]
503    #[cfg(feature = "api-15")]
504    pub fn OH_NativeWindowManager_RegisterMouseEventFilter(
505        windowId: i32,
506        mouseEventFilter: OH_NativeWindowManager_MouseEventFilter,
507    ) -> WindowManager_ErrorCode;
508}
509extern "C" {
510    #[doc = " @brief Unregisters a function for filtering multimodal mouse events.\n\n @param windowId ID of the window.\n @return Returns the status code of the execution.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link SERVICE_ERROR} if the window manager service error occurs.</li>\n     </ul>\n @since 15"]
511    #[cfg(feature = "api-15")]
512    pub fn OH_NativeWindowManager_UnregisterMouseEventFilter(
513        windowId: i32,
514    ) -> WindowManager_ErrorCode;
515}
516#[doc = " @brief Defines a function for filtering multimodal touch events.\n @param touchEvent multimodal touchEvent. For details, see {@link Input_TouchEvent}.\n @return Returns whether to filter this event. Returning true prevents the window from dispatching it further;\n         returning false indicates that the event is not intercepted.\n @since 15"]
517#[cfg(feature = "api-15")]
518pub type OH_NativeWindowManager_TouchEventFilter =
519    ::std::option::Option<unsafe extern "C" fn(touchEvent: *mut Input_TouchEvent) -> bool>;
520extern "C" {
521    #[doc = " @brief Registers a function for filtering multimodal touch events.\n\n @param windowId ID of the window.\n @param touchEventFilter Filter function for multimodal touch event.\n @return Returns the status code of the execution.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} if the touchEventFilter is invalid.</li>\n     <li>Returns {@link SERVICE_ERROR} if the window manager service error occurs.</li>\n     </ul>\n @since 15"]
522    #[cfg(feature = "api-15")]
523    pub fn OH_NativeWindowManager_RegisterTouchEventFilter(
524        windowId: i32,
525        touchEventFilter: OH_NativeWindowManager_TouchEventFilter,
526    ) -> WindowManager_ErrorCode;
527}
528extern "C" {
529    #[doc = " @brief Unregisters a function for filtering multimodal touch events.\n\n @param windowId ID of the window for which the function is unregistered.\n @return Returns the status code of the execution.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVAILD_WINDOW_ID} if the window id is invalid.</li>\n     <li>Returns {@link SERVICE_ERROR} if the window manager service error occurs.</li>\n     </ul>\n @since 15"]
530    #[cfg(feature = "api-15")]
531    pub fn OH_NativeWindowManager_UnregisterTouchEventFilter(
532        windowId: i32,
533    ) -> WindowManager_ErrorCode;
534}
535extern "C" {
536    #[doc = " @brief Gets the key event filter callback for the window.\n\n @param windowId ID of the window.\n @param outKeyEventFilter Output parameter for the registered key event filter callback.\n                          If no filter has been registered, *outKeyEventFilter will return NULL.\n @return Returns the error code defined by {@link WindowManager_ErrorCode}.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} if the outKeyEventFilter is NULL.</li>\n     </ul>\n @since 26.0.0"]
537    #[cfg(feature = "api-26")]
538    pub fn OH_NativeWindowManager_GetKeyEventFilter(
539        windowId: i32,
540        outKeyEventFilter: *mut OH_NativeWindowManager_KeyEventFilter,
541    ) -> WindowManager_ErrorCode;
542}
543extern "C" {
544    #[doc = " @brief Gets the mouse event filter callback for the window.\n\n @param windowId ID of the window.\n @param outMouseEventFilter Output parameter for the registered mouse event filter callback.\n                            If no filter has been registered, *outMouseEventFilter will return NULL.\n @return Returns the error code defined by {@link WindowManager_ErrorCode}.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} if the outMouseEventFilter is NULL.</li>\n     </ul>\n @since 26.0.0"]
545    #[cfg(feature = "api-26")]
546    pub fn OH_NativeWindowManager_GetMouseEventFilter(
547        windowId: i32,
548        outMouseEventFilter: *mut OH_NativeWindowManager_MouseEventFilter,
549    ) -> WindowManager_ErrorCode;
550}
551extern "C" {
552    #[doc = " @brief Gets the touch event filter callback for the window.\n\n @param windowId ID of the window.\n @param outTouchEventFilter Output parameter for the registered touch event filter callback.\n                            If no filter has been registered, *outTouchEventFilter will return NULL.\n @return Returns the error code defined by {@link WindowManager_ErrorCode}.\n     <ul>\n     <li>Returns {@link OK} if the operation is successful.</li>\n     <li>Returns {@link INVALID_WINDOW_ID} if the windowId is invalid.</li>\n     <li>Returns {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} if the outTouchEventFilter is NULL.</li>\n     </ul>\n @since 26.0.0"]
553    #[cfg(feature = "api-26")]
554    pub fn OH_NativeWindowManager_GetTouchEventFilter(
555        windowId: i32,
556        outTouchEventFilter: *mut OH_NativeWindowManager_TouchEventFilter,
557    ) -> WindowManager_ErrorCode;
558}