Interface IUIWindow2
interface IUIWindow2
Extends IUIWindow
This interface extends IUIWindow to provide dynamic window configuration
capabilities such as window size, position, and behavior.
All methods of this interface like IUIWindow must be called on the UI thread.
Methods
setPosition()
Sets the position of the window on screen. The position is specified in screen coordinates, where (0,0) represents the top-left corner of the screen. IfvoidsetPosition(com.amazon.kepler.uitoolkit.graphics.Pointpoint)
IUIWindow2::setConstrainedToScreen is enabled, the position will be adjusted
to ensure the window remains fully visible within the screen boundaries.
Positions that would push the window out of bounds will be clamped to the
nearest valid position.
Parameters
point
com.amazon.kepler.uitoolkit.graphics.Point — Required
The new position for the window in screen coordinates.
setSize()
Sets the size of the window. The size represents the width and height of the window’s content area.voidsetSize(com.amazon.kepler.uitoolkit.graphics.Sizesize)
Parameters
size
com.amazon.kepler.uitoolkit.graphics.Size — Required
The size for the window to be set.
setResponsive()
Sets whether the window should be responsive to input events like key and touch. When set to true, the window will receive and process user input events such as keyboard input, touch gestures, and mouse interactions. When set to false, the window becomes non-interactive and all input events will pass through to windows beneath it.voidsetResponsive(boolisResponsive)
Parameters
isResponsive
bool — Required
If true, the window would process and respond to input events.
If false, the window would become non-interactive.
setTransparent()
Sets whether the window should be transparent. When set to true, the window background becomes transparent, allowing content from windows beneath it to be visible. When set to false, the window has an opaque background.voidsetTransparent(boolisTransparent)
Parameters
isTransparent
bool — Required
If true, the window would be transparent. If false, the window would be opaque.
setConstrainedToScreen()
Sets whether the window should be constrained to the screen boundaries. When set as true, the window will be constrained to remain fully visible within the screen bounds. The window cannot be moved or resized such that it extends beyond the screen edges. When set as false, the window can be positioned anywhere, including partially or completely off-screen. By default it is set as falsevoidsetConstrainedToScreen(boolisConstrained)
Parameters
isConstrained
bool — Required
If true, the window would be constrained to screen, false otherwise.
setDraggable()
Sets whether the window can be dragged by the user. By default it is set as falsevoidsetDraggable(boolisDraggable)
Parameters
isDraggable
bool — Required
If true, the window is draggable, false otherwise.
getPosition()
com.amazon.kepler.uitoolkit.graphics.Point getPosition()
Gets the current position of the window on screen.
Returns
com.amazon.kepler.uitoolkit.graphics.Point
The current position of the window in screen coordinates.
getSize()
com.amazon.kepler.uitoolkit.graphics.Size getSize()
Gets the current size of the window.
Returns
com.amazon.kepler.uitoolkit.graphics.Size
The current size of the window.
getTitle()
string getTitle()
Gets the title of the window.
Returns
string
The title string of the window.
getLevel()
UIWindowLevel getLevel()
Gets the level of the window.
Returns
UIWindowLevel
The UIWindowLevel of the window.
isResponsive()
bool isResponsive()
Gets whether the window is responsive to input events.
Returns
bool
True if the window is responsive to input events, false if window is non-interactive
isTransparent()
bool isTransparent()
Gets whether the window is transparent.
Returns
bool
True if the window is transparent, false if opaque.
isConstrainedToScreen()
bool isConstrainedToScreen()
Gets whether the window is constrained to the screen boundaries.
Returns
bool
True if the window is constrained to screen, false otherwise.
isDraggable()
bool isDraggable()
Gets whether the window can be dragged by the user.
Returns
bool
True if the window is draggable, false otherwise.

