ClutterActor

ClutterActor — Base abstract class for all visual stage actors.

Synopsis




#define     CLUTTER_TYPE_GEOMETRY
#define     CLUTTER_TYPE_ACTOR_BOX
#define     CLUTTER_ACTOR_SET_FLAGS         (e,f)
#define     CLUTTER_ACTOR_UNSET_FLAGS       (e,f)
#define     CLUTTER_ACTOR_IS_MAPPED         (e)
#define     CLUTTER_ACTOR_IS_REALIZED       (e)
#define     CLUTTER_ACTOR_IS_VISIBLE        (e)
            ClutterActorBox;
            ClutterActorPrivate;
            ClutterGeometry;
void        (*ClutterCallback)              (ClutterActor *actor,
                                             gpointer data);
enum        ClutterActorFlags;
GType       clutter_actor_box_get_type      (void);
            ClutterActor;
GType       clutter_actor_get_type          (void);
void        clutter_actor_show              (ClutterActor *self);
void        clutter_actor_hide              (ClutterActor *self);
void        clutter_actor_realize           (ClutterActor *self);
void        clutter_actor_unrealize         (ClutterActor *self);
void        clutter_actor_paint             (ClutterActor *self);
void        clutter_actor_queue_redraw      (ClutterActor *self);
void        clutter_actor_request_coords    (ClutterActor *self,
                                             ClutterActorBox *box);
void        clutter_actor_allocate_coords   (ClutterActor *self,
                                             ClutterActorBox *box);
void        clutter_actor_set_geometry      (ClutterActor *self,
                                             ClutterGeometry *geom);
void        clutter_actor_get_geometry      (ClutterActor *self,
                                             ClutterGeometry *geom);
void        clutter_actor_get_coords        (ClutterActor *self,
                                             gint *x1,
                                             gint *y1,
                                             gint *x2,
                                             gint *y2);
void        clutter_actor_set_position      (ClutterActor *self,
                                             gint x,
                                             gint y);
void        clutter_actor_set_size          (ClutterActor *self,
                                             gint width,
                                             gint height);
void        clutter_actor_get_abs_position  (ClutterActor *self,
                                             gint *x,
                                             gint *y);
guint       clutter_actor_get_width         (ClutterActor *self);
guint       clutter_actor_get_height        (ClutterActor *self);
gint        clutter_actor_get_x             (ClutterActor *self);
gint        clutter_actor_get_y             (ClutterActor *self);
void        clutter_actor_rotate_z          (ClutterActor *self,
                                             gfloat angle,
                                             gint x,
                                             gint y);
void        clutter_actor_rotate_x          (ClutterActor *self,
                                             gfloat angle,
                                             gint y,
                                             gint z);
void        clutter_actor_rotate_y          (ClutterActor *self,
                                             gfloat angle,
                                             gint x,
                                             gint z);
void        clutter_actor_set_opacity       (ClutterActor *self,
                                             guint8 opacity);
guint8      clutter_actor_get_opacity       (ClutterActor *self);
void        clutter_actor_set_name          (ClutterActor *self,
                                             const gchar *id);
const gchar* clutter_actor_get_name         (ClutterActor *self);
guint32     clutter_actor_get_id            (ClutterActor *self);
void        clutter_actor_set_clip          (ClutterActor *self,
                                             gint xoff,
                                             gint yoff,
                                             gint width,
                                             gint height);
void        clutter_actor_remove_clip       (ClutterActor *self);
void        clutter_actor_set_parent        (ClutterActor *self,
                                             ClutterActor *parent);
ClutterActor* clutter_actor_get_parent      (ClutterActor *self);
void        clutter_actor_raise             (ClutterActor *self,
                                             ClutterActor *below);
void        clutter_actor_lower             (ClutterActor *self,
                                             ClutterActor *above);
void        clutter_actor_raise_top         (ClutterActor *self);
void        clutter_actor_lower_bottom      (ClutterActor *self);
void        clutter_actor_set_depth         (ClutterActor *self,
                                             gint depth);
gint        clutter_actor_get_depth         (ClutterActor *self);

