mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
37ac7d593e
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.
197 lines
4.3 KiB
Makefile
197 lines
4.3 KiB
Makefile
SUBDIRS = pixops
|
|
|
|
if BUILD_CANVAS_ITEM
|
|
CANVAS_PIXBUF_LIB = libgnomecanvaspixbuf.la
|
|
CANVAS_PIXBUF_HEADERFILES=gnome-canvas-pixbuf.h
|
|
libgnomecanvaspixbuf_la_SOURCES = gnome-canvas-pixbuf.c
|
|
EXTRA_GNOME_LIBS = $(GNOME_LIBS)
|
|
else
|
|
CANVAS_PIXBUF_LIB =
|
|
CANVAS_PIXBUF_HEADERFILES =
|
|
EXTRA_GNOME_LIBS =
|
|
endif
|
|
|
|
lib_LTLIBRARIES = \
|
|
libgdk_pixbuf.la \
|
|
$(CANVAS_PIXBUF_LIB)
|
|
|
|
libgnomecanvaspixbuf_la_LDFLAGS = -version-info 1:0:0 $(EXTRA_GNOME_LIBS)
|
|
|
|
libexecdir = $(libdir)/gdk-pixbuf/loaders
|
|
|
|
#
|
|
# The PNG plugin.
|
|
#
|
|
libpixbufloader_png_la_SOURCES = io-png.c
|
|
libpixbufloader_png_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_png_la_LIBADD = $(LIBPNG)
|
|
|
|
#
|
|
# The JPEG loader
|
|
#
|
|
libpixbufloader_jpeg_la_SOURCES = io-jpeg.c
|
|
libpixbufloader_jpeg_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_jpeg_la_LIBADD = $(LIBJPEG)
|
|
|
|
#
|
|
# The XPM loader
|
|
#
|
|
libpixbufloader_xpm_la_SOURCES = io-xpm.c
|
|
libpixbufloader_xpm_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_xpm_la_LIBADD =
|
|
|
|
#
|
|
# The GIF loader
|
|
#
|
|
libpixbufloader_gif_la_SOURCES = io-gif.c
|
|
libpixbufloader_gif_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_gif_la_LIBADD =
|
|
|
|
#
|
|
# The ICO loader
|
|
#
|
|
libpixbufloader_ico_la_SOURCES = io-ico.c
|
|
libpixbufloader_ico_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_ico_la_LIBADD =
|
|
|
|
#
|
|
# The RAS loader
|
|
#
|
|
libpixbufloader_ras_la_SOURCES = io-ras.c
|
|
libpixbufloader_ras_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_ras_la_LIBADD =
|
|
|
|
#
|
|
# The TIFF loader
|
|
#
|
|
libpixbufloader_tiff_la_SOURCES = io-tiff.c
|
|
libpixbufloader_tiff_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_tiff_la_LIBADD = $(LIBTIFF)
|
|
|
|
#
|
|
# The PNM loader
|
|
#
|
|
libpixbufloader_pnm_la_SOURCES = io-pnm.c
|
|
libpixbufloader_pnm_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_pnm_la_LIBADD =
|
|
|
|
#
|
|
# The BMP loader
|
|
#
|
|
libpixbufloader_bmp_la_SOURCES = io-bmp.c
|
|
libpixbufloader_bmp_la_LDFLAGS = -version-info 1:0:0 -module
|
|
libpixbufloader_bmp_la_LIBADD =
|
|
|
|
if HAVE_PNG
|
|
PNG_LIB = libpixbufloader-png.la
|
|
endif
|
|
|
|
if HAVE_JPEG
|
|
JPEG_LIB = libpixbufloader-jpeg.la
|
|
endif
|
|
|
|
GIF_LIB = libpixbufloader-gif.la
|
|
|
|
ICO_LIB = libpixbufloader-ico.la
|
|
|
|
RAS_LIB = libpixbufloader-ras.la
|
|
|
|
if HAVE_TIFF
|
|
TIFF_LIB = libpixbufloader-tiff.la
|
|
endif
|
|
|
|
XPM_LIB = libpixbufloader-xpm.la
|
|
|
|
PNM_LIB = libpixbufloader-pnm.la
|
|
|
|
BMP_LIB = libpixbufloader-bmp.la
|
|
|
|
if BUILD_DYNAMIC_MODULES
|
|
|
|
libexec_LTLIBRARIES = \
|
|
$(PNG_LIB) \
|
|
$(JPEG_LIB) \
|
|
$(GIF_LIB) \
|
|
$(ICO_LIB) \
|
|
$(RAS_LIB) \
|
|
$(XPM_LIB) \
|
|
$(TIFF_LIB) \
|
|
$(PNM_LIB) \
|
|
$(BMP_LIB)
|
|
|
|
|
|
extra_sources =
|
|
|
|
else
|
|
libexec_LTLIBRARIES =
|
|
|
|
extra_sources = $(libpixbufloader_png_la_SOURCES) \
|
|
$(libpixbufloader_jpeg_la_SOURCES) \
|
|
$(libpixbufloader_xpm_la_SOURCES) \
|
|
$(libpixbufloader_gif_la_SOURCES) \
|
|
$(libpixbufloader_ico_la_SOURCES) \
|
|
$(libpixbufloader_ras_la_SOURCES) \
|
|
$(libpixbufloader_tiff_la_SOURCES) \
|
|
$(libpixbufloader_pnm_la_SOURCES) \
|
|
$(libpixbufloader_bmp_la_SOURCES)
|
|
|
|
builtin_libraries =
|
|
endif
|
|
|
|
noinst_PROGRAMS = testpixbuf testpixbuf-drawable testanimation testpixbuf-scale
|
|
|
|
DEPS = libgdk_pixbuf.la
|
|
INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
|
|
-I$(top_srcdir)/gdk-pixbuf \
|
|
-I$(top_builddir)/gdk-pixbuf \
|
|
$(GLIB_CFLAGS) $(GTK_CFLAGS)
|
|
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\""
|
|
|
|
LDADDS = libgdk_pixbuf.la $(GLIB_LIBS) $(GTK_LIBS) $(STATIC_LIB_DEPS)
|
|
|
|
if INSIDE_GNOME_LIBS
|
|
testpixbuf_LDADD = $(LDADDS) -lgmodule
|
|
testpixbuf_drawable_LDADD = $(LDADDS)
|
|
testpixbuf_scale_LDADD = $(LDADDS)
|
|
testanimation_LDADD = $(LDADDS) -lgmodule
|
|
else
|
|
testpixbuf_LDADD = $(LDADDS) $(GNOME_LIBS) -lgmodule
|
|
testpixbuf_drawable_LDADD = $(LDADDS) $(GNOME_LIBS)
|
|
testpixbuf_scale_LDADD = $(LDADDS) $(GNOME_LIBS)
|
|
testanimation_LDADD = $(LDADDS) $(GNOME_LIBS) -lgmodule
|
|
endif
|
|
|
|
|
|
GDK_PIXBUF_LIBS = $(GLIB_LIBS) $(GTK_LIBS)
|
|
|
|
#
|
|
# The GdkPixBuf library
|
|
#
|
|
|
|
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
|
|
|
|
libgdk_pixbuf_la_SOURCES = \
|
|
gdk-pixbuf.c \
|
|
gdk-pixbuf-animation.c \
|
|
gdk-pixbuf-data.c \
|
|
gdk-pixbuf-drawable.c \
|
|
gdk-pixbuf-io.c \
|
|
gdk-pixbuf-loader.c \
|
|
gdk-pixbuf-render.c \
|
|
gdk-pixbuf-scale.c \
|
|
gdk-pixbuf-util.c \
|
|
$(extra_sources)
|
|
|
|
libgdk_pixbuf_la_LDFLAGS = -version-info 2:0:0 $(GLIB_LIBS) $(GTK_LIBS)
|
|
libgdk_pixbuf_la_LIBADD = pixops/libpixops.la
|
|
|
|
libgdk_pixbufinclude_HEADERS = \
|
|
gdk-pixbuf.h \
|
|
gdk-pixbuf-loader.h \
|
|
gdk-pixbuf-features.h \
|
|
$(CANVAS_PIXBUF_HEADERFILES)
|
|
|
|
noinst_HEADERS = \
|
|
gdk-pixbuf-io.h \
|
|
gdk-pixbuf-private.h
|