1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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="ch11.html" title="General purpose API">
9 <link rel="prev" href="ClutterInputDevice.html" title="ClutterInputDevice">
10 <link rel="next" href="ClutterPath.html" title="ClutterPath">
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="ClutterInputDevice.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch11.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="ClutterPath.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-General.synopsis" class="shortcut">Top</a>
26 <a href="#clutter-General.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="clutter-General"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="clutter-General.top_of_page"></a>General</span></h2>
34 <p>General — Various 'global' clutter functions.</p>
36 <td valign="top" align="right"></td>
38 <div class="refsynopsisdiv">
39 <a name="clutter-General.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">#define <a class="link" href="clutter-General.html#CLUTTER-PRIORITY-REDRAW:CAPS" title="CLUTTER_PRIORITY_REDRAW">CLUTTER_PRIORITY_REDRAW</a>
42 enum <a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError">ClutterInitError</a>;
43 <a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="returnvalue">ClutterInitError</span></a> <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()">clutter_init</a> (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
44 <em class="parameter"><code><span class="type">char</span> ***argv</code></em>);
45 <a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="returnvalue">ClutterInitError</span></a> <a class="link" href="clutter-General.html#clutter-init-with-args" title="clutter_init_with_args ()">clutter_init_with_args</a> (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
46 <em class="parameter"><code><span class="type">char</span> ***argv</code></em>,
47 <em class="parameter"><code>const <span class="type">char</span> *parameter_string</code></em>,
48 <em class="parameter"><code><span class="type">GOptionEntry</span> *entries</code></em>,
49 <em class="parameter"><code>const <span class="type">char</span> *translation_domain</code></em>,
50 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
51 <span class="returnvalue">GOptionGroup</span> * <a class="link" href="clutter-General.html#clutter-get-option-group" title="clutter_get_option_group ()">clutter_get_option_group</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
52 <span class="returnvalue">GOptionGroup</span> * <a class="link" href="clutter-General.html#clutter-get-option-group-without-init" title="clutter_get_option_group_without_init ()">clutter_get_option_group_without_init</a>
53 (<em class="parameter"><code><span class="type">void</span></code></em>);
55 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-main" title="clutter_main ()">clutter_main</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
56 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-main-quit" title="clutter_main_quit ()">clutter_main_quit</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
57 <span class="returnvalue">gint</span> <a class="link" href="clutter-General.html#clutter-main-level" title="clutter_main_level ()">clutter_main_level</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
59 <span class="returnvalue">gboolean</span> <a class="link" href="clutter-General.html#clutter-get-debug-enabled" title="clutter_get_debug_enabled ()">clutter_get_debug_enabled</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
60 <span class="returnvalue">gboolean</span> <a class="link" href="clutter-General.html#clutter-get-show-fps" title="clutter_get_show_fps ()">clutter_get_show_fps</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
61 <span class="returnvalue">gulong</span> <a class="link" href="clutter-General.html#clutter-get-timestamp" title="clutter_get_timestamp ()">clutter_get_timestamp</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
62 <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * <a class="link" href="clutter-General.html#clutter-get-actor-by-gid" title="clutter_get_actor_by_gid ()">clutter_get_actor_by_gid</a> (<em class="parameter"><code><span class="type">guint32</span> id_</code></em>);
63 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-set-default-frame-rate" title="clutter_set_default_frame_rate ()">clutter_set_default_frame_rate</a> (<em class="parameter"><code><span class="type">guint</span> frames_per_sec</code></em>);
64 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-get-default-frame-rate" title="clutter_get_default_frame_rate ()">clutter_get_default_frame_rate</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
65 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-set-motion-events-enabled" title="clutter_set_motion_events_enabled ()">clutter_set_motion_events_enabled</a> (<em class="parameter"><code><span class="type">gboolean</span> enable</code></em>);
66 <span class="returnvalue">gboolean</span> <a class="link" href="clutter-General.html#clutter-get-motion-events-enabled" title="clutter_get_motion_events_enabled ()">clutter_get_motion_events_enabled</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
67 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-clear-glyph-cache" title="clutter_clear_glyph_cache ()">clutter_clear_glyph_cache</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
68 enum <a class="link" href="clutter-General.html#ClutterFontFlags" title="enum ClutterFontFlags">ClutterFontFlags</a>;
69 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-set-font-flags" title="clutter_set_font_flags ()">clutter_set_font_flags</a> (<em class="parameter"><code><a class="link" href="clutter-General.html#ClutterFontFlags" title="enum ClutterFontFlags"><span class="type">ClutterFontFlags</span></a> flags</code></em>);
70 <a class="link" href="clutter-General.html#ClutterFontFlags" title="enum ClutterFontFlags"><span class="returnvalue">ClutterFontFlags</span></a> <a class="link" href="clutter-General.html#clutter-get-font-flags" title="clutter_get_font_flags ()">clutter_get_font_flags</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
71 <span class="returnvalue">PangoFontMap</span> * <a class="link" href="clutter-General.html#clutter-get-font-map" title="clutter_get_font_map ()">clutter_get_font_map</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
72 enum <a class="link" href="clutter-General.html#ClutterTextDirection" title="enum ClutterTextDirection">ClutterTextDirection</a>;
73 <a class="link" href="clutter-General.html#ClutterTextDirection" title="enum ClutterTextDirection"><span class="returnvalue">ClutterTextDirection</span></a> <a class="link" href="clutter-General.html#clutter-get-default-text-direction" title="clutter_get_default_text_direction ()">clutter_get_default_text_direction</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
74 <span class="returnvalue">gboolean</span> <a class="link" href="clutter-General.html#clutter-get-accessibility-enabled" title="clutter_get_accessibility_enabled ()">clutter_get_accessibility_enabled</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
76 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-threads-set-lock-functions" title="clutter_threads_set_lock_functions ()">clutter_threads_set_lock_functions</a> (<em class="parameter"><code><span class="type">GCallback</span> enter_fn</code></em>,
77 <em class="parameter"><code><span class="type">GCallback</span> leave_fn</code></em>);
78 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-threads-init" title="clutter_threads_init ()">clutter_threads_init</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
79 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-threads-enter" title="clutter_threads_enter ()">clutter_threads_enter</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
80 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-threads-leave" title="clutter_threads_leave ()">clutter_threads_leave</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
81 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-idle" title="clutter_threads_add_idle ()">clutter_threads_add_idle</a> (<em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
82 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);
83 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-idle-full" title="clutter_threads_add_idle_full ()">clutter_threads_add_idle_full</a> (<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
84 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
85 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
86 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);
87 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-timeout" title="clutter_threads_add_timeout ()">clutter_threads_add_timeout</a> (<em class="parameter"><code><span class="type">guint</span> interval</code></em>,
88 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
89 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);
90 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-timeout-full" title="clutter_threads_add_timeout_full ()">clutter_threads_add_timeout_full</a> (<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
91 <em class="parameter"><code><span class="type">guint</span> interval</code></em>,
92 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
93 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
94 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);
95 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-frame-source" title="clutter_threads_add_frame_source ()">clutter_threads_add_frame_source</a> (<em class="parameter"><code><span class="type">guint</span> fps</code></em>,
96 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
97 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);
98 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-frame-source-full" title="clutter_threads_add_frame_source_full ()">clutter_threads_add_frame_source_full</a>
99 (<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
100 <em class="parameter"><code><span class="type">guint</span> fps</code></em>,
101 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
102 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
103 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);
104 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-repaint-func" title="clutter_threads_add_repaint_func ()">clutter_threads_add_repaint_func</a> (<em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
105 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
106 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);
107 enum <a class="link" href="clutter-General.html#ClutterRepaintFlags" title="enum ClutterRepaintFlags">ClutterRepaintFlags</a>;
108 <span class="returnvalue">guint</span> <a class="link" href="clutter-General.html#clutter-threads-add-repaint-func-full" title="clutter_threads_add_repaint_func_full ()">clutter_threads_add_repaint_func_full</a>
109 (<em class="parameter"><code><a class="link" href="clutter-General.html#ClutterRepaintFlags" title="enum ClutterRepaintFlags"><span class="type">ClutterRepaintFlags</span></a> flags</code></em>,
110 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
111 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
112 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);
113 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-threads-remove-repaint-func" title="clutter_threads_remove_repaint_func ()">clutter_threads_remove_repaint_func</a> (<em class="parameter"><code><span class="type">guint</span> handle_id</code></em>);
115 <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * <a class="link" href="clutter-General.html#clutter-get-keyboard-grab" title="clutter_get_keyboard_grab ()">clutter_get_keyboard_grab</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
116 <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * <a class="link" href="clutter-General.html#clutter-get-pointer-grab" title="clutter_get_pointer_grab ()">clutter_get_pointer_grab</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
117 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-grab-keyboard" title="clutter_grab_keyboard ()">clutter_grab_keyboard</a> (<em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *actor</code></em>);
118 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-grab-pointer" title="clutter_grab_pointer ()">clutter_grab_pointer</a> (<em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *actor</code></em>);
119 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-ungrab-keyboard" title="clutter_ungrab_keyboard ()">clutter_ungrab_keyboard</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
120 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-ungrab-pointer" title="clutter_ungrab_pointer ()">clutter_ungrab_pointer</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
121 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-grab-pointer-for-device" title="clutter_grab_pointer_for_device ()">clutter_grab_pointer_for_device</a> (<em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *actor</code></em>,
122 <em class="parameter"><code><span class="type">gint</span> id_</code></em>);
123 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-ungrab-pointer-for-device" title="clutter_ungrab_pointer_for_device ()">clutter_ungrab_pointer_for_device</a> (<em class="parameter"><code><span class="type">gint</span> id_</code></em>);
125 <span class="returnvalue">void</span> <a class="link" href="clutter-General.html#clutter-do-event" title="clutter_do_event ()">clutter_do_event</a> (<em class="parameter"><code><a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> *event</code></em>);
128 <div class="refsect1">
129 <a name="clutter-General.description"></a><h2>Description</h2>
131 Functions to retrieve various global Clutter resources and other utility
132 functions for mainloops, events and threads
136 <div class="refsect2">
137 <a name="clutter-Threading-Model"></a><h3>Threading Model</h3>
138 <p>Clutter is <span class="emphasis"><em>thread-aware</em></span>: all operations
139 performed by Clutter are assumed to be under the big Clutter lock,
140 which is created when the threading is initialized through
141 <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>.</p>
142 <div class="example">
143 <a name="example-Thread-Init"></a><p class="title"><b>Example 15. Thread Initialization</b></p>
144 <div class="example-contents">
145 <p>The code below shows how to correctly initialize Clutter
146 in a multi-threaded environment. These operations are mandatory for
147 applications that wish to use threads with Clutter.</p>
148 <pre class="programlisting">
150 main (int argc, char *argv[])
152 /* initialize Clutter */
153 clutter_init (&argc, &argv);
157 /* acquire the main lock */
158 clutter_threads_enter ();
160 /* start the main loop */
163 /* release the main lock */
164 clutter_threads_leave ();
172 <br class="example-break"><p>This threading model has the caveat that it is only safe to call
173 Clutter's API when the lock has been acquired — which happens
174 between pairs of <a class="link" href="clutter-General.html#clutter-threads-enter" title="clutter_threads_enter ()"><code class="function">clutter_threads_enter()</code></a> and <a class="link" href="clutter-General.html#clutter-threads-leave" title="clutter_threads_leave ()"><code class="function">clutter_threads_leave()</code></a>
176 <p>The only safe and portable way to use the Clutter API in a
177 multi-threaded environment is to never access the API from a thread that
178 did not call <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a> and <a class="link" href="clutter-General.html#clutter-main" title="clutter_main ()"><code class="function">clutter_main()</code></a>.</p>
179 <p>The common pattern for using threads with Clutter is to use worker
180 threads to perform blocking operations and then install idle or timeout
181 sources with the result when the thread finished.</p>
182 <p>Clutter provides thread-aware variants of <code class="function">g_idle_add()</code> and
183 <code class="function">g_timeout_add()</code> that acquire the Clutter lock before invoking the provided
184 callback: <a class="link" href="clutter-General.html#clutter-threads-add-idle" title="clutter_threads_add_idle ()"><code class="function">clutter_threads_add_idle()</code></a> and
185 <a class="link" href="clutter-General.html#clutter-threads-add-timeout" title="clutter_threads_add_timeout ()"><code class="function">clutter_threads_add_timeout()</code></a>.</p>
186 <p>The example below shows how to use a worker thread to perform a
187 blocking operation, and perform UI updates using the main loop.</p>
188 <div class="example">
189 <a name="worker-thread-example"></a><p class="title"><b>Example 16. A worker thread example</b></p>
190 <div class="example-contents">
191 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
194 <td class="listing_lines" align="right"><pre>1</pre></td>
195 <td class="listing_code"><pre class="programlisting"><span class="normal">FIXME</span><span class="symbol">:</span><span class="normal"> MISSING XINCLUDE CONTENT</span></pre></td>
202 <br class="example-break">
207 <div class="refsect1">
208 <a name="clutter-General.details"></a><h2>Details</h2>
209 <div class="refsect2">
210 <a name="CLUTTER-PRIORITY-REDRAW:CAPS"></a><h3>CLUTTER_PRIORITY_REDRAW</h3>
211 <pre class="programlisting">#define CLUTTER_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 50)
214 Priority of the redraws. This is chosen to be lower than the GTK+
215 redraw and resize priorities, because in application with both
216 GTK+ and Clutter it's more likely that the Clutter part will be
217 continually animating (and thus able to starve GTK+) than
220 <p class="since">Since 0.8</p>
223 <div class="refsect2">
224 <a name="ClutterInitError"></a><h3>enum ClutterInitError</h3>
225 <pre class="programlisting">typedef enum {
226 CLUTTER_INIT_SUCCESS = 1,
227 CLUTTER_INIT_ERROR_UNKNOWN = 0,
228 CLUTTER_INIT_ERROR_THREADS = -1,
229 CLUTTER_INIT_ERROR_BACKEND = -2,
230 CLUTTER_INIT_ERROR_INTERNAL = -3
234 Error conditions returned by <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a> and <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>.
236 <div class="variablelist"><table border="0">
237 <col align="left" valign="top">
240 <td><p><a name="CLUTTER-INIT-SUCCESS:CAPS"></a><span class="term"><code class="literal">CLUTTER_INIT_SUCCESS</code></span></p></td>
241 <td>Initialisation successful
245 <td><p><a name="CLUTTER-INIT-ERROR-UNKNOWN:CAPS"></a><span class="term"><code class="literal">CLUTTER_INIT_ERROR_UNKNOWN</code></span></p></td>
250 <td><p><a name="CLUTTER-INIT-ERROR-THREADS:CAPS"></a><span class="term"><code class="literal">CLUTTER_INIT_ERROR_THREADS</code></span></p></td>
251 <td>Thread initialisation failed
255 <td><p><a name="CLUTTER-INIT-ERROR-BACKEND:CAPS"></a><span class="term"><code class="literal">CLUTTER_INIT_ERROR_BACKEND</code></span></p></td>
256 <td>Backend initialisation failed
260 <td><p><a name="CLUTTER-INIT-ERROR-INTERNAL:CAPS"></a><span class="term"><code class="literal">CLUTTER_INIT_ERROR_INTERNAL</code></span></p></td>
266 <p class="since">Since 0.2</p>
269 <div class="refsect2">
270 <a name="clutter-init"></a><h3>clutter_init ()</h3>
271 <pre class="programlisting"><a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="returnvalue">ClutterInitError</span></a> clutter_init (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
272 <em class="parameter"><code><span class="type">char</span> ***argv</code></em>);</pre>
274 Initialises everything needed to operate with Clutter and parses some
275 standard command line options; <em class="parameter"><code>argc</code></em> and <em class="parameter"><code>argv</code></em> are adjusted accordingly
276 so your own code will never see those standard arguments.
279 It is safe to call this function multiple times.
283 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
284 <h3 class="title">Note</h3>This function will not abort in case of errors during
285 initialization; <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a> will print out the error message on
286 stderr, and will return an error code. It is up to the application
287 code to handle this case. If you need to display the error message
288 yourself, you can use <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>, which takes a <span class="type">GError</span>
293 If this function fails, and returns an error code, any subsequent
294 Clutter API will have undefined behaviour - including segmentation
295 faults and assertion failures. Make sure to handle the returned
296 <a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="type">ClutterInitError</span></a> enumeration value.
298 <div class="variablelist"><table border="0">
299 <col align="left" valign="top">
302 <td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
303 <td>The number of arguments in <em class="parameter"><code>argv</code></em>. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span>
307 <td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
308 <td>A pointer to an array
309 of arguments. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc][<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
313 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
314 <td>a <a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="type">ClutterInitError</span></a> value</td>
320 <div class="refsect2">
321 <a name="clutter-init-with-args"></a><h3>clutter_init_with_args ()</h3>
322 <pre class="programlisting"><a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="returnvalue">ClutterInitError</span></a> clutter_init_with_args (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
323 <em class="parameter"><code><span class="type">char</span> ***argv</code></em>,
324 <em class="parameter"><code>const <span class="type">char</span> *parameter_string</code></em>,
325 <em class="parameter"><code><span class="type">GOptionEntry</span> *entries</code></em>,
326 <em class="parameter"><code>const <span class="type">char</span> *translation_domain</code></em>,
327 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
329 This function does the same work as <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>. Additionally,
330 it allows you to add your own command line options, and it
331 automatically generates nicely formatted <code class="option">--help</code>
332 output. Note that your program will be terminated after writing
333 out the help output. Also note that, in case of error, the
334 error message will be placed inside <em class="parameter"><code>error</code></em> instead of being
335 printed on the display.
338 Just like <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>, if this function returns an error code then
339 any subsequent call to any other Clutter API will result in undefined
340 behaviour - including segmentation faults.
342 <div class="variablelist"><table border="0">
343 <col align="left" valign="top">
346 <td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
347 <td>a pointer to the number of command line arguments. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span>
351 <td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
352 <td>a pointer to the array
353 of command line arguments. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc][<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
357 <td><p><span class="term"><em class="parameter"><code>parameter_string</code></em> :</span></p></td>
358 <td>a string which is displayed in the
359 first line of <code class="option">--help</code> output, after
360 <code class="literal"><em class="replaceable"><code>programname</code></em> [OPTION...]</code>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
364 <td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
365 <td>a <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> terminated array of <span class="type">GOptionEntry</span>s
366 describing the options of your program. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
370 <td><p><span class="term"><em class="parameter"><code>translation_domain</code></em> :</span></p></td>
371 <td>a translation domain to use for
372 translating the <code class="option">--help</code> output for the options in
373 <em class="parameter"><code>entries</code></em> with <code class="function">gettext()</code>, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
377 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
378 <td>a return location for a <span class="type">GError</span>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
382 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
384 <a class="link" href="clutter-General.html#CLUTTER-INIT-SUCCESS:CAPS"><code class="literal">CLUTTER_INIT_SUCCESS</code></a> if Clutter has been successfully
385 initialised, or other values or <a class="link" href="clutter-General.html#ClutterInitError" title="enum ClutterInitError"><span class="type">ClutterInitError</span></a> in case of
390 <p class="since">Since 0.2</p>
393 <div class="refsect2">
394 <a name="clutter-get-option-group"></a><h3>clutter_get_option_group ()</h3>
395 <pre class="programlisting"><span class="returnvalue">GOptionGroup</span> * clutter_get_option_group (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
397 Returns a <span class="type">GOptionGroup</span> for the command line arguments recognized
398 by Clutter. You should add this group to your <span class="type">GOptionContext</span> with
399 <code class="function">g_option_context_add_group()</code>, if you are using <code class="function">g_option_context_parse()</code>
400 to parse your commandline arguments.
403 Calling <code class="function">g_option_context_parse()</code> with Clutter's <span class="type">GOptionGroup</span> will result
404 in Clutter's initialization. That is, the following code:
408 <div class="informalexample">
409 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
412 <td class="listing_lines" align="right"><pre>1
414 <td class="listing_code"><pre class="programlisting"><span class="function">g_option_context_set_main_group</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">context</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-get-option-group">clutter_get_option_group</a></span><span class="normal"> </span><span class="symbol">());</span>
415 <span class="normal">res </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_option_context_parse</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">context</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
424 is functionally equivalent to:
428 <div class="informalexample">
429 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
432 <td class="listing_lines" align="right"><pre>1</pre></td>
433 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="clutter-General.html#clutter-init">clutter_init</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argv</span><span class="symbol">);</span></pre></td>
442 After <code class="function">g_option_context_parse()</code> on a <span class="type">GOptionContext</span> containing the
443 Clutter <span class="type">GOptionGroup</span> has returned <code class="literal">TRUE</code>, Clutter is guaranteed to be
446 <div class="variablelist"><table border="0">
447 <col align="left" valign="top">
449 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
450 <td>a <span class="type">GOptionGroup</span> for the commandline arguments
451 recognized by Clutter. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
455 <p class="since">Since 0.2</p>
458 <div class="refsect2">
459 <a name="clutter-get-option-group-without-init"></a><h3>clutter_get_option_group_without_init ()</h3>
460 <pre class="programlisting"><span class="returnvalue">GOptionGroup</span> * clutter_get_option_group_without_init
461 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
463 Returns a <span class="type">GOptionGroup</span> for the command line arguments recognized
464 by Clutter. You should add this group to your <span class="type">GOptionContext</span> with
465 <code class="function">g_option_context_add_group()</code>, if you are using <code class="function">g_option_context_parse()</code>
466 to parse your commandline arguments.
469 Unlike <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>, calling <code class="function">g_option_context_parse()</code> with
470 the <span class="type">GOptionGroup</span> returned by this function requires a subsequent explicit
471 call to <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>; use this function when needing to set foreign
472 display connection with <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>, or with
473 <code class="function"><code class="function">gtk_clutter_init()</code></code>.
475 <div class="variablelist"><table border="0">
476 <col align="left" valign="top">
478 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
479 <td>a <span class="type">GOptionGroup</span> for the commandline arguments
480 recognized by Clutter. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
484 <p class="since">Since 0.8.2</p>
487 <div class="refsect2">
488 <a name="clutter-main"></a><h3>clutter_main ()</h3>
489 <pre class="programlisting"><span class="returnvalue">void</span> clutter_main (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
491 Starts the Clutter mainloop.
495 <div class="refsect2">
496 <a name="clutter-main-quit"></a><h3>clutter_main_quit ()</h3>
497 <pre class="programlisting"><span class="returnvalue">void</span> clutter_main_quit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
499 Terminates the Clutter mainloop.
503 <div class="refsect2">
504 <a name="clutter-main-level"></a><h3>clutter_main_level ()</h3>
505 <pre class="programlisting"><span class="returnvalue">gint</span> clutter_main_level (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
507 Retrieves the depth of the Clutter mainloop.
509 <div class="variablelist"><table border="0">
510 <col align="left" valign="top">
512 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
513 <td>The level of the mainloop.</td>
518 <div class="refsect2">
519 <a name="clutter-get-debug-enabled"></a><h3>clutter_get_debug_enabled ()</h3>
520 <pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_get_debug_enabled (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
521 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
522 <h3 class="title">Warning</h3>
523 <p><code class="literal">clutter_get_debug_enabled</code> has been deprecated since version 1.10 and should not be used in newly-written code. This function does not do anything.</p>
526 Check if Clutter has debugging enabled.
528 <div class="variablelist"><table border="0">
529 <col align="left" valign="top">
531 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
532 <td><code class="literal">FALSE</code></td>
537 <div class="refsect2">
538 <a name="clutter-get-show-fps"></a><h3>clutter_get_show_fps ()</h3>
539 <pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_get_show_fps (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
540 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
541 <h3 class="title">Warning</h3>
542 <p><code class="literal">clutter_get_show_fps</code> has been deprecated since version 1.10 and should not be used in newly-written code. This function does not do anything. Use the environment
543 variable or the configuration file to determine whether Clutter should
544 print out the FPS counter on the console.</p>
547 Returns whether Clutter should print out the frames per second on the
548 console. You can enable this setting either using the
549 <code class="literal">CLUTTER_SHOW_FPS</code> environment variable or passing
550 the <code class="literal">--clutter-show-fps</code> command line argument. *
552 <div class="variablelist"><table border="0">
553 <col align="left" valign="top">
555 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
557 <code class="literal">TRUE</code> if Clutter should show the FPS.</td>
560 <p class="since">Since 0.4</p>
563 <div class="refsect2">
564 <a name="clutter-get-timestamp"></a><h3>clutter_get_timestamp ()</h3>
565 <pre class="programlisting"><span class="returnvalue">gulong</span> clutter_get_timestamp (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
566 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
567 <h3 class="title">Warning</h3>
568 <p><code class="literal">clutter_get_timestamp</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <span class="type">GTimer</span> or <code class="function">g_get_monotonic_time()</code> for a proper
572 Returns the approximate number of microseconds passed since Clutter was
576 This function shdould not be used by application code.
579 The output of this function depends on whether Clutter was configured to
580 enable its debugging code paths, so it's less useful than intended.
583 Since Clutter 1.10, this function is an alias to <code class="function">g_get_monotonic_time()</code>
584 if Clutter was configured to enable the debugging code paths.
586 <div class="variablelist"><table border="0">
587 <col align="left" valign="top">
589 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
590 <td>Number of microseconds since <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a> was called, or
591 zero if Clutter was not configured with debugging code paths.</td>
596 <div class="refsect2">
597 <a name="clutter-get-actor-by-gid"></a><h3>clutter_get_actor_by_gid ()</h3>
598 <pre class="programlisting"><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * clutter_get_actor_by_gid (<em class="parameter"><code><span class="type">guint32</span> id_</code></em>);</pre>
599 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
600 <h3 class="title">Warning</h3>
601 <p><code class="literal">clutter_get_actor_by_gid</code> has been deprecated since version 1.8 and should not be used in newly-written code. The id is not used any longer.</p>
604 Retrieves the <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> with <em class="parameter"><code>id_</code></em>.
606 <div class="variablelist"><table border="0">
607 <col align="left" valign="top">
610 <td><p><span class="term"><em class="parameter"><code>id_</code></em> :</span></p></td>
611 <td>a <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> unique id.</td>
614 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
615 <td>the actor with the passed id or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
616 The returned actor does not have its reference count increased. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
621 <p class="since">Since 0.6</p>
624 <div class="refsect2">
625 <a name="clutter-set-default-frame-rate"></a><h3>clutter_set_default_frame_rate ()</h3>
626 <pre class="programlisting"><span class="returnvalue">void</span> clutter_set_default_frame_rate (<em class="parameter"><code><span class="type">guint</span> frames_per_sec</code></em>);</pre>
627 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
628 <h3 class="title">Warning</h3>
629 <p><code class="literal">clutter_set_default_frame_rate</code> has been deprecated since version 1.10 and should not be used in newly-written code. This function does not do anything any more.</p>
632 Sets the default frame rate. This frame rate will be used to limit
633 the number of frames drawn if Clutter is not able to synchronize
634 with the vertical refresh rate of the display. When synchronization
635 is possible, this value is ignored.
637 <div class="variablelist"><table border="0">
638 <col align="left" valign="top">
640 <td><p><span class="term"><em class="parameter"><code>frames_per_sec</code></em> :</span></p></td>
641 <td>the new default frame rate</td>
644 <p class="since">Since 0.6</p>
647 <div class="refsect2">
648 <a name="clutter-get-default-frame-rate"></a><h3>clutter_get_default_frame_rate ()</h3>
649 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_get_default_frame_rate (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
651 Retrieves the default frame rate. See <a class="link" href="clutter-General.html#clutter-set-default-frame-rate" title="clutter_set_default_frame_rate ()"><code class="function">clutter_set_default_frame_rate()</code></a>.
653 <div class="variablelist"><table border="0">
654 <col align="left" valign="top">
656 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
657 <td>the default frame rate</td>
660 <p class="since">Since 0.6</p>
663 <div class="refsect2">
664 <a name="clutter-set-motion-events-enabled"></a><h3>clutter_set_motion_events_enabled ()</h3>
665 <pre class="programlisting"><span class="returnvalue">void</span> clutter_set_motion_events_enabled (<em class="parameter"><code><span class="type">gboolean</span> enable</code></em>);</pre>
666 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
667 <h3 class="title">Warning</h3>
668 <p><code class="literal">clutter_set_motion_events_enabled</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use <a class="link" href="ClutterStage.html#clutter-stage-set-motion-events-enabled" title="clutter_stage_set_motion_events_enabled ()"><code class="function">clutter_stage_set_motion_events_enabled()</code></a> instead.</p>
671 Sets whether per-actor motion events should be enabled or not on
672 all <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a>s managed by Clutter.
675 If <em class="parameter"><code>enable</code></em> is <code class="literal">FALSE</code> the following events will not work:
677 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
678 <li class="listitem"><p>ClutterActor::motion-event, unless on the
679 <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a></p></li>
680 <li class="listitem"><p>ClutterActor::enter-event</p></li>
681 <li class="listitem"><p>ClutterActor::leave-event</p></li>
685 <div class="variablelist"><table border="0">
686 <col align="left" valign="top">
688 <td><p><span class="term"><em class="parameter"><code>enable</code></em> :</span></p></td>
690 <code class="literal">TRUE</code> to enable per-actor motion events</td>
693 <p class="since">Since 0.6</p>
696 <div class="refsect2">
697 <a name="clutter-get-motion-events-enabled"></a><h3>clutter_get_motion_events_enabled ()</h3>
698 <pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_get_motion_events_enabled (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
699 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
700 <h3 class="title">Warning</h3>
701 <p><code class="literal">clutter_get_motion_events_enabled</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use <a class="link" href="ClutterStage.html#clutter-stage-get-motion-events-enabled" title="clutter_stage_get_motion_events_enabled ()"><code class="function">clutter_stage_get_motion_events_enabled()</code></a> instead.</p>
704 Gets whether the per-actor motion events are enabled.
706 <div class="variablelist"><table border="0">
707 <col align="left" valign="top">
709 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
711 <code class="literal">TRUE</code> if the motion events are enabled</td>
714 <p class="since">Since 0.6</p>
717 <div class="refsect2">
718 <a name="clutter-clear-glyph-cache"></a><h3>clutter_clear_glyph_cache ()</h3>
719 <pre class="programlisting"><span class="returnvalue">void</span> clutter_clear_glyph_cache (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
720 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
721 <h3 class="title">Warning</h3>
722 <p><code class="literal">clutter_clear_glyph_cache</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <a class="link" href="clutter-General.html#clutter-get-font-map" title="clutter_get_font_map ()"><code class="function">clutter_get_font_map()</code></a> and
723 <code class="function">cogl_pango_font_map_clear_glyph_cache()</code> instead.</p>
726 Clears the internal cache of glyphs used by the Pango
727 renderer. This will free up some memory and GL texture
728 resources. The cache will be automatically refilled as more text is
731 <p class="since">Since 0.8</p>
734 <div class="refsect2">
735 <a name="ClutterFontFlags"></a><h3>enum ClutterFontFlags</h3>
736 <pre class="programlisting">typedef enum {
737 /*< prefix=CLUTTER_FONT >*/
738 CLUTTER_FONT_MIPMAPPING = (1 << 0),
739 CLUTTER_FONT_HINTING = (1 << 1)
743 Runtime flags to change the font quality. To be used with
744 <a class="link" href="clutter-General.html#clutter-set-font-flags" title="clutter_set_font_flags ()"><code class="function">clutter_set_font_flags()</code></a>.
746 <div class="variablelist"><table border="0">
747 <col align="left" valign="top">
750 <td><p><a name="CLUTTER-FONT-MIPMAPPING:CAPS"></a><span class="term"><code class="literal">CLUTTER_FONT_MIPMAPPING</code></span></p></td>
751 <td>Set to use mipmaps for the glyph cache textures.
755 <td><p><a name="CLUTTER-FONT-HINTING:CAPS"></a><span class="term"><code class="literal">CLUTTER_FONT_HINTING</code></span></p></td>
756 <td>Set to enable hinting on the glyphs.
761 <p class="since">Since 1.0</p>
764 <div class="refsect2">
765 <a name="clutter-set-font-flags"></a><h3>clutter_set_font_flags ()</h3>
766 <pre class="programlisting"><span class="returnvalue">void</span> clutter_set_font_flags (<em class="parameter"><code><a class="link" href="clutter-General.html#ClutterFontFlags" title="enum ClutterFontFlags"><span class="type">ClutterFontFlags</span></a> flags</code></em>);</pre>
767 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
768 <h3 class="title">Warning</h3>
769 <p><code class="literal">clutter_set_font_flags</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <a class="link" href="ClutterBackend.html#clutter-backend-set-font-options" title="clutter_backend_set_font_options ()"><code class="function">clutter_backend_set_font_options()</code></a> and the
770 <span class="type">cairo_font_option_t</span> API.</p>
773 Sets the font quality options for subsequent text rendering
777 Using mipmapped textures will improve the quality for scaled down
778 text but will use more texture memory.
781 Enabling hinting improves text quality for static text but may
782 introduce some artifacts if the text is animated.
784 <div class="variablelist"><table border="0">
785 <col align="left" valign="top">
787 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
788 <td>The new flags</td>
791 <p class="since">Since 1.0</p>
794 <div class="refsect2">
795 <a name="clutter-get-font-flags"></a><h3>clutter_get_font_flags ()</h3>
796 <pre class="programlisting"><a class="link" href="clutter-General.html#ClutterFontFlags" title="enum ClutterFontFlags"><span class="returnvalue">ClutterFontFlags</span></a> clutter_get_font_flags (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
797 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
798 <h3 class="title">Warning</h3>
799 <p><code class="literal">clutter_get_font_flags</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <a class="link" href="ClutterBackend.html#clutter-backend-get-font-options" title="clutter_backend_get_font_options ()"><code class="function">clutter_backend_get_font_options()</code></a> and the
800 <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a> API.</p>
803 Gets the current font flags for rendering text. See
804 <a class="link" href="clutter-General.html#clutter-set-font-flags" title="clutter_set_font_flags ()"><code class="function">clutter_set_font_flags()</code></a>.
806 <div class="variablelist"><table border="0">
807 <col align="left" valign="top">
809 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
810 <td>The font flags</td>
813 <p class="since">Since 1.0</p>
816 <div class="refsect2">
817 <a name="clutter-get-font-map"></a><h3>clutter_get_font_map ()</h3>
818 <pre class="programlisting"><span class="returnvalue">PangoFontMap</span> * clutter_get_font_map (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
820 Retrieves the <span class="type">PangoFontMap</span> instance used by Clutter.
821 You can use the global font map object with the COGL
824 <div class="variablelist"><table border="0">
825 <col align="left" valign="top">
827 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
828 <td>the <span class="type">PangoFontMap</span> instance. The returned
829 value is owned by Clutter and it should never be unreferenced. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
833 <p class="since">Since 1.0</p>
836 <div class="refsect2">
837 <a name="ClutterTextDirection"></a><h3>enum ClutterTextDirection</h3>
838 <pre class="programlisting">typedef enum {
839 CLUTTER_TEXT_DIRECTION_DEFAULT,
840 CLUTTER_TEXT_DIRECTION_LTR,
841 CLUTTER_TEXT_DIRECTION_RTL
842 } ClutterTextDirection;
845 The text direction to be used by <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a>s
847 <div class="variablelist"><table border="0">
848 <col align="left" valign="top">
851 <td><p><a name="CLUTTER-TEXT-DIRECTION-DEFAULT:CAPS"></a><span class="term"><code class="literal">CLUTTER_TEXT_DIRECTION_DEFAULT</code></span></p></td>
852 <td>Use the default setting, as returned
853 by <a class="link" href="clutter-General.html#clutter-get-default-text-direction" title="clutter_get_default_text_direction ()"><code class="function">clutter_get_default_text_direction()</code></a>
857 <td><p><a name="CLUTTER-TEXT-DIRECTION-LTR:CAPS"></a><span class="term"><code class="literal">CLUTTER_TEXT_DIRECTION_LTR</code></span></p></td>
858 <td>Use left-to-right text direction
862 <td><p><a name="CLUTTER-TEXT-DIRECTION-RTL:CAPS"></a><span class="term"><code class="literal">CLUTTER_TEXT_DIRECTION_RTL</code></span></p></td>
863 <td>Use right-to-left text direction
868 <p class="since">Since 1.2</p>
871 <div class="refsect2">
872 <a name="clutter-get-default-text-direction"></a><h3>clutter_get_default_text_direction ()</h3>
873 <pre class="programlisting"><a class="link" href="clutter-General.html#ClutterTextDirection" title="enum ClutterTextDirection"><span class="returnvalue">ClutterTextDirection</span></a> clutter_get_default_text_direction (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
875 Retrieves the default direction for the text. The text direction is
876 determined by the locale and/or by the <code class="varname">CLUTTER_TEXT_DIRECTION</code>
877 environment variable.
880 The default text direction can be overridden on a per-actor basis by using
881 <a class="link" href="ClutterActor.html#clutter-actor-set-text-direction" title="clutter_actor_set_text_direction ()"><code class="function">clutter_actor_set_text_direction()</code></a>.
883 <div class="variablelist"><table border="0">
884 <col align="left" valign="top">
886 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
887 <td>the default text direction</td>
890 <p class="since">Since 1.2</p>
893 <div class="refsect2">
894 <a name="clutter-get-accessibility-enabled"></a><h3>clutter_get_accessibility_enabled ()</h3>
895 <pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_get_accessibility_enabled (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
897 Returns whether Clutter has accessibility support enabled. As
898 least, a value of TRUE means that there are a proper AtkUtil
899 implementation available
901 <div class="variablelist"><table border="0">
902 <col align="left" valign="top">
904 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
906 <code class="literal">TRUE</code> if Clutter has accessibility support enabled</td>
909 <p class="since">Since 1.4</p>
912 <div class="refsect2">
913 <a name="clutter-threads-set-lock-functions"></a><h3>clutter_threads_set_lock_functions ()</h3>
914 <pre class="programlisting"><span class="returnvalue">void</span> clutter_threads_set_lock_functions (<em class="parameter"><code><span class="type">GCallback</span> enter_fn</code></em>,
915 <em class="parameter"><code><span class="type">GCallback</span> leave_fn</code></em>);</pre>
917 Allows the application to replace the standard method that
918 Clutter uses to protect its data structures. Normally, Clutter
919 creates a single <span class="type">GMutex</span> that is locked by <a class="link" href="clutter-General.html#clutter-threads-enter" title="clutter_threads_enter ()"><code class="function">clutter_threads_enter()</code></a>,
920 and released by <a class="link" href="clutter-General.html#clutter-threads-leave" title="clutter_threads_leave ()"><code class="function">clutter_threads_leave()</code></a>; using this function an
921 application provides, instead, a function <em class="parameter"><code>enter_fn</code></em> that is
922 called by <a class="link" href="clutter-General.html#clutter-threads-enter" title="clutter_threads_enter ()"><code class="function">clutter_threads_enter()</code></a> and a function <em class="parameter"><code>leave_fn</code></em> that is
923 called by <a class="link" href="clutter-General.html#clutter-threads-leave" title="clutter_threads_leave ()"><code class="function">clutter_threads_leave()</code></a>.
926 The functions must provide at least same locking functionality
927 as the default implementation, but can also do extra application
931 As an example, consider an application that has its own recursive
932 lock that when held, holds the Clutter lock as well. When Clutter
933 unlocks the Clutter lock when entering a recursive main loop, the
934 application must temporarily release its lock as well.
937 Most threaded Clutter apps won't need to use this method.
940 This method must be called before <a class="link" href="clutter-General.html#clutter-init" title="clutter_init ()"><code class="function">clutter_init()</code></a>, and cannot
941 be called multiple times.
943 <div class="variablelist"><table border="0">
944 <col align="left" valign="top">
947 <td><p><span class="term"><em class="parameter"><code>enter_fn</code></em> :</span></p></td>
948 <td>function called when aquiring the Clutter main lock</td>
951 <td><p><span class="term"><em class="parameter"><code>leave_fn</code></em> :</span></p></td>
952 <td>function called when releasing the Clutter main lock</td>
956 <p class="since">Since 0.4</p>
959 <div class="refsect2">
960 <a name="clutter-threads-init"></a><h3>clutter_threads_init ()</h3>
961 <pre class="programlisting"><span class="returnvalue">void</span> clutter_threads_init (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
962 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
963 <h3 class="title">Warning</h3>
964 <p><code class="literal">clutter_threads_init</code> has been deprecated since version 1.10 and should not be used in newly-written code. This function does not do anything. Threading support
965 is initialized when Clutter is initialized.</p>
968 Initialises the Clutter threading mechanism, so that Clutter API can be
969 called by multiple threads, using <a class="link" href="clutter-General.html#clutter-threads-enter" title="clutter_threads_enter ()"><code class="function">clutter_threads_enter()</code></a> and
970 <a class="link" href="clutter-General.html#clutter-threads-leave" title="clutter_threads_leave ()"><code class="function">clutter_threads_leave()</code></a> to mark the critical sections.
973 You must call <code class="function">g_thread_init()</code> before this function.
976 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>.
979 It is safe to call this function multiple times.
981 <p class="since">Since 0.4</p>
984 <div class="refsect2">
985 <a name="clutter-threads-enter"></a><h3>clutter_threads_enter ()</h3>
986 <pre class="programlisting"><span class="returnvalue">void</span> clutter_threads_enter (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
988 Locks the Clutter thread lock.
990 <p class="since">Since 0.4</p>
993 <div class="refsect2">
994 <a name="clutter-threads-leave"></a><h3>clutter_threads_leave ()</h3>
995 <pre class="programlisting"><span class="returnvalue">void</span> clutter_threads_leave (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
997 Unlocks the Clutter thread lock.
999 <p class="since">Since 0.4</p>
1002 <div class="refsect2">
1003 <a name="clutter-threads-add-idle"></a><h3>clutter_threads_add_idle ()</h3>
1004 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_idle (<em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1005 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
1007 Simple wrapper around <a class="link" href="clutter-General.html#clutter-threads-add-idle-full" title="clutter_threads_add_idle_full ()"><code class="function">clutter_threads_add_idle_full()</code></a> using the
1010 <div class="variablelist"><table border="0">
1011 <col align="left" valign="top">
1014 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1015 <td>function to call</td>
1018 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1019 <td>data to pass to the function</td>
1022 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1023 <td>the ID (greater than 0) of the event source.</td>
1027 <p class="since">Since 0.4</p>
1030 <div class="refsect2">
1031 <a name="clutter-threads-add-idle-full"></a><h3>clutter_threads_add_idle_full ()</h3>
1032 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_idle_full (<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
1033 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1034 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
1035 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
1037 Adds a function to be called whenever there are no higher priority
1038 events pending. If the function returns <code class="literal">FALSE</code> it is automatically
1039 removed from the list of event sources and will not be called again.
1042 This function can be considered a thread-safe variant of <code class="function">g_idle_add_full()</code>:
1043 it will call <em class="parameter"><code>function</code></em> while holding the Clutter lock. It is logically
1044 equivalent to the following implementation:
1048 <div class="informalexample">
1049 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1052 <td class="listing_lines" align="right"><pre>1
1085 <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> gboolean</span>
1086 <span class="function">idle_safe_callback</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
1087 <span class="cbracket">{</span>
1088 <span class="normal"> </span><span class="usertype">SafeClosure</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">closure </span><span class="symbol">=</span><span class="normal"> data</span><span class="symbol">;</span>
1089 <span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> res </span><span class="symbol">=</span><span class="normal"> FALSE</span><span class="symbol">;</span>
1091 <span class="normal"> </span><span class="comment">/* mark the critical section */</span>
1093 <span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-threads-enter">clutter_threads_enter</a></span><span class="symbol">();</span>
1095 <span class="normal"> </span><span class="comment">/* the callback does not need to acquire the Clutter</span>
1096 <span class="comment"> * lock itself, as it is held by the this proxy handler</span>
1097 <span class="comment"> */</span>
1098 <span class="normal"> res </span><span class="symbol">=</span><span class="normal"> closure</span><span class="symbol">-></span><span class="function">callback</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">closure</span><span class="symbol">-></span><span class="normal">data</span><span class="symbol">);</span>
1100 <span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-threads-leave">clutter_threads_leave</a></span><span class="symbol">();</span>
1102 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> res</span><span class="symbol">;</span>
1103 <span class="cbracket">}</span>
1104 <span class="keyword">static</span><span class="normal"> gulong</span>
1105 <span class="function">add_safe_idle</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GSourceFunc</span><span class="normal"> callback</span><span class="symbol">,</span>
1106 <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
1107 <span class="cbracket">{</span>
1108 <span class="normal"> </span><span class="usertype">SafeClosure</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">closure </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_new0</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">SafeClosure</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">);</span>
1110 <span class="normal"> closure</span><span class="symbol">-></span><span class="normal">callback </span><span class="symbol">=</span><span class="normal"> callback</span><span class="symbol">;</span>
1111 <span class="normal"> closure</span><span class="symbol">-></span><span class="normal">data </span><span class="symbol">=</span><span class="normal"> data</span><span class="symbol">;</span>
1113 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function">g_idle_add_full</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">G_PRIORITY_DEFAULT_IDLE</span><span class="symbol">,</span>
1114 <span class="normal"> idle_safe_callback</span><span class="symbol">,</span>
1115 <span class="normal"> closure</span><span class="symbol">,</span>
1116 <span class="normal"> g_free</span><span class="symbol">)</span>
1117 <span class="cbracket">}</span></pre></td>
1126 This function should be used by threaded applications to make sure
1127 that <em class="parameter"><code>func</code></em> is emitted under the Clutter threads lock and invoked
1128 from the same thread that started the Clutter main loop. For instance,
1129 it can be used to update the UI using the results from a worker
1134 <div class="informalexample">
1135 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1138 <td class="listing_lines" align="right"><pre>1
1166 <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> gboolean</span>
1167 <span class="function">update_ui</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
1168 <span class="cbracket">{</span>
1169 <span class="normal"> </span><span class="usertype">SomeClosure</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">closure </span><span class="symbol">=</span><span class="normal"> data</span><span class="symbol">;</span>
1171 <span class="normal"> </span><span class="comment">/* it is safe to call Clutter API from this function because</span>
1172 <span class="comment"> * it is invoked from the same thread that started the main</span>
1173 <span class="comment"> * loop and under the Clutter thread lock</span>
1174 <span class="comment"> */</span>
1175 <span class="normal"> </span><span class="function">clutter_label_set_text</span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_LABEL</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">closure</span><span class="symbol">-></span><span class="normal">label</span><span class="symbol">),</span>
1176 <span class="normal"> closure</span><span class="symbol">-></span><span class="normal">text</span><span class="symbol">);</span>
1178 <span class="normal"> </span><span class="function">g_object_unref</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">closure</span><span class="symbol">-></span><span class="normal">label</span><span class="symbol">);</span>
1179 <span class="normal"> </span><span class="function">g_free</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">closure</span><span class="symbol">);</span>
1181 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> FALSE</span><span class="symbol">;</span>
1182 <span class="cbracket">}</span>
1184 <span class="normal"> </span><span class="comment">/* within another thread */</span>
1185 <span class="normal"> closure </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_new0</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">SomeClosure</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">);</span>
1186 <span class="normal"> </span><span class="comment">/* always take a reference on GObject instances */</span>
1187 <span class="normal"> closure</span><span class="symbol">-></span><span class="normal">label </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_object_ref</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_application</span><span class="symbol">-></span><span class="normal">label</span><span class="symbol">);</span>
1188 <span class="normal"> closure</span><span class="symbol">-></span><span class="normal">text </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_strdup</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">processed_text_to_update_the_label</span><span class="symbol">);</span>
1190 <span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-threads-add-idle-full">clutter_threads_add_idle_full</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">G_PRIORITY_HIGH_IDLE</span><span class="symbol">,</span>
1191 <span class="normal"> update_ui</span><span class="symbol">,</span>
1192 <span class="normal"> closure</span><span class="symbol">,</span>
1193 <span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
1202 Rename to: clutter_threads_add_idle
1204 <div class="variablelist"><table border="0">
1205 <col align="left" valign="top">
1208 <td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1209 <td>the priority of the timeout source. Typically this will be in the
1210 range between <span class="type">G_PRIORITY_DEFAULT_IDLE</span> and <span class="type">G_PRIORITY_HIGH_IDLE</span>
1214 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1215 <td>function to call</td>
1218 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1219 <td>data to pass to the function</td>
1222 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1223 <td>functio to call when the idle source is removed</td>
1226 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1227 <td>the ID (greater than 0) of the event source.</td>
1231 <p class="since">Since 0.4</p>
1234 <div class="refsect2">
1235 <a name="clutter-threads-add-timeout"></a><h3>clutter_threads_add_timeout ()</h3>
1236 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_timeout (<em class="parameter"><code><span class="type">guint</span> interval</code></em>,
1237 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1238 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
1240 Simple wrapper around <a class="link" href="clutter-General.html#clutter-threads-add-timeout-full" title="clutter_threads_add_timeout_full ()"><code class="function">clutter_threads_add_timeout_full()</code></a>.
1242 <div class="variablelist"><table border="0">
1243 <col align="left" valign="top">
1246 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
1247 <td>the time between calls to the function, in milliseconds</td>
1250 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1251 <td>function to call</td>
1254 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1255 <td>data to pass to the function</td>
1258 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1259 <td>the ID (greater than 0) of the event source.</td>
1263 <p class="since">Since 0.4</p>
1266 <div class="refsect2">
1267 <a name="clutter-threads-add-timeout-full"></a><h3>clutter_threads_add_timeout_full ()</h3>
1268 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_timeout_full (<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
1269 <em class="parameter"><code><span class="type">guint</span> interval</code></em>,
1270 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1271 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
1272 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
1274 Sets a function to be called at regular intervals holding the Clutter
1275 threads lock, with the given priority. The function is called repeatedly
1276 until it returns <code class="literal">FALSE</code>, at which point the timeout is automatically
1277 removed and the function will not be called again. The <em class="parameter"><code>notify</code></em> function
1278 is called when the timeout is removed.
1281 The first call to the function will be at the end of the first <em class="parameter"><code>interval</code></em>.
1284 It is important to note that, due to how the Clutter main loop is
1285 implemented, the timing will not be accurate and it will not try to
1286 "keep up" with the interval.
1289 See also <a class="link" href="clutter-General.html#clutter-threads-add-idle-full" title="clutter_threads_add_idle_full ()"><code class="function">clutter_threads_add_idle_full()</code></a>.
1292 Rename to: clutter_threads_add_timeout
1294 <div class="variablelist"><table border="0">
1295 <col align="left" valign="top">
1298 <td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1299 <td>the priority of the timeout source. Typically this will be in the
1300 range between <span class="type">G_PRIORITY_DEFAULT</span> and <span class="type">G_PRIORITY_HIGH</span>.</td>
1303 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
1304 <td>the time between calls to the function, in milliseconds</td>
1307 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1308 <td>function to call</td>
1311 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1312 <td>data to pass to the function</td>
1315 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1316 <td>function to call when the timeout source is removed</td>
1319 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1320 <td>the ID (greater than 0) of the event source.</td>
1324 <p class="since">Since 0.4</p>
1327 <div class="refsect2">
1328 <a name="clutter-threads-add-frame-source"></a><h3>clutter_threads_add_frame_source ()</h3>
1329 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_frame_source (<em class="parameter"><code><span class="type">guint</span> fps</code></em>,
1330 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1331 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
1332 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1333 <h3 class="title">Warning</h3>
1334 <p><code class="literal">clutter_threads_add_frame_source</code> is deprecated and should not be used in newly-written code. 1.6</p>
1337 Simple wrapper around <a class="link" href="clutter-General.html#clutter-threads-add-frame-source-full" title="clutter_threads_add_frame_source_full ()"><code class="function">clutter_threads_add_frame_source_full()</code></a>.
1339 <div class="variablelist"><table border="0">
1340 <col align="left" valign="top">
1343 <td><p><span class="term"><em class="parameter"><code>fps</code></em> :</span></p></td>
1344 <td>the number of times per second to call the function</td>
1347 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1348 <td>function to call</td>
1351 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1352 <td>data to pass to the function</td>
1355 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1356 <td>the ID (greater than 0) of the event source.</td>
1360 <p class="since">Since 0.8</p>
1363 <div class="refsect2">
1364 <a name="clutter-threads-add-frame-source-full"></a><h3>clutter_threads_add_frame_source_full ()</h3>
1365 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_frame_source_full
1366 (<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
1367 <em class="parameter"><code><span class="type">guint</span> fps</code></em>,
1368 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1369 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
1370 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
1371 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1372 <h3 class="title">Warning</h3>
1373 <p><code class="literal">clutter_threads_add_frame_source_full</code> is deprecated and should not be used in newly-written code. 1.6</p>
1376 Sets a function to be called at regular intervals holding the Clutter
1377 threads lock, with the given priority. The function is called repeatedly
1378 until it returns <code class="literal">FALSE</code>, at which point the timeout is automatically
1379 removed and the function will not be called again. The <em class="parameter"><code>notify</code></em> function
1380 is called when the timeout is removed.
1383 This function is similar to <a class="link" href="clutter-General.html#clutter-threads-add-timeout-full" title="clutter_threads_add_timeout_full ()"><code class="function">clutter_threads_add_timeout_full()</code></a>
1384 except that it will try to compensate for delays. For example, if
1385 <em class="parameter"><code>func</code></em> takes half the interval time to execute then the function
1386 will be called again half the interval time after it finished. In
1387 contrast <a class="link" href="clutter-General.html#clutter-threads-add-timeout-full" title="clutter_threads_add_timeout_full ()"><code class="function">clutter_threads_add_timeout_full()</code></a> would not fire until a
1388 full interval after the function completes so the delay between
1389 calls would be <em class="parameter"><code>interval</code></em> * 1.5. This function does not however try
1390 to invoke the function multiple times to catch up missing frames if
1391 <em class="parameter"><code>func</code></em> takes more than <em class="parameter"><code>interval</code></em> ms to execute.
1394 See also <a class="link" href="clutter-General.html#clutter-threads-add-idle-full" title="clutter_threads_add_idle_full ()"><code class="function">clutter_threads_add_idle_full()</code></a>.
1397 Rename to: clutter_threads_add_frame_source
1399 <div class="variablelist"><table border="0">
1400 <col align="left" valign="top">
1403 <td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1404 <td>the priority of the frame source. Typically this will be in the
1405 range between <code class="literal">G_PRIORITY_DEFAULT</code> and <code class="literal">G_PRIORITY_HIGH</code>.</td>
1408 <td><p><span class="term"><em class="parameter"><code>fps</code></em> :</span></p></td>
1409 <td>the number of times per second to call the function</td>
1412 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1413 <td>function to call</td>
1416 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1417 <td>data to pass to the function</td>
1420 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1421 <td>function to call when the timeout source is removed</td>
1424 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1425 <td>the ID (greater than 0) of the event source.</td>
1429 <p class="since">Since 0.8</p>
1432 <div class="refsect2">
1433 <a name="clutter-threads-add-repaint-func"></a><h3>clutter_threads_add_repaint_func ()</h3>
1434 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_repaint_func (<em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1435 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
1436 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
1438 Adds a function to be called whenever Clutter is processing a new
1442 If the function returns <code class="literal">FALSE</code> it is automatically removed from the
1443 list of repaint functions and will not be called again.
1446 This function is guaranteed to be called from within the same thread
1447 that called <a class="link" href="clutter-General.html#clutter-main" title="clutter_main ()"><code class="function">clutter_main()</code></a>, and while the Clutter lock is being held;
1448 the function will be called within the main loop, so it is imperative
1449 that it does not block, otherwise the frame time budget may be lost.
1452 A repaint function is useful to ensure that an update of the scenegraph
1453 is performed before the scenegraph is repainted; for instance, uploading
1454 a frame from a video into a <a class="link" href="ClutterTexture.html" title="ClutterTexture"><span class="type">ClutterTexture</span></a>. By default, a repaint
1455 function added using this function will be invoked prior to the frame
1459 Adding a repaint function does not automatically ensure that a new
1460 frame will be queued.
1463 When the repaint function is removed (either because it returned <code class="literal">FALSE</code>
1464 or because <a class="link" href="clutter-General.html#clutter-threads-remove-repaint-func" title="clutter_threads_remove_repaint_func ()"><code class="function">clutter_threads_remove_repaint_func()</code></a> has been called) the
1465 <em class="parameter"><code>notify</code></em> function will be called, if any is set.
1468 See also: <a class="link" href="clutter-General.html#clutter-threads-add-repaint-func-full" title="clutter_threads_add_repaint_func_full ()"><code class="function">clutter_threads_add_repaint_func_full()</code></a>
1470 <div class="variablelist"><table border="0">
1471 <col align="left" valign="top">
1474 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1475 <td>the function to be called within the paint cycle</td>
1478 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1479 <td>data to be passed to the function, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
1483 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1484 <td>function to be called when removing the repaint
1485 function, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
1489 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1490 <td>the ID (greater than 0) of the repaint function. You
1491 can use the returned integer to remove the repaint function by
1492 calling <a class="link" href="clutter-General.html#clutter-threads-remove-repaint-func" title="clutter_threads_remove_repaint_func ()"><code class="function">clutter_threads_remove_repaint_func()</code></a>.</td>
1496 <p class="since">Since 1.0</p>
1499 <div class="refsect2">
1500 <a name="ClutterRepaintFlags"></a><h3>enum ClutterRepaintFlags</h3>
1501 <pre class="programlisting">typedef enum {
1502 CLUTTER_REPAINT_FLAGS_PRE_PAINT = 1 << 0,
1503 CLUTTER_REPAINT_FLAGS_POST_PAINT = 1 << 1,
1504 CLUTTER_REPAINT_FLAGS_QUEUE_REDRAW_ON_ADD = 1 << 2
1505 } ClutterRepaintFlags;
1508 Flags to pass to <a class="link" href="clutter-General.html#clutter-threads-add-repaint-func-full" title="clutter_threads_add_repaint_func_full ()"><code class="function">clutter_threads_add_repaint_func_full()</code></a>.
1510 <div class="variablelist"><table border="0">
1511 <col align="left" valign="top">
1514 <td><p><a name="CLUTTER-REPAINT-FLAGS-PRE-PAINT:CAPS"></a><span class="term"><code class="literal">CLUTTER_REPAINT_FLAGS_PRE_PAINT</code></span></p></td>
1515 <td>Run the repaint function prior to
1520 <td><p><a name="CLUTTER-REPAINT-FLAGS-POST-PAINT:CAPS"></a><span class="term"><code class="literal">CLUTTER_REPAINT_FLAGS_POST_PAINT</code></span></p></td>
1521 <td>Run the repaint function after
1526 <td><p><a name="CLUTTER-REPAINT-FLAGS-QUEUE-REDRAW-ON-ADD:CAPS"></a><span class="term"><code class="literal">CLUTTER_REPAINT_FLAGS_QUEUE_REDRAW_ON_ADD</code></span></p></td>
1527 <td>Ensure that a new frame
1528 is queued after adding the repaint function
1533 <p class="since">Since 1.10</p>
1536 <div class="refsect2">
1537 <a name="clutter-threads-add-repaint-func-full"></a><h3>clutter_threads_add_repaint_func_full ()</h3>
1538 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_threads_add_repaint_func_full
1539 (<em class="parameter"><code><a class="link" href="clutter-General.html#ClutterRepaintFlags" title="enum ClutterRepaintFlags"><span class="type">ClutterRepaintFlags</span></a> flags</code></em>,
1540 <em class="parameter"><code><span class="type">GSourceFunc</span> func</code></em>,
1541 <em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
1542 <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
1544 Adds a function to be called whenever Clutter is processing a new
1548 If the function returns <code class="literal">FALSE</code> it is automatically removed from the
1549 list of repaint functions and will not be called again.
1552 This function is guaranteed to be called from within the same thread
1553 that called <a class="link" href="clutter-General.html#clutter-main" title="clutter_main ()"><code class="function">clutter_main()</code></a>, and while the Clutter lock is being held;
1554 the function will be called within the main loop, so it is imperative
1555 that it does not block, otherwise the frame time budget may be lost.
1558 A repaint function is useful to ensure that an update of the scenegraph
1559 is performed before the scenegraph is repainted; for instance, uploading
1560 a frame from a video into a <a class="link" href="ClutterTexture.html" title="ClutterTexture"><span class="type">ClutterTexture</span></a>. The <em class="parameter"><code>flags</code></em> passed to this
1561 function will determine the section of the frame processing that will
1562 result in <em class="parameter"><code>func</code></em> being called.
1565 Adding a repaint function does not automatically ensure that a new
1566 frame will be queued.
1569 When the repaint function is removed (either because it returned <code class="literal">FALSE</code>
1570 or because <a class="link" href="clutter-General.html#clutter-threads-remove-repaint-func" title="clutter_threads_remove_repaint_func ()"><code class="function">clutter_threads_remove_repaint_func()</code></a> has been called) the
1571 <em class="parameter"><code>notify</code></em> function will be called, if any is set.
1573 <div class="variablelist"><table border="0">
1574 <col align="left" valign="top">
1577 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
1578 <td>flags for the repaint function</td>
1581 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1582 <td>the function to be called within the paint cycle</td>
1585 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1586 <td>data to be passed to the function, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
1590 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1591 <td>function to be called when removing the repaint
1592 function, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
1596 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1597 <td>the ID (greater than 0) of the repaint function. You
1598 can use the returned integer to remove the repaint function by
1599 calling <a class="link" href="clutter-General.html#clutter-threads-remove-repaint-func" title="clutter_threads_remove_repaint_func ()"><code class="function">clutter_threads_remove_repaint_func()</code></a>.</td>
1603 <p class="since">Since 1.10</p>
1606 <div class="refsect2">
1607 <a name="clutter-threads-remove-repaint-func"></a><h3>clutter_threads_remove_repaint_func ()</h3>
1608 <pre class="programlisting"><span class="returnvalue">void</span> clutter_threads_remove_repaint_func (<em class="parameter"><code><span class="type">guint</span> handle_id</code></em>);</pre>
1610 Removes the repaint function with <em class="parameter"><code>handle_id</code></em> as its id
1612 <div class="variablelist"><table border="0">
1613 <col align="left" valign="top">
1615 <td><p><span class="term"><em class="parameter"><code>handle_id</code></em> :</span></p></td>
1616 <td>an unsigned integer greater than zero</td>
1619 <p class="since">Since 1.0</p>
1622 <div class="refsect2">
1623 <a name="clutter-get-keyboard-grab"></a><h3>clutter_get_keyboard_grab ()</h3>
1624 <pre class="programlisting"><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * clutter_get_keyboard_grab (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
1626 Queries the current keyboard grab of clutter.
1628 <div class="variablelist"><table border="0">
1629 <col align="left" valign="top">
1631 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1632 <td>the actor currently holding the keyboard grab, or NULL if there is no grab. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1636 <p class="since">Since 0.6</p>
1639 <div class="refsect2">
1640 <a name="clutter-get-pointer-grab"></a><h3>clutter_get_pointer_grab ()</h3>
1641 <pre class="programlisting"><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * clutter_get_pointer_grab (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
1643 Queries the current pointer grab of clutter.
1645 <div class="variablelist"><table border="0">
1646 <col align="left" valign="top">
1648 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1649 <td>the actor currently holding the pointer grab, or NULL if there is no grab. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1653 <p class="since">Since 0.6</p>
1656 <div class="refsect2">
1657 <a name="clutter-grab-keyboard"></a><h3>clutter_grab_keyboard ()</h3>
1658 <pre class="programlisting"><span class="returnvalue">void</span> clutter_grab_keyboard (<em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *actor</code></em>);</pre>
1660 Grabs keyboard events, after the grab is done keyboard
1661 events (<a class="link" href="ClutterActor.html#ClutterActor-key-press-event" title='The "key-press-event" signal'><span class="type">"key-press-event"</span></a> and <a class="link" href="ClutterActor.html#ClutterActor-key-release-event" title='The "key-release-event" signal'><span class="type">"key-release-event"</span></a>)
1662 are delivered to this actor directly. The source set in the event will be
1663 the actor that would have received the event if the keyboard grab was not
1667 Like pointer grabs, keyboard grabs should only be used as a last
1671 See also <a class="link" href="ClutterStage.html#clutter-stage-set-key-focus" title="clutter_stage_set_key_focus ()"><code class="function">clutter_stage_set_key_focus()</code></a> and <a class="link" href="ClutterActor.html#clutter-actor-grab-key-focus" title="clutter_actor_grab_key_focus ()"><code class="function">clutter_actor_grab_key_focus()</code></a>
1672 to perform a "soft" key grab and assign key focus to a specific actor.
1674 <div class="variablelist"><table border="0">
1675 <col align="left" valign="top">
1677 <td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
1678 <td>a <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a>
1682 <p class="since">Since 0.6</p>
1685 <div class="refsect2">
1686 <a name="clutter-grab-pointer"></a><h3>clutter_grab_pointer ()</h3>
1687 <pre class="programlisting"><span class="returnvalue">void</span> clutter_grab_pointer (<em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *actor</code></em>);</pre>
1689 Grabs pointer events, after the grab is done all pointer related events
1690 (press, motion, release, enter, leave and scroll) are delivered to this
1691 actor directly without passing through both capture and bubble phases of
1692 the event delivery chain. The source set in the event will be the actor
1693 that would have received the event if the pointer grab was not in effect.
1697 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1698 <h3 class="title">Note</h3>
1699 <p>Grabs completely override the entire event delivery chain
1700 done by Clutter. Pointer grabs should only be used as a last resource;
1701 using the <a class="link" href="ClutterActor.html#ClutterActor-captured-event" title='The "captured-event" signal'><span class="type">"captured-event"</span></a> signal should always be the
1702 preferred way to intercept event delivery to reactive actors.</p>
1707 This function should rarely be used.
1710 If a grab is required, you are strongly encouraged to use a specific
1711 input device by calling <a class="link" href="ClutterInputDevice.html#clutter-input-device-grab" title="clutter_input_device_grab ()"><code class="function">clutter_input_device_grab()</code></a>.
1713 <div class="variablelist"><table border="0">
1714 <col align="left" valign="top">
1716 <td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
1717 <td>a <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a>
1721 <p class="since">Since 0.6</p>
1724 <div class="refsect2">
1725 <a name="clutter-ungrab-keyboard"></a><h3>clutter_ungrab_keyboard ()</h3>
1726 <pre class="programlisting"><span class="returnvalue">void</span> clutter_ungrab_keyboard (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
1728 Removes an existing grab of the keyboard.
1730 <p class="since">Since 0.6</p>
1733 <div class="refsect2">
1734 <a name="clutter-ungrab-pointer"></a><h3>clutter_ungrab_pointer ()</h3>
1735 <pre class="programlisting"><span class="returnvalue">void</span> clutter_ungrab_pointer (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
1737 Removes an existing grab of the pointer.
1739 <p class="since">Since 0.6</p>
1742 <div class="refsect2">
1743 <a name="clutter-grab-pointer-for-device"></a><h3>clutter_grab_pointer_for_device ()</h3>
1744 <pre class="programlisting"><span class="returnvalue">void</span> clutter_grab_pointer_for_device (<em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *actor</code></em>,
1745 <em class="parameter"><code><span class="type">gint</span> id_</code></em>);</pre>
1746 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1747 <h3 class="title">Warning</h3>
1748 <p><code class="literal">clutter_grab_pointer_for_device</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <a class="link" href="ClutterInputDevice.html#clutter-input-device-grab" title="clutter_input_device_grab ()"><code class="function">clutter_input_device_grab()</code></a> instead.</p>
1751 Grabs all the pointer events coming from the device <em class="parameter"><code>id</code></em> for <em class="parameter"><code>actor</code></em>.
1754 If <em class="parameter"><code>id</code></em> is -1 then this function is equivalent to <a class="link" href="clutter-General.html#clutter-grab-pointer" title="clutter_grab_pointer ()"><code class="function">clutter_grab_pointer()</code></a>.
1756 <div class="variablelist"><table border="0">
1757 <col align="left" valign="top">
1760 <td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
1761 <td>a <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a>
1765 <td><p><span class="term"><em class="parameter"><code>id_</code></em> :</span></p></td>
1766 <td>a device id, or -1</td>
1770 <p class="since">Since 0.8</p>
1773 <div class="refsect2">
1774 <a name="clutter-ungrab-pointer-for-device"></a><h3>clutter_ungrab_pointer_for_device ()</h3>
1775 <pre class="programlisting"><span class="returnvalue">void</span> clutter_ungrab_pointer_for_device (<em class="parameter"><code><span class="type">gint</span> id_</code></em>);</pre>
1776 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1777 <h3 class="title">Warning</h3>
1778 <p><code class="literal">clutter_ungrab_pointer_for_device</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <a class="link" href="ClutterInputDevice.html#clutter-input-device-ungrab" title="clutter_input_device_ungrab ()"><code class="function">clutter_input_device_ungrab()</code></a> instead.</p>
1781 Removes an existing grab of the pointer events for device <em class="parameter"><code>id_</code></em>.
1783 <div class="variablelist"><table border="0">
1784 <col align="left" valign="top">
1786 <td><p><span class="term"><em class="parameter"><code>id_</code></em> :</span></p></td>
1787 <td>a device id</td>
1790 <p class="since">Since 0.8</p>
1793 <div class="refsect2">
1794 <a name="clutter-do-event"></a><h3>clutter_do_event ()</h3>
1795 <pre class="programlisting"><span class="returnvalue">void</span> clutter_do_event (<em class="parameter"><code><a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> *event</code></em>);</pre>
1800 The <em class="parameter"><code>event</code></em> must be a valid <a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a> and have a <a class="link" href="ClutterStage.html" title="ClutterStage"><span class="type">ClutterStage</span></a>
1804 This function is only useful when embedding Clutter inside another
1805 toolkit, and it should never be called by applications.
1807 <div class="variablelist"><table border="0">
1808 <col align="left" valign="top">
1810 <td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
1811 <td>a <a class="link" href="clutter-Events.html#ClutterEvent" title="union ClutterEvent"><span class="type">ClutterEvent</span></a>.</td>
1814 <p class="since">Since 0.4</p>
1818 <div class="footer">
1820 Generated by GTK-Doc V1.18.1</div>