Object Hierarchy


  GObject
   +----ClutterActor
         +----ClutterGroup
         +----ClutterRectangle
         +----ClutterTexture
         +----ClutterCloneTexture

Properties


  "height"               gint                  : Read / Write
  "opacity"              guchar                : Read / Write / Construct
  "width"                gint                  : Read / Write
  "x"                    gint                  : Read / Write
  "y"                    gint                  : Read / Write

Description

ClutterActor is a base abstract class for all visual elements.

Details

CLUTTER_TYPE_GEOMETRY

#define CLUTTER_TYPE_GEOMETRY (clutter_geometry_get_type ())


CLUTTER_TYPE_ACTOR_BOX

#define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ())


CLUTTER_ACTOR_SET_FLAGS()

#define CLUTTER_ACTOR_SET_FLAGS(e,f) ((e)->flags |= (f))  

e :
f :

CLUTTER_ACTOR_UNSET_FLAGS()

#define CLUTTER_ACTOR_UNSET_FLAGS(e,f) ((e)->flags &= ~(f))  

e :
f :

CLUTTER_ACTOR_IS_MAPPED()

#define CLUTTER_ACTOR_IS_MAPPED(e) ((e)->flags & CLUTTER_ACTOR_MAPPED)  

e :

CLUTTER_ACTOR_IS_REALIZED()

#define CLUTTER_ACTOR_IS_REALIZED(e) ((e)->flags & CLUTTER_ACTOR_REALIZED)

e :

CLUTTER_ACTOR_IS_VISIBLE()

#define     CLUTTER_ACTOR_IS_VISIBLE(e)

e :

ClutterActorBox

typedef struct {
 gint x1, y1, x2, y2; 
} ClutterActorBox;


ClutterActorPrivate

typedef struct _ClutterActorPrivate ClutterActorPrivate;


ClutterGeometry

typedef struct {
  gint x;
  gint y;
  guint width;
  guint height;
} ClutterGeometry;


ClutterCallback ()

void        (*ClutterCallback)              (ClutterActor *actor,
                                             gpointer data);

actor :
data :

enum ClutterActorFlags

typedef enum
{
  CLUTTER_ACTOR_MAPPED   = 1 << 1,
  CLUTTER_ACTOR_REALIZED = 1 << 2
} ClutterActorFlags;


clutter_actor_box_get_type ()

GType       clutter_actor_box_get_type      (void);

Returns :

ClutterActor

typedef struct {
  GObject                 parent;
  guint32                 flags;
} ClutterActor;


clutter_actor_get_type ()

GType       clutter_actor_get_type          (void);

Returns :

clutter_actor_show ()

void        clutter_actor_show              (ClutterActor *self);

Flags a clutter actor to be displayed. An actor not shown will not appear on the display.

self : A ClutterActor

clutter_actor_hide ()

void        clutter_actor_hide              (ClutterActor *self);

Flags a clutter actor to be hidden. An actor not shown will not appear on the display.

self : A ClutterActor

clutter_actor_realize ()

void        clutter_actor_realize           (ClutterActor *self);

Frees up any underlying graphics resources needed by the actor to be displayed.

self : A ClutterActor

clutter_actor_unrealize ()

void        clutter_actor_unrealize         (ClutterActor *self);

self :

clutter_actor_paint ()

void        clutter_actor_paint             (ClutterActor *self);

Renders the actor to display.

This function should not be called directly by applications instead clutter_actor_queue_redraw should be used to queue paints.

self : A ClutterActor

clutter_actor_queue_redraw ()

void        clutter_actor_queue_redraw      (ClutterActor *self);

Queues up a redraw of an actor and any children. The redraw occurs once the main loop becomes idle (after the current batch of events has been processed, roughly).

Applications rarely need to call this as redraws are handled automatically by modification functions.

self : A ClutterActor

clutter_actor_request_coords ()

void        clutter_actor_request_coords    (ClutterActor *self,
                                             ClutterActorBox *box);

Requests new co-ordinates for the ClutterActor ralative to any parent.

