This file is indexed.

/usr/share/gtk-doc/html/clutter-gtk-1.0/clutter-gtk-1.0-Utility-Functions.html is in libclutter-gtk-1.0-doc 1.2.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Utility Functions</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Clutter-Gtk 1.2.0 Reference Manual">
<link rel="up" href="ch03.html" title="Miscellaneous">
<link rel="prev" href="ch03.html" title="Miscellaneous">
<link rel="next" href="ix01.html" title="Index">
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Clutter-Gtk 1.2.0
 Reference Manual</th>
<td><a accesskey="n" href="ix01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#clutter-gtk-1.0-Utility-Functions.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#clutter-gtk-1.0-Utility-Functions.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="clutter-gtk-1.0-Utility-Functions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="clutter-gtk-1.0-Utility-Functions.top_of_page"></a>Utility Functions</span></h2>
<p>Utility Functions — Utility functions for integrating Clutter in GTK+</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="clutter-gtk-1.0-Utility-Functions.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><span class="returnvalue">ClutterInitError</span>    <a class="link" href="clutter-gtk-1.0-Utility-Functions.html#gtk-clutter-init" title="gtk_clutter_init ()">gtk_clutter_init</a>                    (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>);
<span class="returnvalue">ClutterInitError</span>    <a class="link" href="clutter-gtk-1.0-Utility-Functions.html#gtk-clutter-init-with-args" title="gtk_clutter_init_with_args ()">gtk_clutter_init_with_args</a>          (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *parameter_string</code></em>,
                                                         <em class="parameter"><code><span class="type">GOptionEntry</span> *entries</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *translation_domain</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">GOptionGroup</span> *      <a class="link" href="clutter-gtk-1.0-Utility-Functions.html#gtk-clutter-get-option-group" title="gtk_clutter_get_option_group ()">gtk_clutter_get_option_group</a>        (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="clutter-gtk-1.0-Utility-Functions.description"></a><h2>Description</h2>
<p>
In order to properly integrate a Clutter scene into a GTK+ applications
a certain degree of state must be retrieved from GTK+ itself.
</p>
<p>
Clutter-GTK provides API for easing the process of synchronizing colors
with the current GTK+ theme and for loading image sources from <span class="type">GdkPixbuf</span>,
GTK+ stock items and icon themes.
</p>
</div>
<div class="refsect1">
<a name="clutter-gtk-1.0-Utility-Functions.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="gtk-clutter-init"></a><h3>gtk_clutter_init ()</h3>
<pre class="programlisting"><span class="returnvalue">ClutterInitError</span>    gtk_clutter_init                    (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>);</pre>
<p>
This function should be called instead of <code class="function">clutter_init()</code> and
<code class="function">gtk_init()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>pointer to the arguments count, 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="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>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>pointer to the
arguments vector, 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="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>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">CLUTTER_INIT_SUCCESS</code> on success, a negative integer
on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-clutter-init-with-args"></a><h3>gtk_clutter_init_with_args ()</h3>
<pre class="programlisting"><span class="returnvalue">ClutterInitError</span>    gtk_clutter_init_with_args          (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *parameter_string</code></em>,
                                                         <em class="parameter"><code><span class="type">GOptionEntry</span> *entries</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *translation_domain</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
This function should be called instead of <code class="function">clutter_init()</code> and
<code class="function">gtk_init_with_args()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>a pointer to the number of command line
arguments, 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="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>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>a pointer to the array
of command line arguments, 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="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>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameter_string</code></em> :</span></p></td>
<td>a string which is displayed in
the first line of <code class="option">--help</code> output, after
<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>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<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 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>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>translation_domain</code></em> :</span></p></td>
<td>a translation domain to use for
translating the <code class="option">--help</code> output for the options
in <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>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a return location for errors, 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>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">CLUTTER_INIT_SUCCESS</code> on success, a negative integer
on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-clutter-get-option-group"></a><h3>gtk_clutter_get_option_group ()</h3>
<pre class="programlisting"><span class="returnvalue">GOptionGroup</span> *      gtk_clutter_get_option_group        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns a <span class="type">GOptionGroup</span> for the command line arguments recognized
by Clutter. You should add this group to your <span class="type">GOptionContext</span> with
<code class="function">g_option_context_add_group()</code>, if you are using <code class="function">g_option_context_parse()</code>
to parse your commandline arguments instead of using <a class="link" href="clutter-gtk-1.0-Utility-Functions.html#gtk-clutter-init" title="gtk_clutter_init ()"><code class="function">gtk_clutter_init()</code></a>
or <a class="link" href="clutter-gtk-1.0-Utility-Functions.html#gtk-clutter-init-with-args" title="gtk_clutter_init_with_args ()"><code class="function">gtk_clutter_init_with_args()</code></a>.
</p>
<p>
You should add this option group to your <span class="type">GOptionContext</span> after
the GTK option group created with <code class="function">gtk_get_option_group()</code>, and after
the clutter option group obtained from <code class="function">clutter_get_option_group_without_init()</code>.
You should not use <code class="function">clutter_get_option_group()</code> together with this function.
</p>
<p>
You must pass <code class="literal">TRUE</code> to <code class="function">gtk_get_option_group()</code> since gtk-clutter's option
group relies on it.
</p>
<p>
Parsing options using <code class="function">g_option_context_parse()</code> with a <span class="type">GOptionContext</span>
containing the returned <span class="type">GOptionGroupwith</span> will result in Clutter's and
GTK-Clutter's initialisation.  That is, the following code:
</p>
<p>
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="function">g_option_context_add_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">gtk_get_option_group</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TRUE</span><span class="symbol">));</span>
<span class="function">g_option_context_add_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">cogl_get_option_group</span><span class="normal"> </span><span class="symbol">());</span>
<span class="function">g_option_context_add_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">clutter_get_option_group_without_init</span><span class="normal"> </span><span class="symbol">());</span>
<span class="function">g_option_context_add_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-gtk-1.0-Utility-Functions.html#gtk-clutter-get-option-group">gtk_clutter_get_option_group</a></span><span class="normal"> </span><span class="symbol">());</span>
<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">&amp;</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</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>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<p>
is functionally equivalent to:
</p>
<p>
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="function"><a href="clutter-gtk-1.0-Utility-Functions.html#gtk-clutter-init">gtk_clutter_init</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">argv</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<p>
After <code class="function">g_option_context_parse()</code> on a <span class="type">GOptionContext</span> containing the
the returned <span class="type">GOptionGroup</span> has returned <code class="literal">TRUE</code>, Clutter and GTK-Clutter are
guaranteed to be initialized.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GOptionGroup</span> for the commandline arguments
recognized by ClutterGtk. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18.1</div>
</body>
</html>