/usr/share/gtk-doc/html/pigment/pigment-Pgm.html is in libpigment0.3-dev 0.3.17-1.
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 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pgm</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Pigment 0.3 Reference Manual">
<link rel="up" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="prev" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="next" href="PgmCanvas.html" title="PgmCanvas">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="preface" href="introduction.html" title="Introduction">
<link rel="part" href="pigment-overview.html" title="Part I. Pigment Overview">
<link rel="part" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="part" href="pigment-library.html" title="Part III. Pigment Library Reference">
<link rel="index" href="pigment-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="api-index.html" title="Index">
</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="pigment-core.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pigment-core.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">Pigment 0.3
Reference Manual</th>
<td><a accesskey="n" href="PgmCanvas.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#pigment-Pgm.synopsis" class="shortcut">Top</a>
|
<a href="#pigment-Pgm.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="pigment-Pgm"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="pigment-Pgm.top_of_page"></a>Pgm</span></h2>
<p>Pgm — A library to create rich application user interfaces.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="pigment-Pgm.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <pgm/pgm.h>
void <a class="link" href="pigment-Pgm.html#pgm-init" title="pgm_init ()">pgm_init</a> (int *argc,
char **argv[]);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="pigment-Pgm.html#pgm-init-check" title="pgm_init_check ()">pgm_init_check</a> (int *argc,
char **argv[]);
void <a class="link" href="pigment-Pgm.html#pgm-deinit" title="pgm_deinit ()">pgm_deinit</a> (void);
void <a class="link" href="pigment-Pgm.html#pgm-version" title="pgm_version ()">pgm_version</a> (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *major,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *minor,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *micro,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *nano);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a> * <a class="link" href="pigment-Pgm.html#pgm-version-string" title="pgm_version_string ()">pgm_version_string</a> (void);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="pigment-Pgm.html#pgm-events-pending" title="pgm_events_pending ()">pgm_events_pending</a> (void);
void <a class="link" href="pigment-Pgm.html#pgm-main" title="pgm_main ()">pgm_main</a> (void);
void <a class="link" href="pigment-Pgm.html#pgm-main-quit" title="pgm_main_quit ()">pgm_main_quit</a> (void);
void <a class="link" href="pigment-Pgm.html#pgm-main-iteration" title="pgm_main_iteration ()">pgm_main_iteration</a> (void);
void <a class="link" href="pigment-Pgm.html#pgm-main-iteration-do" title="pgm_main_iteration_do ()">pgm_main_iteration_do</a> (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> blocking);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="pigment-Pgm.description"></a><h2>Description</h2>
<p>
</p>
<div class="refsect2" lang="en">
<a name="id2688463"></a><h3>Pigment initialization</h3>
<p>
Pigment is a media rendering library written in C providing an abstraction
layer to easily design GUI (Graphical User Interfaces) like simple games,
media center/set-top box applications, etc. It has a pluggable backend
system so that the same application can run on various hardware and software
platforms using rendering libraries such as OpenGL or DirectFB on
operating systems such as Windows, GNU/Linux or Mac OS X.
</p>
<p>
Pigment has been designed to handle common issues like non square pixels
displays, non square pixels images or video sources, positioning abstraction
and scalable user interface support. Moreover, Pigment is a fully thread safe
library which means that you can call methods on Pigment objects from
multiple threads at the same time even if the rendering backend is not thread
safe itself like some OpenGL implementations are for example.
</p>
<p>
The <span class="application">Pigment</span> library has to be initialized
with <a class="link" href="pigment-Pgm.html#pgm-init" title="pgm_init ()"><code class="function">pgm_init()</code></a> before it can be used. You should pass pointers to
the main argc and argv variables so that Pigment can process its own command
line options, as shown in the following example.
</p>
<p>
</p>
<div class="example">
<a name="pigment-initialization"></a><p class="title"><b>Example 1. Initializing the library</b></p>
<div class="example-contents"><pre class="programlisting">
int
main (int argc, char *argv[])
{
pgm_init (&argc, &argv);
...
}
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
The <a class="link" href="pigment-Pgm.html#pgm-deinit" title="pgm_deinit ()"><code class="function">pgm_deinit()</code></a> call is used to clean up all internal resources used
by <span class="application">Pigment</span>.
</p>
<p>
Use <a class="link" href="pigment-Pgm.html#pgm-version" title="pgm_version ()"><code class="function">pgm_version()</code></a> to query the library version at runtime or use the
PGM_VERSION_* macros to find the version at compile time. Optionally
<a class="link" href="pigment-Pgm.html#pgm-version-string" title="pgm_version_string ()"><code class="function">pgm_version_string()</code></a> returns a printable string.
</p>
<p>
Pigment is a GUI toolkit based on an event-driven programming model. When the
user is doing nothing, Pigment sits in the main loop and waits for input.
If the user performs some action, like a mouse button click, then the main
loop "wakes up" and delivers an event to Pigment. When a viewport receives
an event, it emits a signal to notify your program that something happened
by invoking functions you connected to the signal with
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect"
><code class="function">g_signal_connect()</code></a>. Functions connected to a signal are often termed
callbacks. When your callbacks are invoked, you would typically take some
action, for example when a key of the keyboard is pressed you might update
the properties of your drawables. After a callback finishes, Pigment will
return to the main loop and await more user input.
</p>
</div>
<p>
</p>
<p>
Last reviewed on 2007-09-25 (0.3.1)</p>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="pigment-Pgm.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="pgm-init"></a><h3>pgm_init ()</h3>
<pre class="programlisting">void pgm_init (int *argc,
char **argv[]);</pre>
<p>
Initializes the Pigment library.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
This function will terminate your program if it was unable to initialize
Pigment for some reason. If you want your program to fall back,
use <a class="link" href="pigment-Pgm.html#pgm-init-check" title="pgm_init_check ()"><code class="function">pgm_init_check()</code></a> instead.
</p>
</div>
<p>
</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> the address of the <em class="parameter"><code>argc</code></em> parameter of your main function.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td> the address of the <em class="parameter"><code>argv</code></em> parameter of your main function.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-init-check"></a><h3>pgm_init_check ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> pgm_init_check (int *argc,
char **argv[]);</pre>
<p>
Initializes the Pigment library without terminating the program if it
was unable to initialize successfully.</p>
<p>
</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> the address of the <em class="parameter"><code>argc</code></em> parameter of your main function.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td> the address of the <em class="parameter"><code>argv</code></em> parameter of your main function.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if Pigment was initialized successfully, <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
><code class="literal">FALSE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-deinit"></a><h3>pgm_deinit ()</h3>
<pre class="programlisting">void pgm_deinit (void);</pre>
<p>
Deinitializes the Pigment library. This is not going to free Pigment
objects, you need to explicitely unref these objects using
<code class="function">gst_object_unref()</code>.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-version"></a><h3>pgm_version ()</h3>
<pre class="programlisting">void pgm_version (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *major,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *minor,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *micro,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> *nano);</pre>
<p>
Gets the version number of the Pigment library.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>major</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> to store the major version number.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minor</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> to store the minor version number.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>micro</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> to store the micro version number.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nano</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> to store the nano version number.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-version-string"></a><h3>pgm_version_string ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a> * pgm_version_string (void);</pre>
<p>
Returns a string that is useful for describing this version of Pigment to
the outside world: user agent strings, logging, etc.</p>
<p>
</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 newly allocated string describing this version of Pigment.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-events-pending"></a><h3>pgm_events_pending ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> pgm_events_pending (void);</pre>
<p>
Checks if any events are pending. This can be used to update the GUI, while
doing some time intensive computation.
</p>
<p>
</p>
<div class="example">
<a name="pigment-event-pending"></a><p class="title"><b>Example 2. Updating the GUI during a long computation.</b></p>
<div class="example-contents"><pre class="programlisting">
// computation going on
...
while (pgm_events_pending ())
pgm_main_iteration ();
...
// computation continued
</pre></div>
</div>
<p><br class="example-break"></p>
<p>
</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
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if any events are pending, <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
><code class="literal">FALSE</code></a> otherwise.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-main"></a><h3>pgm_main ()</h3>
<pre class="programlisting">void pgm_main (void);</pre>
<p>
Runs the main loop until <a class="link" href="pigment-Pgm.html#pgm-main-quit" title="pgm_main_quit ()"><code class="function">pgm_main_quit()</code></a> is called. It's ok to use the GLib
main loop directly instead, though it involves slightly more typing. See
GMainLoop in the GLib documentation.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-main-quit"></a><h3>pgm_main_quit ()</h3>
<pre class="programlisting">void pgm_main_quit (void);</pre>
<p>
Quits the main loop.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-main-iteration"></a><h3>pgm_main_iteration ()</h3>
<pre class="programlisting">void pgm_main_iteration (void);</pre>
<p>
Runs a single iteration of the main loop. If no events are waiting to be
processed, Pigment will block until the next event is noticed. If you don't
want to block, look at <a class="link" href="pigment-Pgm.html#pgm-main-iteration-do" title="pgm_main_iteration_do ()"><code class="function">pgm_main_iteration_do()</code></a> or check if any events are
pending with <a class="link" href="pigment-Pgm.html#pgm-events-pending" title="pgm_events_pending ()"><code class="function">pgm_events_pending()</code></a> first.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-main-iteration-do"></a><h3>pgm_main_iteration_do ()</h3>
<pre class="programlisting">void pgm_main_iteration_do (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> blocking);</pre>
<p>
Runs a single iteration of the main loop. If no events are available,
either returns or blocks dependent on the value of <em class="parameter"><code>blocking</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>blocking</code></em> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if you want Pigment to block if no events are pending.
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="pigment-Pgm.see-also"></a><h2>See Also</h2>
#PgmViewport, <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a>.
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|