Pebble Foundation Classes
0.2.0
C++ for Pebble
|
#include <pebble.h>
Public Attributes | |
AnimationSetupImplementation | setup |
AnimationUpdateImplementation | update |
AnimationTeardownImplementation | teardown |
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.
.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”.
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.
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.
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
.