Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

void setPosition(com.amazon.kepler.uitoolkit.graphics.Point point)
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. If 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()

void setSize(com.amazon.kepler.uitoolkit.graphics.Size size)
Sets the size of the window. The size represents the width and height of the window’s content area.

Parameters

size
com.amazon.kepler.uitoolkit.graphics.Size — Required The size for the window to be set.

setResponsive()

void setResponsive(bool isResponsive)
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.

Parameters

isResponsive
bool — Required If true, the window would process and respond to input events. If false, the window would become non-interactive.

setTransparent()

void setTransparent(bool isTransparent)
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.

Parameters

isTransparent
bool — Required If true, the window would be transparent. If false, the window would be opaque.

setConstrainedToScreen()

void setConstrainedToScreen(bool isConstrained)
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 false

Parameters

isConstrained
bool — Required If true, the window would be constrained to screen, false otherwise.

setDraggable()

void setDraggable(bool isDraggable)
Sets whether the window can be dragged by the user. By default it is set as false

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.
Last modified on October 29, 2026