Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- ClutterX11.disable_event_retrieval()¶
Disables the internal polling of X11 events in the main loop.
Libraries or applications calling this function will be responsible of polling all X11 events.
You also must call
ClutterX11.handle_event
() to let Clutter process events and maintain its internal state.This function can only be called before calling
Clutter.init
().Even with event handling disabled, Clutter will still select all the events required to maintain its internal state on the stage Window; compositors using Clutter and input regions to pass events through to application windows should not rely on an empty input region, and should instead clear it themselves explicitly using the XFixes extension.
This function should not be normally used by applications.
New in version 0.8.
- ClutterX11.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
ClutterX11.has_xinput
() to see if support was enabled.New in version 0.8.
Deprecated since version 1.14: This function does not do anything; XInput support is enabled by default in Clutter. Use the CLUTTER_DISABLE_XINPUT environment variable to disable XInput support and use Xlib core events instead.
- ClutterX11.event_get_key_group(event)¶
- Parameters:
event (
Clutter.Event
) – aClutter.Event
of typeClutter.EventType.KEY_PRESS
orClutter.EventType.KEY_RELEASE
- Returns:
the group id
- Return type:
Retrieves the group for the modifiers set in event
New in version 1.4.
- ClutterX11.event_sequence_get_touch_detail(sequence)¶
- Parameters:
sequence (
Clutter.EventSequence
) – aClutter.EventSequence
- Returns:
the touch detail
- Return type:
Retrieves the touch detail froma
Clutter.EventSequence
.New in version 1.12.
- ClutterX11.get_default_display()¶
- Returns:
the default display
- Return type:
Retrieves the pointer to the default display.
New in version 0.6.
- ClutterX11.get_default_screen()¶
- Returns:
the number of the default screen
- Return type:
Gets the number of the default X
xlib.Screen
object.New in version 0.6.
- ClutterX11.get_input_devices()¶
- Returns:
a pointer to the internal list of input devices; the returned list is owned by Clutter and should not be modified or freed
- Return type:
Retrieves a pointer to the list of input devices
New in version 0.8.
Deprecated since version 1.2: Use
Clutter.DeviceManager.peek_devices
() instead
- ClutterX11.get_stage_from_window(win)¶
- Parameters:
win (
int
) – an X Window ID- Returns:
A
Clutter.Stage
, or%None
if a stage does not exist for the window- Return type:
Gets the stage for a particular X window.
New in version 0.8.
- ClutterX11.get_use_argb_visual()¶
-
Retrieves whether the Clutter X11 backend is using ARGB visuals by default
New in version 1.2.
- ClutterX11.get_use_stereo_stage()¶
-
Retrieves whether the Clutter X11 backend will create stereo stages if possible.
New in version 1.22.
- ClutterX11.handle_event(xevent)¶
- Parameters:
xevent (
xlib.XEvent
) – pointer toxlib.XEvent
structure- Returns:
ClutterX11.FilterReturn
.ClutterX11.FilterReturn.REMOVE
indicates that Clutter has internally handled the event and the caller should do no further processing.ClutterX11.FilterReturn.CONTINUE
indicates that Clutter is either not interested in the event, or has used the event to update internal state without taking any exclusive action.ClutterX11.FilterReturn.TRANSLATE
will not occur.- Return type:
This function processes a single X event; it can be used to hook into external X11 event processing (for example, a GDK filter function).
If
ClutterX11.disable_event_retrieval
() has been called, you must let this function process events to update Clutter’s internal state.New in version 0.8.
- ClutterX11.has_composite_extension()¶
-
Retrieves whether Clutter is running on an X11 server with the XComposite extension
- ClutterX11.has_event_retrieval()¶
-
Queries the X11 backend to check if event collection has been disabled.
New in version 0.8.
- ClutterX11.has_xinput()¶
- Returns:
True
if Clutter was compiled with XInput support and XInput support is available at run time.- Return type:
Gets whether Clutter has XInput support.
New in version 0.8.
- ClutterX11.set_display(xdpy)¶
- Parameters:
xdpy (
xlib.Display
) – pointer to a X display connection.
Sets the display connection Clutter should use; must be called before
Clutter.init
(),Clutter.init_with_args
() or other functions pertaining Clutter’s initialization process.If you are parsing the command line arguments by retrieving Clutter’s
GLib.OptionGroup
with clutter_get_option_group() and callingGLib.OptionContext.parse
() yourself, you should also callClutterX11.set_display
() beforeGLib.OptionContext.parse
().New in version 0.8.
- ClutterX11.set_stage_foreign(stage, xwindow)¶
- Parameters:
stage (
Clutter.Stage
) – aClutter.Stage
xwindow (
int
) – an existing X Window id
- Returns:
True
if foreign window is valid- Return type:
Target the
Clutter.Stage
to use an existing external X WindowNew in version 0.4.
- ClutterX11.set_use_argb_visual(use_argb)¶
-
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
Clutter.Stage
:use-alpha
property to work.This function can only be called once, and before
Clutter.init
() is called.New in version 1.2.
- ClutterX11.set_use_stereo_stage(use_stereo)¶
-
Sets whether the backend object for Clutter stages, will, if possible, be created with the ability to support stereo drawing (drawing separate images for the left and right eyes).
This function must be called before
Clutter.init
() is called. During paint callbacks, cogl_framebuffer_is_stereo() can be called on the framebuffer retrieved by cogl_get_draw_framebuffer() to determine if stereo support was successfully enabled, and cogl_framebuffer_set_stereo_mode() to determine which buffers will be drawn to.Note that this function *does not* cause the stage to be drawn multiple times with different perspective transformations and thus appear in 3D, it simply enables individual ClutterActors to paint different images for the left and and right eye.
New in version 1.22.
- ClutterX11.trap_x_errors()¶
Traps every X error until
ClutterX11.untrap_x_errors
() is called.New in version 0.6.