Your eyes are bloodshot.
Your mouth starts to foam.
Your hands are shaking.
You know your need your fix.
NEED MORE ABSTRACTION!
2000-04-12 Federico Mena Quintero <federico@helixcode.com>
This comes from an excellent idea by Tim Janik (timj@gtk.org) to
hook to the last unref operation.
* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_set_last_unref_handler): New
function to set the last unref handler for a pixbuf.
(gdk_pixbuf_finalize): New function to actually finalize a pixbuf.
It calls the pixbuf's destroy notification function and frees the
GdkPixbuf structure itself.
(gdk_pixbuf_unref): Use the last unref function of the pixbuf if
available.
* gdk-pixbuf/gdk-pixbuf-private.h (struct _GdkPixbuf): New fields
for the last unref handler and its user data.
* gdk-pixbuf/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Use
g_new0() to allocate the pixbuf.
* gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init):
Fixed the call to gtk_signal_new() for the "frame_done" signal; it
was not specifying the `frame' argument.
* gdk-pixbuf/gdk-pixbuf-animation.c
(gdk_pixbuf_animation_get_width): Fixed docstring.
(gdk_pixbuf_animation_get_height): Likewise.
(gdk_pixbuf_animation_get_num_frames): Likewise.
(gdk_pixbuf_animation_get_frames): Likewise.
* doc/gdk-pixbuf-sections.txt: Updated with the new functions and
types.
* doc/tmpl/gdk-pixbuf.sgml: Added the description for GdkColorspace.
* doc/tmpl/scaling.sgml: Added the description for GdkInterpType.
* doc/tmpl/refcounting.sgml: Updated with the information about
the last unref handler.
* doc/tmpl/*.sgml: Markup tweaks.
* gdk-pixbuf/Makefile.am (libgnomecanvaspixbuf_la_LDFLAGS): Sigh,
update the libtool version number for libgnomecanvaspixbuf as
well.
(libpixbufloader_*_la_LDFLAGS): The loaders need to be versioned
as well, or the old ones won't work with the new stuff. Also,
renamed the modules as follows.
* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_load_module): Now the
modules are called "libpixbufloader-<format>.so" instead of
"libpixbuf-<format>.so". They needed renaming so that the new
loaders won't overwrite the old ones; even with the versioning
stuff, the new .so symlink to the .so.1.0.0 would overwrite the
old real .so file.
2000-04-11 Federico Mena Quintero <federico@helixcode.com>
Most of this patch is based on a patch by Havoc Pennington
(hp@redhat.com) to make GdkPixbuf's structures opaque and to
remove the libart dependency.
* gdk-pixbuf/gdk-pixbuf.h: Removed the public structures.
(GdkColorspace): New enum that for now only contains
GDK_COLORSPACE_RGB.
(GdkPixbufDestroyNotify): New type for the pixbuf's pixels destroy
notification function.
(GdkInterpType): New num with interpolation types.
* *.[ch]: Replace the libart stuff with our own stuff.
* pixops/*.[ch]: Likewise.
* gdk-pixbuf/gdk-pixbuf-private.h: New file with the private
declarations of the GdkPixbuf structures.
* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_new_from_art_pixbuf):
Removed function.
(gdk_pixbuf_get_format): Constify.
(gdk_pixbuf_get_n_channels): Constify.
(gdk_pixbuf_get_has_alpha): Constify.
(gdk_pixbuf_get_bits_per_sample): Constify.
(gdk_pixbuf_get_pixels): Constify.
(gdk_pixbuf_get_width): Constify.
(gdk_pixbuf_get_height): Constify.
(gdk_pixbuf_get_rowstride): Constify.
* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_copy): New function to copy
a pixbuf.
* gdk-pixbuf/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Added a
bits_per_sample argument; currently only 8 bits per sample are
supported.
* gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_pixbuf):
New accessor.
(gdk_pixbuf_frame_get_x_offset): New accessor.
(gdk_pixbuf_frame_get_y_offset): New accessor.
(gdk_pixbuf_frame_get_delay_time): New accessor.
(gdk_pixbuf_frame_get_action): New accessor.
* gdk-pixbuf/gdk-pixbuf-render.c
(gdk_pixbuf_render_pixmap_and_mask): Instead of returning a solid
mask rectangle for pixbufs without an alpha channel, set the
*mask_return to NULL.
* gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_add_alpha): Constify.
* gdk-pixbuf/gdk-pixbuf-scale.c: Fix includes.
* gdk-pixbuf/gdk-pixbuf-scale.c (gdk_pixbuf_scale): Added some
preconditions. Maybe we should also check for the colorspace,
bits per pixel, and such.
(gdk_pixbuf_composite): Likewise.
(gdk_pixbuf_composite_color): Likewise.
(gdk_pixbuf_scale_simple): Likewise, and fail gracefully if we
cannot allocate the new pixbuf.
(gdk_pixbuf_composite_color_simple): Likewise.
* gdk-pixbuf/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_render):
Use art_rgb_rgba_affine() or art_rgb_affine() since we no longer
have an ArtPixBuf.
* gdk-pixbuf/io-bmp.c: Fix includes.
* gdk-pixbuf/pixops/pixops.c (pixops_scale_nearest): Fixed cast in
an lvalue.
* TODO: Populated.
* configure.in: Removed checks for libart.
* gdk-pixbuf/Makefile.am: Removed references to libart.
(noinst_HEADERS): Added gdk-pixbuf-private.h.
* gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_LDFLAGS): Incremented
the version number of the libtool library to indicate that this
definitely is not compatible with the old usage. I know you love
me. I know you do.
* configure.in: Bumped version number to 0.7.0.
* README: Updated.
* gdk-pixbuf-config.in (--libs): We no longer require libart.
* DEPENDS.libgdk_pixbuf: We no longer depend on libart.
* gdk-pixbuf.spec.in: Updated, but I don't guarantee anything.
2000-03-29 Radek Doulik <rodo@helixcode.com>
* gdk-pixbuf/gdk-pixbuf-animation.c
(gdk_pixbuf_animation_new_from_file): same as below
* gdk-pixbuf/io-gif.c (gif_get_lzw): added update of width and
height in GdkPixbufAnimation
2000-03-28 Radek Doulik <rodo@helixcode.com>
* gdk-pixbuf/io-gif.c (gif_get_lzw): test also for
context->frame_done_func and context->anim_done_func to make
progressive animation loading work
* gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
added priv->pixbuf = NULL as pixbuf is now in frame (and to make
gdk_pixbuf_loader_prepare happy)
(gdk_pixbuf_loader_frame_done): update animation bbox
* gdk-pixbuf/gdk-pixbuf.h: added bbox size (width, height) to
_GdkPixbufAnimation
2000-03-27 Radek Doulik <rodo@helixcode.com>
* gdk-pixbuf/io-gif.c (gif_get_lzw): use frame_len and frame_width
instead of width and height
2000-04-01 Federico Mena Quintero <federico@helixcode.com>
* gdk-pixbuf/gdk-pixbuf.c: Reverted Mark's change. The refcount
is private information, and the art_pixbuf will go away soon.
Added 2 more convience functions.
gdk_pixbuf_get_refcount for the current refcount of the pixbuf (per someone
at Eazel's request)
gdk_pixbuf_get_artpixbuf: returns the artpixbuf of the pixbuf. Is this
a good idea? I'm using it to help make->panel->do->the->right->thing.
2000-01-21 Federico Mena Quintero <federico@helixcode.com>
* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_ref): Return the same pixbuf
as the input parameter.
* gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_animation_ref):
Return the same animation as the input parameter.
2000-01-16 Federico Mena Quintero <federico@helixcode.com>
* configure.in: Removed the broken --enable-canvas-pixbuf option.
Added the stuff necessary to substitute the variables in
gnomecanvaspixbufConf.sh.in.
* gnomecanvaspixbufConf.sh.in: New gnome-config handler for the
tiny gnomecanvaspixbuf library.
* Makefile.am: Build gnomecanvaspixbufConf.sh.
* gdk-pixbuf/Makefile.am: Create a libgnomecanvaspixbuf and only
build it if gdk-pixbuf is being built outside of gnome-libs.
* doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_render_pixmap_and_mask().
* gdk-pixbuf/gdk-pixbuf-render.c
(gdk_pixbuf_render_pixmap_and_mask): Renamed from
gdk_pixbuf_render_pixmap(). Do not create the mask if it is not
needed, and do not use a clipping mask when rendering the pixmap.
Tweaked documentation a little.
* HACKING: New file with hacking policies for the gdk-pixbuf
module.
* doc/Makefile.am (tmpl_sources): Added missing backslash.
* doc/Makefile.am: Use gnomecanvaspixbuf in gnome-config when
scanning for docstrings.
* gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Made sanity
checks more stringent. Removed "gint" abominations. Made
documentation consistent with the rest of the functions.
* doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_copy_area() to the
utilities section.
2000-01-14 Jonathan Blandford <jrb@redhat.com>
* gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap): new
function to let you create a gdk_pixmap from a gdk_pixbuf.
* No more libart/gdk-pixbuf as part of gnome-libs
* Everything: Install header files & *Conf.sh in new per-interface-version locations.
Include interface version in library names.
2000-01-05 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf/pixops/: Directory full of pixel data scaling
code that will eventually migrate into libart.
* configure.in acconfig.h: Add checks for MMX compiler support
* gdk-pixbuf/gdk-pixbuf.h gdk-pixbuf/gdk-pixbuf-scale.c:
Nice wrapper routines for the code in pixops that operate
on pixbufs instead of raw data.
* gdk-pixbuf/testpixbuf-scale: Test program for scaling
routines.
2000-01-01 Federico Mena Quintero <federico@helixcode.com>
* gdk-pixbuf/gdk-pixbuf.h (GdkPixbufAnimation): Added reference
counting to animations. A web browser may want to share a single
copy of an animated GIF if it appears multiple times in a web
page, for example.
* gdk-pixbuf/gdk-pixbuf-animation.c: New file. Moved the
animation functions here.
(gdk_pixbuf_animation_new_from_file): Prettified. Return a NULL
animation if the loader does not support multiframe loading and
the single-frame load returned NULL. Check that the filename is
not NULL. Updated inline documentation.
(gdk_pixbuf_animation_ref): New function.
(gdk_pixbuf_animation_unref): New function.
Removed gdk_pixbuf_animation_destroy() in favor of reference
counting.
* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
Prettified. Made ref_count assertion more paranoid. Check that
the filename is not NULL.
(gdk_pixbuf_get_module): Use guchar * and guint for buffer and
size, respectively.
(gdk_pixbuf_new_from_xpm_data): Changed the "data" argument to
const char **.
* gdk-pixbuf/io-gif.c (image_load_animation): Create the animation
with a reference count of 1.
* gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_SOURCES): Added
gdk-pixbuf-animation.c.
* doc/tmpl/animation.sgml: Populated. It is still missing a
description of the overlay modes.
* doc/gdk-pixbuf-sections.txt: Added the animation section. Moved
the canvas item section to the end, as it will be moved later to
gnome-libs.
* doc/gdk-pixbuf.sgml: Added the animation section.
* doc/Makefile.am (tmpl_sources): Added tmpl/animation.sgml.
1999-12-20 Jonathan Blandford <jrb@redhat.com>
* gdk-pixbuf/io-gif.c: finished work to make animated gifs load
correctly. Progressive loading needs some work, but that all
needs doing from the gdk-pixbuf-loader end, not here.
1999-12-17 Jonathan Blandford <jrb@redhat.com>
* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_animation_new_from_file):
moved the file here. It seems natural to put this function here,
as that's where the gdk_pixbuf_new_from_file function is, but it's
still a little convoluted. The source files might be played with
in a bit.
1999-12-10 Jonathan Blandford <jrb@redhat.com>
* gdk-pixbuf/gdk-pixbuf-io.h: thinking about the new loading API.
* gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable):
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.
1999-12-08 Federico Mena Quintero <federico@redhat.com>
* gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes.
(gdk_pixbuf_get_from_drawable): Implemented the zillion sanity
checks and API definition. The body needs filling in and it needs
to do the Right Thing(tm) for pixmaps plus the given colormap and
windows and their own colormaps.
* gdk-pixbuf/gdk-pixbuf.h: Added prototype for
gdk_pixbuf_get_from_drawable(). Killed gdk-pixbuf-drawable.h.
* gdk-pixbuf/Makefile.am: Re-added the gdk-pixbuf-drawable sources.
* doc/tmpl/from-drawables.sgml: Populated.
* doc/gdk-pixbuf.sgml: Added the from-drawables section.
* doc/Makefile.am (tmpl_sources): Added tmpl/from-drawables.sgml.
* doc/gdk-pixbuf-sections.txt: Added a section for getting pixbufs
from drawables.
1999-10-28 Federico Mena Quintero <federico@redhat.com>
* src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable): New
function to render a portion of a pixbuf to a drawable. Ignores
alpha information and takes in a GC.
(gdk_pixbuf_render_to_drawable_alpha): New function to render a
portion of a pixbuf to a drawable. It automatically creates a GC
and a clipping mask for alpha pixbufs.
1999-10-27 Federico Mena Quintero <federico@redhat.com>
* src/gdk-pixbuf-render.c (gdk_pixbuf_render_threshold_alpha): New
function to threshold a pixbuf's alpha channel into a bitmap.
* src/gdk-pixbuf.c (gdk_pixbuf_new): Fixed so that it will
contemplate future extensions to ArtPixBuf's formats.
* src/io-png.c (png_info_callback): Use the new API of gdk_pixbuf_new().
* src/gdk-pixbuf.h (gdk_pixbuf_get_height): Added some convenience
macros to fetch the ArtPixBuf's fields.
1999-10-27 Havoc Pennington <hp@pobox.com>
* src/gdk-pixbuf.c (gdk_pixbuf_new): New function to create a
blank pixbuf.
* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Check all
three progressive load funcs are non-NULL, rather than checking
begin_load three times. Also, check whether begin_load returns
NULL on failure.
1999-10-20 Federico Mena Quintero <federico@redhat.com>
* src/gdk-pixbuf.h (GdkPixbuf): Removed the unref_fn field. Now
all memory management of the buffer is done by libart.
* src/gdk-pixbuf.c (gdk_pixbuf_unref): Do destruction here.
Removed gdk_pixbuf_destroy, gdk_pixbuf_duplicate.
* src/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Implemented in
terms of the libart functions. Removed the old code.
* src/gdk-pixbuf-io.c (image_handler_load): Removed the save
symbols. Saving will not be implemented in GdkPixbuf.
* src/io-gif.c: Removed the saving stub.
(image_load): Fixed memory management to fail gracefully if we run
out of memory while loading the image. Close the gif file when we
are done. This still needs more error handling for the DGif
functions.
* src/io-jpeg.c (image_load): Some robustness fixes.
* src/io-png.c: Removed the saving stuff.
(image_load): Some memory management fixes.
* src/io-tiff.c (image_load): Ditto.
* src/io-xpm.c (pixbuf_create_from_xpm): Ditto.
1999-07-23 Richard Hestilow <hestgray@ionet.net>
* src/gdk-pixbuf.h: Include glib.h as it uses g* datatypes
* gdk_pixbufConf.sh.in: Added for gnome-config
* Makefile.am:
* configure.in: Modified to generate gdk_pixbufConf.sh
Ok minor changes.
No longer make a version.h, and cleaned up some code here and there, and added
a quickie dirty-hack rotation function. However, it rotates at the origin.
Is this what we want? Or do we want a rotate w.r.t. the center of the pixbuf?
Anyone.
Mark