PebbleOS
Loading...
Searching...
No Matches
Functions
Timeline layout animations

Icon transitions between the pin and card views of a timeline item. More...

Functions

void timeline_layout_transition_pin_to_card (TimelineLayout *pin_timeline_layout, TimelineLayout *card_timeline_layout)
 Animate the icon from a pin layout to a card layout.
 
void timeline_layout_transition_card_to_pin (TimelineLayout *card_timeline_layout, TimelineLayout *pin_timeline_layout)
 Animate the icon from a card layout back to a pin layout.
 
Animation * timeline_layout_create_up_down_animation (TimelineLayout *layout, const GRect *from, const GRect *to, const GRect *icon_from, const GRect *icon_to, uint32_t duration, InterpolateInt64Function interpolate)
 Create an animation moving a layout and its icon between two frames.
 

Detailed Description

Icon transitions between the pin and card views of a timeline item.

Function Documentation

◆ timeline_layout_create_up_down_animation()

Animation * timeline_layout_create_up_down_animation ( TimelineLayout *  layout,
const GRect *  from,
const GRect *  to,
const GRect *  icon_from,
const GRect *  icon_to,
uint32_t  duration,
InterpolateInt64Function  interpolate 
)

Create an animation moving a layout and its icon between two frames.

Parameters
layoutLayout to move.
fromStart frame of the layout.
toEnd frame of the layout.
icon_fromStart frame of the icon.
icon_toEnd frame of the icon.
durationDuration in milliseconds.
interpolateInterpolation function.
Returns
Animation.

◆ timeline_layout_transition_card_to_pin()

void timeline_layout_transition_card_to_pin ( TimelineLayout *  card_timeline_layout,
TimelineLayout *  pin_timeline_layout 
)

Animate the icon from a card layout back to a pin layout.

The pin icon is hidden until the animation stops. Does nothing if the card icon cannot be loaded.

Parameters
card_timeline_layoutLayout of the card.
pin_timeline_layoutLayout of the pin.

◆ timeline_layout_transition_pin_to_card()

void timeline_layout_transition_pin_to_card ( TimelineLayout *  pin_timeline_layout,
TimelineLayout *  card_timeline_layout 
)

Animate the icon from a pin layout to a card layout.

Runs for TIMELINE_CARD_TRANSITION_MS. Does nothing if the pin icon cannot be loaded.

Parameters
pin_timeline_layoutLayout of the pin.
card_timeline_layoutLayout of the card.