ClutterStage

ClutterStage — Top level visual element to which actors are placed.

Synopsis




                    ClutterPerspective;
ClutterPerspective* clutter_perspective_copy            (const ClutterPerspective *perspective);
void                clutter_perspective_free            (ClutterPerspective *perspective);

#define             CLUTTER_STAGE_WIDTH                 ()
#define             CLUTTER_STAGE_HEIGHT                ()
ClutterActor*       clutter_stage_get_default           (void);
void                clutter_stage_set_color             (ClutterStage *stage,
                                                         const ClutterColor *color);
void                clutter_stage_get_color             (ClutterStage *stage,
                                                         ClutterColor *color);
void                clutter_stage_fullscreen            (ClutterStage *stage);
void                clutter_stage_unfullscreen          (ClutterStage *stage);
void                clutter_stage_show_cursor           (ClutterStage *stage);
void                clutter_stage_hide_cursor           (ClutterStage *stage);
ClutterActor*       clutter_stage_get_actor_at_pos      (ClutterStage *stage,
                                                         gint x,
                                                         gint y);
GdkPixbuf*          clutter_stage_snapshot              (ClutterStage *stage,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height);
gboolean            clutter_stage_event                 (ClutterStage *stage,
                                                         ClutterEvent *event);
void                clutter_stage_set_perspective       (ClutterStage *stage,
                                                         gfloat fovy,
                                                         gfloat aspect,
                                                         gfloat z_near,
                                                         gfloat z_far);
void                clutter_stage_set_perspectivex      (ClutterStage *stage,
                                                         ClutterPerspective *perspective);
void                clutter_stage_get_perspective       (ClutterStage *stage,
                                                         gfloat *fovy,
                                                         gfloat *aspect,
                                                         gfloat *z_near,
                                                         gfloat *z_far);
void                clutter_stage_get_perspectivex      (ClutterStage *stage,
                                                         ClutterPerspective *perspective);
void                clutter_stage_set_title             (ClutterStage *stage,
                                                         const gchar *title);
const gchar*        clutter_stage_get_title             (ClutterStage *stage);
void                clutter_stage_set_user_resizable    (ClutterStage *stage,
                                                         gboolean resizable);
gboolean            clutter_stage_get_user_resizable    (ClutterStage *stage);


Description

ClutterStage is a top level 'window' on which child actors are placed and manipulated.

Details

ClutterPerspective

typedef struct {
  ClutterFixed fovy;
  ClutterFixed aspect;
  ClutterFixed z_near;
  ClutterFixed z_far;
} ClutterPerspective;

Stage perspective definition

ClutterFixed fovy; FIXME
ClutterFixed aspect; FIXME
ClutterFixed z_near; FIXME
ClutterFixed z_far; FIXME

Since 0.4


clutter_perspective_copy ()

ClutterPerspective* clutter_perspective_copy            (const ClutterPerspective *perspective);

Makes a copy of the perspective structure. The result must be freed using clutter_perspective_free().

perspective : a ClutterPerspective
Returns : an allocated copy of perspective.

Since 0.4


clutter_perspective_free ()

void                clutter_perspective_free            (ClutterPerspective *perspective);

Frees a perspective structure created with clutter_perspective_copy().

perspective : a ClutterPerspective

Since 0.4


CLUTTER_STAGE_WIDTH()

#define             CLUTTER_STAGE_WIDTH()


CLUTTER_STAGE_HEIGHT()

#define             CLUTTER_STAGE_HEIGHT()


clutter_stage_get_default ()

ClutterActor*       clutter_stage_get_default           (void);

Returns the main stage. ClutterStage is a singleton, so the stage will be created the first time this function is called (typically, inside clutter_init()); all the subsequent calls to clutter_stage_get_default() will return the same instance.

Returns : the main ClutterStage. You should never destroy or unref the returned actor.

clutter_stage_set_color ()

void                clutter_stage_set_color             (ClutterStage *stage,
                                                         const ClutterColor *color);

Set the stage color.

stage : A ClutterStage
color : A ClutterColor

clutter_stage_get_color ()

void                clutter_stage_get_color             (ClutterStage *stage,
                                                         ClutterColor *color);

Retrieves the stage color.

stage : A ClutterStage
color : return location for a ClutterColor

clutter_stage_fullscreen ()

void                clutter_stage_fullscreen            (ClutterStage *stage);

