summaryrefslogtreecommitdiff
path: root/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
blob: dc8992a95531ae0ba04235002d6c0585bb5f1a8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<USER_FUNCTION>
<NAME>ModulePreparedNotifyFunc</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf, gpointer user_data
</USER_FUNCTION>
<USER_FUNCTION>
<NAME>ModuleUpdatedNotifyFunc</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf,
					  guint x, guint y,
					  guint width, guint height,
					  gpointer user_data
</USER_FUNCTION>
<USER_FUNCTION>
<NAME>ModuleFrameDoneNotifyFunc</NAME>
<RETURNS>void </RETURNS>
GdkPixbufFrame *frame,
					    gpointer user_data
</USER_FUNCTION>
<USER_FUNCTION>
<NAME>ModuleAnimationDoneNotifyFunc</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf,
						gpointer user_data
</USER_FUNCTION>
<STRUCT>
<NAME>GdkPixbufModule</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufModule</NAME>
struct GdkPixbufModule {
	char *module_name;
	gboolean (* format_check) (guchar *buffer, int size);
	GModule *module;
	GdkPixbuf *(* load) (FILE *f);
        GdkPixbuf *(* load_xpm_data) (const char **data);

        /* Incremental loading */

        gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func,
				 ModuleUpdatedNotifyFunc update_func,
				 ModuleFrameDoneNotifyFunc frame_done_func,
				 ModuleAnimationDoneNotifyFunc anim_done_func,
				 gpointer user_data);
        void (* stop_load) (gpointer context);
        gboolean (* load_increment) (gpointer context, const guchar *buf, guint size);

	/* Animation loading */
	GdkPixbufAnimation *(* load_animation) (FILE *f);
};
</STRUCT>
<FUNCTION>
<NAME>gdk_pixbuf_get_module</NAME>
<RETURNS>GdkPixbufModule  *</RETURNS>
guchar *buffer, guint size
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_load_module</NAME>
<RETURNS>void  </RETURNS>
GdkPixbufModule *image_module
</FUNCTION>
<MACRO>
<NAME>GDK_TYPE_PIXBUF_LOADER</NAME>
#define GDK_TYPE_PIXBUF_LOADER		   (gdk_pixbuf_loader_get_type ())
</MACRO>
<MACRO>
<NAME>GDK_PIXBUF_LOADER</NAME>
#define GDK_PIXBUF_LOADER(obj)		   (GTK_CHECK_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader))
</MACRO>
<MACRO>
<NAME>GDK_PIXBUF_LOADER_CLASS</NAME>
#define GDK_PIXBUF_LOADER_CLASS(klass)	   (GTK_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
</MACRO>
<MACRO>
<NAME>GDK_IS_PIXBUF_LOADER</NAME>
#define GDK_IS_PIXBUF_LOADER(obj)	   (GTK_CHECK_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
</MACRO>
<MACRO>
<NAME>GDK_IS_PIXBUF_LOADER_CLASS</NAME>
#define GDK_IS_PIXBUF_LOADER_CLASS(klass)  (GTK_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
</MACRO>
<STRUCT>
<NAME>GdkPixbufLoader</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufLoader</NAME>
struct GdkPixbufLoader
{
	GtkObject object;

