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 IViewContext

interface IViewContext
Extends com.amazon.apmf.IStandard Interface holding the necessary information which is related to this view which can aid in defining customization of the view drawing.

Methods

getAttachmentLayer()

com.amazon.kepler.uitoolkit.graphics.ILayer* getAttachmentLayer()
Returns the attachment layer associated with the current context. Attachment layer holds all the child layers for the IView.

Returns

com.amazon.kepler.uitoolkit.graphics.ILayer* ILayer Layer instance associated with this context.

getRootLayer()

com.amazon.kepler.uitoolkit.graphics.ILayer* getRootLayer()
Returns the root layer of the view associated with the current context.

Returns

com.amazon.kepler.uitoolkit.graphics.ILayer* ILayer Layer instance associated with this context.

requestFrame()

bool requestFrame()
Calls the graphics layer to request a new frame event to be relayed to this view. This will enqueue a callback via the object added in IViewContext::addFrameEventListener when a new frame is about to be presented on the window.

Returns

bool bool Whether the frame event request was successfully acknowledged or not.

addFrameEventListener()

com.amazon.apmf.ISubscription* addFrameEventListener(IFrameEventListener* frameEventListener)
This method adds frame event listener and returns a subscription object related to it. Frame events are used to listen to display sync events.

Parameters

frameEventListener
IFrameEventListener* — Required Pointer to an instance of IFrameEventListener.

Returns

com.amazon.apmf.ISubscription* ISubscription object related to the listener
Last modified on October 29, 2026