Commit 100c9594 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik
Browse files

make the current version number 1.3.1 (binary age 0, interface age 0).

Fri Jun 23 17:54:23 2000  Tim Janik  <timj@gtk.org>

        * configure.in: make the current version number 1.3.1 (binary age 0,
        interface age 0).

        * gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
        gtkcompat.h is all we want.

        * gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
        GLib primitive types. fixed g_type_register_fundamental() argument
        ordering.

        * gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
        compiles.

        * gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
        object code cleanup, comment trigraph fixes, etc...
parent 3ef478ec
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
Fri Jun 23 17:54:23 2000 Tim Janik <timj@gtk.org>
* configure.in: make the current version number 1.3.1 (binary age 0,
interface age 0).
* gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
gtkcompat.h is all we want.
* gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
GLib primitive types. fixed g_type_register_fundamental() argument
ordering.
* gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
compiles.
* gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
object code cleanup, comment trigraph fixes, etc...
2000-06-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_buffer): Use anonymous mark
......
......@@ -29,7 +29,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
#
GTK_MAJOR_VERSION=1
GTK_MINOR_VERSION=3
GTK_MICRO_VERSION=0
GTK_MICRO_VERSION=1
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
......@@ -1001,7 +1001,6 @@ gdk/win32/Makefile
gdk/nanox/Makefile
gdk/linux-fb/Makefile
gtk/Makefile
gtk/gtkfeatures.h
gtk/gtkcompat.h
modules/Makefile
modules/linux-fb/Makefile
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* GdkPixbuf library - Main header file
*
* Copyright (C) 1999 The Free Software Foundation
......@@ -31,8 +29,6 @@
#include "gtksignal.h"
enum {
AREA_UPDATED,
AREA_PREPARED,
......@@ -42,22 +38,22 @@ enum {
LAST_SIGNAL
};
static GtkObjectClass *parent_class;
static void gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *klass);
static void gdk_pixbuf_loader_init (GdkPixbufLoader *loader);
static void gdk_pixbuf_loader_destroy (GtkObject *loader);
static void gdk_pixbuf_loader_finalize (GObject *loader);
static gpointer parent_class = NULL;
static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 };
/* Internal data */
#define LOADER_HEADER_SIZE 128
typedef struct {
typedef struct
{
GdkPixbuf *pixbuf;
GdkPixbufAnimation *animation;
gboolean closed;
......@@ -67,10 +63,9 @@ typedef struct {
gpointer context;
} GdkPixbufLoaderPrivate;
/* our marshaller */
typedef void (* GtkSignal_NONE__INT_INT_INT_INT) (GtkObject *object,
typedef void (*GtkSignal_NONE__INT_INT_INT_INT) (GtkObject *object,
gint arg1, gint arg2, gint arg3, gint arg4,
gpointer user_data);
static void
......@@ -88,7 +83,6 @@ gtk_marshal_NONE__INT_INT_INT_INT (GtkObject *object, GtkSignalFunc func, gpoint
func_data);
}
/**
* gdk_pixbuf_loader_get_type:
......@@ -104,7 +98,8 @@ gdk_pixbuf_loader_get_type (void)
{
static GtkType loader_type = 0;
if (!loader_type) {
if (!loader_type)
{
static const GtkTypeInfo loader_info = {
"GdkPixbufLoader",
sizeof (GdkPixbufLoader),
......@@ -131,7 +126,7 @@ gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class)
object_class = (GtkObjectClass *) class;
gobject_class = (GObjectClass *) class;
parent_class = gtk_type_class (gtk_object_get_type ());
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
pixbuf_loader_signals[AREA_PREPARED] =
gtk_signal_new ("area_prepared",
......@@ -214,7 +209,7 @@ gdk_pixbuf_loader_destroy (GtkObject *object)
gdk_pixbuf_unref (priv->pixbuf);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static void
......@@ -229,16 +224,18 @@ gdk_pixbuf_loader_finalize (GObject *object)
g_free (priv);
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, gpointer loader)
gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf,
gpointer loader)
{
GdkPixbufLoaderPrivate *priv = NULL;
priv = GDK_PIXBUF_LOADER (loader)->private;
gdk_pixbuf_ref (pixbuf);
g_assert (priv->pixbuf == NULL);
priv->pixbuf = pixbuf;
......@@ -246,7 +243,12 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, gpointer loader)
}
static void
gdk_pixbuf_loader_update (GdkPixbuf *pixbuf, guint x, guint y, guint width, guint height, gpointer loader)
gdk_pixbuf_loader_update (GdkPixbuf *pixbuf,
guint x,
guint y,
guint width,
guint height,
gpointer loader)
{
GdkPixbufLoaderPrivate *priv = NULL;
......@@ -261,7 +263,8 @@ gdk_pixbuf_loader_update (GdkPixbuf *pixbuf, guint x, guint y, guint width, guin
}
static void
gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader)
gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame,
gpointer loader)
{
GdkPixbufLoaderPrivate *priv = NULL;
......@@ -269,13 +272,16 @@ gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader)
priv->pixbuf = NULL;
if (priv->animation == NULL) {
if (priv->animation == NULL)
{
priv->animation = GDK_PIXBUF_ANIMATION (g_type_create_instance (GDK_TYPE_PIXBUF_ANIMATION));
priv->animation->n_frames = 0;
priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf) + frame->x_offset;
priv->animation->height = gdk_pixbuf_get_height (frame->pixbuf) + frame->y_offset;
} else {
}
else
{
int w, h;
/* update bbox size */
......@@ -291,14 +297,15 @@ gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader)
}
priv->animation->frames = g_list_append (priv->animation->frames, frame);
priv->animation->n_frames ++;
priv->animation->n_frames++;
gtk_signal_emit (GTK_OBJECT (loader),
pixbuf_loader_signals[FRAME_DONE],
frame);
}
static void
gdk_pixbuf_loader_animation_done (GdkPixbuf *pixbuf, gpointer loader)
gdk_pixbuf_loader_animation_done (GdkPixbuf *pixbuf,
gpointer loader)
{
GdkPixbufLoaderPrivate *priv = NULL;
GdkPixbufFrame *frame;
......@@ -310,28 +317,24 @@ gdk_pixbuf_loader_animation_done (GdkPixbuf *pixbuf, gpointer loader)
current = gdk_pixbuf_animation_get_frames (priv->animation);
while (current) {
while (current)
{
frame = (GdkPixbufFrame *) current->data;
/* update bbox size */
w = gdk_pixbuf_get_width (frame->pixbuf) + frame->x_offset;
h = gdk_pixbuf_get_height (frame->pixbuf) + frame->y_offset;
if (w > priv->animation->width) {
if (w > priv->animation->width)
priv->animation->width = w;
}
if (h > priv->animation->height) {
if (h > priv->animation->height)
priv->animation->height = h;
}
current = current->next;
}
gtk_signal_emit (GTK_OBJECT (loader),
pixbuf_loader_signals[ANIMATION_DONE]);
gtk_signal_emit (GTK_OBJECT (loader), pixbuf_loader_signals[ANIMATION_DONE]);
}
/**
* gdk_pixbuf_loader_new:
*
......@@ -342,11 +345,11 @@ gdk_pixbuf_loader_animation_done (GdkPixbuf *pixbuf, gpointer loader)
GdkPixbufLoader *
gdk_pixbuf_loader_new (void)
{
return gtk_type_new (gdk_pixbuf_loader_get_type ());
return g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL);
}
static int
gdk_pixbuf_loader_load_module(GdkPixbufLoader *loader)
static gint
gdk_pixbuf_loader_load_module (GdkPixbufLoader *loader)
{
GdkPixbufLoaderPrivate *priv = loader->private;
......@@ -363,45 +366,51 @@ gdk_pixbuf_loader_load_module(GdkPixbufLoader *loader)
if ((priv->image_module->begin_load == NULL) ||
(priv->image_module->stop_load == NULL) ||
(priv->image_module->load_increment == NULL)) {
g_warning ("module %s does not support incremental loading.\n",
(priv->image_module->load_increment == NULL))
{
g_warning (G_STRLOC ": module %s does not support incremental loading.\n",
priv->image_module->module_name);
return 0;
}
priv->context = (*priv->image_module->begin_load) (gdk_pixbuf_loader_prepare,
priv->context = priv->image_module->begin_load (gdk_pixbuf_loader_prepare,
gdk_pixbuf_loader_update,
gdk_pixbuf_loader_frame_done,
gdk_pixbuf_loader_animation_done,
loader);
if (priv->context == NULL) {
g_warning("Failed to begin progressive load");
if (priv->context == NULL)
{
g_warning (G_STRLOC ": Failed to begin progressive load");
return 0;
}
if( (* priv->image_module->load_increment) (priv->context, priv->header_buf, priv->header_buf_offset) )
if (priv->image_module->load_increment (priv->context, priv->header_buf, priv->header_buf_offset))
return priv->header_buf_offset;
return 0;
}
static int
gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf, size_t count)
gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader,
const guchar *buf,
gsize count)
{
int nbytes;
gint n_bytes;
GdkPixbufLoaderPrivate *priv = loader->private;
nbytes = MIN(LOADER_HEADER_SIZE - priv->header_buf_offset, count);
memcpy (priv->header_buf + priv->header_buf_offset, buf, nbytes);
n_bytes = MIN(LOADER_HEADER_SIZE - priv->header_buf_offset, count);
memcpy (priv->header_buf + priv->header_buf_offset, buf, n_bytes);
priv->header_buf_offset += nbytes;
priv->header_buf_offset += n_bytes;
if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
if (gdk_pixbuf_loader_load_module(loader) == 0)
if (priv->header_buf_offset >= LOADER_HEADER_SIZE)
{
if (gdk_pixbuf_loader_load_module (loader) == 0)
return 0;
}
return nbytes;
return n_bytes;
}
/**
......@@ -419,7 +428,9 @@ gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf,
* cannot parse the buffer.
**/
gboolean
gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const guchar *buf, size_t count)
gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
const guchar *buf,
gsize count)
{
GdkPixbufLoaderPrivate *priv;
......@@ -434,8 +445,9 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const guchar *buf, size_t coun
/* we expect it's not to be closed */
g_return_val_if_fail (priv->closed == FALSE, FALSE);
if (priv->image_module == NULL) {
int eaten;
if (priv->image_module == NULL)
{
gint eaten;
eaten = gdk_pixbuf_loader_eat_header_write(loader, buf, count);
if (eaten <= 0)
......@@ -446,7 +458,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const guchar *buf, size_t coun
}
if (count > 0 && priv->image_module->load_increment)
return (* priv->image_module->load_increment) (priv->context, buf, count);
return priv->image_module->load_increment (priv->context, buf, count);
return TRUE;
}
......@@ -490,7 +502,7 @@ gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader)
*
* Return value: The GdkPixbufAnimation that the loader is loading, or NULL if
not enough data has been read to determine the information.
**/
**/
GdkPixbufAnimation *
gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader)
{
......@@ -529,11 +541,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader)
gdk_pixbuf_loader_load_module (loader);
if (priv->image_module && priv->image_module->stop_load)
(* priv->image_module->stop_load) (priv->context);
priv->image_module->stop_load (priv->context);
priv->closed = TRUE;
gtk_signal_emit (GTK_OBJECT (loader),
pixbuf_loader_signals[CLOSED]);
gtk_signal_emit (GTK_OBJECT (loader), pixbuf_loader_signals[CLOSED]);
}
......@@ -26,7 +26,6 @@
#ifndef GDK_PIXBUF_LOADER_H
#define GDK_PIXBUF_LOADER_H
#include <unistd.h>
#include <gtk/gtkobject.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
......@@ -34,13 +33,14 @@
extern "C" {
#endif
#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ())
#define GDK_PIXBUF_LOADER(obj) (GTK_CHECK_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader))
#define GDK_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
#define GDK_IS_PIXBUF_LOADER(obj) (GTK_CHECK_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
#define GDK_PIXBUF_LOADER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
typedef struct _GdkPixbufLoader GdkPixbufLoader;
......@@ -48,38 +48,37 @@ struct _GdkPixbufLoader
{
GtkObject object;
/* < Private > */
/*< private >*/
gpointer private;
};
typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
struct _GdkPixbufLoaderClass {
struct _GdkPixbufLoaderClass
{
GtkObjectClass parent_class;
void (* area_prepared) (GdkPixbufLoader *loader);
void (* area_updated) (GdkPixbufLoader *loader,
guint x, guint y, guint width, guint height);
void (* frame_done) (GdkPixbufLoader *loader, GdkPixbufFrame *frame);
void (* animation_done) (GdkPixbufLoader *loader);
void (* closed) (GdkPixbufLoader *loader);
void (*area_prepared) (GdkPixbufLoader *loader);
void (*area_updated) (GdkPixbufLoader *loader,
guint x,
guint y,
guint width,
guint height);
void (*frame_done) (GdkPixbufLoader *loader,
GdkPixbufFrame *frame);
void (*animation_done) (GdkPixbufLoader *loader);
void (*closed) (GdkPixbufLoader *loader);
};
GtkType gdk_pixbuf_loader_get_type (void);
GdkPixbufLoader *gdk_pixbuf_loader_new (void);
GdkPixbufLoader * gdk_pixbuf_loader_new (void);
gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
const guchar *buf,
size_t count);
GdkPixbuf *gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader);
GdkPixbufAnimation *gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
gsize count);
GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader);
GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
void gdk_pixbuf_loader_close (GdkPixbufLoader *loader);
#ifdef __cplusplus
}
......
......@@ -120,6 +120,6 @@ if test "$echo_libs" = "yes"; then
fi
done
echo $libdirs @more_ldflags@ -lgtk-$target -lgdk-$target $my_glib_libs @INTLLIBS@ @PANGO_LIBS@ @more_libs@ @GDK_WLIBS@ @MATH_LIB@
echo $libdirs @more_ldflags@ -lgtk-$target -lgdk_pixbuf -lgdk-$target $my_glib_libs @INTLLIBS@ @PANGO_LIBS@ @more_libs@ @GDK_WLIBS@ @MATH_LIB@
fi
......@@ -80,7 +80,6 @@ gtk_public_h_sources = @STRIP_BEGIN@ \
gtkentry.h \
gtkenums.h \
gtkeventbox.h \
gtkfeatures.h \
gtkfilesel.h \
gtkfixed.h \
gtkfontsel.h \
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* GdkPixbuf library - Main header file
*
* Copyright (C) 1999 The Free Software Foundation
......@@ -31,8 +29,6 @@
#include "gtksignal.h"
enum {
AREA_UPDATED,
AREA_PREPARED,
......@@ -42,22 +38,22 @@ enum {
LAST_SIGNAL
};
static GtkObjectClass *parent_class;