X11 Specific Support

X11 Specific Support — X11 specific API

Synopsis




Display*            clutter_x11_get_default_display     (void);
int                 clutter_x11_get_default_screen      (void);
Window              clutter_x11_get_root_window         (void);
XVisualInfo*        clutter_x11_get_stage_visual        (ClutterStage *stage);
Window              clutter_x11_get_stage_window        (ClutterStage *stage);
gboolean            clutter_x11_set_stage_foreign       (ClutterStage *stage,
                                                         Window xwindow);
void                clutter_x11_trap_x_errors           (void);
gint                clutter_x11_untrap_x_errors         (void);

ClutterX11FilterReturn (*ClutterX11FilterFunc)          (XEvent *xev,
                                                         ClutterEvent *cev,
                                                         gpointer data);
enum                ClutterX11FilterReturn;
void                clutter_x11_add_filter              (ClutterX11FilterFunc func,
                                                         gpointer data);
void                clutter_x11_remove_filter           (ClutterX11FilterFunc func,
                                                         gpointer data);

Description

The X11 backend for Clutter provides some specific API, allowing integration with the Xlibs API for embedding and manipulating the stage window, or for trapping X errors.

The ClutterX11 API is available since Clutter 0.6

Details

clutter_x11_get_default_display ()

Display*            clutter_x11_get_default_display     (void);

Retrieves the pointer to the default display.

Returns : the default display

Since 0.6


clutter_x11_get_default_screen ()

int                 clutter_x11_get_default_screen      (void);

Gets the number of the default X Screen object.

Returns : the number of the default screen

Since 0.6


clutter_x11_get_root_window ()

Window              clutter_x11_get_root_window         (void);

Retrieves the root window.

Returns : the id of the root window

Since 0.6


clutter_x11_get_stage_visual ()

XVisualInfo*        clutter_x11_get_stage_visual        (ClutterStage *stage);

Returns the stage XVisualInfo

stage : a ClutterStage
Returns : The XVisualInfo for the stage.

Since 0.4


clutter_x11_get_stage_window ()

Window              clutter_x11_get_stage_window        (ClutterStage *stage);

Gets the stages X Window.

stage : a ClutterStage
Returns : An XID for the stage window.

Since 0.4


clutter_x11_set_stage_foreign ()

gboolean            clutter_x11_set_stage_foreign       (ClutterStage *stage,
                                                         Window xwindow);

Target the ClutterStage to use an existing external X Window

stage : a ClutterStage
xwindow : an existing X Window id
Returns : TRUE if foreign window is valid

Since 0.4


clutter_x11_trap_x_errors ()

void                clutter_x11_trap_x_errors           (void);

Traps every X error until clutter_x11_untrap_x_errors() is called.

Since 0.6


clutter_x11_untrap_x_errors ()

gint                clutter_x11_untrap_x_errors         (void);

Removes the X error trap and returns the current status.

Returns : the trapped error code, or 0 for success

Since 0.4


ClutterX11FilterFunc ()

ClutterX11FilterReturn (*ClutterX11FilterFunc)          (XEvent *xev,
                                                         ClutterEvent *cev,
                                                         gpointer data);

Filter function for X11 native events.

xev : Native X11 event structure
cev : Clutter event structure
data : user data passed to the filter function
Returns : the result of the filtering

Since 0.6


enum ClutterX11FilterReturn

typedef enum {
  CLUTTER_X11_FILTER_CONTINUE,
  CLUTTER_X11_FILTER_TRANSLATE,
  CLUTTER_X11_FILTER_REMOVE
} ClutterX11FilterReturn;

Return values for the ClutterX11FilterFunc function.

CLUTTER_X11_FILTER_CONTINUE The event was not handled, continues the processing
CLUTTER_X11_FILTER_TRANSLATE Native event translated into a Clutter event, stops the processing
CLUTTER_X11_FILTER_REMOVE Remove the event, stops the processing

Since 0.6


clutter_x11_add_filter ()

void                clutter_x11_add_filter              (ClutterX11FilterFunc func,
                                                         gpointer data);

Adds an event filter function.

func : a filter function
data : user data to be passed to the filter function, or NULL

Since 0.6


clutter_x11_remove_filter ()

void                clutter_x11_remove_filter           (ClutterX11FilterFunc func,
                                                         gpointer data);

Removes the given filter function.

func : a filter function
data : user data to be passed to the filter function, or NULL

Since 0.6