CtkEffectContext

CtkEffectContext — A per-stage singleton that controls the render queue for effects

Synopsis

#include <ctk-effect-context.h>

                    CtkEffectContext;
                    CtkEffectContextClass;
                    CtkEffectContextPrivate;
CtkEffectContext *  ctk_effect_context_get_default_for_stage
                                                        (ClutterStage *stage);
CtkEffectContext *  ctk_effect_context_get_default_for_actor
                                                        (ClutterActor *actor);
CtkRenderTarget *   ctk_effect_context_grab_render_target_for_size
                                                        (CtkEffectContext *self,
                                                         guint width,
                                                         guint height);
CtkRenderTarget *   ctk_effect_context_grab_render_target_for_actor
                                                        (CtkEffectContext *self,
                                                         ClutterActor *actor);
CtkRenderTarget *   ctk_effect_context_grab_render_target
                                                        (CtkEffectContext *self);
void                ctk_effect_context_release_render_target
                                                        (CtkEffectContext *self,
                                                         CtkRenderTarget *target);
void                ctk_effect_context_push_render_target
                                                        (CtkEffectContext *self,
                                                         CtkRenderTarget *target);
CtkRenderTarget *   ctk_effect_context_pop_render_target
                                                        (CtkEffectContext *self);
CtkRenderTarget *   ctk_effect_context_peek_render_target
                                                        (CtkEffectContext *self);
CtkRenderTarget *   ctk_effect_context_get_utility_render_target
                                                        (CtkEffectContext *self);

Object Hierarchy

  GObject
   +----CtkEffectContext

Properties

  "stage"                    gpointer              : Read / Write / Construct Only

Description

CtkEffectContext is a per-stage singleton that controls the render queue for CtkEffects. It manages the global pool for CtkRenderTargets available to effects and holds the current active CtkRenderTarget for effects to render to.

Details

CtkEffectContext

typedef struct _CtkEffectContext CtkEffectContext;


CtkEffectContextClass

typedef struct {
} CtkEffectContextClass;


CtkEffectContextPrivate

typedef struct _CtkEffectContextPrivate CtkEffectContextPrivate;


ctk_effect_context_get_default_for_stage ()

CtkEffectContext *  ctk_effect_context_get_default_for_stage
                                                        (ClutterStage *stage);

Creates a new CtkEffectContext that will manage the stage or will return the default CtkEffectContext for the stage if one already exists.

Do not ref/unref the returned object, it will automatically be finalized when the stage it's attached to is finalized.

stage :

A ClutterStage

Returns :

The CtkEffectContext that manages the stage.

ctk_effect_context_get_default_for_actor ()

CtkEffectContext *  ctk_effect_context_get_default_for_actor
                                                        (ClutterActor *actor);

Creates a new CtkEffectContext that will manage the stage that the actor is bound to, or will return the default CtkEffectContext for that stage if one already exists.

Do not ref/unref the returned object, it will automatically be finalized when the stage it's attached to is finalized.

actor :

A ClutterActor

Returns :

The CtkEffectContext that manages the actor's ClutterStage.

ctk_effect_context_grab_render_target_for_size ()

CtkRenderTarget *   ctk_effect_context_grab_render_target_for_size
                                                        (CtkEffectContext *self,
                                                         guint width,
                                                         guint height);

self :

width :

height :

Returns :


ctk_effect_context_grab_render_target_for_actor ()

CtkRenderTarget *   ctk_effect_context_grab_render_target_for_actor
                                                        (CtkEffectContext *self,
                                                         ClutterActor *actor);

This is a convenience function to get a CtkRenderTarget from self's pool that matches the width and height of actor. You should only use this call while the ClutterAllocation of actor is valid (i.e. during a paint cycle).

self :

a CtkEffectContext

actor :

a ClutterActor

Returns :

a CtkRenderTarget from self's pool, sized to match the allocation of actor

ctk_effect_context_grab_render_target ()

CtkRenderTarget *   ctk_effect_context_grab_render_target
                                                        (CtkEffectContext *self);

Grab the first render target available without consideration of size.

self :

a CtkEffectContext

Returns :

a CtkRenderTarget from self's pool

ctk_effect_context_release_render_target ()

void                ctk_effect_context_release_render_target
                                                        (CtkEffectContext *self,
                                                         CtkRenderTarget *target);

Releases target and adds it back into self's render target pool

self :

a CtkEffectContext

target :

a CtkRenderTarget

ctk_effect_context_push_render_target ()

void                ctk_effect_context_push_render_target
                                                        (CtkEffectContext *self,
                                                         CtkRenderTarget *target);

Pushes target to the top of the render queue, causing subsequent draws to be rendered to it.

self :

a CtkEffectContext

target :

a CtkRenderTarget

ctk_effect_context_pop_render_target ()

CtkRenderTarget *   ctk_effect_context_pop_render_target
                                                        (CtkEffectContext *self);

Pops the CtkRenderTarget at the top of the render queue

self :

a CtkEffectContext

Returns :


ctk_effect_context_peek_render_target ()

CtkRenderTarget *   ctk_effect_context_peek_render_target
                                                        (CtkEffectContext *self);

self :

a CtkEffectContext

Returns :

the CtkRenderTarget at the top of the render queue

ctk_effect_context_get_utility_render_target ()

CtkRenderTarget *   ctk_effect_context_get_utility_render_target
                                                        (CtkEffectContext *self);

self :

a CtkEffectContext

Returns :

the utility CtkRenderTarget. The caller will use it to perform custom operations.

Property Details

The "stage" property

  "stage"                    gpointer              : Read / Write / Construct Only

The ClutterStage that this CtkEffectContext handles the effects for.