Asks to place the stage window in the fullscreen state. Note that you shouldn't assume the window is definitely full screen afterward, because other entities (e.g. the user or window manager) could unfullscreen it again, and not all window managers honor requests to fullscreen windows.

stage : a ClutterStage

clutter_stage_unfullscreen ()

void                clutter_stage_unfullscreen          (ClutterStage *stage);

Asks to toggle off the fullscreen state for the stage window. Note that you shouldn't assume the window is definitely not full screen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows.

stage : a ClutterStage

clutter_stage_show_cursor ()

void                clutter_stage_show_cursor           (ClutterStage *stage);

Shows the cursor on the stage window

stage : a ClutterStage

clutter_stage_hide_cursor ()

void                clutter_stage_hide_cursor           (ClutterStage *stage);

Makes the cursor invisible on the stage window

stage : a ClutterStage

Since 0.4


clutter_stage_get_actor_at_pos ()

ClutterActor*       clutter_stage_get_actor_at_pos      (ClutterStage *stage,
                                                         gint x,
                                                         gint y);

Checks the scene at the coordinates x and y and returns a pointer to the ClutterActor at those coordinates.

stage : a ClutterStage
x : X coordinate to check
y : Y coordinate to check
Returns : the actor at the specified coordinates, if any

clutter_stage_snapshot ()

GdkPixbuf*          clutter_stage_snapshot              (ClutterStage *stage,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height);

Gets a pixel based representation of the current rendered stage.

stage : A ClutterStage
x : x coordinate of the first pixel that is read from stage
y : y coordinate of the first pixel that is read from stage
width : Width dimention of pixels to be read, or -1 for the entire stage width
height : Height dimention of pixels to be read, or -1 for the entire stage height
Returns : pixel representation as a GdkPixbuf

clutter_stage_event ()

gboolean            clutter_stage_event                 (ClutterStage *stage,
                                                         ClutterEvent *event);

This function is used to emit an event on the main stage. You should rarely need to use this function, except for synthetising events.

stage : a ClutterStage
event : a ClutterEvent
Returns : the return value from the signal emission

Since 0.4


clutter_stage_set_perspective ()

void                clutter_stage_set_perspective       (ClutterStage *stage,
                                                         gfloat fovy,
                                                         gfloat aspect,
                                                         gfloat z_near,
                                                         gfloat z_far);

Set the stage perspective.

stage : A ClutterStage
fovy : FIXME
aspect : FIXME
z_near : FIXME
z_far : FIXME

Since 0.4


clutter_stage_set_perspectivex ()

void                clutter_stage_set_perspectivex      (ClutterStage *stage,
                                                         ClutterPerspective *perspective);

Set the stage perspective.

stage : A ClutterStage
perspective : A ClutterPerspective

clutter_stage_get_perspective ()

void                clutter_stage_get_perspective       (ClutterStage *stage,
                                                         gfloat *fovy,
                                                         gfloat *aspect,
                                                         gfloat *z_near,
                                                         gfloat *z_far);

Retrieves the stage perspective.

stage : A ClutterStage
fovy : FIXME
aspect : FIXME
z_near : FIXME
z_far : FIXME

clutter_stage_get_perspectivex ()

void                clutter_stage_get_perspectivex      (ClutterStage *stage,
                                                         ClutterPerspective *perspective);

Retrieves the stage perspective.

stage : A ClutterStage
perspective : return location for a ClutterPerspective

clutter_stage_set_title ()

void                clutter_stage_set_title             (ClutterStage *stage,
                                                         const gchar *title);

Sets the stage title.

Since 0.4

stage : A ClutterStage
title : A utf8 string for the stage windows title.

clutter_stage_get_title ()

const gchar*        clutter_stage_get_title             (ClutterStage *stage);

Gets the stage title.

stage : A ClutterStage
Returns : pointer to the title string for the stage. The returned string is owned by the actor and should not be modified or freed.

Since 0.4


clutter_stage_set_user_resizable ()

void                clutter_stage_set_user_resizable    (ClutterStage *stage,
                                                         gboolean resizable);

Sets if the stage is able to be resized by user interaction (i.e via window manager controls)

stage : a ClutterStage
resizable : whether if the stage should be user resizable.

Since 0.4


clutter_stage_get_user_resizable ()

gboolean            clutter_stage_get_user_resizable    (ClutterStage *stage);

Retrieves the value set with clutter_stage_set_user_resizable().

stage : a ClutterStage
Returns : TRUE is the stage is resizable by the user.

Since 0.4