PebbleOS
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
layout_layer.h File Reference
#include "attribute.h"
#include <applib/graphics/gtypes.h>
#include <applib/ui/animation.h>
#include <applib/ui/layer.h>
#include <pbl/util/uuid.h>

Data Structures

struct  LayoutColors
 Colors of a layout. More...
 
struct  LayoutLayerImpl
 Methods of a LayoutLayer type. More...
 
struct  LayoutLayerConstructor
 Base of all layouts; can be cast to a Layer. More...
 
struct  LayoutLayerConfig
 Configuration of a new LayoutLayer. More...
 

Typedefs

typedef void(* LayoutLayerDestructor) (struct LayoutLayer *layout)
 Destructor of a LayoutLayer.
 
typedef bool(* LayoutVerifier) (bool existing_attributes[])
 Check whether attributes satisfy the requirements of a layout.
 
typedef struct GSize(* LayoutLayerSizeGetter) (GContext *ctx, struct LayoutLayer *layout)
 Get the size of a layout's content, set by its text and icons.
 
typedef void(* LayerLayerModeSetter) (struct LayoutLayer *layout, LayoutLayerMode final_mode)
 Change the mode of a layout.
 
typedef void *(* LayoutLayerContextGetter) (struct LayoutLayer *layout)
 Get the type-specific context of a layout.
 

Enumerations

enum  LayoutLayerAnchorTextDirection { LayoutLayerAnchorTextDirectionUp , LayoutLayerAnchorTextDirectionDown }
 Direction in which text is anchored. More...
 
enum  LayoutId {
  LayoutIdUnknown = 0 , LayoutIdGeneric , LayoutIdCalendar , LayoutIdReminder ,
  LayoutIdNotification , LayoutIdCommNotification , LayoutIdWeather , LayoutIdSports ,
  LayoutIdAlarm , LayoutIdHealth , NumLayoutIds , LayoutIdTest
}
 Type of a LayoutLayer, which tells which attributes to expect. More...
 
enum  LayoutLayerMode {
  LayoutLayerModeNone = 0 , LayoutLayerModePeek , LayoutLayerModePinnedFat , LayoutLayerModePinnedThin ,
  LayoutLayerModeCard , NumLayoutLayerModes
}
 Context in which a layout is displayed. More...
 

Functions

LayoutLayer * layout_create (LayoutId id, const LayoutLayerConfig *config)
 Create a layout of a type.
 
bool layout_verify (bool existing_attributes[], LayoutId id)
 Check whether attributes satisfy the requirements of a layout type.
 
GSize layout_get_size (GContext *ctx, LayoutLayer *layout)
 Get the size of a layout's content.
 
const LayoutColors * layout_get_colors (const LayoutLayer *layout)
 Get the colors of a layout.
 
const LayoutColors * layout_get_notification_colors (const LayoutLayer *layout)
 Get the colors of a notification layout.
 
void layout_set_mode (LayoutLayer *layout, LayoutLayerMode final_mode)
 Change the mode of a layout.
 
void layout_destroy (LayoutLayer *layout)
 Destroy a layout with its type's destructor.
 
void * layout_get_context (LayoutLayer *layout)
 Get the type-specific context of a layout.