1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>X11 Specific Support</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Clutter Reference Manual">
8 <link rel="up" href="clutterbackends.html" title="Part VII. Clutter Backends">
9 <link rel="prev" href="ClutterBackend.html" title="ClutterBackend">
10 <link rel="next" href="clutter-ClutterX11TexturePixmap.html" title="ClutterX11TexturePixmap">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="ClutterBackend.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="clutterbackends.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Clutter Reference Manual</th>
21 <td><a accesskey="n" href="clutter-ClutterX11TexturePixmap.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#clutter-X11-Specific-Support.synopsis" class="shortcut">Top</a>
26 <a href="#clutter-X11-Specific-Support.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="clutter-X11-Specific-Support"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="clutter-X11-Specific-Support.top_of_page"></a>X11 Specific Support</span></h2>
34 <p>X11 Specific Support — X11 specific API</p>
36 <td valign="top" align="right"></td>
38 <div class="refsynopsisdiv">
39 <a name="clutter-X11-Specific-Support.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis"><span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-set-display" title="clutter_x11_set_display ()">clutter_x11_set_display</a> (<em class="parameter"><code><span class="type">Display</span> *xdpy</code></em>);
41 <span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-disable-event-retrieval" title="clutter_x11_disable_event_retrieval ()">clutter_x11_disable_event_retrieval</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
42 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-has-event-retrieval" title="clutter_x11_has_event_retrieval ()">clutter_x11_has_event_retrieval</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
43 <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="returnvalue">ClutterStage</span></a> * <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-stage-from-window" title="clutter_x11_get_stage_from_window ()">clutter_x11_get_stage_from_window</a> (<em class="parameter"><code><span class="type">Window</span> win</code></em>);
44 <a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterReturn" title="enum ClutterX11FilterReturn"><span class="returnvalue">ClutterX11FilterReturn</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-handle-event" title="clutter_x11_handle_event ()">clutter_x11_handle_event</a> (<em class="parameter"><code><span class="type">XEvent</span> *xevent</code></em>);
45 <span class="returnvalue">Display</span> * <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-default-display" title="clutter_x11_get_default_display ()">clutter_x11_get_default_display</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
46 <span class="returnvalue">int</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-default-screen" title="clutter_x11_get_default_screen ()">clutter_x11_get_default_screen</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
47 <span class="returnvalue">Window</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-root-window" title="clutter_x11_get_root_window ()">clutter_x11_get_root_window</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
48 <span class="returnvalue">XVisualInfo</span> * <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-stage-visual" title="clutter_x11_get_stage_visual ()">clutter_x11_get_stage_visual</a> (<em class="parameter"><code><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> *stage</code></em>);
49 <span class="returnvalue">Window</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-stage-window" title="clutter_x11_get_stage_window ()">clutter_x11_get_stage_window</a> (<em class="parameter"><code><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> *stage</code></em>);
50 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-set-stage-foreign" title="clutter_x11_set_stage_foreign ()">clutter_x11_set_stage_foreign</a> (<em class="parameter"><code><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> *stage</code></em>,
51 <em class="parameter"><code><span class="type">Window</span> xwindow</code></em>);
52 <span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-trap-x-errors" title="clutter_x11_trap_x_errors ()">clutter_x11_trap_x_errors</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
53 <a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-untrap-x-errors" title="clutter_x11_untrap_x_errors ()">clutter_x11_untrap_x_errors</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
54 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-has-composite-extension" title="clutter_x11_has_composite_extension ()">clutter_x11_has_composite_extension</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
55 <span class="returnvalue">Time</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-current-event-time" title="clutter_x11_get_current_event_time ()">clutter_x11_get_current_event_time</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
56 <span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-set-use-argb-visual" title="clutter_x11_set_use_argb_visual ()">clutter_x11_set_use_argb_visual</a> (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_argb</code></em>);
57 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-use-argb-visual" title="clutter_x11_get_use_argb_visual ()">clutter_x11_get_use_argb_visual</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
58 <span class="returnvalue">XVisualInfo</span> * <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-visual-info" title="clutter_x11_get_visual_info ()">clutter_x11_get_visual_info</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
60 <a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterReturn" title="enum ClutterX11FilterReturn"><span class="returnvalue">ClutterX11FilterReturn</span></a> (<a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterFunc" title="ClutterX11FilterFunc ()">*ClutterX11FilterFunc</a>) (<em class="parameter"><code><span class="type">XEvent</span> *xev</code></em>,
61 <em class="parameter"><code><a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> *cev</code></em>,
62 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
63 enum <a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterReturn" title="enum ClutterX11FilterReturn">ClutterX11FilterReturn</a>;
64 <span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-add-filter" title="clutter_x11_add_filter ()">clutter_x11_add_filter</a> (<em class="parameter"><code><a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterFunc" title="ClutterX11FilterFunc ()"><span class="type">ClutterX11FilterFunc</span></a> func</code></em>,
65 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
66 <span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-remove-filter" title="clutter_x11_remove_filter ()">clutter_x11_remove_filter</a> (<em class="parameter"><code><a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterFunc" title="ClutterX11FilterFunc ()"><span class="type">ClutterX11FilterFunc</span></a> func</code></em>,
67 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
69 const <a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-input-devices" title="clutter_x11_get_input_devices ()">clutter_x11_get_input_devices</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
70 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-has-xinput" title="clutter_x11_has_xinput ()">clutter_x11_has_xinput</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
71 <span class="returnvalue">void</span> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-enable-xinput" title="clutter_x11_enable_xinput ()">clutter_x11_enable_xinput</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
72 <a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-event-get-key-group" title="clutter_x11_event_get_key_group ()">clutter_x11_event_get_key_group</a> (<em class="parameter"><code>const <a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> *event</code></em>);
75 <div class="refsect1">
76 <a name="clutter-X11-Specific-Support.description"></a><h2>Description</h2>
78 The X11 backend for Clutter provides some specific API, allowing
79 integration with the Xlibs API for embedding and manipulating the
80 stage window, or for trapping X errors.
83 The ClutterX11 API is available since Clutter 0.6
86 <div class="refsect1">
87 <a name="clutter-X11-Specific-Support.details"></a><h2>Details</h2>
88 <div class="refsect2">
89 <a name="clutter-x11-set-display"></a><h3>clutter_x11_set_display ()</h3>
90 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_set_display (<em class="parameter"><code><span class="type">Display</span> *xdpy</code></em>);</pre>
92 Sets the display connection Clutter should use; must be called
93 before <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>, <a class="link" href="clutter-General.html#clutter-init-with-args" title="clutter_init_with_args ()"><code class="function">clutter_init_with_args()</code></a> or other functions
94 pertaining Clutter's initialization process.
97 If you are parsing the command line arguments by retrieving Clutter's
98 <a href="../glib/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> with <a class="link" href="clutter-General.html#clutter-get-option-group" title="clutter_get_option_group ()"><code class="function">clutter_get_option_group()</code></a> and calling
99 <a href="../glib/glib-Commandline-option-parser.html#g-option-context-parse"><code class="function">g_option_context_parse()</code></a> yourself, you should also call
100 <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-set-display" title="clutter_x11_set_display ()"><code class="function">clutter_x11_set_display()</code></a> before <a href="../glib/glib-Commandline-option-parser.html#g-option-context-parse"><code class="function">g_option_context_parse()</code></a>.
102 <div class="variablelist"><table border="0">
103 <col align="left" valign="top">
105 <td><p><span class="term"><em class="parameter"><code>xdpy</code></em> :</span></p></td>
106 <td>pointer to a X display connection.</td>
109 <p class="since">Since 0.8</p>
112 <div class="refsect2">
113 <a name="clutter-x11-disable-event-retrieval"></a><h3>clutter_x11_disable_event_retrieval ()</h3>
114 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_disable_event_retrieval (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
116 Disables the internal polling of X11 events in the main loop.
119 Libraries or applications calling this function will be responsible of
120 polling all X11 events.
123 You also must call <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-handle-event" title="clutter_x11_handle_event ()"><code class="function">clutter_x11_handle_event()</code></a> to let Clutter process
124 events and maintain its internal state.
128 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
129 <h3 class="title">Warning</h3>This function can only be called before calling
130 <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>.</div>
135 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
136 <h3 class="title">Note</h3>Even with event handling disabled, Clutter will still select
137 all the events required to maintain its internal state on the stage
138 Window; compositors using Clutter and input regions to pass events
139 through to application windows should not rely on an empty input
140 region, and should instead clear it themselves explicitly using the
141 XFixes extension.</div>
145 This function should not be normally used by applications.
147 <p class="since">Since 0.8</p>
150 <div class="refsect2">
151 <a name="clutter-x11-has-event-retrieval"></a><h3>clutter_x11_has_event_retrieval ()</h3>
152 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_x11_has_event_retrieval (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
154 Queries the X11 backend to check if event collection has been disabled.
156 <div class="variablelist"><table border="0">
157 <col align="left" valign="top">
159 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
160 <td>TRUE if event retrival has been disabled. FALSE otherwise.</td>
163 <p class="since">Since 0.8</p>
166 <div class="refsect2">
167 <a name="clutter-x11-get-stage-from-window"></a><h3>clutter_x11_get_stage_from_window ()</h3>
168 <pre class="programlisting"><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="returnvalue">ClutterStage</span></a> * clutter_x11_get_stage_from_window (<em class="parameter"><code><span class="type">Window</span> win</code></em>);</pre>
170 Gets the stage for a particular X window.
172 <div class="variablelist"><table border="0">
173 <col align="left" valign="top">
176 <td><p><span class="term"><em class="parameter"><code>win</code></em> :</span></p></td>
177 <td>an X Window ID</td>
180 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
181 <td>A <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a>, or% NULL if a stage
182 does not exist for the window. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
187 <p class="since">Since 0.8</p>
190 <div class="refsect2">
191 <a name="clutter-x11-handle-event"></a><h3>clutter_x11_handle_event ()</h3>
192 <pre class="programlisting"><a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterReturn" title="enum ClutterX11FilterReturn"><span class="returnvalue">ClutterX11FilterReturn</span></a> clutter_x11_handle_event (<em class="parameter"><code><span class="type">XEvent</span> *xevent</code></em>);</pre>
194 This function processes a single X event; it can be used to hook
195 into external X11 event processing (for example, a GDK filter
199 If <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-disable-event-retrieval" title="clutter_x11_disable_event_retrieval ()"><code class="function">clutter_x11_disable_event_retrieval()</code></a> has been called, you must
200 let this function process events to update Clutter's internal state.
202 <div class="variablelist"><table border="0">
203 <col align="left" valign="top">
206 <td><p><span class="term"><em class="parameter"><code>xevent</code></em> :</span></p></td>
207 <td>pointer to XEvent structure</td>
210 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
212 <a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterReturn" title="enum ClutterX11FilterReturn"><span class="type">ClutterX11FilterReturn</span></a>. <a class="link" href="clutter-X11-Specific-Support.html#CLUTTER-X11-FILTER-REMOVE:CAPS"><code class="literal">CLUTTER_X11_FILTER_REMOVE</code></a>
213 indicates that Clutter has internally handled the event and the
214 caller should do no further processing. <a class="link" href="clutter-X11-Specific-Support.html#CLUTTER-X11-FILTER-CONTINUE:CAPS"><code class="literal">CLUTTER_X11_FILTER_CONTINUE</code></a>
215 indicates that Clutter is either not interested in the event,
216 or has used the event to update internal state without taking
217 any exclusive action. <a class="link" href="clutter-X11-Specific-Support.html#CLUTTER-X11-FILTER-TRANSLATE:CAPS"><code class="literal">CLUTTER_X11_FILTER_TRANSLATE</code></a> will not
222 <p class="since">Since 0.8</p>
225 <div class="refsect2">
226 <a name="clutter-x11-get-default-display"></a><h3>clutter_x11_get_default_display ()</h3>
227 <pre class="programlisting"><span class="returnvalue">Display</span> * clutter_x11_get_default_display (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
229 Retrieves the pointer to the default display.
231 <div class="variablelist"><table border="0">
232 <col align="left" valign="top">
234 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
235 <td>the default display. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
239 <p class="since">Since 0.6</p>
242 <div class="refsect2">
243 <a name="clutter-x11-get-default-screen"></a><h3>clutter_x11_get_default_screen ()</h3>
244 <pre class="programlisting"><span class="returnvalue">int</span> clutter_x11_get_default_screen (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
246 Gets the number of the default X Screen object.
248 <div class="variablelist"><table border="0">
249 <col align="left" valign="top">
251 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
252 <td>the number of the default screen</td>
255 <p class="since">Since 0.6</p>
258 <div class="refsect2">
259 <a name="clutter-x11-get-root-window"></a><h3>clutter_x11_get_root_window ()</h3>
260 <pre class="programlisting"><span class="returnvalue">Window</span> clutter_x11_get_root_window (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
262 Retrieves the root window.
264 <div class="variablelist"><table border="0">
265 <col align="left" valign="top">
267 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
268 <td>the id of the root window</td>
271 <p class="since">Since 0.6</p>
274 <div class="refsect2">
275 <a name="clutter-x11-get-stage-visual"></a><h3>clutter_x11_get_stage_visual ()</h3>
276 <pre class="programlisting"><span class="returnvalue">XVisualInfo</span> * clutter_x11_get_stage_visual (<em class="parameter"><code><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> *stage</code></em>);</pre>
277 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
278 <h3 class="title">Warning</h3>
279 <p><code class="literal">clutter_x11_get_stage_visual</code> has been deprecated since version 1.2 and should not be used in newly-written code. Use <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-get-visual-info" title="clutter_x11_get_visual_info ()"><code class="function">clutter_x11_get_visual_info()</code></a> instead</p>
282 Returns an XVisualInfo suitable for creating a foreign window for the given
283 stage. NOTE: It doesn't do as the name may suggest, which is return the
284 XVisualInfo that was used to create an existing window for the given stage.
287 XXX: It might be best to deprecate this function and replace with something
288 along the lines of <code class="function">clutter_backend_x11_get_foreign_visual()</code> or perhaps
289 <code class="function">clutter_stage_x11_get_foreign_visual()</code>
291 <div class="variablelist"><table border="0">
292 <col align="left" valign="top">
295 <td><p><span class="term"><em class="parameter"><code>stage</code></em> :</span></p></td>
296 <td>a <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a>
300 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
301 <td>An XVisualInfo suitable for creating a
302 foreign stage. Use <code class="function">XFree()</code> to free the returned value instead. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
307 <p class="since">Since 0.4</p>
310 <div class="refsect2">
311 <a name="clutter-x11-get-stage-window"></a><h3>clutter_x11_get_stage_window ()</h3>
312 <pre class="programlisting"><span class="returnvalue">Window</span> clutter_x11_get_stage_window (<em class="parameter"><code><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> *stage</code></em>);</pre>
314 Gets the stages X Window.
316 <div class="variablelist"><table border="0">
317 <col align="left" valign="top">
320 <td><p><span class="term"><em class="parameter"><code>stage</code></em> :</span></p></td>
321 <td>a <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a>
325 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
326 <td>An XID for the stage window.</td>
330 <p class="since">Since 0.4</p>
333 <div class="refsect2">
334 <a name="clutter-x11-set-stage-foreign"></a><h3>clutter_x11_set_stage_foreign ()</h3>
335 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_x11_set_stage_foreign (<em class="parameter"><code><a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> *stage</code></em>,
336 <em class="parameter"><code><span class="type">Window</span> xwindow</code></em>);</pre>
338 Target the <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a> to use an existing external X Window
340 <div class="variablelist"><table border="0">
341 <col align="left" valign="top">
344 <td><p><span class="term"><em class="parameter"><code>stage</code></em> :</span></p></td>
345 <td>a <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a>
349 <td><p><span class="term"><em class="parameter"><code>xwindow</code></em> :</span></p></td>
350 <td>an existing X Window id</td>
353 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
355 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if foreign window is valid</td>
359 <p class="since">Since 0.4</p>
362 <div class="refsect2">
363 <a name="clutter-x11-trap-x-errors"></a><h3>clutter_x11_trap_x_errors ()</h3>
364 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_trap_x_errors (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
366 Traps every X error until <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-untrap-x-errors" title="clutter_x11_untrap_x_errors ()"><code class="function">clutter_x11_untrap_x_errors()</code></a> is called.
368 <p class="since">Since 0.6</p>
371 <div class="refsect2">
372 <a name="clutter-x11-untrap-x-errors"></a><h3>clutter_x11_untrap_x_errors ()</h3>
373 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> clutter_x11_untrap_x_errors (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
375 Removes the X error trap and returns the current status.
377 <div class="variablelist"><table border="0">
378 <col align="left" valign="top">
380 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
381 <td>the trapped error code, or 0 for success</td>
384 <p class="since">Since 0.4</p>
387 <div class="refsect2">
388 <a name="clutter-x11-has-composite-extension"></a><h3>clutter_x11_has_composite_extension ()</h3>
389 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_x11_has_composite_extension (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
391 Retrieves whether Clutter is running on an X11 server with the
394 <div class="variablelist"><table border="0">
395 <col align="left" valign="top">
397 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
399 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the XComposite extension is available</td>
404 <div class="refsect2">
405 <a name="clutter-x11-get-current-event-time"></a><h3>clutter_x11_get_current_event_time ()</h3>
406 <pre class="programlisting"><span class="returnvalue">Time</span> clutter_x11_get_current_event_time (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
408 Retrieves the timestamp of the last X11 event processed by
409 Clutter. This might be different from the timestamp returned
410 by <a class="link" href="clutter-Events.html#clutter-get-current-event-time" title="clutter_get_current_event_time ()"><code class="function">clutter_get_current_event_time()</code></a>, as Clutter may synthesize
413 <div class="variablelist"><table border="0">
414 <col align="left" valign="top">
416 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
417 <td>a timestamp, in milliseconds</td>
420 <p class="since">Since 1.0</p>
423 <div class="refsect2">
424 <a name="clutter-x11-set-use-argb-visual"></a><h3>clutter_x11_set_use_argb_visual ()</h3>
425 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_set_use_argb_visual (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_argb</code></em>);</pre>
427 Sets whether the Clutter X11 backend should request ARGB visuals by default
431 By default, Clutter requests RGB visuals.
435 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
436 <h3 class="title">Note</h3>If no ARGB visuals are found, the X11 backend will fall back to
437 requesting a RGB visual instead.</div>
441 ARGB visuals are required for the <a class="link" href="ClutterStage.html#ClutterStage--use-alpha" title='The "use-alpha" property'><span class="type">"use-alpha"</span></a> property to work.
445 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
446 <h3 class="title">Note</h3>This function can only be called once, and before <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a> is
450 <div class="variablelist"><table border="0">
451 <col align="left" valign="top">
453 <td><p><span class="term"><em class="parameter"><code>use_argb</code></em> :</span></p></td>
455 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if ARGB visuals should be requested by default</td>
458 <p class="since">Since 1.2</p>
461 <div class="refsect2">
462 <a name="clutter-x11-get-use-argb-visual"></a><h3>clutter_x11_get_use_argb_visual ()</h3>
463 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_x11_get_use_argb_visual (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
465 Retrieves whether the Clutter X11 backend is using ARGB visuals by default
467 <div class="variablelist"><table border="0">
468 <col align="left" valign="top">
470 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
472 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if ARGB visuals are queried by default</td>
475 <p class="since">Since 1.2</p>
478 <div class="refsect2">
479 <a name="clutter-x11-get-visual-info"></a><h3>clutter_x11_get_visual_info ()</h3>
480 <pre class="programlisting"><span class="returnvalue">XVisualInfo</span> * clutter_x11_get_visual_info (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
482 Retrieves the <span class="structname">XVisualInfo</span> used by the Clutter X11
485 <div class="variablelist"><table border="0">
486 <col align="left" valign="top">
488 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
489 <td>a <span class="structname">XVisualInfo</span>, or
490 <code class="varname">None</code>. The returned value should be freed using <code class="function">XFree()</code>
491 when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
495 <p class="since">Since 1.2</p>
498 <div class="refsect2">
499 <a name="ClutterX11FilterFunc"></a><h3>ClutterX11FilterFunc ()</h3>
500 <pre class="programlisting"><a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterReturn" title="enum ClutterX11FilterReturn"><span class="returnvalue">ClutterX11FilterReturn</span></a> (*ClutterX11FilterFunc) (<em class="parameter"><code><span class="type">XEvent</span> *xev</code></em>,
501 <em class="parameter"><code><a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> *cev</code></em>,
502 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
504 Filter function for X11 native events.
506 <div class="variablelist"><table border="0">
507 <col align="left" valign="top">
510 <td><p><span class="term"><em class="parameter"><code>xev</code></em> :</span></p></td>
511 <td>Native X11 event structure</td>
514 <td><p><span class="term"><em class="parameter"><code>cev</code></em> :</span></p></td>
515 <td>Clutter event structure</td>
518 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
519 <td>user data passed to the filter function</td>
522 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
523 <td>the result of the filtering</td>
527 <p class="since">Since 0.6</p>
530 <div class="refsect2">
531 <a name="ClutterX11FilterReturn"></a><h3>enum ClutterX11FilterReturn</h3>
532 <pre class="programlisting">typedef enum {
533 CLUTTER_X11_FILTER_CONTINUE,
534 CLUTTER_X11_FILTER_TRANSLATE,
535 CLUTTER_X11_FILTER_REMOVE
536 } ClutterX11FilterReturn;
539 Return values for the <a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterFunc" title="ClutterX11FilterFunc ()"><span class="type">ClutterX11FilterFunc</span></a> function.
541 <div class="variablelist"><table border="0">
542 <col align="left" valign="top">
545 <td><p><a name="CLUTTER-X11-FILTER-CONTINUE:CAPS"></a><span class="term"><code class="literal">CLUTTER_X11_FILTER_CONTINUE</code></span></p></td>
546 <td>The event was not handled, continues the
551 <td><p><a name="CLUTTER-X11-FILTER-TRANSLATE:CAPS"></a><span class="term"><code class="literal">CLUTTER_X11_FILTER_TRANSLATE</code></span></p></td>
552 <td>Native event translated into a Clutter
553 event, stops the processing
557 <td><p><a name="CLUTTER-X11-FILTER-REMOVE:CAPS"></a><span class="term"><code class="literal">CLUTTER_X11_FILTER_REMOVE</code></span></p></td>
558 <td>Remove the event, stops the processing
563 <p class="since">Since 0.6</p>
566 <div class="refsect2">
567 <a name="clutter-x11-add-filter"></a><h3>clutter_x11_add_filter ()</h3>
568 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_add_filter (<em class="parameter"><code><a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterFunc" title="ClutterX11FilterFunc ()"><span class="type">ClutterX11FilterFunc</span></a> func</code></em>,
569 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
571 Adds an event filter function.
573 <div class="variablelist"><table border="0">
574 <col align="left" valign="top">
577 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
578 <td>a filter function</td>
581 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
582 <td>user data to be passed to the filter function, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
587 <p class="since">Since 0.6</p>
590 <div class="refsect2">
591 <a name="clutter-x11-remove-filter"></a><h3>clutter_x11_remove_filter ()</h3>
592 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_remove_filter (<em class="parameter"><code><a class="link" href="clutter-X11-Specific-Support.html#ClutterX11FilterFunc" title="ClutterX11FilterFunc ()"><span class="type">ClutterX11FilterFunc</span></a> func</code></em>,
593 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
595 Removes the given filter function.
597 <div class="variablelist"><table border="0">
598 <col align="left" valign="top">
601 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
602 <td>a filter function</td>
605 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
606 <td>user data to be passed to the filter function, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
611 <p class="since">Since 0.6</p>
614 <div class="refsect2">
615 <a name="clutter-x11-get-input-devices"></a><h3>clutter_x11_get_input_devices ()</h3>
616 <pre class="programlisting">const <a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * clutter_x11_get_input_devices (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
617 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
618 <h3 class="title">Warning</h3>
619 <p><code class="literal">clutter_x11_get_input_devices</code> has been deprecated since version 1.2 and should not be used in newly-written code. Use <a class="link" href="ClutterDeviceManager.html#clutter-device-manager-peek-devices" title="clutter_device_manager_peek_devices ()"><code class="function">clutter_device_manager_peek_devices()</code></a> instead</p>
622 Retrieves a pointer to the list of input devices
624 <div class="variablelist"><table border="0">
625 <col align="left" valign="top">
627 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
629 pointer to the internal list of input devices; the returned list is
630 owned by Clutter and should not be modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Clutter.InputDevice]</span>
634 <p class="since">Since 0.8</p>
637 <div class="refsect2">
638 <a name="clutter-x11-has-xinput"></a><h3>clutter_x11_has_xinput ()</h3>
639 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_x11_has_xinput (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
641 Gets whether Clutter has XInput support.
643 <div class="variablelist"><table border="0">
644 <col align="left" valign="top">
646 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
648 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if Clutter was compiled with XInput support
649 and XInput support is available at run time.</td>
652 <p class="since">Since 0.8</p>
655 <div class="refsect2">
656 <a name="clutter-x11-enable-xinput"></a><h3>clutter_x11_enable_xinput ()</h3>
657 <pre class="programlisting"><span class="returnvalue">void</span> clutter_x11_enable_xinput (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
659 Enables the use of the XInput extension if present on connected
660 XServer and support built into Clutter. XInput allows for multiple
661 pointing devices to be used.
664 This function must be called before <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>.
667 Since XInput might not be supported by the X server, you might
668 want to use <a class="link" href="clutter-X11-Specific-Support.html#clutter-x11-has-xinput" title="clutter_x11_has_xinput ()"><code class="function">clutter_x11_has_xinput()</code></a> to see if support was enabled.
670 <p class="since">Since 0.8</p>
673 <div class="refsect2">
674 <a name="clutter-x11-event-get-key-group"></a><h3>clutter_x11_event_get_key_group ()</h3>
675 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> clutter_x11_event_get_key_group (<em class="parameter"><code>const <a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> *event</code></em>);</pre>
677 Retrieves the group for the modifiers set in <em class="parameter"><code>event</code></em>
679 <div class="variablelist"><table border="0">
680 <col align="left" valign="top">
683 <td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
684 <td>a <a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> of type <a class="link" href="clutter-Events.html#CLUTTER-KEY-PRESS:CAPS"><code class="literal">CLUTTER_KEY_PRESS</code></a> or <a class="link" href="clutter-Events.html#CLUTTER-KEY-RELEASE:CAPS"><code class="literal">CLUTTER_KEY_RELEASE</code></a>
688 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
689 <td>the group id</td>
693 <p class="since">Since 1.4</p>
699 Generated by GTK-Doc V1.18.1</div>