This function should not be called directly by applications instead the various position/geometry methods should be used.

self : A ClutterActor
box : A ClutterActorBox with requested new co-ordinates.

clutter_actor_allocate_coords ()

void        clutter_actor_allocate_coords   (ClutterActor *self,
                                             ClutterActorBox *box);

Requests the allocated co-ordinates for the ClutterActor relative to any parent.

This function should not be called directly by applications instead the various position/geometry methods should be used.

self : A ClutterActor
box : A location to store the actors ClutterActorBox co-ordinates

clutter_actor_set_geometry ()

void        clutter_actor_set_geometry      (ClutterActor *self,
                                             ClutterGeometry *geom);

Sets the actors geometry in pixels relative to any parent actor.

self : A ClutterActor
geom : A ClutterGeometry

clutter_actor_get_geometry ()

void        clutter_actor_get_geometry      (ClutterActor *self,
                                             ClutterGeometry *geom);

Gets the actors geometry in pixels relative to any parent actor.

self : A ClutterActor
geom : A location to store actors ClutterGeometry

clutter_actor_get_coords ()

void        clutter_actor_get_coords        (ClutterActor *self,
                                             gint *x1,
                                             gint *y1,
                                             gint *x2,
                                             gint *y2);

Gets the actors bounding rectangle co-ordinates in pixels relative to any parent actor.

self : A ClutterActor
x1 : A location to store actors left position if non NULL.
y1 : A location to store actors top position if non NULL.
x2 : A location to store actors right position if non NULL.
y2 : A location to store actors bottom position if non NULL.

clutter_actor_set_position ()

void        clutter_actor_set_position      (ClutterActor *self,
                                             gint x,
                                             gint y);

Gets the absolute position of an actor in pixels relative to the stage.

self : A ClutterActor
x : Location to store x position if non NULL.
y : Location to store y position if non NULL.

clutter_actor_set_size ()

void        clutter_actor_set_size          (ClutterActor *self,
                                             gint width,
                                             gint height);

Sets the actors position in pixels relative to any parent actor.

self : A ClutterActor
width : New width of actor in pixels
height : New height of actor in pixels

clutter_actor_get_abs_position ()

void        clutter_actor_get_abs_position  (ClutterActor *self,
                                             gint *x,
                                             gint *y);

self :
x :
y :

clutter_actor_get_width ()

guint       clutter_actor_get_width         (ClutterActor *self);

Retrieves the actors width.

self : A ClutterActor
Returns : The actor width in pixels

clutter_actor_get_height ()

guint       clutter_actor_get_height        (ClutterActor *self);

Retrieves the actors height.

self : A ClutterActor
Returns : The actor height in pixels

clutter_actor_get_x ()

gint        clutter_actor_get_x             (ClutterActor *self);

Retrieves the actors x position relative to any parent.

self : A ClutterActor
Returns : The actor x position in pixels

clutter_actor_get_y ()

gint        clutter_actor_get_y             (ClutterActor *self);

Retrieves the actors y position relative to any parent.

self : A ClutterActor
Returns : The actor y position in pixels

clutter_actor_rotate_z ()

void        clutter_actor_rotate_z          (ClutterActor *self,
                                             gfloat angle,
                                             gint x,
                                             gint y);

Rotates actor around the Z axis.

self : A ClutterActor
angle : Angle of rotation
x : X co-ord to rotate actor around ( relative to actor position )
y : Y co-ord to rotate actor around ( relative to actor position )

clutter_actor_rotate_x ()

void        clutter_actor_rotate_x          (ClutterActor *self,
                                             gfloat angle,
                                             gint y,
                                             gint z);

Rotates actor around the X axis.

self : A ClutterActor
angle : Angle of rotation
y : Y co-ord to rotate actor around ( relative to actor position )
z : Z co-ord to rotate actor around ( relative to actor position )

clutter_actor_rotate_y ()

void        clutter_actor_rotate_y          (ClutterActor *self,
                                             gfloat angle,
                                             gint x,
                                             gint z);

Rotates actor around the X axis.

