PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
timeline_layout.h File Reference
#include "layout_layer.h"
#include "layout_node.h"
#include <applib/graphics/gtypes.h>
#include <applib/graphics/gpath.h>
#include <applib/ui/status_bar_layer.h>
#include <applib/ui/kino/kino_layer.h>
#include <apps/system/timeline/text_node.h>
#include <pbl/services/clock.h>
#include <pbl/services/timeline/timeline.h>
#include <pbl/services/timeline/timeline_resources.h>

Data Structures

struct  TimelineLayoutInfo
 Timing information of the pin rendered by a TimelineLayout. More...
 
struct  TimelineLayout
 Layout rendering a pin; can be cast to a LayoutLayer. More...
 
struct  TimelineLayoutImpl
 Implementation of a TimelineLayout type. More...
 
struct  TimelineLayoutImpl.attributes
 Attributes shown in the pin view. More...
 

Macros

#define TIMELINE_MAX_BOX_HEIGHT   2500
 Maximum height of a card view, in pixels.
 
#define TIMELINE_TOP_MARGIN   10
 Top margin of the pin view, in pixels.
 
#define TIMELINE_CARD_ARROW_HEIGHT   13
 Height of the page break arrow of a card, in pixels.
 
#define TIMELINE_CARD_MARGIN   PBL_IF_RECT_ELSE(7, 12)
 Horizontal margin of a card, in pixels.
 
#define TIMELINE_CARD_TRANSITION_MS   (interpolate_moook_duration())
 Duration of the pin to card transition, in milliseconds.
 
#define TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT
 Bottom margin of a card body section header, in pixels.
 
#define TIMELINE_CARD_BODY_MARGIN_HEIGHT
 Bottom margin of a card body section, in pixels.
 

Typedefs

typedef GTextNode *(* TimelineLayoutViewConstructor) (TimelineLayout *layout)
 Build the card view of a layout.
 
typedef void(* TimelineLayoutViewDeinitializer) (TimelineLayout *layout)
 Release resources of a card view before its nodes are destroyed.
 
typedef const char *(* TimelineLayoutPrimaryTextGetter) (const TimelineLayout *layout)
 Get the primary text of a layout.
 

Enumerations

enum  TimelineScrollDirection { TimelineScrollDirectionUp , TimelineScrollDirectionDown }
 Scroll direction of the Timeline. More...
 

Functions

TimelineResourceId timeline_layout_get_icon_resource_id (LayoutLayerMode mode, const AttributeList *attributes, TimelineResourceSize icon_size, TimelineResourceId fallback_resource)
 Pick the icon of a layout from its attributes.
 
void timeline_layout_init (TimelineLayout *layout, const LayoutLayerConfig *config, const TimelineLayoutImpl *timeline_layout_impl)
 Initialize a TimelineLayout, picking its icon from the attributes.
 
void timeline_layout_init_with_icon_id (TimelineLayout *layout, const LayoutLayerConfig *config, const TimelineLayoutImpl *timeline_layout_impl, TimelineResourceId icon_resource)
 Initialize a TimelineLayout with a given icon.
 
void timeline_layout_init_info (TimelineLayoutInfo *info, TimelineItem *item, time_t current_day)
 Fill the timing information of a pin.
 
void timeline_layout_deinit (TimelineLayout *timeline_layout)
 Release the resources of a TimelineLayout without freeing it.
 
void timeline_layout_get_icon_frame (const GRect *bounds, TimelineScrollDirection scroll_direction, GRect *frame)
 Get the frame of the pin icon.
 
GSize timeline_layout_get_content_size (GContext *ctx, LayoutLayer *layout)
 LayoutLayerSizeGetter of timeline layouts.
 
void timeline_layout_destroy (LayoutLayer *layout)
 LayoutLayerDestructor of timeline layouts; deinitializes and frees the layout.
 
void timeline_layout_change_mode (LayoutLayer *layout, LayoutLayerMode final_mode)
 Mode setter of timeline layouts; rebuilds the view for the new mode.
 
const LayoutColors * timeline_layout_get_colors (const LayoutLayer *layout)
 Colors getter of timeline layouts.
 
void timeline_layout_init_view (TimelineLayout *layout, LayoutLayerMode mode)
 Build the view of a layout for a mode and measure it.
 
void timeline_layout_deinit_view (TimelineLayout *layout)
 Destroy the view of a layout.
 
void timeline_layout_render_view (TimelineLayout *timeline_layout, GContext *ctx)
 Draw the view of a layout.
 
void timeline_layout_get_size (TimelineLayout *timeline_layout, GContext *ctx, GSize *size_out)
 Measure the view of a layout.
 
GTextNode * timeline_layout_create_card_view_from_config (const TimelineLayout *layout, const LayoutNodeConfig *config)
 Build a card view from a vertical container config.
 
GTextNodeCustom * timeline_layout_create_icon_node (const TimelineLayout *layout)
 Create a node positioning the layout's icon.
 
GTextNodeCustom * timeline_layout_create_page_break_node (const TimelineLayout *layout)
 Create a page break node, which draws the glance arrow.
 
void timeline_layout_time_text_update (const LayoutLayer *layout, const LayoutNodeTextDynamicConfig *config, char *buffer, bool render)
 LayoutNodeTextDynamicUpdate writing the start time of the pin.