	/* < Private > */
	gpointer private;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufLoaderClass</NAME>
</STRUCT>
<FUNCTION>
<NAME>gdk_pixbuf_loader_get_type</NAME>
<RETURNS>GtkType  </RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_new</NAME>
<RETURNS>GdkPixbufLoader     *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_write</NAME>
<RETURNS>gboolean  </RETURNS>
GdkPixbufLoader *loader,const guchar    *buf,size_t           count
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_get_pixbuf</NAME>
<RETURNS>GdkPixbuf           *</RETURNS>
GdkPixbufLoader *loader
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_get_animation</NAME>
<RETURNS>GdkPixbufAnimation  *</RETURNS>
GdkPixbufLoader *loader
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_close</NAME>
<RETURNS>void  </RETURNS>
GdkPixbufLoader *loader
</FUNCTION>
<ENUM>
<NAME>GdkColorspace</NAME>
typedef enum {
	GDK_COLORSPACE_RGB
} GdkColorspace;
</ENUM>
<STRUCT>
<NAME>GdkPixbuf</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
</STRUCT>
<USER_FUNCTION>
<NAME>GdkPixbufDestroyNotify</NAME>
<RETURNS>void </RETURNS>
guchar *pixels, gpointer data
</USER_FUNCTION>
<USER_FUNCTION>
<NAME>GdkPixbufLastUnref</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf, gpointer data
</USER_FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_ref</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_unref</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_set_last_unref_handler</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf          *pixbuf,GdkPixbufLastUnref  last_unref_fn,gpointer            last_unref_fn_data
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_finalize</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_colorspace</NAME>
<RETURNS>GdkColorspace  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_n_channels</NAME>
<RETURNS>int  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_has_alpha</NAME>
<RETURNS>gboolean  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_bits_per_sample</NAME>
<RETURNS>int  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_pixels</NAME>
<RETURNS>guchar        *</RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_width</NAME>
<RETURNS>int  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_height</NAME>
<RETURNS>int  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_rowstride</NAME>
<RETURNS>int  </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample,int width, int height
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_copy</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new_from_file</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const char *filename
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new_from_data</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const guchar *data,GdkColorspace colorspace,gboolean has_alpha,int bits_per_sample,int width, int height,int rowstride,GdkPixbufDestroyNotify destroy_fn,gpointer destroy_fn_data
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new_from_xpm_data</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const char **data
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_add_alpha</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const GdkPixbuf *pixbuf, gboolean substitute_color,guchar r, guchar g, guchar b
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_copy_area</NAME>
<RETURNS>void  </RETURNS>
const GdkPixbuf *src_pixbuf,int src_x, int src_y,int width, int height,GdkPixbuf *dest_pixbuf,int dest_x, int dest_y
</FUNCTION>
<ENUM>
<NAME>GdkPixbufAlphaMode</NAME>
typedef enum {
	GDK_PIXBUF_ALPHA_BILEVEL,
	GDK_PIXBUF_ALPHA_FULL
} GdkPixbufAlphaMode;
</ENUM>
<FUNCTION>
<NAME>gdk_pixbuf_render_threshold_alpha</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf *pixbuf, GdkBitmap *bitmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height,int alpha_threshold
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_render_to_drawable</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf *pixbuf,GdkDrawable *drawable, GdkGC *gc,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkRgbDither dither,int x_dither, int y_dither
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_render_to_drawable_alpha</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkPixbufAlphaMode alpha_mode,int alpha_threshold,GdkRgbDither dither,int x_dither, int y_dither
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_render_pixmap_and_mask</NAME>
<RETURNS>void  </RETURNS>
GdkPixbuf *pixbuf,GdkPixmap **pixmap_return, GdkBitmap **mask_return,int alpha_threshold
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_from_drawable</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
</FUNCTION>
<ENUM>
<NAME>GdkInterpType</NAME>
typedef enum {
	GDK_INTERP_NEAREST,
	GDK_INTERP_TILES,
	GDK_INTERP_BILINEAR,
	GDK_INTERP_HYPER
} GdkInterpType;
</ENUM>
<FUNCTION>
<NAME>gdk_pixbuf_scale</NAME>
<RETURNS>void  </RETURNS>
const GdkPixbuf *src,GdkPixbuf       *dest,int              dest_x,int              dest_y,int              dest_width,int              dest_height,double           offset_x,double           offset_y,double           scale_x,double           scale_y,GdkInterpType    interp_type
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_composite</NAME>
<RETURNS>void  </RETURNS>
const GdkPixbuf *src,GdkPixbuf       *dest,int              dest_x,int              dest_y,int              dest_width,int              dest_height,double           offset_x,double           offset_y,double           scale_x,double           scale_y,GdkInterpType    interp_type,int              overall_alpha
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_composite_color</NAME>
<RETURNS>void  </RETURNS>
const GdkPixbuf *src,GdkPixbuf       *dest,int              dest_x,int              dest_y,int              dest_width,int              dest_height,double           offset_x,double           offset_y,double           scale_x,double           scale_y,GdkInterpType    interp_type,int              overall_alpha,int              check_x,int              check_y,int              check_size,guint32          color1,guint32          color2
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_scale_simple</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const GdkPixbuf *src,int              dest_width,int              dest_height,GdkInterpType    interp_type
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_composite_color_simple</NAME>
<RETURNS>GdkPixbuf  *</RETURNS>
const GdkPixbuf *src,int              dest_width,int              dest_height,GdkInterpType    interp_type,int              overall_alpha,int              check_size,guint32          color1,guint32          color2
</FUNCTION>
<ENUM>
<NAME>GdkPixbufFrameAction</NAME>
typedef enum {
	GDK_PIXBUF_FRAME_RETAIN,
	GDK_PIXBUF_FRAME_DISPOSE,
	GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
</ENUM>
<FUNCTION>
<NAME>gdk_pixbuf_animation_new_from_file</NAME>
<RETURNS>GdkPixbufAnimation  *</RETURNS>
const char         *filename
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_ref</NAME>
<RETURNS>GdkPixbufAnimation  *</RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_unref</NAME>
<RETURNS>void  </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_width</NAME>
<RETURNS>int  </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_height</NAME>
<RETURNS>int  </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_frames</NAME>
<RETURNS>GList               *</RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_num_frames</NAME>
<RETURNS>int  </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_pixbuf</NAME>
<RETURNS>GdkPixbuf            *</RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_x_offset</NAME>
<RETURNS>int  </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_y_offset</NAME>
<RETURNS>int  </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_delay_time</NAME>
<RETURNS>int  </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_action</NAME>
<RETURNS>GdkPixbufFrameAction  </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_preinit</NAME>
<RETURNS>void  </RETURNS>
gpointer app, gpointer modinfo
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_postinit</NAME>
<RETURNS>void  </RETURNS>
gpointer app, gpointer modinfo
</FUNCTION>
<MACRO>
<NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME>
#define GNOME_TYPE_CANVAS_PIXBUF            (gnome_canvas_pixbuf_get_type ())
</MACRO>
<MACRO>
<NAME>GNOME_CANVAS_PIXBUF</NAME>
#define GNOME_CANVAS_PIXBUF(obj)            (GTK_CHECK_CAST ((obj),		\
					     GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbuf))
