| 1 |
<part id="running-clutter"> |
| 2 |
<partinfo> |
| 3 |
<author> |
| 4 |
<firstname>Emmanuele</firstname> |
| 5 |
<surname>Bassi</surname> |
| 6 |
<affiliation> |
| 7 |
<address> |
| 8 |
<email>[email protected]</email> |
| 9 |
</address> |
| 10 |
</affiliation> |
| 11 |
</author> |
| 12 |
</partinfo> |
| 13 |
|
| 14 |
<title>Running Clutter</title> |
| 15 |
|
| 16 |
<partintro> |
| 17 |
|
| 18 |
<section id="environment-variables"> |
| 19 |
<title>Environment Variables</title> |
| 20 |
|
| 21 |
<para> |
| 22 |
Clutter automatically checks environment variables during |
| 23 |
its initialization. These environment variables are meant |
| 24 |
as debug tools, overrides for default behaviours or to |
| 25 |
address known hardware issues: |
| 26 |
</para> |
| 27 |
|
| 28 |
<variablelist> |
| 29 |
<varlistentry> |
| 30 |
<term>CLUTTER_BACKEND</term> |
| 31 |
<listitem> |
| 32 |
<para>Changes the windowing system backend used by Clutter. |
| 33 |
The allowed values for this environment variable depend on |
| 34 |
the configuration options used when compiling Clutter. The |
| 35 |
available values are:</para> |
| 36 |
<itemizedlist> |
| 37 |
<listitem><simpara>x11, for the X11 backend</simpara></listitem> |
| 38 |
<listitem><simpara>wayland, for the Wayland backend</simpara></listitem> |
| 39 |
<listitem><simpara>win32, for the Windows backend</simpara></listitem> |
| 40 |
<listitem><simpara>osx, for the MacOS X backend</simpara></listitem> |
| 41 |
<listitem><simpara>gdk, for the GDK backend</simpara></listitem> |
| 42 |
<listitem><simpara>eglnative, for the EGL/KMS backend</simpara></listitem> |
| 43 |
<listitem><simpara>cex100, for the CEx100 backend</simpara></listitem> |
| 44 |
</itemizedlist> |
| 45 |
<para>All of the above options except for the <varname>eglnative</varname> |
| 46 |
and <varname>cex100</varname> backends also have an input backend.</para> |
| 47 |
</listitem> |
| 48 |
</varlistentry> |
| 49 |
<varlistentry> |
| 50 |
<term>CLUTTER_INPUT_BACKEND</term> |
| 51 |
<listitem> |
| 52 |
<para>Changes the input backend used by Clutter. |
| 53 |
The allowed values for this environment variable depend on |
| 54 |
the configuration options used when compiling Clutter. The |
| 55 |
available values are:</para> |
| 56 |
<itemizedlist> |
| 57 |
<listitem><simpara>tslib</simpara></listitem> |
| 58 |
<listitem><simpara>evdev</simpara></listitem> |
| 59 |
<listitem><simpara>null</simpara></listitem> |
| 60 |
</itemizedlist> |
| 61 |
<para>This environment variable is only useful for setting the input |
| 62 |
backend when using a windowing system backend that does not have an |
| 63 |
input API, like the <varname>eglnative</varname> or the <varname>cex100</varname> |
| 64 |
windowing system backends.</para> |
| 65 |
</listitem> |
| 66 |
</varlistentry> |
| 67 |
<varlistentry> |
| 68 |
<term>CLUTTER_DRIVER</term> |
| 69 |
<listitem> |
| 70 |
<para>Changes the GL driver used when initializing Clutter. |
| 71 |
The allowed values for this environment variable are:</para> |
| 72 |
<itemizedlist> |
| 73 |
<listitem><simpara>gl3, for the GL driver using a 3.2+ core profile</simpara></listitem> |
| 74 |
<listitem><simpara>gl, for the GL driver using a legacy profile</simpara></listitem> |
| 75 |
<listitem><simpara>gles2, for the GLES 2.0 driver</simpara></listitem> |
| 76 |
<listitem><simpara>any, for the default chosen by Cogl</simpara></listitem> |
| 77 |
</itemizedlist> |
| 78 |
<para>The special '*' value can be used to ask Clutter to use the |
| 79 |
default list of drivers, e.g. 'CLUTTER_DRIVER=gles2,*' will ask Clutter |
| 80 |
to try the GLES 2.0 driver first, and then fall back to the default list |
| 81 |
of Cogl drivers.</para> |
| 82 |
</listitem> |
| 83 |
</varlistentry> |
| 84 |
<varlistentry> |
| 85 |
<term>CLUTTER_SCALE</term> |
| 86 |
<listitem> |
| 87 |
<para>Forces the window scaling factor to that value |
| 88 |
inside Clutter instead of relying on what backends detect.</para> |
| 89 |
</listitem> |
| 90 |
</varlistentry> |
| 91 |
<varlistentry> |
| 92 |
<term>CLUTTER_TEXT_DIRECTION</term> |
| 93 |
<listitem> |
| 94 |
<para>Forces the text direction of every Pango layout |
| 95 |
inside Clutter. Valid values are: ltr or rtl</para> |
| 96 |
</listitem> |
| 97 |
</varlistentry> |
| 98 |
<varlistentry> |
| 99 |
<term>CLUTTER_SHOW_FPS</term> |
| 100 |
<listitem> |
| 101 |
<para>Prints out the frames per second achieved by Clutter.</para> |
| 102 |
</listitem> |
| 103 |
</varlistentry> |
| 104 |
<varlistentry> |
| 105 |
<term>CLUTTER_DEFAULT_FPS</term> |
| 106 |
<listitem> |
| 107 |
<para>Sets the default framerate.</para> |
| 108 |
</listitem> |
| 109 |
</varlistentry> |
| 110 |
<varlistentry> |
| 111 |
<term>CLUTTER_DISABLE_MIPMAPPED_TEXT</term> |
| 112 |
<listitem> |
| 113 |
<para>Disables mipmapping when rendering text.</para> |
| 114 |
</listitem> |
| 115 |
</varlistentry> |
| 116 |
<varlistentry> |
| 117 |
<term>CLUTTER_FUZZY_PICK</term> |
| 118 |
<listitem> |
| 119 |
<para>Enables "fuzzy picking".</para> |
| 120 |
</listitem> |
| 121 |
</varlistentry> |
| 122 |
<varlistentry> |
| 123 |
<term>CLUTTER_DEBUG</term> |
| 124 |
<listitem> |
| 125 |
<para>Enables debugging modes for Clutter; debugging modes are |
| 126 |
used to print debugging messages on the console. Clutter must be |
| 127 |
compiled with the --enable-debug configuration switch for these |
| 128 |
messages to be printed out. Multiple debugging modes can be |
| 129 |
enabled by separating them using a colon (":") or a comma |
| 130 |
(",").</para> |
| 131 |
</listitem> |
| 132 |
</varlistentry> |
| 133 |
<varlistentry> |
| 134 |
<term>CLUTTER_PAINT</term> |
| 135 |
<listitem> |
| 136 |
<para>Enables paint debugging modes for Clutter; the modes change |
| 137 |
the way Clutter paints a scene and are useful for debugging the |
| 138 |
behaviour of the paint cycle.</para> |
| 139 |
</listitem> |
| 140 |
</varlistentry> |
| 141 |
<varlistentry> |
| 142 |
<term>CLUTTER_ENABLE_DIAGNOSTIC</term> |
| 143 |
<listitem> |
| 144 |
<para>When set to 1, enables diagnostic messages for run-time |
| 145 |
deprecations, similarly to <varname>G_ENABLE_DIAGNOSTIC</varname> in |
| 146 |
GLib.</para> |
| 147 |
</listitem> |
| 148 |
</varlistentry> |
| 149 |
</variablelist> |
| 150 |
|
| 151 |
<para>On the GLX backend there is also:</para> |
| 152 |
|
| 153 |
<variablelist> |
| 154 |
<varlistentry> |
| 155 |
<term>CLUTTER_VBLANK</term> |
| 156 |
<listitem> |
| 157 |
<para>Selects the sync-to-vblank mode to be used. |
| 158 |
Valid values are: none, dri or glx</para> |
| 159 |
</listitem> |
| 160 |
</varlistentry> |
| 161 |
</variablelist> |
| 162 |
|
| 163 |
</section> |
| 164 |
|
| 165 |
<section id="command-line"> |
| 166 |
<title>Command Line Arguments</title> |
| 167 |
|
| 168 |
<para>Similarly to the environment variables, Clutter also installs |
| 169 |
command line switches that are parsed during initialization:</para> |
| 170 |
|
| 171 |
<variablelist> |
| 172 |
<varlistentry> |
| 173 |
<term>--clutter-show-fps</term> |
| 174 |
<listitem><para>Equivalent of CLUTTER_SHOW_FPS. Prints the |
| 175 |
current rendering speed in frames per second.</para></listitem> |
| 176 |
</varlistentry> |
| 177 |
<varlistentry> |
| 178 |
<term>--clutter-default-fps=FPS</term> |
| 179 |
<listitem><para>Equivalent of CLUTTER_DEFAULT_FPS. Sets the |
| 180 |
default framerate.</para></listitem> |
| 181 |
</varlistentry> |
| 182 |
<varlistentry> |
| 183 |
<term>--clutter-text-direction=DIRECTION</term> |
| 184 |
<listitem><para>Equivalent of CLUTTER_TEXT_DIRECTION. Sets the |
| 185 |
direction for the text.</para></listitem> |
| 186 |
</varlistentry> |
| 187 |
<varlistentry> |
| 188 |
<term>--clutter-disable-mipmapped-text</term> |
| 189 |
<listitem><para>Equivalent of CLUTTER_DISABLE_MIPMAPPED_TEXT. |
| 190 |
Disables mipmapping when rendering text.</para></listitem> |
| 191 |
</varlistentry> |
| 192 |
<varlistentry> |
| 193 |
<term>--clutter-use-fuzzy-picking</term> |
| 194 |
<listitem><para>Equivalent of CLUTTER_FUZZY_PICK. Enables |
| 195 |
"fuzzy" picking.</para></listitem> |
| 196 |
</varlistentry> |
| 197 |
<varlistentry> |
| 198 |
<term>--clutter-debug=FLAGS</term> |
| 199 |
<listitem><para>Equivalent of CLUTTER_DEBUG. Sets FLAGS as the |
| 200 |
Clutter debugging flags.</para></listitem> |
| 201 |
</varlistentry> |
| 202 |
<varlistentry> |
| 203 |
<term>--clutter-no-debug=FLAGS</term> |
| 204 |
<listitem><para>Unsets FLAGS from the Clutter debugging |
| 205 |
flags.</para></listitem> |
| 206 |
</varlistentry> |
| 207 |
<varlistentry> |
| 208 |
<term>--cogl-debug=FLAGS</term> |
| 209 |
<listitem><para>Equivalent of COGL_DEBUG. Sets FLAGS as the |
| 210 |
Cogl debugging flags.</para></listitem> |
| 211 |
</varlistentry> |
| 212 |
<varlistentry> |
| 213 |
<term>--cogl-no-debug=FLAGS</term> |
| 214 |
<listitem><para>Unsets FLAGS from the Cogl debugging |
| 215 |
flags.</para></listitem> |
| 216 |
</varlistentry> |
| 217 |
<varlistentry> |
| 218 |
<term>--clutter-enable-accessibility</term> |
| 219 |
<listitem><para>Enables accessibility support.</para></listitem> |
| 220 |
</varlistentry> |
| 221 |
</variablelist> |
| 222 |
|
| 223 |
<para>The X11 backends also have the following command line |
| 224 |
options:</para> |
| 225 |
|
| 226 |
<variablelist> |
| 227 |
<varlistentry> |
| 228 |
<term>--display=DISPLAY</term> |
| 229 |
<listitem><para>Sets the X11 display to use.</para></listitem> |
| 230 |
</varlistentry> |
| 231 |
<varlistentry> |
| 232 |
<term>--screen=SCREEN</term> |
| 233 |
<listitem><para>Sets the X11 screen number to use.</para></listitem> |
| 234 |
</varlistentry> |
| 235 |
<varlistentry> |
| 236 |
<term>--synch</term> |
| 237 |
<listitem><para>Make X11 calls synchronous.</para></listitem> |
| 238 |
</varlistentry> |
| 239 |
</variablelist> |
| 240 |
</section> |
| 241 |
|
| 242 |
<para>The GLX backend also has the following command line option:</para> |
| 243 |
|
| 244 |
<variablelist> |
| 245 |
<varlistentry> |
| 246 |
<term>--vblank=METHOD</term> |
| 247 |
<listitem><para>Equivalent of CLUTTER_VBLANK. Sets the sync-to-vblank |
| 248 |
method to be used.</para></listitem> |
| 249 |
</varlistentry> |
| 250 |
</variablelist> |
| 251 |
|
| 252 |
<section id="clutter-Debug-Flags"> |
| 253 |
<title>Debug flags for Clutter</title> |
| 254 |
|
| 255 |
<para>The debugging flags can be used for the CLUTTER_DEBUG environment |
| 256 |
variable and the --clutter-debug command line switch. Multiple flags can |
| 257 |
be separated by a colon (:) or a comma (,).</para> |
| 258 |
|
| 259 |
<!-- |
| 260 |
keep in sync with the list of Clutter debug keys inside clutter-main.c |
| 261 |
--> |
| 262 |
<variablelist> |
| 263 |
<varlistentry> |
| 264 |
<term>actor</term> |
| 265 |
<listitem><para>Generic actor-related notes</para></listitem> |
| 266 |
</varlistentry> |
| 267 |
<varlistentry> |
| 268 |
<term>animation</term> |
| 269 |
<listitem><para>#ClutterAnimation notes</para></listitem> |
| 270 |
</varlistentry> |
| 271 |
<varlistentry> |
| 272 |
<term>backend</term> |
| 273 |
<listitem><para>Backend-related notes, including initialization of |
| 274 |
the backend features and GL context creation</para></listitem> |
| 275 |
</varlistentry> |
| 276 |
<varlistentry> |
| 277 |
<term>event</term> |
| 278 |
<listitem><para>Event handling notes</para></listitem> |
| 279 |
</varlistentry> |
| 280 |
<varlistentry> |
| 281 |
<term>layout</term> |
| 282 |
<listitem><para>#ClutterLayoutManager notes</para></listitem> |
| 283 |
</varlistentry> |
| 284 |
<varlistentry> |
| 285 |
<term>misc</term> |
| 286 |
<listitem><para>Miscellaneous notes</para></listitem> |
| 287 |
</varlistentry> |
| 288 |
<varlistentry> |
| 289 |
<term>scheduler</term> |
| 290 |
<listitem><para>Notes related to timelines and the master |
| 291 |
clock</para></listitem> |
| 292 |
</varlistentry> |
| 293 |
<varlistentry> |
| 294 |
<term>script</term> |
| 295 |
<listitem><para>Notes related to #ClutterScript</para></listitem> |
| 296 |
</varlistentry> |
| 297 |
</variablelist> |
| 298 |
|
| 299 |
<para>It is possible to get all the debugging notes using the |
| 300 |
special "all" flag.</para> |
| 301 |
|
| 302 |
</section> |
| 303 |
|
| 304 |
<section id="configuration-file"> |
| 305 |
<title>Configuration File</title> |
| 306 |
|
| 307 |
<para>Clutter will look for files named <filename>settings.ini</filename> |
| 308 |
located in the <filename>/etc/clutter-1.0</filename> and |
| 309 |
<filename>$XDG_CONFIG_HOME/clutter-1.0</filename> directories. These files |
| 310 |
must be valid key files (see #GKeyFile in the GLib documentation) and may |
| 311 |
have three sections:</para> |
| 312 |
|
| 313 |
<variablelist> |
| 314 |
<varlistentry> |
| 315 |
<term>Environment</term> |
| 316 |
<listitem><para>The keys in this section map the environment variables |
| 317 |
honoured by Clutter.</para></listitem> |
| 318 |
</varlistentry> |
| 319 |
<varlistentry> |
| 320 |
<term>Debug</term> |
| 321 |
<listitem><para>The keys in this section related to the debugging notes |
| 322 |
that Clutter exposes when compiled with debugging support; similarly to |
| 323 |
the environment variables and command line arguments related to the |
| 324 |
debugging notes, Clutter must be compiled with support for these notes |
| 325 |
in order to use them.</para></listitem> |
| 326 |
</varlistentry> |
| 327 |
<varlistentry> |
| 328 |
<term>Settings</term> |
| 329 |
<listitem><para>The keys in this section strictly map to the #GObject |
| 330 |
properties exposed by the #ClutterSettings type; if Clutter is running |
| 331 |
on an X11 platform, the XSettings manager will take precedence over the |
| 332 |
values specified in the <filename>settings.ini</filename> |
| 333 |
file.</para></listitem> |
| 334 |
</varlistentry> |
| 335 |
</variablelist> |
| 336 |
|
| 337 |
<section id="configuration-keys-environment"> |
| 338 |
<title>Keys available for the Environment group</title> |
| 339 |
|
| 340 |
<variablelist> |
| 341 |
<varlistentry> |
| 342 |
<term>Backends</term> |
| 343 |
<listitem><para>A string value, equivalent to setting |
| 344 |
<code>CLUTTER_BACKEND</code>.</para></listitem> |
| 345 |
</varlistentry> |
| 346 |
<varlistentry> |
| 347 |
<term>Drivers</term> |
| 348 |
<listitem><para>A string value, equivalent to setting |
| 349 |
<code>CLUTTER_DRIVER</code>.</para></listitem> |
| 350 |
</varlistentry> |
| 351 |
<varlistentry> |
| 352 |
<term>ShowFps</term> |
| 353 |
<listitem><para>A boolean value, equivalent to setting |
| 354 |
<code>CLUTTER_SHOW_FPS</code>.</para></listitem> |
| 355 |
</varlistentry> |
| 356 |
<varlistentry> |
| 357 |
<term>DisableMipmappedText</term> |
| 358 |
<listitem><para>A boolean value, equivalent to setting |
| 359 |
<code>CLUTTER_DISABLE_MIPMAPPED_TEXT</code>.</para></listitem> |
| 360 |
</varlistentry> |
| 361 |
<varlistentry> |
| 362 |
<term>UseFuzzyPicking</term> |
| 363 |
<listitem><para>A boolean value, equivalent to setting |
| 364 |
<code>CLUTTER_FUZZY_PICK</code>.</para></listitem> |
| 365 |
</varlistentry> |
| 366 |
<varlistentry> |
| 367 |
<term>EnableAccessibility</term> |
| 368 |
<listitem><para>A boolean value, equivalent to setting |
| 369 |
<code>CLUTTER_ENABLE_ACCESSIBILITY</code>.</para></listitem> |
| 370 |
</varlistentry> |
| 371 |
<varlistentry> |
| 372 |
<term>SyncToVblank</term> |
| 373 |
<listitem><para>A boolean value, equivalent to setting |
| 374 |
<code>CLUTTER_VBLANK</code>.</para></listitem> |
| 375 |
</varlistentry> |
| 376 |
<varlistentry> |
| 377 |
<term>DefaultFps</term> |
| 378 |
<listitem><para>An integer value, equivalent to setting |
| 379 |
<code>CLUTTER_DEFAULT_FPS</code>.</para></listitem> |
| 380 |
</varlistentry> |
| 381 |
<varlistentry> |
| 382 |
<term>TextDirection</term> |
| 383 |
<listitem><para>A string value, equivalent to setting |
| 384 |
<code>CLUTTER_TEXT_DIRECTION</code>.</para></listitem> |
| 385 |
</varlistentry> |
| 386 |
</variablelist> |
| 387 |
</section> |
| 388 |
|
| 389 |
<section id="configuration-keys-debug"> |
| 390 |
<title>Keys available for the Debug group</title> |
| 391 |
|
| 392 |
<variablelist> |
| 393 |
<varlistentry> |
| 394 |
<term>Debug</term> |
| 395 |
<listitem><para>A string containing the debugging flags, in the same |
| 396 |
format that should be used with the <code>CLUTTER_DEBUG</code> |
| 397 |
environment variable.</para></listitem> |
| 398 |
</varlistentry> |
| 399 |
<varlistentry> |
| 400 |
<term>PaintDebug</term> |
| 401 |
<listitem><para>A string containing the paint debugging flags, in the same |
| 402 |
format that should be used with the <code>CLUTTER_PAINT</code> |
| 403 |
environment variable.</para></listitem> |
| 404 |
</varlistentry> |
| 405 |
<varlistentry> |
| 406 |
<term>PickDebug</term> |
| 407 |
<listitem><para>A string containing the pick debugging flags, in the same |
| 408 |
format that should be used with the <code>CLUTTER_PICK</code> |
| 409 |
environment variable.</para></listitem> |
| 410 |
</varlistentry> |
| 411 |
</variablelist> |
| 412 |
</section> |
| 413 |
|
| 414 |
</section> |
| 415 |
|
| 416 |
</partintro> |
| 417 |
</part> |