diff options
author | Havoc Pennington <hp@redhat.com> | 2000-10-18 18:42:54 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-10-18 18:42:54 +0000 |
commit | 9fde4eb55d460dfffeee55b6514e414fa9dad6a7 (patch) | |
tree | 28658f77c210e11d068dd75f1851a012f415e9f4 /gdk-pixbuf/gdk-pixbuf.h | |
parent | 03ed8493021187a640cacb99e110f86bafeed1cf (diff) | |
download | gdk-pixbuf-9fde4eb55d460dfffeee55b6514e414fa9dad6a7.tar.gz |
Some updates
2000-10-18 Havoc Pennington <hp@redhat.com>
* gtk/gtk-sections.txt: Some updates
* gdk/gdk-sections.txt: remove GdkPixbufAlphaMode
* gdk-pixbuf/gdk-pixbuf-sections.txt: Add new API, remove
GdkPixbufClass/GdkAnimationClass since those are private
* gdk-pixbuf/Makefile.am (IGNORE_HFILES): ignore more headers
2000-10-18 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): Fix a bug
where any number of empty lines would get skipped
* gtk/gtktextiter.h: Remove padding from GtkTextIter; live on the
edge.
* gtk/gtktextiter.c (gtk_text_iter_make_surreal): enhance the
warning about invalid iterators (explain more thoroughly)
(gtk_text_iter_in_region): rename gtk_text_iter_in_range
* gtk/gtktextview.c (FOCUS_EDGE_WIDTH): Make focus rectangle less
big
* demos/*.c: Add error handling
* gtk/gtktextbuffer.c: don't modify const iterators
* gtk/gdk-pixbuf-loader.c: Add full error handling here
* gtk/gtkimage.c (gtk_image_set_from_file): ignore errors
on file load
* gtk/gtkiconfactory.c: Update to reflect addition of error
handling to gdk-pixbuf loaders
2000-10-16 Havoc Pennington <hp@redhat.com>
* gdk-pixbuf-io.c (gdk_pixbuf_get_module)
(gdk_pixbuf_get_named_module) (gdk_pixbuf_load_module):
add error reporting here also
* make-inline-pixbuf.c (main): use GError
* io-xpm.c: include unistd.h
* gdk-pixbuf-util.c: include string.h
* io-*.c: add error reporting
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): add
error reporting
* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Add error reporting
* gdk-pixbuf-io.h: Add GError** to load_increment and load
methods
* gdk-pixbuf-io.c (gdk_pixbuf_save) (gdk_pixbuf_savev): return
a G_FILE_ERROR if we fail to write or close the file.
* gdk-pixbuf.h: remove GDK_PIXBUF_ERROR_IO, instead we'll use
G_FILE_ERROR_*. Rename enum to GdkPixbufError, properly following
the GError naming rules. Add GError** to load functions.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf.h')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h index a61dc9366..e87737277 100644 --- a/gdk-pixbuf/gdk-pixbuf.h +++ b/gdk-pixbuf/gdk-pixbuf.h @@ -39,8 +39,8 @@ extern "C" { /* Alpha compositing mode */ typedef enum { - GDK_PIXBUF_ALPHA_BILEVEL, - GDK_PIXBUF_ALPHA_FULL + GDK_PIXBUF_ALPHA_BILEVEL, + GDK_PIXBUF_ALPHA_FULL } GdkPixbufAlphaMode; /* Color spaces; right now only RGB is supported. @@ -71,14 +71,18 @@ typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data); #define GDK_PIXBUF_ERROR gdk_pixbuf_error_quark () typedef enum { - /* some kind of failure reading or writing files */ - GDK_PIXBUF_ERROR_IO, + /* image data hosed */ + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + /* no mem to load image */ + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, /* bad option value passed to save routine */ GDK_PIXBUF_ERROR_BAD_OPTION_VALUE, /* unsupported image type (sort of an ENOSYS) */ GDK_PIXBUF_ERROR_UNKNOWN_TYPE, + /* unsupported operation (load, save) for image type */ + GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION, GDK_PIXBUF_ERROR_FAILED -} GdkPixbufErrorType; +} GdkPixbufError; GQuark gdk_pixbuf_error_quark () G_GNUC_CONST; @@ -114,7 +118,8 @@ GdkPixbuf *gdk_pixbuf_copy (const GdkPixbuf *pixbuf); /* Simple loading */ -GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename); +GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename, + GError **error); GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data, GdkColorspace colorspace, @@ -130,23 +135,24 @@ GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data); /* Read an inline pixbuf */ GdkPixbuf *gdk_pixbuf_new_from_inline (const guchar *inline_pixbuf, gboolean copy_pixels, - int length); + int length, + GError **error); /* Saving */ gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf, const char *filename, - const char *format, - GError **err, + const char *type, + GError **error, ...); gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf, const char *filename, - const char *format, + const char *type, char **option_keys, char **option_values, - GError **err); + GError **error); /* Adding an alpha channel */ GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color, @@ -248,7 +254,8 @@ typedef enum { GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST; -GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename); +GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename, + GError **error); GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation); void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation); |