Pebble Foundation Classes  0.2.0
C++ for Pebble
AnimationImplementation Struct Reference

#include <pebble.h>

Public Attributes

AnimationSetupImplementation setup
 
AnimationUpdateImplementation update
 
AnimationTeardownImplementation teardown
 

Detailed Description

The 3 callbacks that implement a custom animation. Only the .update callback is mandatory, .setup and .teardown are optional. See the documentation with the function pointer typedefs for more information.

Note
The .setup callback is called immediately after scheduling the animation, regardless if there is a delay set for that animation using animation_set_delay().

The diagram below illustrates the order in which callbacks can be expected to get called over the life cycle of an animation. It also illustrates where the implementation of different animation callbacks are intended to be “living”.

See also
AnimationSetupImplementation
AnimationUpdateImplementation
AnimationTeardownImplementation

Member Data Documentation

◆ setup

AnimationSetupImplementation AnimationImplementation::setup

Called by the animation system when an animation is scheduled, to prepare it for running. This callback is optional and can be left NULL when not needed.

◆ teardown

AnimationTeardownImplementation AnimationImplementation::teardown

Called by the animation system when an animation is unscheduled, to clean up after it has run. This callback is optional and can be left NULL when not needed.

◆ update

AnimationUpdateImplementation AnimationImplementation::update

Called by the animation system when the animation needs to calculate the next animation frame. This callback is mandatory and should not be left NULL.


The documentation for this struct was generated from the following file: