![]() |
![]() |
![]() |
Clutter 0.4 Reference Manual | ![]() |
---|---|---|---|---|
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);
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
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
void clutter_perspective_free (ClutterPerspective *perspective);
Frees a perspective structure created with clutter_perspective_copy()
.
perspective : |
a ClutterPerspective |
Since 0.4
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. |
void clutter_stage_set_color (ClutterStage *stage, const ClutterColor *color);
Set the stage color.
stage : |
A ClutterStage |
color : |
A ClutterColor |
void clutter_stage_get_color (ClutterStage *stage, ClutterColor *color);
Retrieves the stage color.
stage : |
A ClutterStage |
color : |
return location for a ClutterColor |
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 |
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 |
void clutter_stage_show_cursor (ClutterStage *stage);
Shows the cursor on the stage window
stage : |
a ClutterStage |
void clutter_stage_hide_cursor (ClutterStage *stage);
Makes the cursor invisible on the stage window
stage : |
a ClutterStage |
Since 0.4
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 |
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 |
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
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
void clutter_stage_set_perspectivex (ClutterStage *stage, ClutterPerspective *perspective);
Set the stage perspective.
stage : |
A ClutterStage |
perspective : |
A ClutterPerspective |
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 |
void clutter_stage_get_perspectivex (ClutterStage *stage, ClutterPerspective *perspective);
Retrieves the stage perspective.
stage : |
A ClutterStage |
perspective : |
return location for a ClutterPerspective |
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. |
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
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
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