/* automatically generated by rust-bindgen 0.65.1 */
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(clippy::missing_safety_doc)]
// bindgen's bitfield accessors transmute/cast between identical types.
#![allow(clippy::useless_transmute)]
#![allow(clippy::unnecessary_cast)]
pub use ohos_multi_modal_input_sys::{Input_KeyEvent, Input_MouseEvent, Input_TouchEvent};
#[link(name = "native_window_manager")]
unsafe extern "C" {}
#[doc = " @brief Describes the pixel image information.\n\n @since 15"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PixelmapNative {
_unused: [u8; 0],
}
#[cfg(feature = "api-26")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_WindowManager_FrameMetrics {
_unused: [u8; 0],
}
#[doc = " @brief Frame metrics callback type.\n\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub type OH_WindowManager_FrameMetricsMeasuredCallback = ::std::option::Option<
unsafe extern "C" fn(windowId: i32, metrics: *const OH_WindowManager_FrameMetrics),
>;
#[cfg(feature = "api-24")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_WindowManager_DensityInfo {
_unused: [u8; 0],
}
#[doc = " @brief Density info callback type.\n\n @since 24"]
#[cfg(feature = "api-24")]
pub type OH_WindowManager_DensityInfoCallback = ::std::option::Option<
unsafe extern "C" fn(windowId: i32, info: *const OH_WindowManager_DensityInfo),
>;
#[doc = " Successful."]
pub const WindowManager_ErrorCode_OK: WindowManager_ErrorCode = 0;
#[doc = " No permission.\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_NO_PERMISSION: WindowManager_ErrorCode =
201;
#[doc = " Invalid parameter.\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_INVALID_PARAM: WindowManager_ErrorCode =
401;
#[doc = " Not supported by the device.\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED:
WindowManager_ErrorCode = 801;
#[doc = " Invalid window ID."]
pub const WindowManager_ErrorCode_INVAILD_WINDOW_ID: WindowManager_ErrorCode = 1000;
#[doc = " Invalid window ID.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const WindowManager_ErrorCode_INVALID_WINDOW_ID: WindowManager_ErrorCode = 1000;
#[doc = " Service error."]
pub const WindowManager_ErrorCode_SERVICE_ERROR: WindowManager_ErrorCode = 2000;
#[doc = " Abnormal window status.\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL: WindowManager_ErrorCode =
1300002;
#[doc = " Abnormal window manager service.\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL:
WindowManager_ErrorCode = 1300003;
#[doc = " Failed to destroy the PiP window.\n @since 20"]
#[cfg(feature = "api-20")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_DESTROY_FAILED:
WindowManager_ErrorCode = 1300011;
#[doc = " Abnormal PiP status.\n @since 20"]
#[cfg(feature = "api-20")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_STATE_ABNORMAL:
WindowManager_ErrorCode = 1300012;
#[doc = " Failed to create the PiP window.\n @since 20"]
#[cfg(feature = "api-20")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_CREATE_FAILED:
WindowManager_ErrorCode = 1300013;
#[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"]
#[cfg(feature = "api-20")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR:
WindowManager_ErrorCode = 1300014;
#[doc = " Repeated PiP operation.\n @since 20"]
#[cfg(feature = "api-20")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_PIP_REPEATED_OPERATION:
WindowManager_ErrorCode = 1300015;
#[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"]
#[cfg(feature = "api-20")]
pub const WindowManager_ErrorCode_WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM:
WindowManager_ErrorCode = 1300016;
#[doc = " @brief Enumerates the status codes returned by the window manager interface.\n\n @since 12"]
pub type WindowManager_ErrorCode = u32;
#[doc = " System avoid area."]
#[cfg(feature = "api-15")]
pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM:
WindowManager_AvoidAreaType = 0;
#[doc = " Cutout area."]
#[cfg(feature = "api-15")]
pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_CUTOUT:
WindowManager_AvoidAreaType = 1;
#[doc = " System gesture area."]
#[cfg(feature = "api-15")]
pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_SYSTEM_GESTURE:
WindowManager_AvoidAreaType = 2;
#[doc = " Keyboard area."]
#[cfg(feature = "api-15")]
pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_KEYBOARD:
WindowManager_AvoidAreaType = 3;
#[doc = " Navigation bar area."]
#[cfg(feature = "api-15")]
pub const WindowManager_AvoidAreaType_WINDOW_MANAGER_AVOID_AREA_TYPE_NAVIGATION_INDICATOR:
WindowManager_AvoidAreaType = 4;
#[doc = " @brief Enumerates the avoid area types.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub type WindowManager_AvoidAreaType = u32;
#[doc = " Child window.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_APP: WindowManager_WindowType = 0;
#[doc = " Main window.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_MAIN: WindowManager_WindowType = 1;
#[doc = " Global float window.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_FLOAT: WindowManager_WindowType = 8;
#[doc = " Modal window.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub const WindowManager_WindowType_WINDOW_MANAGER_WINDOW_TYPE_DIALOG: WindowManager_WindowType = 16;
#[doc = " @brief Enumerates the window types.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub type WindowManager_WindowType = u32;
#[doc = " @brief The struct describes the window rectangle, including the window position, width, and height.\n\n @since 15"]
#[cfg(feature = "api-15")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WindowManager_Rect {
#[doc = " X coordinate of the window, in px. The value is an integer."]
pub posX: i32,
#[doc = " Y coordinate of the window, in px. The value is an integer."]
pub posY: i32,
#[doc = " Window width, in px. The value is an integer."]
pub width: u32,
#[doc = " Window height, in px. The value is an integer."]
pub height: u32,
}
#[doc = " @brief Describes the configuration of the main window screenshot.\n\n @since 21"]
#[cfg(feature = "api-21")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WindowManager_WindowSnapshotConfig {
#[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."]
pub useCache: bool,
}
#[doc = " @brief The struct describes the main window information.\n\n @since 21"]
#[cfg(feature = "api-21")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WindowManager_MainWindowInfo {
#[doc = " ID of the display to which the main window belongs."]
pub displayId: u64,
#[doc = " Window ID. The default value is **0**, and the value is an integer."]
pub windowId: i32,
#[doc = " Foreground/Background status of the main window. **true** if the main window is in the foreground, **false**\n otherwise."]
pub showing: bool,
#[doc = " Pointer to the task name of the main window."]
pub label: *const ::std::os::raw::c_char,
}
#[doc = " @brief The struct describes the window properties.\n\n @since 15"]
#[cfg(feature = "api-15")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WindowManager_WindowProperties {
#[doc = " Position and size of the window."]
pub windowRect: WindowManager_Rect,
#[doc = " Size of the drawable area within the window."]
pub drawableRect: WindowManager_Rect,
#[doc = " Window type."]
pub type_: WindowManager_WindowType,
#[doc = " Whether the window is in full-screen mode. The default value is **false**. **true** if in full-screen mode, **\n false** otherwise."]
pub isFullScreen: bool,
#[doc = " Whether the window layout is immersive. The default value is **false**. **true** if immersive, **false**\n otherwise."]
pub isLayoutFullScreen: bool,
#[doc = " Whether the window is focusable. The default value is **true**. **true** if focusable, **false** otherwise."]
pub focusable: bool,
#[doc = " Whether the window is touchable. The default value is **true**. **true** if touchable, **false** otherwise."]
pub touchable: bool,
#[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."]
pub brightness: f32,
#[doc = " Whether the screen is steady on. The default value is **false**. **true** if steady on, **false** otherwise."]
pub isKeepScreenOn: bool,
#[doc = " Whether privacy mode is enabled for the window. The default value is **false**. **true** if enabled, **false**\n otherwise."]
pub isPrivacyMode: bool,
#[doc = " Whether the window is transparent. The default value is **false**. **true** if transparent, **false** otherwise."]
pub isTransparent: bool,
#[doc = " Window ID. The default value is **0**, and the value is an integer."]
pub id: u32,
#[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."]
pub displayId: u32,
}
#[doc = " @brief The struct describes the avoid area.\n\n @since 15"]
#[cfg(feature = "api-15")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WindowManager_AvoidArea {
#[doc = " Top rectangle of the avoid area."]
pub topRect: WindowManager_Rect,
#[doc = " Left rectangle of the avoid area."]
pub leftRect: WindowManager_Rect,
#[doc = " Right rectangle of the avoid area."]
pub rightRect: WindowManager_Rect,
#[doc = " Bottom rectangle of the avoid area."]
pub bottomRect: WindowManager_Rect,
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowStatusBarEnabled(
windowId: i32,
enabled: bool,
enableAnimation: bool,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowStatusBarColor(windowId: i32, color: i32) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowNavigationBarEnabled(
windowId: i32,
enabled: bool,
enableAnimation: bool,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_GetWindowAvoidArea(
windowId: i32,
type_: WindowManager_AvoidAreaType,
avoidArea: *mut WindowManager_AvoidArea,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_IsWindowShown(windowId: i32, isShow: *mut bool) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_ShowWindow(windowId: i32) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowTouchable(windowId: i32, isTouchable: bool) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowFocusable(windowId: i32, isFocusable: bool) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowBackgroundColor(
windowId: i32,
color: *const ::std::os::raw::c_char,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowBrightness(windowId: i32, brightness: f32) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowKeepScreenOn(windowId: i32, isKeepScreenOn: bool) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_SetWindowPrivacyMode(windowId: i32, isPrivacy: bool) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_GetWindowProperties(
windowId: i32,
windowProperties: *mut WindowManager_WindowProperties,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_WindowManager_Snapshot(windowId: i32, pixelMap: *mut OH_PixelmapNative) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-17")]
pub fn OH_WindowManager_GetAllWindowLayoutInfoList(
displayId: i64,
windowLayoutInfoList: *mut *mut WindowManager_Rect,
windowLayoutInfoSize: *mut usize,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-17")]
pub fn OH_WindowManager_ReleaseAllWindowLayoutInfoList(
windowLayoutInfoList: *mut WindowManager_Rect,
);
}
extern "C" {
#[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"]
#[cfg(feature = "api-20")]
pub fn OH_WindowManager_InjectTouchEvent(
windowId: i32,
touchEvent: *mut Input_TouchEvent,
windowX: i32,
windowY: i32,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-21")]
pub fn OH_WindowManager_GetAllMainWindowInfo(
infoList: *mut *mut WindowManager_MainWindowInfo,
mainWindowInfoSize: *mut usize,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-21")]
pub fn OH_WindowManager_ReleaseAllMainWindowInfo(infoList: *mut WindowManager_MainWindowInfo);
}
#[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"]
#[cfg(feature = "api-21")]
pub type OH_WindowManager_WindowSnapshotCallback = ::std::option::Option<
unsafe extern "C" fn(
snapshotPixelMapList: *mut *const OH_PixelmapNative,
snapshotListSize: usize,
),
>;
extern "C" {
#[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"]
#[cfg(feature = "api-21")]
pub fn OH_WindowManager_GetMainWindowSnapshot(
windowIdList: *mut i32,
windowIdListSize: usize,
config: WindowManager_WindowSnapshotConfig,
callback: OH_WindowManager_WindowSnapshotCallback,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-21")]
pub fn OH_WindowManager_ReleaseMainWindowSnapshot(
snapshotPixelMapList: *const OH_PixelmapNative,
);
}
extern "C" {
#[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"]
#[cfg(feature = "api-22")]
pub fn OH_WindowManager_LockCursor(windowId: i32, isCursorFollowMovement: bool) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-22")]
pub fn OH_WindowManager_UnlockCursor(windowId: i32) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_WindowManager_FrameMetrics_IsFirstDrawFrame(
metrics: *const OH_WindowManager_FrameMetrics,
isFirstDrawFrame: *mut bool,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_WindowManager_FrameMetrics_GetInputHandlingDuration(
metrics: *const OH_WindowManager_FrameMetrics,
duration: *mut u64,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_WindowManager_FrameMetrics_GetLayoutMeasureDuration(
metrics: *const OH_WindowManager_FrameMetrics,
duration: *mut u64,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_WindowManager_FrameMetrics_GetVsyncTimestamp(
metrics: *const OH_WindowManager_FrameMetrics,
timestamp: *mut u64,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_WindowManager_RegisterFrameMetricsMeasuredCallback(
windowId: i32,
callback: OH_WindowManager_FrameMetricsMeasuredCallback,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_WindowManager_UnregisterFrameMetricsMeasuredCallback(
windowId: i32,
callback: OH_WindowManager_FrameMetricsMeasuredCallback,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_DensityInfo_GetDefaultDensity(
info: *const OH_WindowManager_DensityInfo,
density: *mut f32,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_DensityInfo_GetSystemDensity(
info: *const OH_WindowManager_DensityInfo,
density: *mut f32,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_DensityInfo_GetCustomDensity(
info: *const OH_WindowManager_DensityInfo,
density: *mut f32,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_GetDensityInfoCopy(
windowId: i32,
info: *mut *const OH_WindowManager_DensityInfo,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_RegisterDensityInfoChangeCallback(
windowId: i32,
callback: OH_WindowManager_DensityInfoCallback,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_UnregisterDensityInfoChangeCallback(
windowId: i32,
callback: OH_WindowManager_DensityInfoCallback,
) -> i32;
}
extern "C" {
#[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"]
#[cfg(feature = "api-24")]
pub fn OH_WindowManager_DensityInfo_Release(info: *const OH_WindowManager_DensityInfo) -> i32;
}
#[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"]
pub type OH_NativeWindowManager_KeyEventFilter =
::std::option::Option<unsafe extern "C" fn(keyEvent: *mut Input_KeyEvent) -> bool>;
extern "C" {
#[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"]
pub fn OH_NativeWindowManager_RegisterKeyEventFilter(
windowId: i32,
keyEventFilter: OH_NativeWindowManager_KeyEventFilter,
) -> WindowManager_ErrorCode;
}
extern "C" {
#[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"]
pub fn OH_NativeWindowManager_UnregisterKeyEventFilter(
windowId: i32,
) -> WindowManager_ErrorCode;
}
#[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"]
#[cfg(feature = "api-15")]
pub type OH_NativeWindowManager_MouseEventFilter =
::std::option::Option<unsafe extern "C" fn(mouseEvent: *mut Input_MouseEvent) -> bool>;
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_NativeWindowManager_RegisterMouseEventFilter(
windowId: i32,
mouseEventFilter: OH_NativeWindowManager_MouseEventFilter,
) -> WindowManager_ErrorCode;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_NativeWindowManager_UnregisterMouseEventFilter(
windowId: i32,
) -> WindowManager_ErrorCode;
}
#[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"]
#[cfg(feature = "api-15")]
pub type OH_NativeWindowManager_TouchEventFilter =
::std::option::Option<unsafe extern "C" fn(touchEvent: *mut Input_TouchEvent) -> bool>;
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_NativeWindowManager_RegisterTouchEventFilter(
windowId: i32,
touchEventFilter: OH_NativeWindowManager_TouchEventFilter,
) -> WindowManager_ErrorCode;
}
extern "C" {
#[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"]
#[cfg(feature = "api-15")]
pub fn OH_NativeWindowManager_UnregisterTouchEventFilter(
windowId: i32,
) -> WindowManager_ErrorCode;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_NativeWindowManager_GetKeyEventFilter(
windowId: i32,
outKeyEventFilter: *mut OH_NativeWindowManager_KeyEventFilter,
) -> WindowManager_ErrorCode;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_NativeWindowManager_GetMouseEventFilter(
windowId: i32,
outMouseEventFilter: *mut OH_NativeWindowManager_MouseEventFilter,
) -> WindowManager_ErrorCode;
}
extern "C" {
#[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"]
#[cfg(feature = "api-26")]
pub fn OH_NativeWindowManager_GetTouchEventFilter(
windowId: i32,
outTouchEventFilter: *mut OH_NativeWindowManager_TouchEventFilter,
) -> WindowManager_ErrorCode;
}