Getter for the label of a given ActionMenuItem.
the ActionMenuItem of interest
a pointer to the string label. NULL if invalid.
Getter for the action_data pointer of a given ActionMenuitem.
the ActionMenuItem of interest
a pointer to the data. NULL if invalid.
Create a new action menu level with storage allocated for a given number of items.
levels are freed alongside the whole hierarchy so no destroy API is provided.
by default, levels are using ActionMenuLevelDisplayModeWide. Use action_menu_level_set_display_mode to change it.
the max number of items that will be displayed at that level
Set the action menu display mode.
The ActionMenuLevel whose display mode you want to change
The display mode for the action menu (3 vs. 1 item per row)
Add an action to an ActionLevel.
the level to add the action to
the text to display for the action in the menu
the callback that will be triggered when this action is actuated
data to pass to the callback for this action
a reference to the new ActionMenuItem on success, NULL if the level is full
Add a child to this ActionMenuLevel.
the parent level
the child level
the text to display in the action menu for this level
a reference to the new ActionMenuItem on success, NULL if the level is full
Destroy a hierarchy of ActionMenuLevels.
Typical implementations will cleanup memory allocated for the item label/data associated with each item in the callback
Hierarchy is traversed in post-order. In other words, all children items are freed before their parent is freed.
the root level in the hierarchy
a callback to call on every ActionMenuItem in every level
a context pointer to pass to each_cb on invocation
Get the context pointer this ActionMenu was created with.
A pointer to an ActionMenu
the context pointer initially provided in the ActionMenuConfig. NULL if none exists.
Get the root level of an ActionMenu.
the ActionMenu you want to know about
a pointer to the root ActionMenuLevel for the given ActionMenu, NULL if invalid
Open a new ActionMenu. The ActionMenu acts much like a window. It fills the whole screen and handles clicks.
the configuration info for this new ActionMenu
the new ActionMenu
Freeze the ActionMenu. The ActionMenu will no longer respond to user input.
this API should be used when waiting for asynchronous operation.
the ActionMenu
Unfreeze the ActionMenu previously frozen with action_menu_freeze.
the ActionMenu to unfreeze
Set the result window for an ActionMenu. The result window will be shown when the ActionMenu closes.
repeated call will result in only the last call to be applied, i.e. only one result window is ever set
the ActionMenu
the window to insert, pass NULL to remove the current result window
Close the ActionMenu, whether it is frozen or not.
this API can be used on a frozen ActionMenu once the data required to build the result window has been received and the result window has been set
the ActionMenu to close
whether or not show a close animation
Configuration struct for the ActionMenu.
the root level of the ActionMenu
a context pointer which will be accessbile when actions are performed
Called immediately before the ActionMenu closes.
a callback used to cleanup memory after the menu has closed
enum value that controls whether menu items are displayed in a grid (similarly to the emoji replies) or in a single column (reminiscent of MenuLayer)
Each item gets its own row.
Grid view: multiple items per row.
Callback executed after the ActionMenu has closed, so memory may be freed.
the root level passed to the ActionMenu
the ActionMenuItem for the action that was performed, NULL if the ActionMenu is closing without an action being selected by the user
the context passed to the ActionMenu
Callback executed when a given action is selected.
the action menu is closed immediately after an action is performed, unless it is frozen in the ActionMenuPerformActionCb
the action menu currently on screen
the action that was triggered
the context passed to the action menu
Callback invoked for each item in an action menu hierarchy.
the current action menu item
caller-provided context callback
Do you have questions about the Pebble SDK?
Do you need some help understanding something on this page?
You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!