[gcompris/gcomprixogoo] Improved documentation of the sound API documentation.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Improved documentation of the sound API documentation.
- Date: Wed, 14 Jul 2010 23:18:26 +0000 (UTC)
commit 259991957ac49bc4d5d4e28e696276127c31c10d
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Wed Jul 14 18:08:08 2010 +0200
Improved documentation of the sound API documentation.
docs/C/python.html | 73 ++++++++++++++++++++---
docs/C/python.xml | 151 +++++++++++++++++++++++++++++++++++++--------
src/gcompris/soundutil.h | 6 +-
3 files changed, 192 insertions(+), 38 deletions(-)
---
diff --git a/docs/C/python.html b/docs/C/python.html
index a677c48..471b50f 100644
--- a/docs/C/python.html
+++ b/docs/C/python.html
@@ -1,18 +1,18 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Python wrapper for Gcompris</title><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2487360"></a>Python wrapper for Gcompris</h2></div><div><div class="author"><h3 class="author"><span class="honorific">Ir</span>. <span class="firstname">Olivier</span> <span class="surname">Samyn</span></h3><code class="email"><<a href="mailto:osamyn ulb ac be">osamyn ulb ac be</a>></code></div></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="2"><b>Revision History</b></th></tr><tr><td align="left">Revision 0.1</td><td align="left">February 2003</td></tr><tr><td align="left">Revision 0.2</td><td align="left">April 20
03</td></tr><tr><td align="left">Revision 0.3</td><td align="left">January 2004</td></tr><tr><td align="left">Revision 0.4</td><td align="left">January 2005</td></tr><tr><td align="left">Revision 0.5</td><td align="left">December 2006</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id2524635">Notes about this wrapper</a></span></dt><dt><span class="sect1"><a href="#id2487666">Python board structure</a></span></dt><dt><span class="sect1"><a href="#id2487733">GcomprisBoard structure mapping </a></span></dt><dt><span class="sect1"><a href="#id2486794">gcompris.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2486799">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2487128">GComprisBarFlags enum mapping</a></span></dt><dt><span class="sect2"><a href="#id2487223">Misc constants mapping</a></span></dt><dt><span class="sect2"><a href="#
id2487288">Colors constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2534004">Fonts constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2534080">Board font constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2534187">Cursor constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2534296">gameutil.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2534302">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2534510">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2534522">bonus.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2534529">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2534591">Constants mapping (BonusStatusList)</a></span></dt><dt><span class="sect2"><a href="#id2534648">Constants mapping (BonusList)</a></span></dt><dt><span class="sect
2"><a href="#id2534730">Constants mapping (BoardFinishedList)</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2534799">score.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2534805">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2534880">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2534930">sound.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2534936">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2535018">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2535030">timer.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2535036">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2535142">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2535208">anim.h structures Mapping</a></span
></dt><dd><dl><dt><span class="sect2"><a href="#id2535220">Animation</a></span></dt><dt><span class="sect2"><a href="#id2535236">CanvasItem</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2524635"></a>Notes about this wrapper</h2></div></div></div><p>Generaly speaking, all C gc_xxx functions are wrapped to a
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Python wrapper for Gcompris</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" title="Python wrapper for Gcompris"><div class="titlepage"><div><div><h2 class="title"><a name="id2778112"></a>Python wrapper for Gcompris</h2></div><div><div class="author"><h3 class="author"><span class="honorific">Ir</span>. <span class="firstname">Olivier</span> <span class="surname">Samyn</span></h3><code class="email"><<a class="email" href="mailto:osamyn ulb ac be">osamyn ulb ac be</a>></code></div></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="2"><b>Revision History</b></th></tr><tr><td align="left">Revision 0.7</td><td align="left">July 2010</td></tr><tr><td align="left" colspa
n="2">Updated documentation of the sound API.</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id2780648">Notes about this wrapper</a></span></dt><dt><span class="sect1"><a href="#id2780681">Python board structure</a></span></dt><dt><span class="sect1"><a href="#id2820751">GcomprisBoard structure mapping </a></span></dt><dt><span class="sect1"><a href="#id2778977">gcompris.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2780812">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2779088">GComprisBarFlags enum mapping</a></span></dt><dt><span class="sect2"><a href="#id2779182">Misc constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2779245">Colors constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2779304">Fonts constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2830431">Board fon
t constants mapping</a></span></dt><dt><span class="sect2"><a href="#id2830532">Cursor constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2830632">gameutil.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2830638">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2830860">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2830872">bonus.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2830878">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2830941">Constants mapping (BonusStatusList)</a></span></dt><dt><span class="sect2"><a href="#id2830982">Constants mapping (BonusList)</a></span></dt><dt><span class="sect2"><a href="#id2831066">Constants mapping (BoardFinishedList)</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2831132">score.h functions and constants Mapping</a></span></dt><d
d><dl><dt><span class="sect2"><a href="#id2831139">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2831211">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2831257">soundutil.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2831264">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2831491">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2831550">timer.h functions and constants Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2831556">Functions mapping</a></span></dt><dt><span class="sect2"><a href="#id2831657">Constants mapping</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2831719">anim.h structures Mapping</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2831730">Animation</a></span></dt><dt><span class="sect2"><a href="#id2831746">CanvasItem</a></span></dt></dl></dd></dl></div><div clas
s="sect1" title="Notes about this wrapper"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2780648"></a>Notes about this wrapper</h2></div></div></div><p>Generaly speaking, all C gc_xxx functions are wrapped to a
corresponding gcompris.xxx function; parameters and return types remains the same.
Some structures have also been wrapped. See below particular notes about this.</p><p>The wrapped functions are divided into packages. Every package correponds to a
gcompris header file (gameutil.h, score.h, ...)</p><p>For each package/header not all functions have been wrapped.
Only functions that are used/usefull for plugins are wrapped.</p><p>Notice also that not all functions have been tested (with time and new python
plugins implemented they will be, but...). The wrappers have been written, they compiles,
-but there is no warranty on their behaviour... I you find a bug report it!</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2487666"></a>Python board structure</h2></div></div></div><p>Each board written in python must contains a class which name is
+but there is no warranty on their behaviour... I you find a bug report it!</p></div><div class="sect1" title="Python board structure"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2780681"></a>Python board structure</h2></div></div></div><p>Each board written in python must contains a class which name is
"Gcompris_xxx" where xxx is the name of the board. Let's take an example: I made
a gcompris board written in python and called "pythontest".</p><p>For this board there is a gcompris pythontest.xml file containing
"pythontest" for the board name and "pythonboard" for the board type. There's
also a pythontest.py file containing the board code. And to finish, this file
contains a "Gcompris_pythontest" class definition which in turns contains the
-needed gcompris board functions.</p><p>The class defined in the python board must contains the following methods:</p><div class="itemizedlist"><ul type="disc"><li>__init__(self, gcomprisBoard)</li><li>start(self)</li><li>end(self)</li><li>ok(self)</li><li>repeat(self)</li><li>config(self)</li><li>key_press(self, keyval)</li><li>pause(self, pause)</li><li>set_level(self, level)</li></ul></div><p>
+needed gcompris board functions.</p><p>The class defined in the python board must contains the following methods:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">__init__(self, gcomprisBoard)</li><li class="listitem">start(self)</li><li class="listitem">end(self)</li><li class="listitem">ok(self)</li><li class="listitem">repeat(self)</li><li class="listitem">config(self)</li><li class="listitem">key_press(self, keyval)</li><li class="listitem">pause(self, pause)</li><li class="listitem">set_level(self, level)</li></ul></div><p>
</p><p>For the method role and use, please consult the sample pythontest.py board
-and other C boards.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2487733"></a>GcomprisBoard structure mapping </h2></div></div></div><p>An instance of this structure in Python will act like an instance of the C
+and other C boards.</p></div><div class="sect1" title="GcomprisBoard structure mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2820751"></a>GcomprisBoard structure mapping </h2></div></div></div><p>An instance of this structure in Python will act like an instance of the C
one. Here a some Python call samples:</p><pre class="programlisting">
...
gcomprisBoard.level = 1
@@ -21,8 +21,65 @@ one. Here a some Python call samples:</p><pre class="programlisting">
gcompris.bar_start(gcomprisBoard.canvas)
...
</pre><p>Here are the Python structure member name and type, and a note indicating if the
-attribute is readeable and/or writable.</p><div class="informaltable"><table border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Structure member</th><th>Type</th><th>Readable</th><th>Writable</th></tr></thead><tbody><tr><td>type</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>board_ready</td><td>boolean</td><td>Y</td><td>N</td></tr><tr><td>mode</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>name</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>title</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>description</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>icon_name</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>author</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>boarddir</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>filename</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>difficulty</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>mandatory_sound_file</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>section</td>
<td>string</td><td>Y</td><td>N</td></tr><tr><td>menuposotion</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>prerequisite</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>goal</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>manual</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>credit</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>width</td><td>int</td><td>Y</td><td>N</td></tr><tr><td>height</td><td>int</td><td>Y</td><td>N</td></tr><tr><td>canvas</td><td>gnome.canvas.Canvas</td><td>Y</td><td>N</td></tr><tr><td>previous_board</td><td>GcomprisBoard</td><td>Y</td><td>N</td></tr><tr><td>level</td><td>int</td><td>Y</td><td>Y</td></tr><tr><td>maxlevel</td><td>int</td><td>Y</td><td>Y</td></tr><tr><td>sublevel</td><td>int</td><td>Y</td><td>Y</td></tr><tr><td>number_of_sublevel</td><td>int</td><td>Y</td><td>Y</td></tr></tbody></table></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2486794">
</a>gcompris.h functions and constants Mapping</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2486799"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.end_board()</td><td>void gc_board_end(void)</td><td> </td></tr><tr><td>gcompris.bar_start(gnomeCanvas)</td><td>void gc_bar_start(GnomeCanvas *theCanvas)</td><td> </td></tr><tr><td>gcompris.set_background(gnomeCanvasGroup, file)</td><td>GnomeCanvasItem *gc_set_background(GnomeCanvasGroup *parent, gchar *file)</td><td>return a gnome.canvas.CanvasItem object</td></tr><tr><td>gcompris.bar_set_level(gcomprisBoard)</td><td>void gc_bar_set_level(GcomprisBoard *gcomprisBoard)</td><td> </td></tr><tr><td>gcompris.bar_set_repeat_icon(pixmap)</td><td>void gc_bar_set_repeat_icon(GdkPixbuf *pixm
ap)</td><td> </td></tr><tr><td>gcompris.bar_set(flags)</td><td>void gc_bar_set(const GComprisBarFlags flags)</td><td> </td></tr><tr><td>gcompris.bar_hide(hide)</td><td>void gc_bar_hide(gboolean hide)</td><td> </td></tr><tr><td>gcompris.get_canvas()</td><td>GnomeCanvas* gc_get_canvas()</td><td>return a gnome.canvas.Canvas</td></tr><tr><td>gcompris.get_window()</td><td>GtkWidget* gc_get_window(void)</td><td>return a gtk.Widget</td></tr><tr><td>gcompris.get_locale()</td><td>gchar* gc_locale_get(void)</td><td>return a string</td></tr><tr><td>gcompris.set_locale(locale)</td><td>void gc_locale_set(gchar *locale)</td><td> </td></tr><tr><td>gcompris.set_cursor(cursor_type)</td><td>void gc_cursor_set(guint gdk_cursor_type)</td><td> </td></tr><tr><td>gcompris.images_selector_start(gcomprisBoard, dataset, callback)</td><td>void gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset, ImageSelectorCallBack imscb)</td><td>The callback must be a callable object</td></tr><tr
><td>gcompris.images_selector_stop()</td><td>void gc_selector_images_stop(void)</td><td> </td></tr><tr><td>gcompris.exit()</td><td>void gc_exit(void)</td><td> </td></tr><tr><td>gcompris.log_set_reason (gcomprisBoard, expected, got)</td><td>gc_log_set_reason (GcomprisBoard *gcomprisBoard, gchar *expected, gchar *got)</td><td> </td></tr><tr><td>gcompris.log_end (gcomprisBoard, status)</td><td>gc_log_end (GcomprisBoard *gcomprisBoard, gchar *status)</td><td> </td></tr><tr><td>gcompris.file_selector_load(gcomprisBoard, rootdir, file_types, callback)</td><td>void gc_selector_file_load (GcomprisBoard *gcomprisBoard, gchar *rootdir, gchar *file_types, FileSelectorCallBack fscb)</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.file_selector_save(gcomprisBoard, rootdir, file_types, callback)</td><td>void gc_selector_file_save(GcomprisBoard *gcomprisBoard, gchar *rootdir,gchar *file_types, FileSelectorCallBack fscb)</td><td>The callback must be a callable objec
t</td></tr><tr><td>gcompris.file_selector_stop()</td><td>void gc_selector_file_stop(void)</td><td> </td></tr><tr><td>gcompris.get_database()</td><td>gchar* gc_db_get_filename(void)</td><td>return the filename (string) of the database (fullpath)</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2487128"></a>GComprisBarFlags enum mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.BAR_LEVEL</td><td>GCOMPRIS_BAR_LEVEL</td></tr><tr><td>gcompris.BAR_OK</td><td>GCOMPRIS_BAR_OK</td></tr><tr><td>gcompris.BAR_REPEAT</td><td>GCOMPRIS_BAR_REPEAT</td></tr><tr><td>gcompris.BAR_REPEAT_ICON</td><td>GCOMPRIS_BAR_REPEAT_ICON</td></tr><tr><td>gcompris.BAR_CONFIG</td><td>GCOMPRIS_BAR_CONFIG</td></tr><tr><td>gcompris.BAR_ABOUT</td><td>GCOMPRIS_BAR_ABOUT</td></tr></tbody></t
able></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2487223"></a>Misc constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.BOARD_HEIGHT</td><td>BOARDHEIGHT</td></tr><tr><td>gcompris.BOARD_WIDTH</td><td>BOARDWIDTH</td></tr><tr><td>gcompris.BAR_HEIGHT</td><td>BAR_HEIGHT</td></tr><tr><td>gcompris.DEFAULT_SKIN</td><td>DEFAULT_SKIN</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2487288"></a>Colors constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.COLOR_TITLE</td><td>COLOR_TITLE</td></tr><tr><td>gcompris.COLOR_TEXT_BUTTON</td><td>COLOR_T
EXT_BUTTON</td></tr><tr><td>gcompris.COLOR_CONTENT</td><td>COLOR_CONTENT</td></tr><tr><td>gcompris.COLOR_SUBTITLE</td><td>COLOR_SUBTITLE</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534004"></a>Fonts constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.FONT_TITLE</td><td>FONT_TITLE</td></tr><tr><td>gcompris.FONT_TITLE_FALLBACK</td><td>FONT_TITLE_FALLBACK</td></tr><tr><td>gcompris.FONT_SUBTITLE</td><td>FONT_SUBTITLE</td></tr><tr><td>gcompris.FONT_SUBTITLE_FALLBACK</td><td>FONT_SUBTITLE_FALLBACK</td></tr><tr><td>gcompris.FONT_CONTENT</td><td>FONT_CONTENT</td></tr><tr><td>gcompris.FONT_CONTENT_FALLBACK</td><td>FONT_CONTENT_FALLBACK</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="ti
tle"><a name="id2534080"></a>Board font constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.FONT_BOARD_TINY</td><td>FONT_BOARD_TINY</td></tr><tr><td>gcompris.FONT_BOARD_SMALL</td><td>FONT_BOARD_SMALL</td></tr><tr><td>gcompris.FONT_BOARD_MEDIUM</td><td>FONT_BOARD_MEDIUM</td></tr><tr><td>gcompris.FONT_BOARD_BIG</td><td>FONT_BOARD_BIG</td></tr><tr><td>gcompris.FONT_BOARD_BIG_BOLD</td><td>FONT_BOARD_BIG_BOLD</td></tr><tr><td>gcompris.FONT_BOARD_FIXED</td><td>FONT_BOARD_FIXED</td></tr><tr><td>gcompris.FONT_BOARD_TITLE</td><td>FONT_BOARD_TITLE</td></tr><tr><td>gcompris.FONT_BOARD_TITLE_BOLD</td><td>FONT_BOARD_TITLE_BOLD</td></tr><tr><td>gcompris.FONT_BOARD_HUGE</td><td>FONT_BOARD_HUGE</td></tr><tr><td>gcompris.FONT_BOARD_HUGE_BOLD</td><td>FONT_BOARD_HUGE_BOLD</td></tr></tbody></table></div></div><div class="sect2" lang="en"><d
iv class="titlepage"><div><div><h3 class="title"><a name="id2534187"></a>Cursor constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.CURSOR_FIRST_CUSTOM</td><td>GCOMPRIS_FIRST_CUSTOM_CURSOR</td></tr><tr><td>gcompris.CURSOR_LINE</td><td>GCOMPRIS_LINE_CURSOR</td></tr><tr><td>gcompris.CURSOR_FILLRECT</td><td>GCOMPRIS_FILLRECT_CURSOR</td></tr><tr><td>gcompris.CURSOR_RECT</td><td>GCOMPRIS_RECT_CURSOR</td></tr><tr><td>gcompris.CURSOR_FILLCIRCLE</td><td>GCOMPRIS_FILLCIRCLE_CURSOR</td></tr><tr><td>gcompris.CURSOR_CIRCLE</td><td>GCOMPRIS_CIRCLE_CURSOR</td></tr><tr><td>gcompris.CURSOR_DEL</td><td>GCOMPRIS_DEL_CURSOR</td></tr><tr><td>gcompris.CURSOR_FILL</td><td>GCOMPRIS_FILL_CURSOR</td></tr><tr><td>gcompris.CURSOR_SELECT</td><td>GCOMPRIS_SELECT_CURSOR</td></tr><tr><td>gcompris.CURSOR_DEFAULT</td><td>GCOMPRIS_DEFAULT_CURSOR</td></tr
></tbody></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2534296"></a>gameutil.h functions and constants Mapping</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534302"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.utils.image_to_skin(imagename)</td><td>gchar *gc_skin_image_get(gchar *imagename)</td><td>return a string</td></tr><tr><td>gcompris.utils.load_skin_pixmap(pixmapfile)</td><td>GdkPixbuf *gcompris_skin_pixmap_load(char *pixmapfile)</td><td>return a gtk.gdk.Pixbuf</td></tr><tr><td>gcompris.utils.load_pixmap(pixmapfile)</td><td>GdkPixbuf *gc_pixmap_load(char *pixmapfile)</td><td>return a gtk.gdk.Pixbuf</td></tr><tr><td>gcompris.utils
.set_image_focus(item, focus)</td><td>void gc_item_focus_set(GnomeCanvasItem *item, gboolean focus)</td><td> </td></tr><tr><td>gcompris.utils.item_event_focus(item, event, dest_item)</td><td>gint gc_item_focus_event(GnomeCanvasItem *item, GdkEvent *event, GnomeCanvasItem *dest_item)</td><td>return an integer</td></tr><tr><td>gcompris.utils.item_absolute_move(item, x, y)</td><td>void gc_item_absolute_move(GnomeCanvasItem *item, int x, int y)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate(item, angle)</td><td>void gc_item_rotate(GnomeCanvasItem *item, double angle)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate_relative(item, angle)</td><td>void gc_item_rotate_relative(GnomeCanvasItem *item, double angle)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate_with_center(item, angle, x, y)</td><td>void gc_item_rotate_with_center(GnomeCanvasItem *item, double angle, int x, int y)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate_relative_with_center(item, angle
, x, y)</td><td>void gc_item_rotate_relative_with_center(GnomeCanvasItem *item, double angle, int x, int y)</td><td> </td></tr><tr><td>gcompris.utils.dialog(str, callback)</td><td>void gc_dialog(gchar *str, DialogBoxCallBack callback)</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.utils.dialog_close()</td><td>void gc_dialog_close()</td><td> </td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534510"></a>Constants mapping</h3></div></div></div><p>
+attribute is readeable and/or writable.</p><div class="informaltable"><table border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Structure member</th><th>Type</th><th>Readable</th><th>Writable</th></tr></thead><tbody><tr><td>type</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>board_ready</td><td>boolean</td><td>Y</td><td>N</td></tr><tr><td>mode</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>name</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>title</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>description</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>icon_name</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>author</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>boarddir</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>filename</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>difficulty</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>mandatory_sound_file</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>section</td>
<td>string</td><td>Y</td><td>N</td></tr><tr><td>menuposotion</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>prerequisite</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>goal</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>manual</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>credit</td><td>string</td><td>Y</td><td>N</td></tr><tr><td>width</td><td>int</td><td>Y</td><td>N</td></tr><tr><td>height</td><td>int</td><td>Y</td><td>N</td></tr><tr><td>canvas</td><td>gnome.canvas.Canvas</td><td>Y</td><td>N</td></tr><tr><td>previous_board</td><td>GcomprisBoard</td><td>Y</td><td>N</td></tr><tr><td>level</td><td>int</td><td>Y</td><td>Y</td></tr><tr><td>maxlevel</td><td>int</td><td>Y</td><td>Y</td></tr><tr><td>sublevel</td><td>int</td><td>Y</td><td>Y</td></tr><tr><td>number_of_sublevel</td><td>int</td><td>Y</td><td>Y</td></tr></tbody></table></div></div><div class="sect1" title="gcompris.h functions and constants Mapping"><div class="titlepage"><div><div><h2 class="title"
style="clear: both"><a name="id2778977"></a>gcompris.h functions and constants Mapping</h2></div></div></div><div class="sect2" title="Functions mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2780812"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.end_board()</td><td>void gc_board_end(void)</td><td> </td></tr><tr><td>gcompris.bar_start(gnomeCanvas)</td><td>void gc_bar_start(GnomeCanvas *theCanvas)</td><td> </td></tr><tr><td>gcompris.set_background(gnomeCanvasGroup, file)</td><td>GnomeCanvasItem *gc_set_background(GnomeCanvasGroup *parent, gchar *file)</td><td>return a gnome.canvas.CanvasItem object</td></tr><tr><td>gcompris.bar_set_level(gcomprisBoard)</td><td>void gc_bar_set_level(GcomprisBoard *gcomprisBoard)</td><td> </td></tr><tr><td>gcompris.bar_set_repeat_icon(pi
xmap)</td><td>void gc_bar_set_repeat_icon(GdkPixbuf *pixmap)</td><td> </td></tr><tr><td>gcompris.bar_set(flags)</td><td>void gc_bar_set(const GComprisBarFlags flags)</td><td> </td></tr><tr><td>gcompris.bar_hide(hide)</td><td>void gc_bar_hide(gboolean hide)</td><td> </td></tr><tr><td>gcompris.get_canvas()</td><td>GnomeCanvas* gc_get_canvas()</td><td>return a gnome.canvas.Canvas</td></tr><tr><td>gcompris.get_window()</td><td>GtkWidget* gc_get_window(void)</td><td>return a gtk.Widget</td></tr><tr><td>gcompris.get_locale()</td><td>gchar* gc_locale_get(void)</td><td>return a string</td></tr><tr><td>gcompris.set_locale(locale)</td><td>void gc_locale_set(gchar *locale)</td><td> </td></tr><tr><td>gcompris.set_cursor(cursor_type)</td><td>void gc_cursor_set(guint gdk_cursor_type)</td><td> </td></tr><tr><td>gcompris.images_selector_start(gcomprisBoard, dataset, callback)</td><td>void gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset, ImageSelectorCallBack imscb)</t
d><td>The callback must be a callable object</td></tr><tr><td>gcompris.images_selector_stop()</td><td>void gc_selector_images_stop(void)</td><td> </td></tr><tr><td>gcompris.exit()</td><td>void gc_exit(void)</td><td> </td></tr><tr><td>gcompris.log_set_reason (gcomprisBoard, expected, got)</td><td>gc_log_set_reason (GcomprisBoard *gcomprisBoard, gchar *expected, gchar *got)</td><td> </td></tr><tr><td>gcompris.log_end (gcomprisBoard, status)</td><td>gc_log_end (GcomprisBoard *gcomprisBoard, gchar *status)</td><td> </td></tr><tr><td>gcompris.file_selector_load(gcomprisBoard, rootdir, file_types, callback)</td><td>void gc_selector_file_load (GcomprisBoard *gcomprisBoard, gchar *rootdir, gchar *file_types, FileSelectorCallBack fscb)</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.file_selector_save(gcomprisBoard, rootdir, file_types, callback)</td><td>void gc_selector_file_save(GcomprisBoard *gcomprisBoard, gchar *rootdir,gchar *file_types, FileSelectorCal
lBack fscb)</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.file_selector_stop()</td><td>void gc_selector_file_stop(void)</td><td> </td></tr><tr><td>gcompris.get_database()</td><td>gchar* gc_db_get_filename(void)</td><td>return the filename (string) of the database (fullpath)</td></tr></tbody></table></div></div><div class="sect2" title="GComprisBarFlags enum mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2779088"></a>GComprisBarFlags enum mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.BAR_LEVEL</td><td>GCOMPRIS_BAR_LEVEL</td></tr><tr><td>gcompris.BAR_OK</td><td>GCOMPRIS_BAR_OK</td></tr><tr><td>gcompris.BAR_REPEAT</td><td>GCOMPRIS_BAR_REPEAT</td></tr><tr><td>gcompris.BAR_REPEAT_ICON</td><td>GCOMPRIS_BAR_REPEAT_ICON</td></tr><tr><td>gcompris.BAR_CONFIG</td><td>GCOMPRIS_BAR_CONFI
G</td></tr><tr><td>gcompris.BAR_ABOUT</td><td>GCOMPRIS_BAR_ABOUT</td></tr></tbody></table></div></div><div class="sect2" title="Misc constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2779182"></a>Misc constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.BOARD_HEIGHT</td><td>BOARDHEIGHT</td></tr><tr><td>gcompris.BOARD_WIDTH</td><td>BOARDWIDTH</td></tr><tr><td>gcompris.BAR_HEIGHT</td><td>BAR_HEIGHT</td></tr><tr><td>gcompris.DEFAULT_SKIN</td><td>DEFAULT_SKIN</td></tr></tbody></table></div></div><div class="sect2" title="Colors constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2779245"></a>Colors constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th
></tr></thead><tbody><tr><td>gcompris.COLOR_TITLE</td><td>COLOR_TITLE</td></tr><tr><td>gcompris.COLOR_TEXT_BUTTON</td><td>COLOR_TEXT_BUTTON</td></tr><tr><td>gcompris.COLOR_CONTENT</td><td>COLOR_CONTENT</td></tr><tr><td>gcompris.COLOR_SUBTITLE</td><td>COLOR_SUBTITLE</td></tr></tbody></table></div></div><div class="sect2" title="Fonts constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2779304"></a>Fonts constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.FONT_TITLE</td><td>FONT_TITLE</td></tr><tr><td>gcompris.FONT_TITLE_FALLBACK</td><td>FONT_TITLE_FALLBACK</td></tr><tr><td>gcompris.FONT_SUBTITLE</td><td>FONT_SUBTITLE</td></tr><tr><td>gcompris.FONT_SUBTITLE_FALLBACK</td><td>FONT_SUBTITLE_FALLBACK</td></tr><tr><td>gcompris.FONT_CONTENT</td><td>FONT_CONTENT</td></tr><tr><td>gcompris.FONT_CONTENT_
FALLBACK</td><td>FONT_CONTENT_FALLBACK</td></tr></tbody></table></div></div><div class="sect2" title="Board font constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2830431"></a>Board font constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.FONT_BOARD_TINY</td><td>FONT_BOARD_TINY</td></tr><tr><td>gcompris.FONT_BOARD_SMALL</td><td>FONT_BOARD_SMALL</td></tr><tr><td>gcompris.FONT_BOARD_MEDIUM</td><td>FONT_BOARD_MEDIUM</td></tr><tr><td>gcompris.FONT_BOARD_BIG</td><td>FONT_BOARD_BIG</td></tr><tr><td>gcompris.FONT_BOARD_BIG_BOLD</td><td>FONT_BOARD_BIG_BOLD</td></tr><tr><td>gcompris.FONT_BOARD_FIXED</td><td>FONT_BOARD_FIXED</td></tr><tr><td>gcompris.FONT_BOARD_TITLE</td><td>FONT_BOARD_TITLE</td></tr><tr><td>gcompris.FONT_BOARD_TITLE_BOLD</td><td>FONT_BOARD_TITLE_BOLD</td></tr><tr><td>gcompris.FONT_B
OARD_HUGE</td><td>FONT_BOARD_HUGE</td></tr><tr><td>gcompris.FONT_BOARD_HUGE_BOLD</td><td>FONT_BOARD_HUGE_BOLD</td></tr></tbody></table></div></div><div class="sect2" title="Cursor constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2830532"></a>Cursor constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.CURSOR_FIRST_CUSTOM</td><td>GCOMPRIS_FIRST_CUSTOM_CURSOR</td></tr><tr><td>gcompris.CURSOR_LINE</td><td>GCOMPRIS_LINE_CURSOR</td></tr><tr><td>gcompris.CURSOR_FILLRECT</td><td>GCOMPRIS_FILLRECT_CURSOR</td></tr><tr><td>gcompris.CURSOR_RECT</td><td>GCOMPRIS_RECT_CURSOR</td></tr><tr><td>gcompris.CURSOR_FILLCIRCLE</td><td>GCOMPRIS_FILLCIRCLE_CURSOR</td></tr><tr><td>gcompris.CURSOR_CIRCLE</td><td>GCOMPRIS_CIRCLE_CURSOR</td></tr><tr><td>gcompris.CURSOR_DEL</td><td>GCOMPRIS_DEL_CURSOR</td></tr><tr><td>g
compris.CURSOR_FILL</td><td>GCOMPRIS_FILL_CURSOR</td></tr><tr><td>gcompris.CURSOR_SELECT</td><td>GCOMPRIS_SELECT_CURSOR</td></tr><tr><td>gcompris.CURSOR_DEFAULT</td><td>GCOMPRIS_DEFAULT_CURSOR</td></tr></tbody></table></div></div></div><div class="sect1" title="gameutil.h functions and constants Mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2830632"></a>gameutil.h functions and constants Mapping</h2></div></div></div><div class="sect2" title="Functions mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2830638"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.utils.image_to_skin(imagename)</td><td>gchar *gc_skin_image_get(gchar *imagename)</td><td>return a string</td></tr><tr><td>gcompris.skin.load_pixmap(pixmapfile)</td><td>GdkPix
buf *gc_skin_pixmap_load(char *pixmapfile)</td><td>return a gtk.gdk.Pixbuf</td></tr><tr><td>gcompris.utils.load_pixmap(pixmapfile)</td><td>GdkPixbuf *gc_pixmap_load(char *pixmapfile)</td><td>return a gtk.gdk.Pixbuf</td></tr><tr><td>gcompris.utils.find_file_absolute(file)</td><td>char *gc_file_find_absolute(char *file)</td><td>return a string</td></tr><tr><td>gcompris.utils.set_image_focus(item, focus)</td><td>void gc_item_focus_set(GnomeCanvasItem *item, gboolean focus)</td><td> </td></tr><tr><td>gcompris.utils.item_event_focus(item, event, dest_item)</td><td>gint gc_item_focus_event(GnomeCanvasItem *item, GdkEvent *event, GnomeCanvasItem *dest_item)</td><td>return an integer</td></tr><tr><td>gcompris.utils.item_absolute_move(item, x, y)</td><td>void gc_item_absolute_move(GnomeCanvasItem *item, int x, int y)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate(item, angle)</td><td>void gc_item_rotate(GnomeCanvasItem *item, double angle)</td><td> </td></tr><tr><td>gcompris.u
tils.item_rotate_relative(item, angle)</td><td>void gc_item_rotate_relative(GnomeCanvasItem *item, double angle)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate_with_center(item, angle, x, y)</td><td>void gc_item_rotate_with_center(GnomeCanvasItem *item, double angle, int x, int y)</td><td> </td></tr><tr><td>gcompris.utils.item_rotate_relative_with_center(item, angle, x, y)</td><td>void gc_item_rotate_relative_with_center(GnomeCanvasItem *item, double angle, int x, int y)</td><td> </td></tr><tr><td>gcompris.utils.dialog(str, callback)</td><td>void gc_dialog(gchar *str, DialogBoxCallBack callback)</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.utils.dialog_close()</td><td>void gc_dialog_close()</td><td> </td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2830860"></a>Constants mapping</h3></div></div></div><p>
There is no constants in this package.
- </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2534522"></a>bonus.h functions and constants Mapping</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534529"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.bonus.display(BonusStatusList, BonusList)</td><td>void gc_bonus_display(BonusStatusList, BonusList)</td><td> </td></tr><tr><td>gcompris.bonus.board_finished(BoardFinishedList)</td><td>void gc_bonus_end_display(BoardFinishedList)</td><td> </td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534591"></a>Constants mapping (BonusStatusList)</h3></div></div></div><div clas
s="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.bonus.LOOSE</td><td>BOARD_LOOSE</td></tr><tr><td>gcompris.bonus.WIN</td><td>BOARD_WIN</td></tr><tr><td>gcompris.bonus.DRAW</td><td>BOARD_DRAW</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534648"></a>Constants mapping (BonusList)</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.bonus.TIME_CLICK_TO</td><td>TIME_CLICK_TO_BONUS</td></tr><tr><td>gcompris.bonus.RANDOM</td><td>BONUS_RANDOM</td></tr><tr><td>gcompris.bonus.SMILEY</td><td>BONUS_SMILEY</td></tr><tr><td>gcompris.bonus.FLOWER</td><td>BONUS_FLOWER</td></tr><tr><td>gcompris.bonus.TUX</td><td>BONUS_TUX</td></tr><tr><td>gcompris.bonus.GNU</td><td
>BONUS_TUX</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534730"></a>Constants mapping (BoardFinishedList)</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.bonus.FINISHED_RANDOM</td><td>BOARD_FINISHED_RANDOM</td></tr><tr><td>gcompris.bonus.FINISHED_TUXPLANE</td><td>BOARD_FINISHED_TUXPLANE</td></tr><tr><td>gcompris.bonus.FINISHED_TUXLOCO</td><td>BOARD_FINISHED_TUXLOCO</td></tr><tr><td>gcompris.bonus.FINISHED_TOOMANYERRORS</td><td>BOARD_FINISHED_TOOMANYERRORS</td></tr></tbody></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2534799"></a>score.h functions and constants Mapping</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="
title"><a name="id2534805"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.score.start(style, x, y, max)</td><td>void gc_score_start(ScoreStyleList style, guint x, guint y, guint max)</td><td> </td></tr><tr><td>gcompris.score.end()</td><td>void gc_score_end()</td><td> </td></tr><tr><td>gcompris.score.set(value)</td><td>void gc_score_set(guint value)</td><td> </td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534880"></a>Constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.score.STYLE_NOTE</td><td>SCORESTYLE_NOTE</td></tr><tr><td>gcompris.score.STYLE_LIFE</td><td>S
CORESTYLE_LIFE</td></tr></tbody></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2534930"></a>sound.h functions and constants Mapping</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534936"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.sound.play_ogg_list(list)</td><td>void gc_sound_play_ogg_list( GList* files )</td><td>The list argument is a GList</td></tr><tr><td>gcompris.sound.play_ogg(list)</td><td>void gc_sound_play_ogg(char *, ...)</td><td>The list argument is a python list containing strings</td></tr><tr><td>gcompris.sound.play_ogg_cb(list)</td><td>void gc_sound_play_ogg_cb((const gchar *file, GcomprisSoundCallback cb)</td><td>The lis
t argument is a python string and a function callback. It will be called once the sound has been played.</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2535018"></a>Constants mapping</h3></div></div></div><p>
- There is no constants in this package.
- </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2535030"></a>timer.h functions and constants Mapping</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2535036"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.timer.display(x, y, type, second, callback)</td><td>void gcompris_timer_display (int x, int y, TimerList type, int second, GcomprisTimerEnd gcomprisTimerEnd);</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.timer.add(second)</td><td>void gc_timer_add(int second)</td><td> </td></tr><tr><td>gcompris.timer.end()</td><td>void gc_timer_end(void)</td><td> </td></tr><tr><td>gcompris.timer.get_remaining()</td><td>guint gc_time
r_get_remaining()</td><td>Return an integer</td></tr><tr><td>gcompris.timer.pause(pause)</td><td>void gc_timer_pause(gboolean pause)</td><td> </td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2535142"></a>Constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.timer.TEXT</td><td>GCOMPRIS_TIMER_TEXT</td></tr><tr><td>gcompris.timer.SAND</td><td>GCOMPRIS_TIMER_SAND</td></tr><tr><td>gcompris.timer.BALLOON</td><td>GCOMPRIS_TIMER_BALLOON</td></tr><tr><td>gcompris.timer.CLOCK</td><td>GCOMPRIS_TIMER_CLOCK</td></tr></tbody></table></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2535208"></a>anim.h structures Mapping</h2></div></div></div><p>The gcompris.anim module supplies tw
o objects, Animation and CanvasItems, corresponding to GcomprisAnimation and GcomprisAnimCanvasItem respectively.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2535220"></a>Animation</h3></div></div></div><p>The Animation object represents a set of animation files loaded into memory; it has no methods or members, only a constructor and a destructor. The constructor takes a single argument, the name of a text file containing a space-separated list of animation files. Each animation file in the text file corresponds to an animation state; the animations states are numbered from 0 to n-1.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2535236"></a>CanvasItem</h3></div></div></div><p>The CanvasItem object is a bit more interesting than the Animation object. It represents an active instance of an animation file. Its constructor takes two arguments, an Animation and a GnomeCanvasGr
oup (the parent of the desired active animation).</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2535250"></a>Members</h4></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Structure member</th><th>Type</th><th>Readable</th><th>Writable</th></tr></thead><tbody><tr><td>gnome_canvas</td><td>gnome.canvas.CanvasPixbuf</td><td>Y</td><td>N</td></tr><tr><td>num_states</td><td>int</td><td>Y</td><td>N</td></tr></tbody></table></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2535323"></a>Functions</h4></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.anim.CanvasItem.setState(int)</td><td>gc_anim_set_state(GcomprisAnimCanvasItem*, int)</td><td> </td></tr></tbody></ta
ble></div></div></div></div></div></body></html>
+ </p></div></div><div class="sect1" title="bonus.h functions and constants Mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2830872"></a>bonus.h functions and constants Mapping</h2></div></div></div><div class="sect2" title="Functions mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2830878"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.bonus.display(BonusStatusList, BonusList)</td><td>void gc_bonus_display(BonusStatusList, BonusList)</td><td> </td></tr><tr><td>gcompris.bonus.board_finished(BoardFinishedList)</td><td>void gc_bonus_end_display(BoardFinishedList)</td><td> </td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping (BonusStatusList)"><div class="titlepage"><div><div><h3 class="title"><a
name="id2830941"></a>Constants mapping (BonusStatusList)</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.bonus.LOOSE</td><td>BOARD_LOOSE</td></tr><tr><td>gcompris.bonus.WIN</td><td>BOARD_WIN</td></tr><tr><td>gcompris.bonus.DRAW</td><td>BOARD_DRAW</td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping (BonusList)"><div class="titlepage"><div><div><h3 class="title"><a name="id2830982"></a>Constants mapping (BonusList)</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.bonus.TIME_CLICK_TO</td><td>TIME_CLICK_TO_BONUS</td></tr><tr><td>gcompris.bonus.RANDOM</td><td>BONUS_RANDOM</td></tr><tr><td>gcompris.bonus.SMILEY</td><td>BONUS_SMILEY</td></tr><tr><td>gcompris.bonus.FLOWER</t
d><td>BONUS_FLOWER</td></tr><tr><td>gcompris.bonus.TUX</td><td>BONUS_TUX</td></tr><tr><td>gcompris.bonus.GNU</td><td>BONUS_TUX</td></tr><tr><td>gcompris.bonus.LION</td><td>BONUS_LION</td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping (BoardFinishedList)"><div class="titlepage"><div><div><h3 class="title"><a name="id2831066"></a>Constants mapping (BoardFinishedList)</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.bonus.FINISHED_RANDOM</td><td>BOARD_FINISHED_RANDOM</td></tr><tr><td>gcompris.bonus.FINISHED_TUXPLANE</td><td>BOARD_FINISHED_TUXPLANE</td></tr><tr><td>gcompris.bonus.FINISHED_TUXLOCO</td><td>BOARD_FINISHED_TUXLOCO</td></tr><tr><td>gcompris.bonus.FINISHED_TOOMANYERRORS</td><td>BOARD_FINISHED_TOOMANYERRORS</td></tr></tbody></table></div></div></div><div class="sect1" title="score.h functions and con
stants Mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2831132"></a>score.h functions and constants Mapping</h2></div></div></div><div class="sect2" title="Functions mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2831139"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.score.start(style, x, y, max)</td><td>void gc_score_start(ScoreStyleList style, guint x, guint y, guint max)</td><td> </td></tr><tr><td>gcompris.score.end()</td><td>void gc_score_end()</td><td> </td></tr><tr><td>gcompris.score.set(value)</td><td>void gc_score_set(guint value)</td><td> </td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2831211"></a>Constants mapping</h3></
div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.score.STYLE_NOTE</td><td>SCORESTYLE_NOTE</td></tr><tr><td>gcompris.score.STYLE_LIFE</td><td>SCORESTYLE_LIFE</td></tr></tbody></table></div></div></div><div class="sect1" title="soundutil.h functions and constants Mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2831257"></a>soundutil.h functions and constants Mapping</h2></div></div></div><div class="sect2" title="Functions mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2831264"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.sound.play_ogg_list(list)</td><td>void gc_sound_play_ogg_list( GList* fil
es )</td><td>The list argument is a python list
+ <pre class="programlisting">
+import gcompris.sound
+
+sounds=["sounds/Harbor1.wav", "sounds/Harbor3.ogg"]
+gcompris.sound.play_ogg(sounds)
+ </pre>
+ </td></tr><tr><td>gcompris.sound.play_ogg(file1, ...)</td><td>void gc_sound_play_ogg(char *, ...)</td><td>Play all the given files.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.play_ogg("sounds/Harbor1.wav", "sounds/Harbor3.ogg")
+ </pre>
+ </td></tr><tr><td>gcompris.sound.play_ogg_cb(list, callback)</td><td>void gc_sound_play_ogg_cb((const gchar *file, GcomprisSoundCallback cb)</td><td>The list argument is a python string and a function callback. It will be called once the sound has been played.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.play_ogg_cb("melody/into.ogg", self.intro_cb)
+
+def intro_cb(self, file):
+ print "intro passed. go play"
+ self.pause(False)
+ </pre>
+ </td></tr><tr><td>gcompris.sound.policy_get()</td><td>int gc_sound_policy_get()</td><td>Returns the current sound policy.
+ <pre class="programlisting">
+import gcompris.sound
+
+self.saved_policy = gcompris.sound.policy_get()
+ </pre>
+ </td></tr><tr><td>gcompris.sound.policy_set(policy)</td><td>void gc_sound_policy_set(int)</td><td>Set the sound policy.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.policy_set(gcompris.sound.PLAY_AND_INTERRUPT)
+ </pre>
+ </td></tr><tr><td>gcompris.sound.pause()</td><td>void gc_sound_bg_pause()</td><td>Pause the background music.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.pause()
+ </pre>
+ </td></tr><tr><td>gcompris.sound.resume()</td><td>void gc_sound_bg_resume()</td><td>Resume the background music.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.resume()
+ </pre>
+ </td></tr><tr><td>gcompris.sound.close()</td><td>void gc_sound_close()</td><td>Close the audio channel. This is usefull to start an external programm which may then access the audio device on the system.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.close()
+ </pre>
+ </td></tr><tr><td>gcompris.sound.reopen()</td><td>void gc_sound_reopen()</td><td>Reopen the audio channel to be used by GCompris.
+ <pre class="programlisting">
+import gcompris.sound
+
+gcompris.sound.reopen()
+ </pre>
+ </td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping"><div class="titlepage"><div><div><h3 class="title"><a name="id2831491"></a>Constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.sound.PLAY_ONLY_IF_IDLE</td><td>PLAY_ONLY_IF_IDLE (Discard play request if busy)</td></tr><tr><td>gcompris.sound.PLAY_AFTER_CURRENT</td><td>PLAY_AFTER_CURRENT Default value, queue mode()</td></tr><tr><td>gcompris.sound.PLAY_AND_INTERRUPT</td><td>PLAY_AND_INTERRUPT (Interrupt current play with the new one)</td></tr></tbody></table></div></div></div><div class="sect1" title="timer.h functions and constants Mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2831550"></a>timer.h functions and constants Mapping</h2></div></div></div><div class="sect2" title="Functions mapping"><
div class="titlepage"><div><div><h3 class="title"><a name="id2831556"></a>Functions mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.timer.display(x, y, type, second, callback)</td><td>void gcompris_timer_display (int x, int y, TimerList type, int second, GcomprisTimerEnd gcomprisTimerEnd);</td><td>The callback must be a callable object</td></tr><tr><td>gcompris.timer.add(second)</td><td>void gc_timer_add(int second)</td><td> </td></tr><tr><td>gcompris.timer.end()</td><td>void gc_timer_end(void)</td><td> </td></tr><tr><td>gcompris.timer.get_remaining()</td><td>guint gc_timer_get_remaining()</td><td>Return an integer</td></tr><tr><td>gcompris.timer.pause(pause)</td><td>void gc_timer_pause(gboolean pause)</td><td> </td></tr></tbody></table></div></div><div class="sect2" title="Constants mapping"><div class="tit
lepage"><div><div><h3 class="title"><a name="id2831657"></a>Constants mapping</h3></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Python constant</th><th>C equivalent</th></tr></thead><tbody><tr><td>gcompris.timer.TEXT</td><td>GCOMPRIS_TIMER_TEXT</td></tr><tr><td>gcompris.timer.SAND</td><td>GCOMPRIS_TIMER_SAND</td></tr><tr><td>gcompris.timer.BALLOON</td><td>GCOMPRIS_TIMER_BALLOON</td></tr><tr><td>gcompris.timer.CLOCK</td><td>GCOMPRIS_TIMER_CLOCK</td></tr></tbody></table></div></div></div><div class="sect1" title="anim.h structures Mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2831719"></a>anim.h structures Mapping</h2></div></div></div><p>The gcompris.anim module supplies two objects, Animation and CanvasItems, corresponding to GcomprisAnimation and GcomprisAnimCanvasItem respectively.</p><div class="sect2" title="Animation"><div class="titlepage"><div><div><h3 class="ti
tle"><a name="id2831730"></a>Animation</h3></div></div></div><p>The Animation object represents a set of animation files loaded into memory; it has no methods or members, only a constructor and a destructor. The constructor takes a single argument, the name of a text file containing a space-separated list of animation files. Each animation file in the text file corresponds to an animation state; the animations states are numbered from 0 to n-1.</p></div><div class="sect2" title="CanvasItem"><div class="titlepage"><div><div><h3 class="title"><a name="id2831746"></a>CanvasItem</h3></div></div></div><p>The CanvasItem object is a bit more interesting than the Animation object. It represents an active instance of an animation file. Its constructor takes two arguments, an Animation and a GnomeCanvasGroup (the parent of the desired active animation).</p><div class="sect3" title="Members"><div class="titlepage"><div><div><h4 class="title"><a name="id2831759"></a>Members</h4></div></
div></div><div class="informaltable"><table border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Structure member</th><th>Type</th><th>Readable</th><th>Writable</th></tr></thead><tbody><tr><td>gnome_canvas</td><td>gnome.canvas.CanvasPixbuf</td><td>Y</td><td>N</td></tr><tr><td>num_states</td><td>int</td><td>Y</td><td>N</td></tr></tbody></table></div></div><div class="sect3" title="Functions"><div class="titlepage"><div><div><h4 class="title"><a name="id2831828"></a>Functions</h4></div></div></div><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python function</th><th>C equivalent</th><th>Notes</th></tr></thead><tbody><tr><td>gcompris.anim.CanvasItem.setState(int)</td><td>gc_anim_set_state(GcomprisAnimCanvasItem*, int)</td><td> </td></tr></tbody></table></div></div></div></div></div></body></html>
diff --git a/docs/C/python.xml b/docs/C/python.xml
index 08cc71b..da846b6 100644
--- a/docs/C/python.xml
+++ b/docs/C/python.xml
@@ -21,24 +21,9 @@ xsltproc -o python.html http://docbook.sourceforge.net/release/xsl/current/html/
<date>February 2003</date>
<revhistory>
<revision>
- <revnumber>0.1</revnumber>
- <date>February 2003</date>
- </revision>
- <revision>
- <revnumber>0.2</revnumber>
- <date>April 2003</date>
- </revision>
- <revision>
- <revnumber>0.3</revnumber>
- <date>January 2004</date>
- </revision>
- <revision>
- <revnumber>0.4</revnumber>
- <date>January 2005</date>
- </revision>
- <revision>
- <revnumber>0.5</revnumber>
- <date>December 2006</date>
+ <revnumber>0.7</revnumber>
+ <date>July 2010</date>
+ <revremark>Updated documentation of the sound API.</revremark>
</revision>
</revhistory>
</articleinfo>
@@ -715,7 +700,7 @@ attribute is readeable and/or writable.</para>
</sect1>
<sect1>
- <title>sound.h functions and constants Mapping</title>
+ <title>soundutil.h functions and constants Mapping</title>
<sect2>
<title>Functions mapping</title>
<informaltable>
@@ -731,18 +716,115 @@ attribute is readeable and/or writable.</para>
<row>
<entry>gcompris.sound.play_ogg_list(list)</entry>
<entry>void gc_sound_play_ogg_list( GList* files )</entry>
- <entry>The list argument is a GList</entry>
+ <entry>The list argument is a python list
+ <programlisting>
+import gcompris.sound
+
+sounds=["sounds/Harbor1.wav", "sounds/Harbor3.ogg"]
+gcompris.sound.play_ogg(sounds)
+ </programlisting>
+ </entry>
</row>
<row>
- <entry>gcompris.sound.play_ogg(list)</entry>
+ <entry>gcompris.sound.play_ogg(file1, ...)</entry>
<entry>void gc_sound_play_ogg(char *, ...)</entry>
- <entry>The list argument is a python list containing strings</entry>
+ <entry>Play all the given files.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.play_ogg("sounds/Harbor1.wav", "sounds/Harbor3.ogg")
+ </programlisting>
+ </entry>
</row>
+
<row>
- <entry>gcompris.sound.play_ogg_cb(list)</entry>
+ <entry>gcompris.sound.play_ogg_cb(list, callback)</entry>
<entry>void gc_sound_play_ogg_cb((const gchar *file, GcomprisSoundCallback cb)</entry>
- <entry>The list argument is a python string and a function callback. It will be called once the sound has been played.</entry>
+ <entry>The list argument is a python string and a function callback. It will be called once the sound has been played.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.play_ogg_cb("melody/into.ogg", self.intro_cb)
+
+def intro_cb(self, file):
+ print "intro passed. go play"
+ self.pause(False)
+ </programlisting>
+ </entry>
+ </row>
+
+ <row>
+ <entry>gcompris.sound.policy_get()</entry>
+ <entry>int gc_sound_policy_get()</entry>
+ <entry>Returns the current sound policy.
+ <programlisting>
+import gcompris.sound
+
+self.saved_policy = gcompris.sound.policy_get()
+ </programlisting>
+ </entry>
+ </row>
+
+ <row>
+ <entry>gcompris.sound.policy_set(policy)</entry>
+ <entry>void gc_sound_policy_set(int)</entry>
+ <entry>Set the sound policy.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.policy_set(gcompris.sound.PLAY_AND_INTERRUPT)
+ </programlisting>
+ </entry>
+ </row>
+
+ <row>
+ <entry>gcompris.sound.pause()</entry>
+ <entry>void gc_sound_bg_pause()</entry>
+ <entry>Pause the background music.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.pause()
+ </programlisting>
+ </entry>
+ </row>
+
+ <row>
+ <entry>gcompris.sound.resume()</entry>
+ <entry>void gc_sound_bg_resume()</entry>
+ <entry>Resume the background music.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.resume()
+ </programlisting>
+ </entry>
+ </row>
+
+ <row>
+ <entry>gcompris.sound.close()</entry>
+ <entry>void gc_sound_close()</entry>
+ <entry>Close the audio channel. This is usefull to start an external programm which may then access the audio device on the system.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.close()
+ </programlisting>
+ </entry>
</row>
+
+ <row>
+ <entry>gcompris.sound.reopen()</entry>
+ <entry>void gc_sound_reopen()</entry>
+ <entry>Reopen the audio channel to be used by GCompris.
+ <programlisting>
+import gcompris.sound
+
+gcompris.sound.reopen()
+ </programlisting>
+ </entry>
+ </row>
+
</tbody>
</tgroup>
</informaltable>
@@ -751,9 +833,24 @@ attribute is readeable and/or writable.</para>
<sect2>
<title>Constants mapping</title>
- <para>
- There is no constants in this package.
- </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Python constant</entry>
+ <entry>C equivalent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>gcompris.sound.PLAY_ONLY_IF_IDLE</entry>
+ <entry>PLAY_ONLY_IF_IDLE (Discard play request if busy)</entry></row>
+ <row><entry>gcompris.sound.PLAY_AFTER_CURRENT</entry>
+ <entry>PLAY_AFTER_CURRENT Default value, queue mode()</entry></row>
+ <row><entry>gcompris.sound.PLAY_AND_INTERRUPT</entry>
+ <entry>PLAY_AND_INTERRUPT (Interrupt current play with the new one)</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
</sect2>
</sect1>
diff --git a/src/gcompris/soundutil.h b/src/gcompris/soundutil.h
index 9dddc59..50d2661 100644
--- a/src/gcompris/soundutil.h
+++ b/src/gcompris/soundutil.h
@@ -26,9 +26,9 @@
typedef enum
{
- PLAY_ONLY_IF_IDLE = 0,
- PLAY_AFTER_CURRENT = 1,
- PLAY_AND_INTERRUPT = 2,
+ PLAY_ONLY_IF_IDLE = 0, /* Discard play request if busy */
+ PLAY_AFTER_CURRENT = 1, /* Default value, queue mode */
+ PLAY_AND_INTERRUPT = 2, /* Interrupt current play with the new one */
} SoundPolicy;
typedef void (*GcomprisSoundCallback) (gchar *);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]