]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf.h
Removed the unref_fn field. Now all memory management of the buffer is
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf.h
1 /* GdkPixbuf library - Main header file
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  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24
25 #ifndef GDK_PIXBUF_H
26 #define GDK_PIXBUF_H
27
28 #include <libart_lgpl/art_misc.h>
29 #include <libart_lgpl/art_pixbuf.h>
30 #include <glib.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 \f
37
38 /* GdkPixbuf structure */
39
40 typedef struct _GdkPixbuf GdkPixbuf;
41
42 struct _GdkPixbuf {
43         /* Reference count */
44         int ref_count;
45
46         /* Libart pixbuf */
47         ArtPixBuf *art_pixbuf;
48 };
49
50 \f
51
52 /* Reference counting */
53
54 void gdk_pixbuf_ref (GdkPixbuf *pixbuf);
55 void gdk_pixbuf_unref (GdkPixbuf *pixbuf);
56
57 /* Wrap a libart pixbuf */
58
59 GdkPixbuf *gdk_pixbuf_new_from_art_pixbuf (ArtPixBuf *art_pixbuf);
60
61 /* Simple loading */
62
63 GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename);
64 GdkPixbuf *gdk_pixbuf_new_from_data (guchar *data, ArtPixFormat format, gboolean has_alpha,
65                                      int width, int height, int rowstride,
66                                      ArtDestroyNotify dfunc, gpointer dfunc_data);
67
68 /* Transformations */
69 #if 0
70 GdkPixbuf *gdk_pixbuf_scale (const GdkPixbuf *pixbuf, gint w, gint h);
71 GdkPixbuf *gdk_pixbuf_rotate (GdkPixbuf *pixbuf, gdouble angle);
72 #endif
73
74 \f
75
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif