|
PebbleOS
|
App glances: per-app slices shown in the launcher. More...
Data Structures | |
| struct | AppGlanceSliceInternal |
| Glance slice as stored by the firmware. More... | |
| struct | AppGlance |
| App glance: a list of slices. More... | |
| union | AppGlanceSliceInternal.__unnamed66__ |
| struct | AppGlanceSliceInternal.__unnamed66__.icon_and_subtitle |
| Data of AppGlanceSliceType_IconAndSubtitle slices. More... | |
Enumerations | |
| enum | AppGlanceSliceType { AppGlanceSliceType_IconAndSubtitle = 0 , AppGlanceSliceTypeCount } |
| Glance slice layout. More... | |
Functions | |
| void | app_glance_service_init_glance (AppGlance *glance) |
| Initialize a glance with no slices. | |
| void | app_glance_service_init (void) |
| Initialize the service; subscribes to database and app cache events on KernelMain. | |
| bool | app_glance_service_get_current_slice (const Uuid *app_uuid, AppGlanceSliceInternal *slice_out) |
| Get the current slice of an app's glance. | |
App glances: per-app slices shown in the launcher.
Glances are stored in the app glance database. The service emits a PEBBLE_APP_GLANCE_EVENT when an app's glance changes and deletes the glance when the app is removed from the app cache.
| struct AppGlanceSliceInternal |
Glance slice as stored by the firmware.
Named "internal" to avoid a conflict with the SDK AppGlanceSlice.
| Data Fields | ||
|---|---|---|
| union AppGlanceSliceInternal.__unnamed66__ | __unnamed__ | |
| time_t | expiration_time | Time after which the slice is no longer shown, or 0 if it never expires. |
| AppGlanceSliceType | type | Layout of the slice. |
| struct AppGlance |
App glance: a list of slices.
| Data Fields | ||
|---|---|---|
| size_t | num_slices | Number of valid entries in slices. |
| AppGlanceSliceInternal | slices[APP_GLANCE_DB_MAX_SLICES_PER_GLANCE] | Slices. |
| union AppGlanceSliceInternal.__unnamed66__ |
| Data Fields | ||
|---|---|---|
| struct AppGlanceSliceInternal.__unnamed66__.icon_and_subtitle | icon_and_subtitle | Data of AppGlanceSliceType_IconAndSubtitle slices. |
| struct AppGlanceSliceInternal.__unnamed66__.icon_and_subtitle |
Data of AppGlanceSliceType_IconAndSubtitle slices.
| Data Fields | ||
|---|---|---|
| uint32_t | icon_resource_id | Published resource id of the icon. |
| char | template_string[ATTRIBUTE_APP_GLANCE_SUBTITLE_MAX_LEN+1] | Subtitle template string, zero terminated. |
| enum AppGlanceSliceType |
| bool app_glance_service_get_current_slice | ( | const Uuid * | app_uuid, |
| AppGlanceSliceInternal * | slice_out | ||
| ) |
Get the current slice of an app's glance.
The current slice is the unexpired one expiring soonest, or a never-expiring one if no other is left.
| app_uuid | App UUID. | |
| [out] | slice_out | Current slice. |
| void app_glance_service_init | ( | void | ) |
Initialize the service; subscribes to database and app cache events on KernelMain.
| void app_glance_service_init_glance | ( | AppGlance * | glance | ) |
Initialize a glance with no slices.
| [out] | glance | Glance to initialize, may be NULL. |