Next: , Previous: Overview, Up: Top


2 X11 Specific Support

X11 specific API

2.1 Overview

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

2.2 Usage

— Function: clutter-x11-has-event-retrieval ⇒  (ret bool)

Queries the X11 backend to check if event collection has been disabled.

ret
TRUE if event retrival has been disabled. FALSE otherwise.

Since 0.8

— Function: clutter-x11-get-stage-from-window (win unsigned-int32) ⇒  (ret <clutter-stage>)

Gets the stage for a particular X window.

win
an X Window ID
ret
A <clutter-stage>, or% NULL if a stage does not exist for the window.

Since 0.8

— Function: clutter-x11-get-default-screen ⇒  (ret int)

Gets the number of the default X Screen object.

ret
the number of the default screen

Since 0.6

— Function: clutter-x11-get-root-window ⇒  (ret unsigned-int32)

Retrieves the root window.

ret
the id of the root window

Since 0.6

— Function: clutter-x11-get-stage-window (stage <clutter-stage>) ⇒  (ret unsigned-int32)

Gets the stages X Window.

stage
a <clutter-stage>
ret
An XID for the stage window.

Since 0.4

— Function: clutter-x11-set-stage-foreign (stage <clutter-stage>) (xwindow unsigned-int32) ⇒  (ret bool)

Target the <clutter-stage> to use an existing external X Window

stage
a <clutter-stage>
xwindow
an existing X Window id
ret
#t’ if foreign window is valid

Since 0.4

— Function: clutter-x11-trap-x-errors

Traps every X error until clutter-x11-untrap-x-errors is called.

Since 0.6

— Function: clutter-x11-untrap-x-errors ⇒  (ret int)

Removes the X error trap and returns the current status.

ret
the trapped error code, or 0 for success

Since 0.4

— Function: clutter-x11-has-composite-extension ⇒  (ret bool)

Retrieves whether Clutter is running on an X11 server with the XComposite extension

ret
#t’ if the XComposite extension is available
— Function: clutter-x11-set-use-argb-visual (use_argb bool)

Sets whether the Clutter X11 backend should request ARGB visuals by default or not.

By default, Clutter requests RGB visuals.

If no ARGB visuals are found, the X11 backend will fall back to requesting a RGB visual instead.

ARGB visuals are required for the <"use-alpha"> property to work.

This function can only be called once, and before clutter-init is called.

use-argb
#t’ if ARGB visuals should be requested by default

Since 1.2

— Function: clutter-x11-get-use-argb-visual ⇒  (ret bool)

Retrieves whether the Clutter X11 backend is using ARGB visuals by default

ret
#t’ if ARGB visuals are queried by default

Since 1.2

— Function: clutter-x11-has-xinput ⇒  (ret bool)

Gets whether Clutter has XInput support.

ret
#t’ if Clutter was compiled with XInput support and XInput support is available at run time.

Since 0.8

— Function: clutter-x11-enable-xinput

Enables the use of the XInput extension if present on connected XServer and support built into Clutter. XInput allows for multiple pointing devices to be used.

This function must be called before clutter-init.

Since XInput might not be supported by the X server, you might want to use clutter-x11-has-xinput to see if support was enabled.

Since 0.8

— Function: clutter-x11-event-get-key-group (event <clutter-event>) ⇒  (ret int)

Retrieves the group for the modifiers set in event

event
a <clutter-event> of type ‘CLUTTER_KEY_PRESS’ or ‘CLUTTER_KEY_RELEASE
ret
the group id

Since 1.4