Commit 4dfa2840 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

make a warning go away.

1999-12-10  Jonathan Blandford  <jrb@redhat.com>

	* gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable):
	make a warning go away.

	* gdk-pixbuf/gdk-pixbuf.h: added new prototypes for animations.

	* gdk-pixbuf/gdk-pixbuf-loader.h: added new prototypes for
	animations.
parent e4aa217c
......@@ -56,21 +56,28 @@ typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
struct _GdkPixbufLoaderClass {
GtkObjectClass parent_class;
void (* area_prepared) (GdkPixbufLoader *loader);
void (* area_prepared) (GdkPixbufLoader *loader);
void (* area_updated) (GdkPixbufLoader *loader,
guint x, guint y, guint width, guint height);
void (* area_updated) (GdkPixbufLoader *loader,
guint x, guint y, guint width, guint height);
void (* closed) (GdkPixbufLoader *loader);
void (* frame_done) (GdkPixbufLoader *loader, gint frame);
void (* animation_done) (GdkPixbufLoader *loader);
void (* closed) (GdkPixbufLoader *loader);
};
GtkType gdk_pixbuf_loader_get_type (void);
GdkPixbufLoader *gdk_pixbuf_loader_new (void);
gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const gchar *buf, size_t count);
GdkPixbuf *gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader);
void gdk_pixbuf_loader_close (GdkPixbufLoader *loader);
GtkType gdk_pixbuf_loader_get_type (void);
GdkPixbufLoader *gdk_pixbuf_loader_new (void);
gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
const gchar *buf,
size_t count);
GdkPixbuf *gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader);
GdkPixbufAnimation *gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
void gdk_pixbuf_loader_close (GdkPixbufLoader *loader);
......
......@@ -35,11 +35,20 @@ extern "C" {
/* GdkPixbuf structure */
/* GdkPixbuf structures */
typedef struct _GdkPixbuf GdkPixbuf;
struct _GdkPixbuf {
typedef struct _GdkPixbufFrame GdkPixbufFrame;
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
typedef enum
{
GDK_PIXBUF_FRAME_RETAIN,
GDK_PIXBUF_FRAME_DISPOSE,
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
struct _GdkPixbuf
{
/* Reference count */
int ref_count;
......@@ -47,6 +56,25 @@ struct _GdkPixbuf {
ArtPixBuf *art_pixbuf;
};
struct _GdkPixbufFrame
{
GdkPixbuf *pixbuf;
GdkPixbufFrame *next;
gushort x_offset;
gushort y_offset;
guint delaytime;
GdkPixbufFrameAction action;
};
struct _GdkPixbufAnimation
{
int n_frames;
GList *frames;
};
/* Convenience functions */
......@@ -77,11 +105,15 @@ GdkPixbuf *gdk_pixbuf_new (ArtPixFormat format, gboolean has_alpha, int bits_per
/* Simple loading */
GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename);
GdkPixbuf *gdk_pixbuf_new_from_data (guchar *data, ArtPixFormat format, gboolean has_alpha,
int width, int height, int rowstride,
ArtDestroyNotify dfunc, gpointer dfunc_data);
GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const gchar **data);
GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename);
GdkPixbuf *gdk_pixbuf_new_from_data (guchar *data,
ArtPixFormat format,
gboolean has_alpha,
int width, int height,
int rowstride,
ArtDestroyNotify dfunc,
gpointer dfunc_data);
GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const gchar **data);
/* Adding or removing alpha */
......@@ -125,6 +157,15 @@ GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
int src_x, int src_y,
int dest_x, int dest_y,
int width, int height);
/* Animation loading */
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename);
GdkPixbufAnimation *gdk_pixbuf_animation_destroy (GdkPixbufAnimation *animation,
gboolean free_frames);
#ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment