Window
Since:
1.0
Version:
1.0
Summary
Files
Data Structures
Provides a drawing canvas for the , which represents the root node of a view tree. |
Enumerations
OHOS::WindowPixelFormat { = 101, OHOS::WINDOW_PIXEL_FORMAT_ARGB1555, , OHOS::WINDOW_PIXEL_FORMAT_ARGB8888 } |
Functions
Details
Enumeration Type Documentation
WindowPixelFormat
Description:
Enumerates the pixel formats of this window.
WINDOW_PIXEL_FORMAT_RGB565 | |
WINDOW_PIXEL_FORMAT_ARGB1555 | |
WINDOW_PIXEL_FORMAT_RGB888 | |
WINDOW_PIXEL_FORMAT_ARGB8888 |
BindRootView()
Description:
Binds the RootView to this window.
Parameters:
rootView | Indicates the RootView to bind. |
CreateWindow()
static [Window]($api-api-SmartVision-Devices-OHOS-Window.md)* OHOS::Window::CreateWindow (const [WindowConfig]($api-api-SmartVision-Devices-OHOS-WindowConfig.md) & config)
Description:
Creates a Window instance.
Parameters:
Returns:
Returns the Window instance if the operation is successful; returns nullptr otherwise.
DestoryWindow()
static void OHOS::Window::DestoryWindow ([Window]($api-api-SmartVision-Devices-OHOS-Window.md) * window)
Description:
Destroys a specified window.
Parameters:
window | Indicates the Window instance to destroy. |
GetRect()
virtual [Rect]($api-api-SmartVision-Devices-OHOS-Rect.md) OHOS::Window::GetRect ()
Description:
Obtains the rectangle information (position, width, and height) of this window.
Returns:
Returns the rectangle information of this window.
GetRootView()
virtual [RootView]($api-api-SmartVision-Devices-OHOS-RootView.md)* OHOS::Window::GetRootView ()
Description:
Obtains the bound to this window.
Returns:
Returns the RootView if available; returns nullptr otherwise.
GetWindowId()
Description:
Obtains the unique ID of this window.
The window ID is within [0, 31]. An ID will be reused after the current window is destroyed. A maximum of 32 windows can be displayed at the same time.
Returns:
Returns the unique ID of this window if the operation is successful; returns -1 otherwise.
Hide()
Description:
Hides this window.
LowerToBottom()
virtual void OHOS::Window::LowerToBottom ()
Description:
Lowers this window to the bottom.
virtual void OHOS::Window::MoveTo (int16_t x, int16_t y )
Description:
Moves this window to a specified position.
Parameters:
x | Indicates the x-coordinate of the target position. |
y | Indicates the y-coordinate of the target position. |
RaiseToTop()
virtual void OHOS::Window::RaiseToTop ()
Description:
Raises this window to the top.
Resize()
virtual void OHOS::Window::Resize (int16_t width, int16_t height )
Description:
Resizes this window.
Parameters:
Show()
Description:
Shows this window.
UnbindRootView()
Description:
Unbinds the RootView from this window.
Variable Documentation
opacity
uint8_t OHOS::WindowConfig::opacity
Description:
Opacity, within [0, 255]
option
uint32_t OHOS::WindowConfig::option
Description:
Other options
pixelFormat
Description:
Pixel format
[Rect]($api-api-SmartVision-Devices-OHOS-Rect.md) OHOS::WindowConfig::rect
Description: