PebbleOS
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
compositor.h File Reference
#include <applib/ui/property_animation.h>
#include <applib/ui/window.h>

Data Structures

struct  CompositorTransition
 Implementation of a compositor transition animation. More...
 

Typedefs

typedef void(* CompositorTransitionInitFunc) (Animation *animation)
 Set up the transition animation.
 
typedef void(* CompositorTransitionUpdateFunc) (GContext *ctx, Animation *animation, uint32_t distance_normalized)
 Draw one frame of a transition.
 
typedef void(* CompositorTransitionTeardownFunc) (Animation *animation)
 Clean up after a transition finished or was cancelled.
 
typedef struct FrameBuffer FrameBuffer
 Opaque framebuffer type, see applib/graphics/framebuffer.h.
 
typedef void(* CompositorFrozenCallback) (void *data)
 Called once the compositor is frozen.
 

Enumerations

enum  CompositorTransitionDirection {
  CompositorTransitionDirectionUp , CompositorTransitionDirectionDown , CompositorTransitionDirectionLeft , CompositorTransitionDirectionRight ,
  CompositorTransitionDirectionNone
}
 Transition direction, from the current position to the next. More...
 

Functions

void compositor_init (void)
 Initialize the compositor.
 
void compositor_transition (const CompositorTransition *impl)
 Start a transition.
 
void compositor_transition_render (CompositorTransitionUpdateFunc func, Animation *animation, const AnimationProgress distance_normalized)
 Render one transition frame with the given update function.
 
void compositor_render_app (void)
 Write the app framebuffer into the system framebuffer.
 
void compositor_render_modal (void)
 Render the modal window stack into the system framebuffer.
 
void compositor_modal_render_ready (void)
 Notify that the modal needs to redraw itself to the display.
 
void compositor_app_render_ready (void)
 Notify that the app has a new frame for the display.
 
FrameBuffer * compositor_get_framebuffer (void)
 Get the system framebuffer.
 
GBitmap compositor_get_framebuffer_as_bitmap (void)
 Get the system framebuffer as a bitmap.
 
GBitmap compositor_get_app_framebuffer_as_bitmap (void)
 Get the app framebuffer as a bitmap.
 
bool compositor_is_animating (void)
 Check whether a transition between apps or modals is in progress.
 
void compositor_set_modal_transition_offset (GPoint modal_offset)
 Set the offset at which modals are drawn during transitions that redraw them.
 
void compositor_transition_cancel (void)
 Stop the current transition, if any; its teardown completes the switch.
 
void compositor_freeze (CompositorFrozenCallback callback, void *data)
 Stop new frames from the app or the modal reaching the display.
 
void compositor_unfreeze (void)
 Resume pushing frames to the display, undoing compositor_freeze().
 
void compositor_scaled_app_fb_copy (const GRect update_rect, bool copy_relative_to_origin)
 Copy part of the app framebuffer into the system framebuffer.
 
void compositor_scaled_app_fb_copy_offset (const GRect update_rect, bool copy_relative_to_origin, int16_t offset_y)
 compositor_scaled_app_fb_copy() with a vertical offset applied to the source.