]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf-loader.h
Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-loader.h
1 /* GdkPixbuf library - Progressive loader object
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  *          Jonathan Blandford <jrb@redhat.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser 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  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser 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 #if !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
27 #error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
28 #endif
29
30 #ifndef GDK_PIXBUF_LOADER_H
31 #define GDK_PIXBUF_LOADER_H
32
33 #include <glib.h>
34 #include <glib-object.h>
35 #include <gdk-pixbuf/gdk-pixbuf-core.h>
36 #include <gdk-pixbuf/gdk-pixbuf-animation.h>
37 #include <gdk-pixbuf/gdk-pixbuf-io.h>
38
39 G_BEGIN_DECLS
40
41 #define GDK_TYPE_PIXBUF_LOADER             (gdk_pixbuf_loader_get_type ())
42 #define GDK_PIXBUF_LOADER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader))
43 #define GDK_PIXBUF_LOADER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
44 #define GDK_IS_PIXBUF_LOADER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
45 #define GDK_IS_PIXBUF_LOADER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
46 #define GDK_PIXBUF_LOADER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
47
48
49 typedef struct _GdkPixbufLoader GdkPixbufLoader;
50 struct _GdkPixbufLoader
51 {
52   GObject parent_instance;
53   
54   /*< private >*/
55   gpointer priv;
56 };
57
58 typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
59 struct _GdkPixbufLoaderClass
60 {
61   GObjectClass parent_class;
62
63   void (*size_prepared)      (GdkPixbufLoader *loader, 
64                               int              width,
65                               int              height);
66
67   void (*area_prepared)      (GdkPixbufLoader *loader);
68
69   /* Last known frame needs a redraw for x, y, width, height */
70   void (*area_updated)       (GdkPixbufLoader *loader,
71                               int              x,
72                               int              y,
73                               int              width,
74                               int              height);
75
76   void (*closed)             (GdkPixbufLoader *loader);
77 };
78
79 GType                gdk_pixbuf_loader_get_type      (void) G_GNUC_CONST;
80 GdkPixbufLoader *    gdk_pixbuf_loader_new           (void);
81 GdkPixbufLoader *    gdk_pixbuf_loader_new_with_type (const char *image_type,
82                                                       GError    **error);
83 GdkPixbufLoader *    gdk_pixbuf_loader_new_with_mime_type (const char *mime_type,
84                                                            GError    **error);
85 void                 gdk_pixbuf_loader_set_size (GdkPixbufLoader  *loader,
86                                                  int               width,
87                                                  int               height);
88 gboolean             gdk_pixbuf_loader_write         (GdkPixbufLoader *loader,
89                                                       const guchar    *buf,
90                                                       gsize            count,
91                                                       GError         **error);
92 GdkPixbuf *          gdk_pixbuf_loader_get_pixbuf    (GdkPixbufLoader *loader);
93 GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
94 gboolean             gdk_pixbuf_loader_close         (GdkPixbufLoader *loader,
95                                                       GError         **error);
96 GdkPixbufFormat     *gdk_pixbuf_loader_get_format    (GdkPixbufLoader *loader);
97
98 G_END_DECLS
99
100 #endif
101
102