Commit Graph

80 Commits

Author SHA1 Message Date
Sven Herzberg
bff6e61aba Bug 546549 : Better Type Checking reviewed by mitch
2008-08-06  Sven Herzberg  <sven@imendio.com>

	Bug 546549 : Better Type Checking
	reviewed by mitch

	* gdk-pixbuf.c (gdk_pixbuf_copy), (gdk_pixbuf_get_colorspace),
	(gdk_pixbuf_get_n_channels), (gdk_pixbuf_get_has_alpha),
	(gdk_pixbuf_get_bits_per_sample), (gdk_pixbuf_get_pixels),
	(gdk_pixbuf_get_width), (gdk_pixbuf_get_height),
	(gdk_pixbuf_get_rowstride): use GDK_IS_PIXBUF() and not pixbuf != NULL
	in g_return_*() statements


svn path=/trunk/; revision=21025
2008-08-06 16:15:31 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Michael Natterer
4449e5032c put back the #define, but call it GDK_PIXBUF_C_COMPILATION.
2008-05-27  Michael Natterer  <mitch@imendio.com>

	* gdk-pixbuf.c: put back the #define, but call it
	GDK_PIXBUF_C_COMPILATION.

	* gdk-pixbuf-features.h.in: make variable export depend on that
	define instead of GDK_PIXBUF_COMPILATION.


svn path=/trunk/; revision=20189
2008-05-27 12:50:45 +00:00
Michael Natterer
f498fc887f Fix and simplify definition of GDK_PIXBUF_VAR:
2008-05-27  Michael Natterer  <mitch@imendio.com>

	Fix and simplify definition of GDK_PIXBUF_VAR:

	* Makefile.am: add -DGDK_PIXBUF_COMPILATION to INCLUDES.

	* gdk-pixbuf.c: don't #define it here. Remove GDK_PIXBUF_VAR from
	the definition of the version variables.

	* gdk-pixbuf-features.h.in: in the !G_PLATFORM_WIN32 case, always
	define GDK_PIXBUF_VAR to "extern". Remove redundant #ifndef
	GDK_PIXBUF_VAR around the whole block, the header itself already
	has include guards.