</MACRO>
<MACRO>
<NAME>GNOME_CANVAS_PIXBUF_CLASS</NAME>
#define GNOME_CANVAS_PIXBUF_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass),	\
					     GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufClass))
</MACRO>
<MACRO>
<NAME>GNOME_IS_CANVAS_PIXBUF</NAME>
#define GNOME_IS_CANVAS_PIXBUF(obj)         (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_PIXBUF))
</MACRO>
<MACRO>
<NAME>GNOME_IS_CANVAS_PIXBUF_CLASS</NAME>
#define GNOME_IS_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),	\
					     GNOME_TYPE_CANVAS_PIXBUF))
</MACRO>
<STRUCT>
<NAME>GnomeCanvasPixbuf</NAME>
</STRUCT>
<STRUCT>
<NAME>GnomeCanvasPixbufClass</NAME>
</STRUCT>
<STRUCT>
<NAME>GnomeCanvasPixbuf</NAME>
struct GnomeCanvasPixbuf {
	GnomeCanvasItem item;

	/* Private data */
	gpointer priv;
};
</STRUCT>
<FUNCTION>
<NAME>gnome_canvas_pixbuf_get_type</NAME>
<RETURNS>GtkType  </RETURNS>
void
</FUNCTION>
<MACRO>
<NAME>GDK_PIXBUF_MAJOR</NAME>
#define GDK_PIXBUF_MAJOR (0)
</MACRO>
<MACRO>
<NAME>GDK_PIXBUF_MINOR</NAME>
#define GDK_PIXBUF_MINOR (7)
</MACRO>
<MACRO>
<NAME>GDK_PIXBUF_MICRO</NAME>
#define GDK_PIXBUF_MICRO (0)
</MACRO>
<MACRO>
<NAME>GDK_PIXBUF_VERSION</NAME>
#define GDK_PIXBUF_VERSION "0.7.0"
</MACRO>
<VARIABLE>
<NAME>gdk_pixbuf_version</NAME>
extern const char *gdk_pixbuf_version;
</VARIABLE>
<STRUCT>
<NAME>GdkPixbuf</NAME>
struct GdkPixbuf {
	/* Reference count */
	int ref_count;

	/* Color space */
	GdkColorspace colorspace;

	/* Number of channels, alpha included */
	int n_channels;

	/* Bits per channel */
	int bits_per_sample;

	/* Size */
	int width, height;

	/* Offset between rows */
	int rowstride;

	/* The pixel array */
	guchar *pixels;

	/* Destroy notification function; it is supposed to free the pixel array */
	GdkPixbufDestroyNotify destroy_fn;

	/* User data for the destroy notification function */
	gpointer destroy_fn_data;

	/* Last unref handler, determines whether the pixbuf should be finalized */
	GdkPixbufLastUnref last_unref_fn;

	/* User data for the last unref handler */
	gpointer last_unref_fn_data;

	/* Do we have an alpha channel? */
	guint has_alpha : 1;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
struct GdkPixbufFrame {
	/* The pixbuf with this frame's image data */
	GdkPixbuf *pixbuf;

	/* Offsets for overlaying onto the animation's area */
	int x_offset;
	int y_offset;

	/* Frame duration in ms */
	int delay_time;

	/* Overlay mode */
	GdkPixbufFrameAction action;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
struct GdkPixbufAnimation {
	/* Reference count */
	int ref_count;

	/* Number of frames */
        int n_frames;

	/* List of GdkPixbufFrame structures */
        GList *frames;

	/* bounding box size */
	int width, height;
};
</STRUCT>