oh_window.h
概述
定义窗口管理的相关接口,主要用于设置和获取指定窗口的属性,以及设置指定窗口的状态栏样式、导航栏样式。
引用文件:<window_manager/oh_window.h>
系统能力: SystemCapability.Window.SessionManager
库: libnative_window_manager.so
起始版本: 15
相关模块:WindowManager_NativeModule
汇总
函数
| 名称 | 描述 |
|---|---|
| int32_t OH_WindowManager_SetWindowStatusBarEnabled (int32_t windowId, bool enabled, bool enableAnimation) | 设置指定窗口是否显示状态栏。 |
| int32_t OH_WindowManager_SetWindowStatusBarColor (int32_t windowId, int32_t color) | 设置指定窗口的状态栏内容颜色。 |
| int32_t OH_WindowManager_SetWindowNavigationBarEnabled (int32_t windowId, bool enabled, bool enableAnimation) | 设置指定窗口是否显示导航栏。 |
| int32_t OH_WindowManager_GetWindowAvoidArea (int32_t windowId, WindowManager_AvoidAreaType type, WindowManager_AvoidArea *avoidArea) | 获取指定窗口的避让区域。 |
| WindowManager_ErrorCode OH_WindowManager_IsWindowShown (int32_t windowId, bool *isShow) | 判断指定窗口是否显示。 |
| WindowManager_ErrorCode OH_WindowManager_ShowWindow (int32_t windowId) | 显示指定窗口。 |
| int32_t OH_WindowManager_SetWindowTouchable (int32_t windowId, bool isTouchable) | 设置指定窗口是否可触。 |
| int32_t OH_WindowManager_SetWindowFocusable (int32_t windowId, bool isFocusable) | 设置指定窗口是否可获焦。 |
| int32_t OH_WindowManager_SetWindowBackgroundColor (int32_t windowId, const char *color) | 设置指定窗口背景颜色。 |
| int32_t OH_WindowManager_SetWindowBrightness (int32_t windowId, float brightness) | 设置指定窗口的屏幕亮度。 |
| int32_t OH_WindowManager_SetWindowKeepScreenOn (int32_t windowId, bool isKeepScreenOn) | 设置指定窗口是否开启屏幕常亮。 |
| int32_t OH_WindowManager_SetWindowPrivacyMode (int32_t windowId, bool isPrivacy) | 设置指定窗口是否开启隐私模式。 |
| int32_t OH_WindowManager_GetWindowProperties (int32_t windowId, WindowManager_WindowProperties *windowProperties) | 获取指定窗口属性。 |
| int32_t OH_WindowManager_Snapshot (int32_t windowId, OH_PixelmapNative *pixelMap) | 获取指定窗口截图。 |