]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf-private.h
Convert GdkPixbuf to GObject, leaving it opaque (i.e. derivation is not
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-private.h
1 /* GdkPixbuf library - Private declarations
2  *
3  * Copyright (C) 1999 The Free Software Foundation
4  *
5  * Authors: Mark Crichton <crichton@gimp.org>
6  *          Miguel de Icaza <miguel@gnu.org>
7  *          Federico Mena-Quintero <federico@gimp.org>
8  *          Havoc Pennington <hp@redhat.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */
25
26 #ifndef GDK_PIXBUF_PRIVATE_H
27 #define GDK_PIXBUF_PRIVATE_H
28
29 #include "gdk-pixbuf.h"
30
31 \f
32
33 typedef struct _GdkPixbufClass GdkPixbufClass;
34
35 #define GDK_PIXBUF_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF, GdkPixbufClass))
36 #define GDK_IS_PIXBUF_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF))
37 #define GDK_PIXBUF_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF, GdkPixbufClass))
38
39 /* Private part of the GdkPixbuf structure */
40 struct _GdkPixbuf {
41         GObject parent_instance;
42
43         /* Color space */
44         GdkColorspace colorspace;
45
46         /* Number of channels, alpha included */
47         int n_channels;
48
49         /* Bits per channel */
50         int bits_per_sample;
51
52         /* Size */
53         int width, height;
54
55         /* Offset between rows */
56         int rowstride;
57
58         /* The pixel array */
59         guchar *pixels;
60
61         /* Destroy notification function; it is supposed to free the pixel array */
62         GdkPixbufDestroyNotify destroy_fn;
63
64         /* User data for the destroy notification function */
65         gpointer destroy_fn_data;
66
67         /* Do we have an alpha channel? */
68         guint has_alpha : 1;
69 };
70
71 struct _GdkPixbufClass {
72         GObjectClass parent_class;
73
74 };
75
76 /* Private part of the GdkPixbufFrame structure */
77 struct _GdkPixbufFrame {
78         /* The pixbuf with this frame's image data */
79         GdkPixbuf *pixbuf;
80
81         /* Offsets for overlaying onto the animation's area */
82         int x_offset;
83         int y_offset;
84
85         /* Frame duration in ms */
86         int delay_time;
87
88         /* Overlay mode */
89         GdkPixbufFrameAction action;
90 };
91
92 typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass;
93
94 #define GDK_PIXBUF_ANIMATION_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
95 #define GDK_IS_PIXBUF_ANIMATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION))
96 #define GDK_PIXBUF_ANIMATION_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
97
98 /* Private part of the GdkPixbufAnimation structure */
99 struct _GdkPixbufAnimation {
100         GObject parent_instance;
101
102         /* Number of frames */
103         int n_frames;
104
105         /* List of GdkPixbufFrame structures */
106         GList *frames;
107
108         /* bounding box size */
109         int width, height;
110 };
111
112 struct _GdkPixbufAnimationClass {
113         GObjectClass parent_class;
114
115
116 };
117
118 \f
119
120 #endif