]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf-loader.h
Header file reorganization. (#51999)
[~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 #ifndef GDK_PIXBUF_LOADER_H
27 #define GDK_PIXBUF_LOADER_H
28
29 #include <glib.h>
30 #include <glib-object.h>
31 #include <gdk-pixbuf/gdk-pixbuf-core.h>
32 #include <gdk-pixbuf/gdk-pixbuf-animation.h>
33 #include <gdk-pixbuf/gdk-pixbuf-io.h>
34
35 G_BEGIN_DECLS
36
37 #define GDK_TYPE_PIXBUF_LOADER             (gdk_pixbuf_loader_get_type ())
38 #define GDK_PIXBUF_LOADER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader))
39 #define GDK_PIXBUF_LOADER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
40 #define GDK_IS_PIXBUF_LOADER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
41 #define GDK_IS_PIXBUF_LOADER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
42 #define GDK_PIXBUF_LOADER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
43
44
45 typedef struct _GdkPixbufLoader GdkPixbufLoader;
46 struct _GdkPixbufLoader
47 {
48   GObject parent_instance;
49   
50   /*< private >*/
51   gpointer priv;
52 };
53
54 typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
55 struct _GdkPixbufLoaderClass
56 {
57   GObjectClass parent_class;
58
59   void (*size_prepared)      (GdkPixbufLoader *loader, 
60                               int              width,
61                               int              height);
62
63   void (*area_prepared)      (GdkPixbufLoader *loader);
64
65   /* Last known frame needs a redraw for x, y, width, height */
66   void (*area_updated)       (GdkPixbufLoader *loader,
67                               int              x,
68                               int              y,
69                               int              width,
70                               int              height);
71
72   void (*closed)             (GdkPixbufLoader *loader);
73 };
74
75 GType                gdk_pixbuf_loader_get_type      (void) G_GNUC_CONST;
76 GdkPixbufLoader *    gdk_pixbuf_loader_new           (void);
77 GdkPixbufLoader *    gdk_pixbuf_loader_new_with_type (const char *image_type,
78                                                       GError    **error);
79 GdkPixbufLoader *    gdk_pixbuf_loader_new_with_mime_type (const char *mime_type,
80                                                            GError    **error);
81 void                 gdk_pixbuf_loader_set_size (GdkPixbufLoader  *loader,
82                                                  int               width,
83                                                  int               height);
84 gboolean             gdk_pixbuf_loader_write         (GdkPixbufLoader *loader,
85                                                       const guchar    *buf,
86                                                       gsize            count,
87                                                       GError         **error);
88 GdkPixbuf *          gdk_pixbuf_loader_get_pixbuf    (GdkPixbufLoader *loader);
89 GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
90 gboolean             gdk_pixbuf_loader_close         (GdkPixbufLoader *loader,
91                                                       GError         **error);
92 GdkPixbufFormat     *gdk_pixbuf_loader_get_format    (GdkPixbufLoader *loader);
93
94 G_END_DECLS
95
96 #endif
97
98