diff options
Diffstat (limited to 'pig/pig-loader-private.h')
-rw-r--r-- | pig/pig-loader-private.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/pig/pig-loader-private.h b/pig/pig-loader-private.h new file mode 100644 index 0000000..1c2a6c6 --- /dev/null +++ b/pig/pig-loader-private.h @@ -0,0 +1,72 @@ +/* Pig + * Copyright (C) 2011 Benjamin Otte <otte@gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__PIG_H_INSIDE__) && !defined (PIG_COMPILATION) +#error "Only <pig/pig.h> can be included directly." +#endif + +#ifndef __PIG_LOADER_H__ +#define __PIG_LOADER_H__ + + +#include <pig/pig-picture.h> + + +G_BEGIN_DECLS + +#define PIG_TYPE_LOADER (_pig_loader_get_type ()) +#define PIG_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIG_TYPE_LOADER, PigLoader)) +#define PIG_LOADER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PIG_TYPE_LOADER, PigLoaderInterface)) +#define PIG_IS_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIG_TYPE_LOADER)) +#define PIG_LOADER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PIG_TYPE_LOADER, PigLoaderInterface)) + +typedef struct _PigLoader PigLoader; /* Dummy typedef */ +typedef struct _PigLoaderInterface PigLoaderInterface; + +struct _PigLoaderInterface +{ + GTypeInterface g_iface; + + const char const ** mime_types; + + gboolean (* write) (PigLoader * loader, + const guchar * data, + gsize size, + GError ** error); + gboolean (* close) (PigLoader * loader, + GError ** error); +}; + + +GType _pig_loader_get_type (void) G_GNUC_CONST; + +PigPicture * _pig_loader_open (const char * content_type, + GError ** error); + +gboolean _pig_loader_write (PigLoader * loader, + const guchar *data, + gsize size, + GError ** error); +gboolean _pig_loader_close (PigLoader * loader, + GError ** error); + + +G_END_DECLS + +#endif /* __PIG_LOADER_H__ */ |