PebbleOS
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
App glances

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.
 

Detailed Description

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.


Data Structure Documentation

◆ AppGlanceSliceInternal

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.

◆ AppGlance

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.

◆ AppGlanceSliceInternal.__unnamed66__

union AppGlanceSliceInternal.__unnamed66__

◆ AppGlanceSliceInternal.__unnamed66__.icon_and_subtitle

struct AppGlanceSliceInternal.__unnamed66__.icon_and_subtitle
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.

Enumeration Type Documentation

◆ AppGlanceSliceType

Glance slice layout.

Enumerator
AppGlanceSliceType_IconAndSubtitle 

Icon and subtitle.

AppGlanceSliceTypeCount 

Number of slice types.

Function Documentation

◆ app_glance_service_get_current_slice()

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.

Parameters
app_uuidApp UUID.
[out]slice_outCurrent slice.
Returns
false if the app has no glance, all slices expired, or on error.

◆ app_glance_service_init()

void app_glance_service_init ( void  )

Initialize the service; subscribes to database and app cache events on KernelMain.

◆ app_glance_service_init_glance()

void app_glance_service_init_glance ( AppGlance *  glance)

Initialize a glance with no slices.

Parameters
[out]glanceGlance to initialize, may be NULL.