self : A ClutterActor
angle : Angle of rotation
x : X co-ord to rotate actor around ( relative to actor position )
z : Z co-ord to rotate actor around ( relative to actor position )

clutter_actor_set_opacity ()

void        clutter_actor_set_opacity       (ClutterActor *self,
                                             guint8 opacity);

Sets the actors opacity, with zero being completely transparent.

self : A ClutterActor
opacity : New opacity value for actor.

clutter_actor_get_opacity ()

guint8      clutter_actor_get_opacity       (ClutterActor *self);

Retrieves the actors opacity.

self : A ClutterActor
Returns : The actor opacity value.

clutter_actor_set_name ()

void        clutter_actor_set_name          (ClutterActor *self,
                                             const gchar *id);

Sets a textual tag to the actor.

self : A ClutterActor
id : Textual tag to apply to actor

clutter_actor_get_name ()

const gchar* clutter_actor_get_name         (ClutterActor *self);

self : A ClutterActor
Returns : pointer to textual tag for the actor. The returned string is owned by the actor and should not be modified or freed.

clutter_actor_get_id ()

guint32     clutter_actor_get_id            (ClutterActor *self);

Retrieves the unique id for self.

self : A ClutterActor
Returns : Globally unique value for object instance.

clutter_actor_set_clip ()

void        clutter_actor_set_clip          (ClutterActor *self,
                                             gint xoff,
                                             gint yoff,
                                             gint width,
                                             gint height);

Sets clip area for self.

self : A ClutterActor
xoff : X offset of the clip rectangle
yoff : Y offset of the clip rectangle
width : Width of the clip rectangle
height : Height of the clip rectangle

clutter_actor_remove_clip ()

void        clutter_actor_remove_clip       (ClutterActor *self);

Removes clip area from self.

self : A ClutterActor

clutter_actor_set_parent ()

void        clutter_actor_set_parent        (ClutterActor *self,
                                             ClutterActor *parent);

Sets the parent of self to parent. This function should not be used by applications.

self : A ClutterActor
parent : A new ClutterActor parent or NULL

clutter_actor_get_parent ()

ClutterActor* clutter_actor_get_parent      (ClutterActor *self);

Retrieves the parent of self.

self : A ClutterActor
Returns : The ClutterActor parent or NULL

clutter_actor_raise ()

void        clutter_actor_raise             (ClutterActor *self,
                                             ClutterActor *below);

Puts self above below. Both actors must have the same parent.

self : A ClutterActor
below : A ClutterActor to raise above.

clutter_actor_lower ()

void        clutter_actor_lower             (ClutterActor *self,
                                             ClutterActor *above);

Puts self below above. Both actors must have the same parent.

self : A ClutterActor
above : A ClutterActor to lower below

clutter_actor_raise_top ()

void        clutter_actor_raise_top         (ClutterActor *self);

self :

clutter_actor_lower_bottom ()

void        clutter_actor_lower_bottom      (ClutterActor *self);

Lowers self to the bottom.

self : A ClutterActor

clutter_actor_set_depth ()

void        clutter_actor_set_depth         (ClutterActor *self,
                                             gint depth);

Sets the Z co-ordinate of self to depth.

self : a ClutterActor
depth : Z co-ord

clutter_actor_get_depth ()

gint        clutter_actor_get_depth         (ClutterActor *self);

Retrieves the depth of self.

self : a ClutterActor
Returns : the depth of a ClutterActor

Property Details

The "height" property

  "height"               gint                  : Read / Write

Height of actor in pixels.

Allowed values: >= 0

Default value: 0


The "opacity" property

  "opacity"              guchar                : Read / Write / Construct

Opacity of actor.

Default value: 255


The "width" property

  "width"                gint                  : Read / Write

Width of actor in pixels.

Allowed values: >= 0

Default value: 0


The "x" property

  "x"                    gint                  : Read / Write

X co-ord of actor.

Allowed values: >= 0

Default value: 0


The "y" property

  "y"                    gint                  : Read / Write

Y co-ord of actor.

Allowed values: >= 0

Default value: 0