Class: Toybox.WatchUi.WatchFaceDelegate
- Inherits:
-
Toybox.Lang.Object
Overview
Receive events on a Watch Face.
See Also:
Instance Method Summary collapse
-
getComplicationDrawable(complication as WatchFaceConfig.ComplicationRef) as WatchUi.Drawable or WatchUi.ComplicationDrawableRef or Null
Get a Drawable for highlighting purposes.
-
onPowerBudgetExceeded(powerInfo as WatchUi.WatchFacePowerInfo) as Void
Handle a partial update exceeding the power budget.
-
onPress(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
Called when user does a touch and hold.
-
onTap(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A screen tap event has occurred.
-
onWatchFaceConfigEdited(options as { :configId as WatchFaceConfig.Id, :type as WatchUi.WatchFaceConfigType or Null, :committed as Lang.Boolean }) as Void
A watchface config change has occurred.
-
setSelectedComplication(complicationIdentifier as Lang.Number) as Void
Set the selected complication field.
Instance Method Details
getComplicationDrawable(complication as WatchFaceConfig.ComplicationRef) as WatchUi.Drawable or WatchUi.ComplicationDrawableRef or Null
Get a Drawable for highlighting purposes.
Called by system to get a Drawable for the given complication field for highlighting purposes. Only available in WatchFace config mode. Animation will be easing around the center of the Drawable. The Dc object passed to the Drawable.draw function shares the same origin as screen, e.g. at [0, 0], so it's aligned with the drawable coordinates for convenience.
onPowerBudgetExceeded(powerInfo as WatchUi.WatchFacePowerInfo) as Void
Handle a partial update exceeding the power budget.
If the onPartialUpdate() callback of the associated WatchFace exceeds the power budget of the device, this method will be called with information about the limits that were exceeded.
onPress(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
Called when user does a touch and hold
onTap(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A screen tap event has occurred.
Only available in WatchFace config mode.
Can be overridden by application to change the selected complication
,
using WatchFaceDelegate.setSelectedComplication()
onWatchFaceConfigEdited(options as { :configId as WatchFaceConfig.Id, :type as WatchUi.WatchFaceConfigType or Null, :committed as Lang.Boolean }) as Void
A watchface config change has occurred.
Only available in WatchFace config mode, application can call WatchFaceConfig.getSettings() to retrieve the current settings.
setSelectedComplication(complicationIdentifier as Lang.Number) as Void
Set the selected complication field.
Can be called by application when handling onTap
event,
to change the selected (highlighted) complication.
Only effective during WatchFace config mode.