PebbleOS
Loading...
Searching...
No Matches
Functions | Variables
Transitions

Ready-made compositor transitions and helpers to build new ones. More...

Functions

bool compositor_transition_app_to_app_should_be_skipped (void)
 Check whether app-to-app transitions should be skipped.
 
AnimationProgress animation_timing_scaled (AnimationProgress time_normalized, AnimationProgress interval_start, AnimationProgress interval_end)
 Rescale animation progress to a sub-interval.
 
void compositor_transition_pdcs_animation_update (GContext *ctx, GDrawCommandSequence *sequence, uint32_t distance_normalized, GColor chroma_key_color, GColor stroke_color, GColor overdraw_color, bool inner, const GPoint *framebuffer_offset)
 Draw the frame of a PDC sequence for the current point of a transition.
 

Variables

const GDrawRawImplementation g_compositor_transitions_app_fb_draw_implementation
 Draw implementation filling lines with the contents of the app framebuffer.
 

Detailed Description

Ready-made compositor transitions and helpers to build new ones.

Including this header pulls in the transitions available on the platform (see Default transitions and Legacy transitions). Each getter returns a CompositorTransition to pass to compositor_transition(); app-to-app getters return NULL when compositor_transition_app_to_app_should_be_skipped() says so, which switches without animation.

const CompositorTransition *transition =
const CompositorTransition * compositor_shutter_transition_get(CompositorTransitionDirection direction, GColor color)
Get the shutter transition between apps.
Implementation of a compositor transition animation.
Definition compositor.h:94
void compositor_transition(const CompositorTransition *impl)
Start a transition.
@ CompositorTransitionDirectionLeft
Towards the item on the left.
Definition compositor.h:57

Function Documentation

◆ animation_timing_scaled()

AnimationProgress animation_timing_scaled ( AnimationProgress  time_normalized,
AnimationProgress  interval_start,
AnimationProgress  interval_end 
)

Rescale animation progress to a sub-interval.

Parameters
time_normalizedProgress to rescale, expected between interval_start and interval_end.
interval_startProgress mapped to 0.
interval_endProgress mapped to ANIMATION_NORMALIZED_MAX.
Returns
Progress relative to the interval.

◆ compositor_transition_app_to_app_should_be_skipped()

bool compositor_transition_app_to_app_should_be_skipped ( void  )

Check whether app-to-app transitions should be skipped.

Returns
true if an opaque modal window covers the app, so the transition would not be seen.

◆ compositor_transition_pdcs_animation_update()

void compositor_transition_pdcs_animation_update ( GContext *  ctx,
GDrawCommandSequence *  sequence,
uint32_t  distance_normalized,
GColor  chroma_key_color,
GColor  stroke_color,
GColor  overdraw_color,
bool  inner,
const GPoint *  framebuffer_offset 
)

Draw the frame of a PDC sequence for the current point of a transition.

Does nothing if sequence is NULL. The sequence's red strokes are drawn with stroke_color.

Parameters
ctxGraphics context to draw into.
sequencePDC sequence whose frame to draw.
distance_normalizedAnimation progress, 0 to ANIMATION_NORMALIZED_MAX.
chroma_key_colorColor to replace with the app framebuffer, only used when inner.
stroke_colorColor for the stroke of the ring in the frame.
overdraw_colorColor for areas of the frame without app content (e.g. flip animations must draw the right color beyond the edges of the app face).
innerIf true, draw the app framebuffer inside the ring, otherwise outside.
framebuffer_offsetVisual offset of the app framebuffer. Currently ignored.

Variable Documentation

◆ g_compositor_transitions_app_fb_draw_implementation

const GDrawRawImplementation g_compositor_transitions_app_fb_draw_implementation
extern

Draw implementation filling lines with the contents of the app framebuffer.

Swap it into a graphics context to make fill operations reveal the app.