Pebble Foundation Classes  0.2.0
C++ for Pebble
UnobstructedArea
Collaboration diagram for UnobstructedArea:

Classes

struct  UnobstructedAreaHandlers
 

Typedefs

typedef void(* UnobstructedAreaWillChangeHandler) (GRect final_unobstructed_screen_area, void *context)
 
typedef void(* UnobstructedAreaChangeHandler) (AnimationProgress progress, void *context)
 
typedef void(* UnobstructedAreaDidChangeHandler) (void *context)
 
typedef struct UnobstructedAreaHandlers UnobstructedAreaHandlers
 

Functions

void unobstructed_area_service_subscribe (UnobstructedAreaHandlers handlers, void *context)
 
void unobstructed_area_service_unsubscribe (void)
 Unsubscribe from notifications about changes to the app's unobstructed area.
 

Detailed Description

Typedef Documentation

◆ UnobstructedAreaChangeHandler

typedef void(* UnobstructedAreaChangeHandler) (AnimationProgress progress, void *context)

Handler that will be called every time the unobstructed area changes

Parameters
progressThe progress of the animation changing the unobstructed area.
contextA user-provided context.

◆ UnobstructedAreaDidChangeHandler

typedef void(* UnobstructedAreaDidChangeHandler) (void *context)

Handler that will be called after the unobstructed area has finished changing

Parameters
contextA user-provided context.

◆ UnobstructedAreaWillChangeHandler

typedef void(* UnobstructedAreaWillChangeHandler) (GRect final_unobstructed_screen_area, void *context)

Handler that will be called just before the unobstructed area will begin changing

Parameters
final_unobstructed_screen_areaThe final unobstructed screen area after the unobstructed area has finished changing.
contextA user-provided context.

Function Documentation

◆ unobstructed_area_service_subscribe()

void unobstructed_area_service_subscribe ( UnobstructedAreaHandlers  handlers,
void *  context 
)

Subscribe to be notified when the app's unobstructed area changes. When an unobstructed area begins changing, the will_change handler will be called, and every will_change call is always paired with a did_change call that occurs when it is done changing given that the will_change and did_change handlers are set. When subscribing while the unobstructed area is changing, the will_change handler will be called after subscription in the next event loop.

Parameters
handlersThe handlers that should be called when the unobstructed area changes.
contextA user-provided context that will be passed to the callback handlers.
See also
layer_get_unobstructed_bounds