CtkEffect

CtkEffect — The base class for all effects

Synopsis

                    CtkEffectPrivate;
void                (*CtkEffectPaintFunc)               (ClutterActor *actor);
                    CtkEffect;
void                ctk_effect_paint                    (CtkEffect *self,
                                                         CtkEffectPaintFunc func,
                                                         gboolean is_last_effect);
void                ctk_effect_set_actor                (CtkEffect *self,
                                                         ClutterActor *actor);
ClutterActor *      ctk_effect_get_actor                (CtkEffect *self);
ClutterAnimation *  ctk_effect_animate                  (CtkEffect *self,
                                                         gulong mode,
                                                         guint duration,
                                                         const gchar *first_property_name,
                                                         ...);
ClutterAnimation *  ctk_effect_get_animation            (CtkEffect *self);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----CtkEffect
               +----CtkEffectDropShadow
               +----CtkEffectGlow
               +----CtkEffectBlur

Properties

  "actor"                    gpointer              : Read / Write
  "margin"                   gint                  : Read / Write
  "opacity"                  gfloat                : Read / Write
  "strength"                 gint                  : Read / Write

Description

CtkEffect is the base class that all effects need to derive from.

Details

CtkEffectPrivate

typedef struct _CtkEffectPrivate CtkEffectPrivate;


CtkEffectPaintFunc ()

void                (*CtkEffectPaintFunc)               (ClutterActor *actor);

actor :


CtkEffect

typedef struct _CtkEffect CtkEffect;


ctk_effect_paint ()

void                ctk_effect_paint                    (CtkEffect *self,
                                                         CtkEffectPaintFunc func,
                                                         gboolean is_last_effect);

Will cause the self to paint itself. Should only be called during a paint cycle. func will be used to paint the actor that the effect is attached to directly, without going through clutter_actor_paint, which does some additional work which conflicts with the effects.

self :

a CtkEffect

func :

a CtkEffectPaintFunc

is_last_effect :


ctk_effect_set_actor ()

void                ctk_effect_set_actor                (CtkEffect *self,
                                                         ClutterActor *actor);

This is a conveniece function for CtkActor. If you want to bind an effect to an actor, you should call ctk_actor_add_effect instead.

self :

a CtkEffect

actor :

a CtkActor, or NULL. allow-none.

ctk_effect_get_actor ()

ClutterActor *      ctk_effect_get_actor                (CtkEffect *self);

self :

a CtkEffect

Returns :

the ClutterActor that this effect is bound to, or NULL

ctk_effect_animate ()

ClutterAnimation *  ctk_effect_animate                  (CtkEffect *self,
                                                         gulong mode,
                                                         guint duration,
                                                         const gchar *first_property_name,
                                                         ...);

Animates the give list of properties of self between the current value for each property and a new final value. The animation has a definite duration and a speed given by the mode. See clutter_actor_animate for more details on signal connection.

self :

a CtkEffect

mode :

an animation mode logical id

duration :

duration of the animation, in milliseconds

first_property_name :

the name of a property

... :

a NULL terminated list of property name and property values

Returns :

a ClutterAnimation object. The object is owned by the CtkEffect and should not be unrefferenced with g_object_unref(). transfer none.

ctk_effect_get_animation ()

ClutterAnimation *  ctk_effect_get_animation            (CtkEffect *self);

self :

a CtkEffect

Returns :

a ClutterAnimation for the effect, if ctk_effect_animate has been called on self.

Property Details

The "actor" property

  "actor"                    gpointer              : Read / Write

The ClutterActor this effect is bound to.


The "margin" property

  "margin"                   gint                  : Read / Write

Effect Margin Area.

Allowed values: [0,100]

Default value: 0


The "opacity" property

  "opacity"                  gfloat                : Read / Write

Effect Opacity.

Allowed values: [0,1]

Default value: 1


The "strength" property

  "strength"                 gint                  : Read / Write

Strength of the blur in the effect.

Allowed values: [0,100]

Default value: 5