![]() |
![]() |
![]() |
Clutter 0.2 Reference Manual | ![]() |
---|---|---|---|---|
#define CLUTTER_STAGE_WIDTH () #define CLUTTER_STAGE_HEIGHT () ClutterStage; ClutterStageClass; ClutterActor* clutter_stage_get_default (void); Window clutter_stage_get_xwindow (ClutterStage *stage); gboolean clutter_stage_set_xwindow_foreign (ClutterStage *stage, Window xid); void clutter_stage_set_color (ClutterStage *stage, const ClutterColor *color); void clutter_stage_get_color (ClutterStage *stage, ClutterColor *color); 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); const XVisualInfo* clutter_stage_get_xvisual (ClutterStage *stage);
GObject +----GInitiallyUnowned +----ClutterActor +----ClutterGroup +----ClutterStage
"color" ClutterColor : Read / Write "fullscreen" gboolean : Read / Write / Construct "hide-cursor" gboolean : Read / Write / Construct "offscreen" gboolean : Read / Write / Construct
"button-press-event" : Run Last "button-release-event" : Run Last "input-event" : Run Last "key-press-event" : Run Last "key-release-event" : Run Last "motion-event" : Run Last
#define CLUTTER_STAGE_WIDTH()
Macro evaluating to the width of the ClutterStage
#define CLUTTER_STAGE_HEIGHT()
Macro evaluating to the height of the ClutterStage
typedef struct _ClutterStage ClutterStage;
ClutterStage has no publicly available members.
typedef struct { ClutterGroupClass parent_class; void (*input_event) (ClutterStage *stage, ClutterEvent *event); void (*button_press_event) (ClutterStage *stage, ClutterButtonEvent *event); void (*button_release_event) (ClutterStage *stage, ClutterButtonEvent *event); void (*key_press_event) (ClutterStage *stage, ClutterKeyEvent *event); void (*key_release_event) (ClutterStage *stage, ClutterKeyEvent *event); void (*motion_event) (ClutterStage *stage, ClutterMotionEvent *event); /* padding for future expansion */ void (*_clutter_stage1) (void); void (*_clutter_stage2) (void); void (*_clutter_stage3) (void); void (*_clutter_stage4) (void); void (*_clutter_stage5) (void); void (*_clutter_stage6) (void); } ClutterStageClass;
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, with its reference count increased.
Returns : | the main ClutterStage. You should never destroy the returned actor. |
Window clutter_stage_get_xwindow (ClutterStage *stage);
Get the stage's underlying x window ID.
stage : |
A ClutterStage |
Returns : | Stage X Window XID |
gboolean clutter_stage_set_xwindow_foreign (ClutterStage *stage, Window xid);
Target the ClutterStage to use an existing external X Window.
stage : |
A ClutterStage |
xid : |
A preexisting X Window ID |
Returns : | TRUE if foreign window valid, FALSE otherwise |
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 |
ClutterActor* clutter_stage_get_actor_at_pos (ClutterStage *stage, gint x, gint y);
If found, retrieves the actor that the (x, y) coordinates.
stage : |
a ClutterStage |
x : |
the x coordinate |
y : |
the y coordinate |
Returns : | the ClutterActor at the desired coordinates,
or NULL if no actor was found.
|
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 |
const XVisualInfo* clutter_stage_get_xvisual (ClutterStage *stage);
Get the stage's XVisualInfo.
stage : |
A ClutterStage |
Returns : | The stage's XVisualInfo |
fullscreen
" property"fullscreen" gboolean : Read / Write / Construct
Whether the stage should be fullscreen or not.
Default value: FALSE
hide-cursor
" property"hide-cursor" gboolean : Read / Write / Construct
Make Clutter stage cursor-less.
Default value: FALSE
offscreen
" property"offscreen" gboolean : Read / Write / Construct
Make Clutter stage offscreen.
Default value: FALSE
void user_function (ClutterStage *stage, ClutterEvent *event, gpointer user_data) : Run Last
The ::button-press-event is emitted each time a mouse button
is pressed on stage
.
stage : |
the actor which received the event |
event : |
a ClutterButtonEvent |
user_data : |
user data set when the signal handler was connected. |
void user_function (ClutterStage *stage, ClutterEvent *event, gpointer user_data) : Run Last
The ::button-release-event is emitted each time a mouse button
is released on stage
.
stage : |
the actor which received the event |
event : |
a ClutterButtonEvent |
user_data : |
user data set when the signal handler was connected. |
void user_function (ClutterStage *stage, ClutterEvent *event, gpointer user_data) : Run Last
The ::input-event is a signal emitted when any input event is received. Valid input events are mouse button press and release events, and key press and release events.
stage : |
the actor which received the event |
event : |
the event received |
user_data : |
user data set when the signal handler was connected. |
void user_function (ClutterStage *stage, ClutterEvent *event, gpointer user_data) : Run Last
The ::key-press-event is emitted each time a keyboard button
is pressed on stage
.
stage : |
the actor which received the event |
event : |
a ClutterKeyEvent |
user_data : |
user data set when the signal handler was connected. |
void user_function (ClutterStage *stage, ClutterEvent *event, gpointer user_data) : Run Last
The ::key-release-event is emitted each time a keyboard button
is released on stage
.
stage : |
the actor which received the event |
event : |
a ClutterKeyEvent |
user_data : |
user data set when the signal handler was connected. |
void user_function (ClutterStage *stage, ClutterEvent *event, gpointer user_data) : Run Last
The ::motion-event is emitted each time the mouse pointer is
moved on stage
.
stage : |
the actor which received the event |
event : |
a ClutterMotionEvent |
user_data : |
user data set when the signal handler was connected. |