diff options
Diffstat (limited to '')
-rw-r--r-- | src/others/mimesh/libg3d-0.0.8/include/g3d/context.h | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/include/g3d/context.h b/src/others/mimesh/libg3d-0.0.8/include/g3d/context.h new file mode 100644 index 0000000..26b2134 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/include/g3d/context.h | |||
@@ -0,0 +1,149 @@ | |||
1 | /* $Id$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU Lesser General Public | ||
10 | License as published by the Free Software Foundation; either | ||
11 | version 2.1 of the License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | Lesser General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef __G3D_CONTEXT_H__ | ||
24 | #define __G3D_CONTEXT_H__ | ||
25 | |||
26 | #include <g3d/types.h> | ||
27 | |||
28 | #ifdef __cplusplus | ||
29 | extern "C" { | ||
30 | #endif /* ifdef __cplusplus */ | ||
31 | |||
32 | |||
33 | /** | ||
34 | * SECTION:context | ||
35 | * @short_description: Libg3d initialization and configuration | ||
36 | * @see_also: #G3DContext | ||
37 | * @include: g3d/g3d.h | ||
38 | * | ||
39 | * All state information is saved in the context. It also serves as an | ||
40 | * interface to the application. | ||
41 | */ | ||
42 | |||
43 | |||
44 | /** | ||
45 | * g3d_context_new: | ||
46 | * | ||
47 | * Create a new context. This initializes the library (and also the | ||
48 | * plugin system so this has not to be done seperately). | ||
49 | * | ||
50 | * Returns: a valid context, or NULL on failure. | ||
51 | */ | ||
52 | EAPI | ||
53 | G3DContext *g3d_context_new(void); | ||
54 | |||
55 | /** | ||
56 | * g3d_context_free: | ||
57 | * @context: the context to free | ||
58 | * | ||
59 | * Cleans up the context and the plugin system and frees all reserved | ||
60 | * memory. | ||
61 | */ | ||
62 | EAPI | ||
63 | void g3d_context_free(G3DContext *context); | ||
64 | |||
65 | /** | ||
66 | * g3d_context_set_bgcolor: | ||
67 | * @context: a valid context | ||
68 | * @r: red component (range: 0.0 .. 1.0) | ||
69 | * @g: green component (range: 0.0 .. 1.0) | ||
70 | * @b: green component (range: 0.0 .. 1.0) | ||
71 | * @a: alpha component | ||
72 | * | ||
73 | * Try to set the background color. This will call a function registered | ||
74 | * with <link>@g3d_context_set_set_bgcolor_func</link>. | ||
75 | * | ||
76 | * Returns: TRUE on success, FALSE else | ||
77 | */ | ||
78 | EAPI | ||
79 | gboolean g3d_context_set_bgcolor(G3DContext *context, | ||
80 | G3DFloat r, G3DFloat g, G3DFloat b, G3DFloat a); | ||
81 | |||
82 | /** | ||
83 | * g3d_context_update_interface: | ||
84 | * @context: a valid context | ||
85 | * | ||
86 | * Try to update the interface. This will call a function registered with | ||
87 | * @g3d_context_set_update_interface_func. | ||
88 | * | ||
89 | * Returns: TRUE on success, FALSE else | ||
90 | */ | ||
91 | EAPI | ||
92 | gboolean g3d_context_update_interface(G3DContext *context); | ||
93 | |||
94 | /** | ||
95 | * g3d_context_update_progress_bar: | ||
96 | * @context: a valid context | ||
97 | * @percentage: the percentage to set on the progress bar | ||
98 | * @visibility: show or hide the progress bar | ||
99 | * | ||
100 | * Try to update the progress bar. | ||
101 | * | ||
102 | * Returns: TRUE on success, FALSE else | ||
103 | */ | ||
104 | EAPI | ||
105 | gboolean g3d_context_update_progress_bar(G3DContext *context, | ||
106 | G3DFloat percentage, gboolean visibility); | ||
107 | |||
108 | /** | ||
109 | * g3d_context_set_set_bgcolor_func: | ||
110 | * @context: a valid context | ||
111 | * @func: the callback function | ||
112 | * @user_data: user-defined opaque pointer | ||
113 | * | ||
114 | * Registers a callback function for setting the background color. | ||
115 | */ | ||
116 | EAPI | ||
117 | void g3d_context_set_set_bgcolor_func(G3DContext *context, | ||
118 | G3DSetBgColorFunc func, gpointer user_data); | ||
119 | |||
120 | /** | ||
121 | * g3d_context_set_update_interface_func: | ||
122 | * @context: a valid context | ||
123 | * @func: the callback function | ||
124 | * @user_data: user-defined opaque pointer | ||
125 | * | ||
126 | * Registers a callback function for updating the interface. | ||
127 | */ | ||
128 | EAPI | ||
129 | void g3d_context_set_update_interface_func(G3DContext *context, | ||
130 | G3DUpdateInterfaceFunc func, gpointer user_data); | ||
131 | |||
132 | /** | ||
133 | * g3d_context_set_update_progress_bar_func: | ||
134 | * @context: a valid context | ||
135 | * @func: the callback function | ||
136 | * @user_data: user-defined opaque pointer | ||
137 | * | ||
138 | * Registers a callback function for updating the progress bar. | ||
139 | */ | ||
140 | EAPI | ||
141 | void g3d_context_set_update_progress_bar_func(G3DContext *context, | ||
142 | G3DUpdateProgressBarFunc func, gpointer user_data); | ||
143 | |||
144 | #ifdef __cplusplus | ||
145 | } | ||
146 | #endif /* ifdef __cplusplus */ | ||
147 | |||
148 | #endif /* __G3D_CONTEXT_H__ */ | ||
149 | |||