I've no idea here...
[gtkD.git] / src / gdkpixbuf / gdkpixbuftypes.d
blob9a7c36ee867b875335dbe3a3e502afbb41c3c606
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
23 module gdkpixbuf.gdkpixbuftypes;
26 public import glib.glibtypes;
27 public import gobject.gobjecttypes;
28 public import gdk.gdktypes;
29 public alias void* AtkFocusHandler;
30 public struct AtkStateSet;
31 public struct AtkRectangle;
33 /**
34 * An enumeration containing three sets of flags for a GdkPixdata struct:
35 * one for the used colorspace, one for the width of the samples and one
36 * for the encoding of the pixel data.
37 * GDK_PIXDATA_COLOR_TYPE_RGB
39 public enum GdkPixdataType
41 /+* colorspace + alpha +/
42 GDK_PIXDATA_COLOR_TYPE_RGB = 0x01,
43 GDK_PIXDATA_COLOR_TYPE_RGBA = 0x02,
44 GDK_PIXDATA_COLOR_TYPE_MASK = 0xff,
45 /+* width, support 8bits only currently +/
46 GDK_PIXDATA_SAMPLE_WIDTH_8 = 0x01 << 16,
47 GDK_PIXDATA_SAMPLE_WIDTH_MASK = 0x0f << 16,
48 /+* encoding +/
49 GDK_PIXDATA_ENCODING_RAW = 0x01 << 24,
50 GDK_PIXDATA_ENCODING_RLE = 0x02 << 24,
51 GDK_PIXDATA_ENCODING_MASK = 0x0f << 24
53 alias GdkPixdataType PixdataType;
55 /**
56 * An enumeration which is used by gdk_pixdata_to_csource() to
57 * determine the form of C source to be generated. The three values
58 * GDK_PIXDATA_DUMP_PIXDATA_STREAM, GDK_PIXDATA_DUMP_PIXDATA_STRUCT
59 * and GDK_PIXDATA_DUMP_MACROS are mutually exclusive, as are
60 * GDK_PIXBUF_DUMP_GTYPES and GDK_PIXBUF_DUMP_CTYPES. The remaining
61 * elements are optional flags that can be freely added.
62 * GDK_PIXDATA_DUMP_PIXDATA_STREAM
64 public enum GdkPixdataDumpType
66 /+* type of source to save +/
67 GDK_PIXDATA_DUMP_PIXDATA_STREAM = 0,
68 GDK_PIXDATA_DUMP_PIXDATA_STRUCT = 1,
69 GDK_PIXDATA_DUMP_MACROS = 2,
70 /+* type of variables to use +/
71 GDK_PIXDATA_DUMP_GTYPES = 0,
72 GDK_PIXDATA_DUMP_CTYPES = 1 << 8,
73 GDK_PIXDATA_DUMP_STATIC = 1 << 9,
74 GDK_PIXDATA_DUMP_CONST = 1 << 10,
75 /+* save RLE decoder macro? +/
76 GDK_PIXDATA_DUMP_RLE_DECODER = 1 << 16
78 alias GdkPixdataDumpType PixdataDumpType;
80 /**
81 * Flags which allow a module to specify further details about the supported
82 * operations.
83 * GDK_PIXBUF_FORMAT_WRITABLE
84 * the module can write out images in the format.
85 * GDK_PIXBUF_FORMAT_SCALABLE
86 * the image format is scalable
87 * GDK_PIXBUF_FORMAT_THREADSAFE
88 * the module is threadsafe. If this flag is not
90 public enum GdkPixbufFormatFlags
92 WRITABLE = 1 << 0,
93 SCALABLE = 1 << 1,
94 THREADSAFE = 1 << 2
96 alias GdkPixbufFormatFlags PixbufFormatFlags;
99 /**
100 * Main Gtk struct.
101 * A GdkPixdata contains pixbuf information in a form suitable for
102 * serialization and streaming.
103 * guint32magic;
105 public struct GdkPixdata{}
106 // uint magic; /+* GDK_PIXBUF_MAGIC_NUMBER +/
107 // gdk-pixbuf-inline.html
108 // int length; /+* <1 to disable length checks, otherwise:
109 // gdk-pixbuf-inline.html
110 // * GDK_PIXDATA_HEADER_LENGTH + pixelData length
111 // gdk-pixbuf-inline.html
112 // +/
113 // gdk-pixbuf-inline.html
114 // uint pixdataType; /+* GdkPixdataType +/
115 // gdk-pixbuf-inline.html
116 // uint rowstride;
117 // gdk-pixbuf-inline.html
118 // uint width;
119 // gdk-pixbuf-inline.html
120 // uint height;
121 // gdk-pixbuf-inline.html
122 // byte *pixelData;
123 // gdk-pixbuf-inline.html
127 * Main Gtk struct.
128 * And opaque struct representing an animation.
130 public struct GdkPixbufAnimation{}
134 * And opaque struct representing an iterator which points to a
135 * certain position in an animation.
137 public struct GdkPixbufAnimationIter{}
141 * An
143 public struct GdkPixbufSimpleAnim{}
147 * Main Gtk struct.
148 * The GdkPixbufLoader struct contains only private
149 * fields.
151 public struct GdkPixbufLoader{}
155 * Main Gtk struct.
156 * A GdkPixbufFormat contains information about the image format accepted by a
157 * module. Only modules should access the fields directly, applications should
158 * use the gdk_pixbuf_format_* functions.
159 * gchar*name;
160 * the name of the image format.
161 * GdkPixbufModulePattern*signature;
162 * the signature of the module.
163 * gchar*domain;
164 * the message domain for the description.
165 * gchar*description;
166 * a description of the image format.
167 * gchar**mime_types;
168 * a NULL-terminated array of MIME types for the image format.
169 * gchar**extensions;
170 * a NULL-terminated array of typical filename extensions for the
171 * image format.
172 * guint32flags;
173 * a combination of GdkPixbufFormatFlags.
174 * gbooleandisabled;
175 * a boolean determining whether the loader is disabled.
176 * gchar*license;
177 * a string containing license information, typically set to
179 public struct GdkPixbufFormat{}
180 // char *name;
181 // gdk-pixbuf-Module-Interface.html
182 // GdkPixbufModulePattern *signature;
183 // gdk-pixbuf-Module-Interface.html
184 // char *domain;
185 // gdk-pixbuf-Module-Interface.html
186 // char *description;
187 // gdk-pixbuf-Module-Interface.html
188 // char **mimeTypes;
189 // gdk-pixbuf-Module-Interface.html
190 // char **extensions;
191 // gdk-pixbuf-Module-Interface.html
192 // uint flags;
193 // gdk-pixbuf-Module-Interface.html
194 // int disabled;
195 // gdk-pixbuf-Module-Interface.html
196 // char *license;
197 // gdk-pixbuf-Module-Interface.html
201 * The signature of a module is a set of prefixes. Prefixes are encoded as
202 * pairs of ordinary strings, where the second string, called the mask, if
203 * not NULL, must be of the same length as the first one and may contain
204 * ' ', '!', 'x', 'z', and 'n' to indicate bytes that must be matched,
205 * not matched, "don't-care"-bytes, zeros and non-zeros.
206 * Each prefix has an associated integer that describes the relevance of
207 * the prefix, with 0 meaning a mismatch and 100 a "perfect match".
208 * Starting with gdk-pixbuf 2.8, the first byte of the mask may be '*',
209 * indicating an unanchored pattern that matches not only at the beginning,
210 * but also in the middle. Versions prior to 2.8 will interpret the '*'
211 * like an 'x'.
212 * The signature of a module is stored as an array of
213 * GdkPixbufModulePatterns. The array is terminated by a pattern
214 * where the prefix is NULL.
215 * GdkPixbufModulePattern *signature[] = {
217 public struct GdkPixbufModulePattern{}
218 // char *prefix;
219 // gdk-pixbuf-Module-Interface.html
220 // char *mask;
221 // gdk-pixbuf-Module-Interface.html
222 // int relevance;
223 // gdk-pixbuf-Module-Interface.html
227 * A GdkPixbufModule contains the necessary functions to load and save
228 * images in a certain file format.
229 * A GdkPixbufModule can be loaded dynamically from a GModule.
230 * Each loadable module must contain a GdkPixbufModuleFillVtableFunc function
231 * named fill_vtable, which will get called when the module
232 * is loaded and must set the function pointers of the GdkPixbufModule.
233 * char*module_name;
234 * the name of the module, usually the same as the
236 public struct GdkPixbufModule{}
237 // char *moduleName;
238 // gdk-pixbuf-Module-Interface.html
239 // char *modulePath;
240 // gdk-pixbuf-Module-Interface.html
241 // GModule *modul;
242 // gdk-pixbuf-Module-Interface.html
243 // GdkPixbufFormat *info;
244 // gdk-pixbuf-Module-Interface.html
245 // GdkPixbuf *(* load) (FILE *f,
246 // gdk-pixbuf-Module-Interface.html
247 // GError **error);
248 // gdk-pixbuf-Module-Interface.html
249 // GdkPixbuf *(* loadXpmData) ( char **data);
250 // gdk-pixbuf-Module-Interface.html
251 // /+* Incremental loading +/
252 // gdk-pixbuf-Module-Interface.html
253 // void* (* beginLoad) (GdkPixbufModuleSizeFunc sizeFunc,
254 // gdk-pixbuf-Module-Interface.html
255 // GdkPixbufModulePreparedFunc prepareFunc,
256 // gdk-pixbuf-Module-Interface.html
257 // GdkPixbufModuleUpdatedFunc updateFunc,
258 // gdk-pixbuf-Module-Interface.html
259 // void* userData,
260 // gdk-pixbuf-Module-Interface.html
261 // GError **error);
262 // gdk-pixbuf-Module-Interface.html
263 // int (* stopLoad) (void* context,
264 // gdk-pixbuf-Module-Interface.html
265 // GError **error);
266 // gdk-pixbuf-Module-Interface.html
267 // int (* loadIncrement) (void* context,
268 // gdk-pixbuf-Module-Interface.html
269 // char *buf,
270 // gdk-pixbuf-Module-Interface.html
271 // uint size,
272 // gdk-pixbuf-Module-Interface.html
273 // GError **error);
274 // gdk-pixbuf-Module-Interface.html
275 // /+* Animation loading +/
276 // gdk-pixbuf-Module-Interface.html
277 // GdkPixbufAnimation *(* loadAnimation) (FILE *f,
278 // gdk-pixbuf-Module-Interface.html
279 // GError **error);
280 // gdk-pixbuf-Module-Interface.html
281 // /+* Saving +/
282 // gdk-pixbuf-Module-Interface.html
283 // int (* save) (FILE *f,
284 // gdk-pixbuf-Module-Interface.html
285 // GdkPixbuf *pixbuf,
286 // gdk-pixbuf-Module-Interface.html
287 // char **paramKeys,
288 // gdk-pixbuf-Module-Interface.html
289 // char **paramValues,
290 // gdk-pixbuf-Module-Interface.html
291 // GError **error);
292 // gdk-pixbuf-Module-Interface.html
293 // int (*saveToCallback) (GdkPixbufSaveFunc saveFunc,
294 // gdk-pixbuf-Module-Interface.html
295 // void* userData,
296 // gdk-pixbuf-Module-Interface.html
297 // GdkPixbuf *pixbuf,
298 // gdk-pixbuf-Module-Interface.html
299 // char **optionKeys,
300 // gdk-pixbuf-Module-Interface.html
301 // char **optionValues,
302 // gdk-pixbuf-Module-Interface.html
303 // GError **error);
304 // gdk-pixbuf-Module-Interface.html
308 * Modules supporting animations must derive a type from
309 * GdkPixbufAnimation, providing suitable implementations of the
310 * virtual functions.
311 * GObjectClassparent_class;
312 * the parent class
313 * is_static_image()
314 * returns whether the given animation is just a static image.
315 * get_static_image()
316 * returns a static image representing the given animation.
317 * get_size()
318 * fills width and height with the frame size of the animation.
319 * get_iter()
320 * returns an iterator for the given animation.
322 public struct GdkPixbufAnimationClass{}
323 // GObjectClass parentClass;
324 // gdk-pixbuf-Module-Interface.html
325 // int (*isStaticImage) (GdkPixbufAnimation *anim);
326 // gdk-pixbuf-Module-Interface.html
327 // GdkPixbuf* (*getStaticImage) (GdkPixbufAnimation *anim);
328 // gdk-pixbuf-Module-Interface.html
329 // void (*getSize) (GdkPixbufAnimation *anim,
330 // gdk-pixbuf-Module-Interface.html
331 // int *width,
332 // gdk-pixbuf-Module-Interface.html
333 // int *height);
334 // gdk-pixbuf-Module-Interface.html
335 // GdkPixbufAnimationIter* (*getIter) (GdkPixbufAnimation *anim,
336 // gdk-pixbuf-Module-Interface.html
337 // GTimeVal *startTime);
338 // gdk-pixbuf-Module-Interface.html
342 * Modules supporting animations must derive a type from
343 * GdkPixbufAnimationIter, providing suitable implementations of the
344 * virtual functions.
345 * GObjectClassparent_class;
346 * the parent class
347 * get_delay_time()
348 * returns the time in milliseconds that the current frame
350 public struct GdkPixbufAnimationIterClass{}
351 // GObjectClass parentClass;
352 // gdk-pixbuf-Module-Interface.html
353 // int (*getDelayTime) (GdkPixbufAnimationIter *iter);
354 // gdk-pixbuf-Module-Interface.html
355 // GdkPixbuf* (*getPixbuf) (GdkPixbufAnimationIter *iter);
356 // gdk-pixbuf-Module-Interface.html
357 // int (*onCurrentlyLoadingFrame) (GdkPixbufAnimationIter *iter);
358 // gdk-pixbuf-Module-Interface.html
359 // int (*advance) (GdkPixbufAnimationIter *iter,
360 // gdk-pixbuf-Module-Interface.html
361 // GTimeVal *currentTime);
362 // gdk-pixbuf-Module-Interface.html
366 * Defines the type of the function used to set the vtable of a
367 * GdkPixbufModule when it is loaded.
368 * module:
369 * a GdkPixbufModule.
370 * Since 2.2
372 // void (*GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module);
373 public typedef extern(C) void function (GdkPixbufModule*) GdkPixbufModuleFillVtableFunc;
376 * Defines the type of the function used to fill a
377 * GdkPixbufFormat structure with information about a module.
378 * info:
379 * a GdkPixbufFormat.
380 * Since 2.2
382 // void (*GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info);
383 public typedef extern(C) void function (GdkPixbufFormat*) GdkPixbufModuleFillInfoFunc;
386 * Defines the type of the function that gets called once the size
387 * of the loaded image is known.
388 * The function is expected to set width and height to the desired
389 * size to which the image should be scaled. If a module has no efficient
390 * way to achieve the desired scaling during the loading of the image, it may
391 * either ignore the size request, or only approximate it -- gdk-pixbuf will
392 * then perform the required scaling on the completely loaded image.
393 * If the function sets width or height to zero, the module should interpret
394 * this as a hint that it will be closed soon and shouldn't allocate further
395 * resources. This convention is used to implement gdk_pixbuf_get_file_info()
396 * efficiently.
397 * width:
398 * pointer to a location containing the current image width
399 * height:
400 * pointer to a location containing the current image height
401 * user_data:
402 * the loader.
403 * Since 2.2
405 // void (*GdkPixbufModuleSizeFunc) (gint *width, gint *height, gpointer user_data);
406 public typedef extern(C) void function (gint*, gint*, void*) GdkPixbufModuleSizeFunc;
409 * Defines the type of the function that gets called once the initial
410 * setup of pixbuf is done.
411 * GdkPixbufLoader uses a function of this type to emit the
412 * "area_prepared"
413 * signal.
414 * pixbuf:
415 * the GdkPixbuf that is currently being loaded.
416 * anim:
417 * if an animation is being loaded, the GdkPixbufAnimation, else NULL.
418 * user_data:
419 * the loader.
420 * Since 2.2
422 // void (*GdkPixbufModulePreparedFunc) (GdkPixbuf *pixbuf, GdkPixbufAnimation *anim, gpointer user_data);
423 public typedef extern(C) void function (GdkPixbuf*, GdkPixbufAnimation*, void*) GdkPixbufModulePreparedFunc;
426 * Defines the type of the function that gets called every time a region
427 * of pixbuf is updated.
428 * GdkPixbufLoader uses a function of this type to emit the
429 * "area_updated"
430 * signal.
431 * pixbuf:
432 * the GdkPixbuf that is currently being loaded.
433 * x:
434 * the X origin of the updated area.
435 * y:
436 * the Y origin of the updated area.
437 * width:
438 * the width of the updated area.
439 * height:
440 * the height of the updated area.
441 * user_data:
442 * the loader.
443 * Since 2.2
445 // void (*GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf, int x, int y, int width, int height, gpointer user_data);
446 public typedef extern(C) void function (GdkPixbuf*, int, int, int, int, void*) GdkPixbufModuleUpdatedFunc;