OHOS::Window

Overview

Related Modules:

Window

Description:

Provides a drawing canvas for the RootView, which represents the root node of a view tree.

Each window is bound to a RootView. For details, see RootView. This class also provides window management capabilities, including creating, destroying, showing, hiding, moving, resizing a window, raising a window to the top, and lowering a window to the bottom.

Since:

1.0

Version:

1.0

Summary

Public Member Functions

Public Member Function Name Description
BindRootView (RootView rootView)=0 virtual void Binds the RootView to this window.
UnbindRootView ()=0 virtual void Unbinds the RootView from this window.
GetRootView ()=0 virtual RootView Obtains the RootView bound to this window.
GetRect ()=0 virtual Rect Obtains the rectangle information (position, width, and height) of this window.
Show ()=0 virtual void Shows this window.
Hide ()=0 virtual void Hides this window.
MoveTo (int16_t x, int16_t y)=0 virtual void Moves this window to a specified position.
Resize (int16_t width, int16_t height)=0 virtual void Resizes this window.
RaiseToTop ()=0 virtual void Raises this window to the top.
LowerToBottom ()=0 virtual void Lowers this window to the bottom.
GetWindowId ()=0 virtual int32_t Obtains the unique ID of this window.

Static Public Member Functions

Static Public Member Function Name Description
CreateWindow (const WindowConfig &config) static Window Creates a Window instance.
DestoryWindow (Window window) static void Destroys a specified window.