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
;
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,
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
;
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
;
81 * Flags which allow a module to specify further details about the supported
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
96 alias GdkPixbufFormatFlags PixbufFormatFlags
;
101 * A GdkPixdata contains pixbuf information in a form suitable for
102 * serialization and streaming.
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
113 // gdk-pixbuf-inline.html
114 // uint pixdataType; /+* GdkPixdataType +/
115 // gdk-pixbuf-inline.html
117 // gdk-pixbuf-inline.html
119 // gdk-pixbuf-inline.html
121 // gdk-pixbuf-inline.html
123 // gdk-pixbuf-inline.html
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
{}
143 public struct GdkPixbufSimpleAnim
{}
148 * The GdkPixbufLoader struct contains only private
151 public struct GdkPixbufLoader
{}
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.
160 * the name of the image format.
161 * GdkPixbufModulePattern*signature;
162 * the signature of the module.
164 * the message domain for the description.
166 * a description of the image format.
168 * a NULL-terminated array of MIME types for the image format.
170 * a NULL-terminated array of typical filename extensions for the
173 * a combination of GdkPixbufFormatFlags.
175 * a boolean determining whether the loader is disabled.
177 * a string containing license information, typically set to
179 public struct GdkPixbufFormat
{}
181 // gdk-pixbuf-Module-Interface.html
182 // GdkPixbufModulePattern *signature;
183 // gdk-pixbuf-Module-Interface.html
185 // gdk-pixbuf-Module-Interface.html
186 // char *description;
187 // gdk-pixbuf-Module-Interface.html
189 // gdk-pixbuf-Module-Interface.html
190 // char **extensions;
191 // gdk-pixbuf-Module-Interface.html
193 // gdk-pixbuf-Module-Interface.html
195 // gdk-pixbuf-Module-Interface.html
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 '*'
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
{}
219 // gdk-pixbuf-Module-Interface.html
221 // gdk-pixbuf-Module-Interface.html
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.
234 * the name of the module, usually the same as the
236 public struct GdkPixbufModule
{}
238 // gdk-pixbuf-Module-Interface.html
240 // gdk-pixbuf-Module-Interface.html
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
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
260 // gdk-pixbuf-Module-Interface.html
262 // gdk-pixbuf-Module-Interface.html
263 // int (* stopLoad) (void* context,
264 // gdk-pixbuf-Module-Interface.html
266 // gdk-pixbuf-Module-Interface.html
267 // int (* loadIncrement) (void* context,
268 // gdk-pixbuf-Module-Interface.html
270 // gdk-pixbuf-Module-Interface.html
272 // gdk-pixbuf-Module-Interface.html
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
280 // gdk-pixbuf-Module-Interface.html
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
288 // gdk-pixbuf-Module-Interface.html
289 // char **paramValues,
290 // gdk-pixbuf-Module-Interface.html
292 // gdk-pixbuf-Module-Interface.html
293 // int (*saveToCallback) (GdkPixbufSaveFunc saveFunc,
294 // gdk-pixbuf-Module-Interface.html
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
304 // gdk-pixbuf-Module-Interface.html
308 * Modules supporting animations must derive a type from
309 * GdkPixbufAnimation, providing suitable implementations of the
311 * GObjectClassparent_class;
314 * returns whether the given animation is just a static image.
316 * returns a static image representing the given animation.
318 * fills width and height with the frame size of the animation.
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
332 // gdk-pixbuf-Module-Interface.html
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
345 * GObjectClassparent_class;
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.
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.
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()
398 * pointer to a location containing the current image width
400 * pointer to a location containing the current image height
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
415 * the GdkPixbuf that is currently being loaded.
417 * if an animation is being loaded, the GdkPixbufAnimation, else NULL.
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
432 * the GdkPixbuf that is currently being loaded.
434 * the X origin of the updated area.
436 * the Y origin of the updated area.
438 * the width of the updated area.
440 * the height of the updated area.
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
;