svn path=/trunk/; revision=20188
2008-05-27 12:05:14 +00:00
Matthias Clasen
b863097016 Document the "orientation" option.
2007-07-02  Matthias Clasen <mclasen@redhat.com>

        * gdk-pixbuf.c (gdk_pixbuf_get_option): Document the
        "orientation" option.

        * gdk-pixbuf.symbols:
        * gdk-pixbuf-core.h:
        * gdk-pixbuf-util.c (gdk_pixbuf_apply_embedded_orientation):
        New function to handle Exif orientation information in
        tiff and jpeg images.  (#439567, Michael Chudobiak)


svn path=/trunk/; revision=18340
2007-07-02 14:47:45 +00:00
Matthias Clasen
0f1bed1d74 Remove redundant size checks, and document that width, height must be > 0.
2006-12-21  Matthias Clasen  <mclasen@redhat.com>

        * gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
        * gdk-pixbuf.c (gdk_pixbuf_new): Remove redundant size
        checks, and document that width, height must be > 0.
        (#343330, Felix Riemann)
2006-12-21 20:40:24 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
2006-09-10  Matthias Clasen  <mclasen@redhat.com>

        * Commit a patch by Behdad to fix typos, omissions and other
        errors in the symbol aliasing, and add checks for local PLT
        entries.  (#354687, Behdad Esfahbod)
2006-09-10 06:39:16 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
7d49b31a79 Use G_DEFINE_TYPE 2006-04-04 13:35:59 +00:00
Matthias Clasen
9c0f0bb451 Small savings 2006-04-04 04:14:17 +00:00
Matthias Clasen
f55cffb074 Intern type names before registering the type to avoid unnecessary copies.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* io-ani-animation.c (gdk_pixbuf_ani_anim_iter_get_type)
	(gdk_pixbuf_ani_anim_get_type):
	* io-gif-animation.c (gdk_pixbuf_gif_anim_get_type)
	(gdk_pixbuf_gif_anim_iter_get_type):
	* gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_type):
	* gdk-pixbuf.c (gdk_pixbuf_get_type):
	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
	Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 15:18:41 +00:00
Matthias Clasen
7e77ea9943 Mark param spec strings as static.
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf.c (gdk_pixbuf_class_init): Mark param spec strings
	as static.
2005-03-21 05:07:20 +00:00
Matthias Clasen
eef20f2c83 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-14  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdk-pixbuf-alias.h:

	* gdk-pixbuf.symbols: Group symbols by header and source file.
	* /makegdkpixbufalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegdkpixbufalias.pl -def
	* Makefile.am (gdk-pixbuf-aliasdef.c): Add a rule to generate
	this file.
	* *.c: Include gdk-pixbuf-alias.h after the other headers,
	include gdk-pixbuf-aliasdef.c at the bottom.
2005-03-14 19:37:00 +00:00
Matthias Clasen
c8ce95ab52 Use canonical form of the name when registering properties.
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf.c (gdk_pixbuf_class_init): Use canonical
	form of the name when registering properties.
2005-03-09 02:49:27 +00:00
Matthias Clasen
6834bb9597 Revert the previous change, since it breaks bin compat.
2005-03-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf/gdk-pixbuf.c:
	* gdk-pixbuf/gdk-pixbuf-features.h.in:
	Revert the previous change, since it breaks
	bin compat.
2005-03-01 14:57:20 +00:00
Matthias Clasen
6da29b43a6 gdk/gdkkeyuni.c gdk/gdkpixbuf-drawable.c gdk/gdkrgb.c gdk/x11/gdkdnd-x11.c
2005-03-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeyuni.c
	* gdk/gdkpixbuf-drawable.c
	* gdk/gdkrgb.c
	* gdk/x11/gdkdnd-x11.c
	* gdk/x11/gdkevents-x11.c
	* gdk/x11/gdkproperty-x11.c
	* gdk/x11/gdkvisual-x11.c
	* gdk-pixbuf/gdk-pixbuf.c
	* gtk/gtkaction.c
	* gtk/gtkbindings.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkcombo.c
	* gtk/gtkcontainer.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkinputdialog.c
	* gtk/gtkitemfactory.c
	* gtk/gtkmenu.c
	* gtk/gtktextview.c
	* gtk/gtktooltips.c
	* gtk/gtktreedatalist.c
	* gtk/gtkuimanager.c
	* gtk/tree_minus.xpm
	* gtk/tree_plus.xpm
	* gtk/xdgmime/xdgmime.c
	* gtk/xdgmime/xdgmime.h:
	Move constant data to .rodata.
2005-03-01 06:25:55 +00:00
Matthias Clasen
9222438f4f Document current restrictions for property values. (#157409, Matthew H.
2004-11-04  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf.c (gdk_pixbuf_class_init): Document current
	restrictions for property values.  (#157409, Matthew H. Plough)
2004-11-05 01:43:31 +00:00
Matthias Clasen
f4437de139 Add hidden aliases for exported symbols which are used internally in order
Tue Aug 10 23:53:59 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gdk/Makefile.am: Add rules to generate gdk_pixbuf.def and
	gdk-pixbuf-alias.h from gdk-pixbuf.symbols, and make make
	check check the abi with abicheck.sh.

	* gdk/gdk-pixbuf.symbols: New file. Definition of the gdk-pixbuf
	ABI. The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gdk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgdk_pibuf.2.0.so against the symbols
	found in gdk-pixbuf.symbols.

	* gdk/makegdkpixbufalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* *.c: Include gdk-pixbuf-alias.h
2004-08-11 04:10:18 +00:00
Tor Lillqvist
c65574cfd1 Mark the version variables for proper import and export from Windows DLLs.
2004-07-06  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-features.h.in: Mark the version variables for proper
	import and export from Windows DLLs. Thanks to Laurent Sansonetti
	for reporting the problem.
2004-07-06 22:27:44 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Federico Mena Quintero
0ee78f89af Link to the documentation section on image data.
2004-01-06  Federico Mena Quintero  <federico@ximian.com>

	* gdk-pixbuf.c (gdk_pixbuf_get_pixels): Link to the documentation
	section on image data.
2004-01-07 03:17:17 +00:00
Matthias Clasen
ab74970131 Turn the pixbuf attributes into (construct-only, but always readable)
Sun Jan  4 00:44:57 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf.c (gdk_pixbuf_class_init): Turn the pixbuf
	attributes into (construct-only, but always readable)
	properties.  (#130196)

	* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Set properties
	in g_object_new().
2004-01-03 23:45:06 +00:00
Matthias Clasen
e5d0f500c6 Clarify misleading explanation of rowstride. (#119000)
2003-08-03  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf.c (gdk_pixbuf_get_rowstride):
	* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Clarify misleading explanation of
	rowstride.  (#119000)
2003-08-03 21:51:24 +00:00
Matthias Clasen
d03b2741ad Trivial cleanups (bug #107664) 2003-03-08 20:49:00 +00:00
Matthias Clasen
f0b823e943 Add deprecation docs.
* gdk-pixbuf-animation.c:
	* gdk-pixbuf.c: Add deprecation docs.
2002-11-29 20:36:26 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Manish Singh
d8efdf0024 add deprecation compile flags
Sun Sep 29 14:22:47 2002 Manish Singh  <yosh@gimp.org>

        * contrib/gdk-pixbuf-xlib/Makefile.am demos/Makefile.am
        demos/gtk-demo/Makefile.am: add deprecation compile flags

        * demos/testanimation.c demos/testpixbuf-save.c demos/testpixbuf.c
        demos/gtk-demo/*.c gdk-pixbuf/gdk-pixbuf-animation.c
        gdk-pixbuf/gdk-pixbuf.c: minor cleanups, getting rid of
        unnecessary casts
2002-09-29 21:24:24 +00:00
Matthias Clasen
944334da7f Remove the _-prefix from gdk_pixbuf_set_option and
gdk_pixbuf_non_anim_new again.
2002-09-19 21:00:52 +00:00
Matthias Clasen
1e3c6144b4 _-prefix gdk_pixbuf_non_anim_new and gdk_pixbuf_set_option. Adjust all
* io-xpm.c, io-xbm.c, io-ico.c, io-ani.c, io-png.c,
	gdk-pixbuf.c, gdk-pixbuf-animation.c, gdk-pixbuf-loader.c,
	gdk-pixbuf-private.h: _-prefix gdk_pixbuf_non_anim_new and
	gdk_pixbuf_set_option. Adjust all callers.
2002-09-17 22:52:44 +00:00
Sven Neumann
c51692d673 use sequential writes instead of calling memcpy(). Simpler and potentially
2002-03-12  Sven Neumann  <sven@gimp.org>

	* gdk-pixbuf.c (gdk_pixbuf_fill): use sequential writes instead of
	calling memcpy(). Simpler and potentially faster. (#70332)
2002-03-12 20:38:49 +00:00
Owen Taylor
ed5fc07f4e Bullet-proof against integer overflow.
Sat Mar  2 21:28:03 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixbuf.c (gdk_pixbuf_new): Bullet-proof against integer
        overflow.
2002-03-03 02:35:25 +00:00
Matthias Clasen
50e6308388 Merge 16- and 32-bit ico support from the stable branch. (#61179)
* io-ico.c: Merge 16- and 32-bit ico support from the stable
        branch.  (#61179)

        * io-gif.c: Recomposite all images if the animation size changes
        while loading.  (#70055)

        * gdk-pixbuf.c (gdk-pixbuf-fill): Make it work for subpixbufs.
        (#70055)
2002-02-01 23:43:07 +00:00
Matthias Clasen
237a59fce9 Forgotten files. 2001-12-20 23:44:19 +00:00
Sebastian Wilhelmi
d99bd97fe8 Remove assorted G_OBJECT casts where unnecessary.
2001-12-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c,
	io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove
	assorted G_OBJECT casts where unnecessary.

	* gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref
	instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref
	resp.

	* gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c,
	io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c,
	io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and
	gdk_pixbuf_unref.

	* Makefile.am, pixops/Makefile.am: Compile everything with
	-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED

	* gdk-pixdata.c: Use g_ascii_strup() instead of g_strup().

	* io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().

	* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
	demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
	and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
	resp.
2001-12-13 21:22:12 +00:00
Sven Neumann
40c2926482 gdk-pixbuf/gdk-pixbuf-io.c gdk-pixbuf/gdk-pixbuf-private.h
2001-10-05  Sven Neumann  <sven@gimp.org>

	* gdk-pixbuf/gdk-pixbuf-io.c
	* gdk-pixbuf/gdk-pixbuf-private.h
	* gdk-pixbuf/gdk-pixbuf.c
	* gdk-pixbuf/gdk-pixbuf.h
	* gdk-pixbuf/io-jpeg.c
	* gdk-pixbuf/io-png.c: changed GDK_PIXBUF_ERROR_BAD_OPTION_VALUE to
	GDK_PIXBUF_ERROR_BAD_OPTION to we can use it for bad keys too. Added
	new public API gdk_pixbuf_get_option() to retrieve key/value pairs
	set by an image loader. Added support for saving and reading PNG tEXt
	chunks in PNG images.

	* demos/testpixbuf-save.c
	* demos/testpixbuf-scale.c: simple tests for the new PNG tEXt chunk
	feature.

	* gdk-pixbuf/tmpl/gdk-pixbuf.sgml: adapt to changes in GDK_PIXBUF_ERROR
	enum.
2001-10-05 18:51:47 +00:00
Sven Neumann
85a58dddba a comment asked to optimize this function, so that's what I did.
2001-08-07  Sven Neumann  <sven@gimp.org>

	* gdk-pixbuf.c (gdk_pixbuf_fill): a comment asked to optimize this
	function, so that's what I did.
2001-08-07 17:49:09 +00:00
Havoc Pennington
b4e4a0ed9d fix some shell typos
2001-05-04  Havoc Pennington  <hp@redhat.com>

	* configure.in: fix some shell typos

	* gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix

	* gtk/gtkimage.c: handle animations

	* gtk/gtkcheckbutton.c (gtk_check_button_size_request): request
	border_width * 2, not just border_width

	* gtk/gtkscale.c: add "format_value" signal to allow people
	to override the way values are drawn.
	(gtk_scale_get_value_size): fix width/height mistake,
	and compute size from actual displayed text, not
	from made-up text.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in
	signal registration

	* tests/testtext.c: Add "Remove all tags" menu item for testing

	* gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement

	* demos/gtk-demo/main.c (main): add hack so we can find modules
	without installing gtk

	* demos/gtk-demo/textview.c (insert_text): demo font scaling

	* gtk/gtkcellrenderertext.c: Add "scale" property (font scaling
	factor)
	(gtk_cell_renderer_text_set_property): remove some bogus
	g_object_notify

	* gtk/gtktexttag.c: add "scale" property which is a font scaling
	factor

	* gtk/gtktextlayout.c (add_text_attrs): add font scale attribute
	to layout

	* gtk/gtktextiter.c (gtk_text_iter_is_start): rename from
	gtk_text_iter_is_first

2001-05-04  Havoc Pennington  <hp@redhat.com>

	* pixops/pixops.c (pixops_process): merge fix from stable: Patch
	 from hoshem@mel.comcen.com.au to fix nonzero X offsets.  Fixes
	 bug #50371.

        * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge
	from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix
	confusion of using "src" instead of "p".
        (pixops_composite_color_nearest): Use a more accurate (and
	correct, to begin with) compositing method.  This cures checks
	showing through on images with no alpha.

	* gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing
	bytes unfilled.

	* gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints

	* gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change
	area_updated signal to use signed ints.  Removed animation-related
	signals.

	* io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive
	rewrite action

	* gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract
	all the pesky details. Remove old frame-based API. Make
	GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
Havoc Pennington
60b6a010e9 fix to properly queue resizes when the image is set
2001-04-18  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkimage.c: fix to properly queue resizes when the image is
	set

	* gtk/gtktextview.c (gtk_text_view_do_popup): desensitize Paste
	if the insertion point isn't editable

	* demos/gtk-demo/images.c: Added a GtkImage demo

	* demos/gtk-demo/drawingarea.c: drawing area demo

	* demos/gtk-demo/menus.c (create_menu): cleanups

2001-04-18  Havoc Pennington  <hp@redhat.com>

	* gdk-pixbuf.c (gdk_pixbuf_fill): Function to fill pixbuf with a
	given color.
2001-04-18 18:09:18 +00:00
Alexander Larsson
ba46da61a7 Copy data and free data with free().
2001-02-19 Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
	Copy data and free data with free().

	* gdk-pixbuf/gdk-pixbuf.c:
	* gdk-pixbuf/io-jpeg.c:
	* gdk-pixbuf/io-png.c:
	Use g_try_malloc/g_free instead malloc/free.

	* gdk-pixbuf/test-gdk-pixbuf.c:
	Must... initialize... gobject...

	* gdk-pixbuf/pixops/timescale.c:
	* gtk/gtkcalendar.c:
	Use g_malloc instead of malloc.
2001-02-19 14:35:25 +00:00
Tim Janik
89a0a894bc removed gtk_signal_init() compat define.
Sun Feb  4 07:55:17 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.h: removed gtk_signal_init() compat define.

        * gtk/gtktypeutils.[hc]: gtk_tpye_init() take an additional argument
        GTypeDebugFlags debug_flags and pass it on to g_type_init ();
        deprecated this function.

        * gdk/gdk.c (gdk_init_check): call g_type_init () with 0 as
        argument.

Sun Feb  4 07:45:45 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkdebug.h: nuke GTK_DEBUG_OBJECTS and GTK_DEBUG_SIGNALS.

Sun Feb  4 07:59:57 2001  Tim Janik  <timj@gtk.org>

        * gdk-pixbuf.h: DOH! don't include glib/gobject.h but glib-object.h,
        we finally need the gobject->gruntime rename.

        * *.c: scratched calls to g_type_init(), there's simply no point in
        doing that, use gtk_init().
2001-02-04 07:05:29 +00:00
Havoc Pennington
98ee8c7252 include glib-object.h instead of gvaluetypes.h
2001-01-31  Havoc Pennington  <hp@pobox.com>

	* gdk-pixbuf.c: include glib-object.h instead of gvaluetypes.h
2001-01-31 15:09:59 +00:00
Havoc Pennington
e0fee22e78 Add built marshaller files to support GdkPixbufLoader signals
2001-01-22  Havoc Pennington  <hp@redhat.com>

	* Makefile.am: Add built marshaller files to support
	GdkPixbufLoader signals

	* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
	GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
	module location, rather than acting as a fallback, because we are
	using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.

	* gdk-pixbuf.h: include gdk-pixbuf-loader.h

        * gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
	from gtk, and add error to close(), because stop_load may do
	parsing of the image.

	* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file

        * io-*.c: make individual operations static, and add fill_vtable
	functions which are exported. Fix the collection of type warnings
	that surfaced, including a number of functions that didn't
	properly take a GError and some that weren't
	const-correct. Involved adding error handling for a few loaders.

	* gdk-pixbuf-io.h: Add error reporting to stop_load function

	* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
	a function that fills in the GdkPixbufModule vtable, instead of
	looking up all the image functions individually; this means we
	can get type safety within modules for the loader functions.
	Also it means you don't have to keep the statically compiled and
	GModule versions in sync.

	* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()

	* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()

	* gdk-pixbuf.h: nuke gdk_pixbuf_init()

	* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
	() here

	* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
	g_type_init() here


2001-01-22  Havoc Pennington  <hp@redhat.com>

	* demos/testanimation.c: fix to reflect gdk-pixbuf changes

	* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes

	* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
	Remove, move back to gdk-pixbuf

	* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
	to all the word functions

	* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
	before doing anything on NULL layout or if we don't have the focus

	* gtk/testtext.c (fill_example_buffer): "justification"

	* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
	to be called "justification" not "justify"

	* demos/gtk-demo/textview.c (create_tags): "justification"

	* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
Havoc Pennington
fe9f9d03f4 New function to create a pixbuf pointing to a subregion of another pixbuf.
2000-11-01  Havoc Pennington  <hp@pobox.com>

* gdk-pixbuf.c (gdk_pixbuf_new_subpixbuf): New function to create
a pixbuf pointing to a subregion of another pixbuf.

2000-11-01  Havoc Pennington  <hp@pobox.com>

* gtk/gtklabel.c (gtk_label_set_attributes): Set a PangoAttrList
on a label
(gtk_label_finalize): unref the attr list if any.

* gtk/testgtk.c (create_get_image): close test on second click
(make_message_dialog): close dialog if it exists

* gdk/gdkpango.c (gdk_draw_layout): Handle rise attribute

* gdk-2.0.pc.in (Requires): Make it require gdk-pixbuf-2.0 not
gdk-pixbuf

* gtk/gtklabel.c (gtk_label_set_markup): new function to set label
from Pango markup format
(gtk_label_set_markup_with_accel): ditto but with accelerator
parsing

* gtk/gtkimage.c (gtk_image_expose): reformatting.

* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Hack to
reflect current state of GDK - use gdk_drawable_get_colormap, etc.
Check GDK_IS_WINDOW() not !GDK_IS_PIXMAP() to decide whether to
call gdk_window_get_origin().

* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
implement GDK_PIXBUF_ALPHA_FULL
2000-11-01 07:07:46 +00:00
Tim Janik
d69496c060 urg, removed implementation of gtk_marshal_VOID__INT_INT_INT_INT. if
Wed Oct 25 20:47:41 2000  Tim Janik  <timj@gtk.org>

        * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init): urg, removed
        implementation of gtk_marshal_VOID__INT_INT_INT_INT. if people do that,
        couldn't they at least give it a non-standard name?

        * gtk/gtktextlayout.c: arg! yet another implementation of
        gtk_marshal_VOID__INT_INT_INT_INT(), is this a conspiracy?

        * gtk/gtktextbuffer.c: gotcha! captured a vagabonding
        gtk_marshal_VOID__INT_POINTER_INT() implementation, braught it back
        home. now i know this _is_ a conspiracy.

        * gtk/gtkwidget.c (gtk_widget_class_init): marshaller fixups for
        ::state-changed.

        * gtk/gtkaccelgroup.c (gtk_accel_group_create_remove):
        (gtk_accel_group_create_add): marshaller signature fixups.

        * gtk/gtklistitem.c (gtk_list_item_class_init): signal creation fixups,
        pass in GTK_TYPE_SCROLL_TYPE instead of GTK_TYPE_ENUM.

        * gtk/gtkobject.[hc]: removed GTK_CONNECTED flag, it's not valid
        anymore.

Tue Oct 24 23:59:21 2000  Tim Janik  <timj@gtk.org>

        * docs/reference/Makefile.am: disabled SUBDIRS for the moment, since
        due to the signal system changes, it wouldn't build currently. to
        be fixed soon.

        * docs/Changes-2.0.txt: GtkSignal/GSignal updates.

        * gtk/gtkwidget.c: ::direction_changed takes an enum as argument,
        so it needs gtk_marshal_VOID__ENUM() instead of
        gtk_marshal_NONE__UINT().

        * gdk/gdk*.c: adapted type registration functions.

        * gtk/gtkbindings.c:
        * gtk/gtkaccelgroup.c: operate on GSignalQuery, GtkSignalQuery is
        gone.

        * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType.

        * gtk/gtkobject.c:
        (gtk_object_destroy):
        (gtk_object_shutdown): fixed recursion guards. basically we have to
        catch the case where any of GObject.shutdown() or gtk_object_destroy()
        is called during ::destroy, and avoid recursion there.

        * gtk/gtktypeutils.c:
        * gtk/maketypes.awk: awk-script hackup to provide gtk_type_init() with
        boxed_copy/boxed_free. this needs a more general solution based on a
        publically installed code-generator utility.

        * gtk/gtktypeutils.[hc]: compat aliased GTK_TYPE_BOXED to G_TYPE_BOXED,
        glib's gobject has support for that now.
        define GtkSignalMarshaller in terms of GSignalCMarshaller.


Mon Oct 23 09:36:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]:
        * gtk/gtkmarshal.[hc]:
        * gtk/Makefile.am: generate marshallers with glib-genmarshal and don't
        compile gtkmarshal.c on its own anymore, just include it in gtksignal.c.
        removed #include <gtkmarshal.h>s all over the place, gtksignal.h takes
        care of that.

        * *.c: marshaller name fixups.

        * gtk/gtkmarshal.list: added a comment briefing the format.

Sun Oct 22 23:14:39 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]: nuked old implementation. we mostly have
        compatibility macros here now. more specifically, most of
        the API is preserved (yes, _most_, nonwithstanding the
        following exceptions listed, the API is stil lHUGE ;)
        things that got removed completely:
        GtkSignalQuery, gtk_signal_query(), gtk_signal_n_emissions(),
        gtk_signal_n_emissions_by_name(), gtk_signal_handlers_destroy(),
        gtk_signal_set_funcs(), gtk_signal_handler_pending_by_id(),
        gtk_signal_add_emission_hook(), gtk_signal_add_emission_hook_full(),
        gtk_signal_remove_emission_hook().
        non-functional functions variants:
        gtk_signal_add_emission_hook(), gtk_signal_remove_emission_hook().
        the GtkCallbackMarshal argument to gtk_signal_connect_full() is
        not supported anymore.
        (gtk_signal_compat_matched): new internal function to aid
        implementation of the compatibility macros, it  provides
        functionality to block/unblock/disconnect handlers based
        on func/data.

        * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType,

        * *.c: adaptions to new type registration API signatures.


Fri Oct 20 15:26:33 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.[hc]: removed G_TYPE_GTK_POINTER cludge.
2000-10-25 22:34:14 +00:00
Havoc Pennington
6b9f907270 Pixbuf saving, patch from David Welton.
2000-10-05  Havoc Pennington  <hp@redhat.com>

        Pixbuf saving, patch from David Welton.

	* Makefile.am (GDK_PIXBUF_LIBS): add INTLLIBS
	(libgdk_pixbuf_1_3_la_SOURCES): add gdk-pixbuf-i18n.h

	* gdk-pixbuf-i18n.h: Add _() to gdk-pixbuf

	* io-png.c (gdk_pixbuf__png_image_save): PNG save routine.

	* io-jpeg.c (gdk_pixbuf__jpeg_image_save): JPEG save routine.

	* gdk-pixbuf-io.c (gdk_pixbuf_save):
	(gdk_pixbuf_savev): Implement pixbuf saving routines

	* gdk-pixbuf.c (gdk_pixbuf_error_quark): pixbuf error quark
	function

	* gdk-pixbuf.h: Add public save routines; add pixbuf error
	types

	* gdk-pixbuf-io.h: Add save function to GdkPixbufModule

2000-10-05  Havoc Pennington  <hp@redhat.com>

        * demos/testpixbuf-save.c: add pixbuf save test

	* demos/Makefile.am: add testpixbuf-save.c
2000-10-06 18:19:18 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Owen Taylor
0bcf86c032 use FALSE for size_only most of the time when calling
Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c: use FALSE for size_only most
	of the time when calling gtk_text_layout_get_line_display()
	to avoid causing double reshapes when a redraw follows
	immediately after.

Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
	appropriate region and gdk_window_process_updates() so trough
	updating doesn't lag behind the window being scrolled.

        * gdk/gdkgc.c: Make parent_class pointer static.

Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
	include <string.h>.

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
	cut-and-paste error in computing memory offset for 4 channels.
2000-07-14 20:24:14 +00:00
Havoc Pennington
3a422541e3 Convert GdkPixbuf to GObject, leaving it opaque (i.e. derivation is not
2000-06-21  Havoc Pennington  <hp@pobox.com>

* gdk-pixbuf.c: Convert GdkPixbuf to GObject, leaving it opaque
(i.e. derivation is not allowed, and there are no virtual methods
anyway).
(gdk_pixbuf_preinit): Call g_type_init() here.
(gdk_pixbuf_init): Add a user-friendly init function, for users
of standalone gdk-pixbuf

* gdk-pixbuf-animation.c: Convert to GObject, in the same
way GdkPixbufAnimation was done.

* gdk-pixbuf.h: Remove gdk_pixbuf_set_unref_handler() and
gdk_pixbuf_finalize() from API, since these are broken and don't
make sense with new GObject stuff.

2000-06-21  Havoc Pennington  <hp@pobox.com>

* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Fix bug where
we didn't check window->bg_pixmap != GDK_NO_BG.

* gtk/gdk-pixbuf-loader.c: Change to reflect GObject-ification of
gdk-pixbuf
2000-06-22 15:36:12 +00:00
Federico Mena Quintero
37ac7d593e Your eyes are bloodshot.
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-13 01:18:41 +00:00
Federico Mena Quintero
829ed02435 Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)
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-04-11 07:03:25 +00:00