forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
a44d2e2e2c
commit
0b0ebee941
@ -1,3 +1,13 @@
|
||||
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.
|
||||
|
||||
1999-12-09 Michael Zucchi <zucchi@zedzone.mmc.com.au>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf.h: Enable gdk_pixbuf_get_from_drawable()
|
||||
|
@ -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;
|
||||
typedef struct _GdkPixbufFrame GdkPixbufFrame;
|
||||
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
|
||||
|
||||
struct _GdkPixbuf {
|
||||
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
|
||||
|
@ -1031,7 +1031,7 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
||||
{
|
||||
GdkWindowType window_type;
|
||||
gint src_width, src_height;
|
||||
ArtPixBuf *apb;
|
||||
ArtPixBuf *apb = NULL;
|
||||
GdkImage *image;
|
||||
int rowstride, bpp, alpha;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user