diff options
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml')
-rw-r--r-- | src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml | 321 |
1 files changed, 321 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml new file mode 100644 index 0000000..d9d6e36 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml | |||
@@ -0,0 +1,321 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> | ||
4 | <refentry id="libg3d-context"> | ||
5 | <refmeta> | ||
6 | <refentrytitle role="top_of_page" id="libg3d-context.top_of_page">context</refentrytitle> | ||
7 | <manvolnum>3</manvolnum> | ||
8 | <refmiscinfo>LIBG3D Library</refmiscinfo> | ||
9 | </refmeta> | ||
10 | |||
11 | <refnamediv> | ||
12 | <refname>context</refname> | ||
13 | <refpurpose>Libg3d initialization and configuration</refpurpose> | ||
14 | <!--[<xref linkend="desc" endterm="desc.title"/>]--> | ||
15 | </refnamediv> | ||
16 | |||
17 | <refsynopsisdiv id="libg3d-context.synopsis" role="synopsis"> | ||
18 | <title role="synopsis.title">Synopsis</title> | ||
19 | |||
20 | <synopsis> | ||
21 | |||
22 | #include <g3d/g3d.h> | ||
23 | |||
24 | <link linkend="G3DContext">G3DContext</link>; | ||
25 | <link linkend="G3DContext">G3DContext</link>* <link linkend="g3d-context-new">g3d_context_new</link> (void); | ||
26 | <link linkend="void">void</link> <link linkend="g3d-context-free">g3d_context_free</link> (<link linkend="G3DContext">G3DContext</link> *context); | ||
27 | <link linkend="gboolean">gboolean</link> (<link linkend="G3DSetBgColorFunc">*G3DSetBgColorFunc</link>) (<link linkend="G3DFloat">G3DFloat</link> r, | ||
28 | <link linkend="G3DFloat">G3DFloat</link> g, | ||
29 | <link linkend="G3DFloat">G3DFloat</link> b, | ||
30 | <link linkend="G3DFloat">G3DFloat</link> a, | ||
31 | <link linkend="gpointer">gpointer</link> user_data); | ||
32 | <link linkend="gboolean">gboolean</link> (<link linkend="G3DUpdateInterfaceFunc">*G3DUpdateInterfaceFunc</link>) (<link linkend="gpointer">gpointer</link> user_data); | ||
33 | <link linkend="gboolean">gboolean</link> (<link linkend="G3DUpdateProgressBarFunc">*G3DUpdateProgressBarFunc</link>) (<link linkend="G3DFloat">G3DFloat</link> percentage, | ||
34 | <link linkend="gboolean">gboolean</link> show, | ||
35 | <link linkend="gpointer">gpointer</link> user_data); | ||
36 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-context-update-interface">g3d_context_update_interface</link> (<link linkend="G3DContext">G3DContext</link> *context); | ||
37 | <link linkend="void">void</link> <link linkend="g3d-context-set-update-interface-func">g3d_context_set_update_interface_func</link> | ||
38 | (<link linkend="G3DContext">G3DContext</link> *context, | ||
39 | <link linkend="G3DUpdateInterfaceFunc">G3DUpdateInterfaceFunc</link> func, | ||
40 | <link linkend="gpointer">gpointer</link> user_data); | ||
41 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-context-update-progress-bar">g3d_context_update_progress_bar</link> (<link linkend="G3DContext">G3DContext</link> *context, | ||
42 | <link linkend="G3DFloat">G3DFloat</link> percentage, | ||
43 | <link linkend="gboolean">gboolean</link> visibility); | ||
44 | <link linkend="void">void</link> <link linkend="g3d-context-set-update-progress-bar-func">g3d_context_set_update_progress_bar_func</link> | ||
45 | (<link linkend="G3DContext">G3DContext</link> *context, | ||
46 | <link linkend="G3DUpdateProgressBarFunc">G3DUpdateProgressBarFunc</link> func, | ||
47 | <link linkend="gpointer">gpointer</link> user_data); | ||
48 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-context-set-bgcolor">g3d_context_set_bgcolor</link> (<link linkend="G3DContext">G3DContext</link> *context, | ||
49 | <link linkend="G3DFloat">G3DFloat</link> r, | ||
50 | <link linkend="G3DFloat">G3DFloat</link> g, | ||
51 | <link linkend="G3DFloat">G3DFloat</link> b, | ||
52 | <link linkend="G3DFloat">G3DFloat</link> a); | ||
53 | <link linkend="void">void</link> <link linkend="g3d-context-set-set-bgcolor-func">g3d_context_set_set_bgcolor_func</link> (<link linkend="G3DContext">G3DContext</link> *context, | ||
54 | <link linkend="G3DSetBgColorFunc">G3DSetBgColorFunc</link> func, | ||
55 | <link linkend="gpointer">gpointer</link> user_data); | ||
56 | </synopsis> | ||
57 | </refsynopsisdiv> | ||
58 | |||
59 | |||
60 | |||
61 | |||
62 | |||
63 | |||
64 | |||
65 | |||
66 | |||
67 | <refsect1 id="libg3d-context.description" role="desc"> | ||
68 | <title role="desc.title">Description</title> | ||
69 | <para> | ||
70 | All state information is saved in the context. It also serves as an | ||
71 | interface to the application.</para> | ||
72 | <para> | ||
73 | |||
74 | </para> | ||
75 | </refsect1> | ||
76 | |||
77 | <refsect1 id="libg3d-context.details" role="details"> | ||
78 | <title role="details.title">Details</title> | ||
79 | <refsect2 id="G3DContext" role="struct"> | ||
80 | <title>G3DContext</title> | ||
81 | <indexterm zone="G3DContext"><primary>G3DContext</primary></indexterm><programlisting>typedef struct { | ||
82 | } G3DContext; | ||
83 | </programlisting> | ||
84 | <para> | ||
85 | Internal stuff for libg3d.</para> | ||
86 | <para> | ||
87 | |||
88 | </para></refsect2> | ||
89 | <refsect2 id="g3d-context-new" role="function"> | ||
90 | <title>g3d_context_new ()</title> | ||
91 | <indexterm zone="g3d-context-new"><primary>g3d_context_new</primary></indexterm><programlisting><link linkend="G3DContext">G3DContext</link>* g3d_context_new (void);</programlisting> | ||
92 | <para> | ||
93 | Create a new context. This initializes the library (and also the | ||
94 | plugin system so this has not to be done seperately).</para> | ||
95 | <para> | ||
96 | |||
97 | </para><variablelist role="params"> | ||
98 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a valid context, or NULL on failure. | ||
99 | </simpara></listitem></varlistentry> | ||
100 | </variablelist></refsect2> | ||
101 | <refsect2 id="g3d-context-free" role="function"> | ||
102 | <title>g3d_context_free ()</title> | ||
103 | <indexterm zone="g3d-context-free"><primary>g3d_context_free</primary></indexterm><programlisting><link linkend="void">void</link> g3d_context_free (<link linkend="G3DContext">G3DContext</link> *context);</programlisting> | ||
104 | <para> | ||
105 | Cleans up the context and the plugin system and frees all reserved | ||
106 | memory.</para> | ||
107 | <para> | ||
108 | |||
109 | </para><variablelist role="params"> | ||
110 | <varlistentry><term><parameter>context</parameter> :</term> | ||
111 | <listitem><simpara> the context to free | ||
112 | </simpara></listitem></varlistentry> | ||
113 | </variablelist></refsect2> | ||
114 | <refsect2 id="G3DSetBgColorFunc" role="function"> | ||
115 | <title>G3DSetBgColorFunc ()</title> | ||
116 | <indexterm zone="G3DSetBgColorFunc"><primary>G3DSetBgColorFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*G3DSetBgColorFunc) (<link linkend="G3DFloat">G3DFloat</link> r, | ||
117 | <link linkend="G3DFloat">G3DFloat</link> g, | ||
118 | <link linkend="G3DFloat">G3DFloat</link> b, | ||
119 | <link linkend="G3DFloat">G3DFloat</link> a, | ||
120 | <link linkend="gpointer">gpointer</link> user_data);</programlisting> | ||
121 | <para> | ||
122 | Background color setting callback.</para> | ||
123 | <para> | ||
124 | |||
125 | </para><variablelist role="params"> | ||
126 | <varlistentry><term><parameter>r</parameter> :</term> | ||
127 | <listitem><simpara> red component | ||
128 | </simpara></listitem></varlistentry> | ||
129 | <varlistentry><term><parameter>g</parameter> :</term> | ||
130 | <listitem><simpara> green component | ||
131 | </simpara></listitem></varlistentry> | ||
132 | <varlistentry><term><parameter>b</parameter> :</term> | ||
133 | <listitem><simpara> blue component | ||
134 | </simpara></listitem></varlistentry> | ||
135 | <varlistentry><term><parameter>a</parameter> :</term> | ||
136 | <listitem><simpara> alpha component | ||
137 | </simpara></listitem></varlistentry> | ||
138 | <varlistentry><term><parameter>user_data</parameter> :</term> | ||
139 | <listitem><simpara> opaque data as given to <link linkend="g3d-context-set-set-bgcolor-func"><function>g3d_context_set_set_bgcolor_func()</function></link> | ||
140 | </simpara></listitem></varlistentry> | ||
141 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else. | ||
142 | </simpara></listitem></varlistentry> | ||
143 | </variablelist></refsect2> | ||
144 | <refsect2 id="G3DUpdateInterfaceFunc" role="function"> | ||
145 | <title>G3DUpdateInterfaceFunc ()</title> | ||
146 | <indexterm zone="G3DUpdateInterfaceFunc"><primary>G3DUpdateInterfaceFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*G3DUpdateInterfaceFunc) (<link linkend="gpointer">gpointer</link> user_data);</programlisting> | ||
147 | <para> | ||
148 | Interface updating callback.</para> | ||
149 | <para> | ||
150 | |||
151 | </para><variablelist role="params"> | ||
152 | <varlistentry><term><parameter>user_data</parameter> :</term> | ||
153 | <listitem><simpara> opaque data as given to <link linkend="g3d-context-set-update-interface-func"><function>g3d_context_set_update_interface_func()</function></link> | ||
154 | </simpara></listitem></varlistentry> | ||
155 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else. | ||
156 | </simpara></listitem></varlistentry> | ||
157 | </variablelist></refsect2> | ||
158 | <refsect2 id="G3DUpdateProgressBarFunc" role="function"> | ||
159 | <title>G3DUpdateProgressBarFunc ()</title> | ||
160 | <indexterm zone="G3DUpdateProgressBarFunc"><primary>G3DUpdateProgressBarFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*G3DUpdateProgressBarFunc) (<link linkend="G3DFloat">G3DFloat</link> percentage, | ||
161 | <link linkend="gboolean">gboolean</link> show, | ||
162 | <link linkend="gpointer">gpointer</link> user_data);</programlisting> | ||
163 | <para> | ||
164 | Progress updating callback.</para> | ||
165 | <para> | ||
166 | |||
167 | </para><variablelist role="params"> | ||
168 | <varlistentry><term><parameter>percentage</parameter> :</term> | ||
169 | <listitem><simpara> progress of plugin operation | ||
170 | </simpara></listitem></varlistentry> | ||
171 | <varlistentry><term><parameter>show</parameter> :</term> | ||
172 | <listitem><simpara> <link linkend="TRUE:CAPS"><type>TRUE</type></link> if the progress bar should be visible, <link linkend="FALSE:CAPS"><type>FALSE</type></link> else | ||
173 | </simpara></listitem></varlistentry> | ||
174 | <varlistentry><term><parameter>user_data</parameter> :</term> | ||
175 | <listitem><simpara> opaque data as given to | ||
176 | <link linkend="g3d-context-set-update-progress-bar-func"><function>g3d_context_set_update_progress_bar_func()</function></link> | ||
177 | </simpara></listitem></varlistentry> | ||
178 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else. | ||
179 | </simpara></listitem></varlistentry> | ||
180 | </variablelist></refsect2> | ||
181 | <refsect2 id="g3d-context-update-interface" role="function"> | ||
182 | <title>g3d_context_update_interface ()</title> | ||
183 | <indexterm zone="g3d-context-update-interface"><primary>g3d_context_update_interface</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_context_update_interface (<link linkend="G3DContext">G3DContext</link> *context);</programlisting> | ||
184 | <para> | ||
185 | Try to update the interface. This will call a function registered with | ||
186 | <parameter>g3d_context_set_update_interface_func</parameter>.</para> | ||
187 | <para> | ||
188 | |||
189 | </para><variablelist role="params"> | ||
190 | <varlistentry><term><parameter>context</parameter> :</term> | ||
191 | <listitem><simpara> a valid context | ||
192 | </simpara></listitem></varlistentry> | ||
193 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
194 | </simpara></listitem></varlistentry> | ||
195 | </variablelist></refsect2> | ||
196 | <refsect2 id="g3d-context-set-update-interface-func" role="function"> | ||
197 | <title>g3d_context_set_update_interface_func ()</title> | ||
198 | <indexterm zone="g3d-context-set-update-interface-func"><primary>g3d_context_set_update_interface_func</primary></indexterm><programlisting><link linkend="void">void</link> g3d_context_set_update_interface_func | ||
199 | (<link linkend="G3DContext">G3DContext</link> *context, | ||
200 | <link linkend="G3DUpdateInterfaceFunc">G3DUpdateInterfaceFunc</link> func, | ||
201 | <link linkend="gpointer">gpointer</link> user_data);</programlisting> | ||
202 | <para> | ||
203 | Registers a callback function for updating the interface.</para> | ||
204 | <para> | ||
205 | |||
206 | </para><variablelist role="params"> | ||
207 | <varlistentry><term><parameter>context</parameter> :</term> | ||
208 | <listitem><simpara> a valid context | ||
209 | </simpara></listitem></varlistentry> | ||
210 | <varlistentry><term><parameter>func</parameter> :</term> | ||
211 | <listitem><simpara> the callback function | ||
212 | </simpara></listitem></varlistentry> | ||
213 | <varlistentry><term><parameter>user_data</parameter> :</term> | ||
214 | <listitem><simpara> user-defined opaque pointer | ||
215 | </simpara></listitem></varlistentry> | ||
216 | </variablelist></refsect2> | ||
217 | <refsect2 id="g3d-context-update-progress-bar" role="function"> | ||
218 | <title>g3d_context_update_progress_bar ()</title> | ||
219 | <indexterm zone="g3d-context-update-progress-bar"><primary>g3d_context_update_progress_bar</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_context_update_progress_bar (<link linkend="G3DContext">G3DContext</link> *context, | ||
220 | <link linkend="G3DFloat">G3DFloat</link> percentage, | ||
221 | <link linkend="gboolean">gboolean</link> visibility);</programlisting> | ||
222 | <para> | ||
223 | Try to update the progress bar.</para> | ||
224 | <para> | ||
225 | |||
226 | </para><variablelist role="params"> | ||
227 | <varlistentry><term><parameter>context</parameter> :</term> | ||
228 | <listitem><simpara> a valid context | ||
229 | </simpara></listitem></varlistentry> | ||
230 | <varlistentry><term><parameter>percentage</parameter> :</term> | ||
231 | <listitem><simpara> the percentage to set on the progress bar | ||
232 | </simpara></listitem></varlistentry> | ||
233 | <varlistentry><term><parameter>visibility</parameter> :</term> | ||
234 | <listitem><simpara> show or hide the progress bar | ||
235 | </simpara></listitem></varlistentry> | ||
236 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
237 | </simpara></listitem></varlistentry> | ||
238 | </variablelist></refsect2> | ||
239 | <refsect2 id="g3d-context-set-update-progress-bar-func" role="function"> | ||
240 | <title>g3d_context_set_update_progress_bar_func ()</title> | ||
241 | <indexterm zone="g3d-context-set-update-progress-bar-func"><primary>g3d_context_set_update_progress_bar_func</primary></indexterm><programlisting><link linkend="void">void</link> g3d_context_set_update_progress_bar_func | ||
242 | (<link linkend="G3DContext">G3DContext</link> *context, | ||
243 | <link linkend="G3DUpdateProgressBarFunc">G3DUpdateProgressBarFunc</link> func, | ||
244 | <link linkend="gpointer">gpointer</link> user_data);</programlisting> | ||
245 | <para> | ||
246 | Registers a callback function for updating the progress bar.</para> | ||
247 | <para> | ||
248 | |||
249 | </para><variablelist role="params"> | ||
250 | <varlistentry><term><parameter>context</parameter> :</term> | ||
251 | <listitem><simpara> a valid context | ||
252 | </simpara></listitem></varlistentry> | ||
253 | <varlistentry><term><parameter>func</parameter> :</term> | ||
254 | <listitem><simpara> the callback function | ||
255 | </simpara></listitem></varlistentry> | ||
256 | <varlistentry><term><parameter>user_data</parameter> :</term> | ||
257 | <listitem><simpara> user-defined opaque pointer | ||
258 | </simpara></listitem></varlistentry> | ||
259 | </variablelist></refsect2> | ||
260 | <refsect2 id="g3d-context-set-bgcolor" role="function"> | ||
261 | <title>g3d_context_set_bgcolor ()</title> | ||
262 | <indexterm zone="g3d-context-set-bgcolor"><primary>g3d_context_set_bgcolor</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_context_set_bgcolor (<link linkend="G3DContext">G3DContext</link> *context, | ||
263 | <link linkend="G3DFloat">G3DFloat</link> r, | ||
264 | <link linkend="G3DFloat">G3DFloat</link> g, | ||
265 | <link linkend="G3DFloat">G3DFloat</link> b, | ||
266 | <link linkend="G3DFloat">G3DFloat</link> a);</programlisting> | ||
267 | <para> | ||
268 | Try to set the background color. This will call a function registered | ||
269 | with <link><parameter>g3d_context_set_set_bgcolor_func</parameter></link>.</para> | ||
270 | <para> | ||
271 | |||
272 | </para><variablelist role="params"> | ||
273 | <varlistentry><term><parameter>context</parameter> :</term> | ||
274 | <listitem><simpara> a valid context | ||
275 | </simpara></listitem></varlistentry> | ||
276 | <varlistentry><term><parameter>r</parameter> :</term> | ||
277 | <listitem><simpara> red component (range: 0.0 .. 1.0) | ||
278 | </simpara></listitem></varlistentry> | ||
279 | <varlistentry><term><parameter>g</parameter> :</term> | ||
280 | <listitem><simpara> green component (range: 0.0 .. 1.0) | ||
281 | </simpara></listitem></varlistentry> | ||
282 | <varlistentry><term><parameter>b</parameter> :</term> | ||
283 | <listitem><simpara> green component (range: 0.0 .. 1.0) | ||
284 | </simpara></listitem></varlistentry> | ||
285 | <varlistentry><term><parameter>a</parameter> :</term> | ||
286 | <listitem><simpara> alpha component | ||
287 | </simpara></listitem></varlistentry> | ||
288 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
289 | </simpara></listitem></varlistentry> | ||
290 | </variablelist></refsect2> | ||
291 | <refsect2 id="g3d-context-set-set-bgcolor-func" role="function"> | ||
292 | <title>g3d_context_set_set_bgcolor_func ()</title> | ||
293 | <indexterm zone="g3d-context-set-set-bgcolor-func"><primary>g3d_context_set_set_bgcolor_func</primary></indexterm><programlisting><link linkend="void">void</link> g3d_context_set_set_bgcolor_func (<link linkend="G3DContext">G3DContext</link> *context, | ||
294 | <link linkend="G3DSetBgColorFunc">G3DSetBgColorFunc</link> func, | ||
295 | <link linkend="gpointer">gpointer</link> user_data);</programlisting> | ||
296 | <para> | ||
297 | Registers a callback function for setting the background color.</para> | ||
298 | <para> | ||
299 | |||
300 | </para><variablelist role="params"> | ||
301 | <varlistentry><term><parameter>context</parameter> :</term> | ||
302 | <listitem><simpara> a valid context | ||
303 | </simpara></listitem></varlistentry> | ||
304 | <varlistentry><term><parameter>func</parameter> :</term> | ||
305 | <listitem><simpara> the callback function | ||
306 | </simpara></listitem></varlistentry> | ||
307 | <varlistentry><term><parameter>user_data</parameter> :</term> | ||
308 | <listitem><simpara> user-defined opaque pointer | ||
309 | </simpara></listitem></varlistentry> | ||
310 | </variablelist></refsect2> | ||
311 | |||
312 | </refsect1> | ||
313 | |||
314 | |||
315 | |||
316 | <refsect1 id="libg3d-context.see-also"> | ||
317 | <title>See Also</title> | ||
318 | <link linkend="G3DContext"><type>G3DContext</type></link> | ||
319 | </refsect1> | ||
320 | |||
321 | </refentry> | ||