1999-10-20 21:20:49 +00:00
|
|
|
|
/* GdkPixbuf library - Main header file
|
1999-10-18 19:29:45 +00:00
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 1999 The Free Software Foundation
|
|
|
|
|
*
|
|
|
|
|
* Authors: Mark Crichton <crichton@gimp.org>
|
|
|
|
|
* Miguel de Icaza <miguel@gnu.org>
|
|
|
|
|
* Federico Mena-Quintero <federico@gimp.org>
|
2000-04-11 07:03:25 +00:00
|
|
|
|
* Havoc Pennington <hp@redhat.com>
|
1999-10-18 19:29:45 +00:00
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1999-10-18 19:29:45 +00:00
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
|
* Lesser General Public License for more details.
|
1999-10-18 19:29:45 +00:00
|
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1999-10-18 19:29:45 +00:00
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef GDK_PIXBUF_H
|
|
|
|
|
#define GDK_PIXBUF_H
|
1999-01-04 23:53:12 +00:00
|
|
|
|
|
2000-06-21 20:47:22 +00:00
|
|
|
|
#include <glib.h>
|
2000-01-10 19:17:42 +00:00
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf-features.h>
|
2001-02-04 07:05:29 +00:00
|
|
|
|
#include <glib-object.h>
|
1999-09-22 22:30:51 +00:00
|
|
|
|
|
Include files outside of the extern "C" block. Makes some C++ compiler
2000-07-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk-pixbuf/gdk-pixbuf.h, gtk/gtkhsv.h, gtk/gtktextbtree.h,
gtk/gtktextbuffer.h, gtk/gtktextchild.h, gtk/gtktextdisplay.h,
gtk/gtktextiter.h, gtk/gtktextiterprivate.h, gtk/gtktextlayout.h,
gtk/gtktextmarkprivate.h, gtk/gtktextsegment.h, gtk/gtktexttag.h,
gtk/gtktexttagtable.h, gtk/gtktexttypes.h, gtk/gtktextview.h,
gtk/gtktypeutils.h: Include files outside of the extern "C"
block. Makes some C++ compiler happy. Reported by Denis Vakatov
<vakatov@peony.nlm.nih.gov>.
I really hope not to have caused a merging nightmare for all
the branches out there. Otherwise I'll be available for crucifixion.
2000-07-19 16:11:40 +00:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
|
1999-01-04 23:53:12 +00:00
|
|
|
|
|
2000-10-09 17:22:20 +00:00
|
|
|
|
/* Alpha compositing mode */
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2000-10-18 18:42:54 +00:00
|
|
|
|
GDK_PIXBUF_ALPHA_BILEVEL,
|
|
|
|
|
GDK_PIXBUF_ALPHA_FULL
|
2000-10-09 17:22:20 +00:00
|
|
|
|
} GdkPixbufAlphaMode;
|
|
|
|
|
|
Move more text widget headers into the private header list
2000-09-26 Havoc Pennington <hp@redhat.com>
* gtk/Makefile.am (gtk_private_h_sources): Move more text widget
headers into the private header list
* Makefile.am (pkgconfig_DATA): install pkg-config files
* configure.in: add pkg-config files
* gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files
* gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate
outstanding icon caches on theme change.
* gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three
important types:
(GtkIconSource): Specification for creating a pixbuf
appropriate for a direction/state/size triplet from
a source pixbuf or filename
(GtkIconSet): List of GtkIconSource objects that are used to
create the "same" icon (e.g. an OK button icon), and cache for
rendered icons
(GtkIconFactory): Hash from stock ID to GtkIconSet; used to look
up the icon set for a given stock ID. GTK maintains a stack of
GtkIconFactory to search, and applications or libraries can add
additional icon factories on top of the stack
* gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse
the set of GtkIconSource specified for a given stock ID into
a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the
RcStyle, under the specified stock ID.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function
render_icon used to derive a GdkPixbuf from a GtkIconSource.
This allows people to theme how prelight, insensitive, etc. are
done.
(gtk_style_lookup_icon_set): Look up a stock ID in the list of
icon factories for a style, and return the resulting
icon set if any.
(gtk_style_render_icon): Render an icon using the render_icon
method in the GtkStyleClass.
* gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon):
Use the style for a given widget to look up a stock ID, get the
icon set, and render an icon using the render_icon method
of the style
* gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type
(contains information about a stock item), the built-in stock item
IDs, and functions to add/lookup stock items.
* gtk/stock-icons/*: Stock icons that come with GTK
* gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns
a button based on a GtkStockItem
(gtk_button_new_accel): Takes a uline string and accel group, and
installs the accelerator.
* gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic
image-display widget.
2000-09-26 20:22:17 +00:00
|
|
|
|
/* Color spaces; right now only RGB is supported.
|
|
|
|
|
* Note that these values are encoded in inline pixbufs
|
|
|
|
|
* as ints, so don't reorder them
|
|
|
|
|
*/
|
2000-01-02 03:59:22 +00:00
|
|
|
|
typedef enum {
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GDK_COLORSPACE_RGB
|
|
|
|
|
} GdkColorspace;
|
1999-12-10 23:15:20 +00:00
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* All of these are opaque structures */
|
|
|
|
|
typedef struct _GdkPixbuf GdkPixbuf;
|
|
|
|
|
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
|
2001-05-07 15:58:47 +00:00
|
|
|
|
typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
|
2000-06-22 15:36:12 +00:00
|
|
|
|
typedef struct _GdkPixbufFrame GdkPixbufFrame;
|
|
|
|
|
|
|
|
|
|
#define GDK_TYPE_PIXBUF (gdk_pixbuf_get_type ())
|
|
|
|
|
#define GDK_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF, GdkPixbuf))
|
|
|
|
|
#define GDK_IS_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF))
|
|
|
|
|
|
|
|
|
|
#define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ())
|
|
|
|
|
#define GDK_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimation))
|
|
|
|
|
#define GDK_IS_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION))
|
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
#define GDK_TYPE_PIXBUF_ANIMATION_ITER (gdk_pixbuf_animation_iter_get_type ())
|
|
|
|
|
#define GDK_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter))
|
|
|
|
|
#define GDK_IS_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER))
|
2000-04-03 08:59:43 +00:00
|
|
|
|
|
2000-04-13 01:18:41 +00:00
|
|
|
|
/* Handler that must free the pixel array */
|
2000-04-11 07:03:25 +00:00
|
|
|
|
typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data);
|
1999-12-10 23:15:20 +00:00
|
|
|
|
|
2000-10-06 18:19:18 +00:00
|
|
|
|
#define GDK_PIXBUF_ERROR gdk_pixbuf_error_quark ()
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
2000-10-18 18:42:54 +00:00
|
|
|
|
/* image data hosed */
|
|
|
|
|
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
|
|
|
|
/* no mem to load image */
|
|
|
|
|
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
|
2001-10-05 18:51:47 +00:00
|
|
|
|
/* bad option passed to save routine */
|
|
|
|
|
GDK_PIXBUF_ERROR_BAD_OPTION,
|
2000-10-06 18:26:23 +00:00
|
|
|
|
/* unsupported image type (sort of an ENOSYS) */
|
|
|
|
|
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
|
2000-10-18 18:42:54 +00:00
|
|
|
|
/* unsupported operation (load, save) for image type */
|
|
|
|
|
GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION,
|
2000-10-06 18:19:18 +00:00
|
|
|
|
GDK_PIXBUF_ERROR_FAILED
|
2000-10-18 18:42:54 +00:00
|
|
|
|
} GdkPixbufError;
|
2000-10-06 18:19:18 +00:00
|
|
|
|
|
2001-05-29 23:28:28 +00:00
|
|
|
|
GQuark gdk_pixbuf_error_quark (void) G_GNUC_CONST;
|
2000-10-06 18:19:18 +00:00
|
|
|
|
|
1999-10-18 19:29:45 +00:00
|
|
|
|
|
|
|
|
|
|
2000-08-30 00:33:38 +00:00
|
|
|
|
GType gdk_pixbuf_get_type (void) G_GNUC_CONST;
|
2000-06-22 15:36:12 +00:00
|
|
|
|
|
1999-10-20 21:20:49 +00:00
|
|
|
|
/* Reference counting */
|
1999-10-18 19:29:45 +00:00
|
|
|
|
|
2000-04-13 01:18:41 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf);
|
|
|
|
|
void gdk_pixbuf_unref (GdkPixbuf *pixbuf);
|
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* GdkPixbuf accessors */
|
|
|
|
|
|
|
|
|
|
GdkColorspace gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf);
|
|
|
|
|
int gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf);
|
|
|
|
|
gboolean gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf);
|
|
|
|
|
int gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf);
|
|
|
|
|
guchar *gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf);
|
|
|
|
|
int gdk_pixbuf_get_width (const GdkPixbuf *pixbuf);
|
|
|
|
|
int gdk_pixbuf_get_height (const GdkPixbuf *pixbuf);
|
|
|
|
|
int gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf);
|
|
|
|
|
|
|
|
|
|
|
1999-07-16 20:35:21 +00:00
|
|
|
|
|
1999-10-27 23:36:44 +00:00
|
|
|
|
/* Create a blank pixbuf with an optimal rowstride and a new buffer */
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample,
|
1999-10-27 23:36:44 +00:00
|
|
|
|
int width, int height);
|
1999-10-27 17:28:44 +00:00
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* Copy a pixbuf */
|
|
|
|
|
|
|
|
|
|
GdkPixbuf *gdk_pixbuf_copy (const GdkPixbuf *pixbuf);
|
|
|
|
|
|
2000-11-01 07:07:46 +00:00
|
|
|
|
/* Create a pixbuf which points to the pixels of another pixbuf */
|
|
|
|
|
GdkPixbuf *gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf,
|
|
|
|
|
int src_x,
|
|
|
|
|
int src_y,
|
|
|
|
|
int width,
|
|
|
|
|
int height);
|
|
|
|
|
|
1999-10-20 21:20:49 +00:00
|
|
|
|
/* Simple loading */
|
|
|
|
|
|
2000-10-18 18:42:54 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename,
|
|
|
|
|
GError **error);
|
2000-01-02 03:59:22 +00:00
|
|
|
|
|
2000-02-14 20:06:23 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkColorspace colorspace,
|
2000-01-02 03:59:22 +00:00
|
|
|
|
gboolean has_alpha,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
int bits_per_sample,
|
2000-01-02 03:59:22 +00:00
|
|
|
|
int width, int height,
|
|
|
|
|
int rowstride,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkPixbufDestroyNotify destroy_fn,
|
|
|
|
|
gpointer destroy_fn_data);
|
1999-10-20 21:20:49 +00:00
|
|
|
|
|
2000-01-02 03:59:22 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data);
|
2001-10-10 16:56:18 +00:00
|
|
|
|
GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length,
|
|
|
|
|
const guint8 *data,
|
2001-06-26 20:56:32 +00:00
|
|
|
|
gboolean copy_pixels,
|
|
|
|
|
GError **error);
|
|
|
|
|
|
2001-04-18 18:09:18 +00:00
|
|
|
|
/* Mutations */
|
|
|
|
|
void gdk_pixbuf_fill (GdkPixbuf *pixbuf,
|
|
|
|
|
guint32 pixel);
|
2000-10-06 18:19:18 +00:00
|
|
|
|
|
|
|
|
|
/* Saving */
|
|
|
|
|
|
|
|
|
|
gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf,
|
|
|
|
|
const char *filename,
|
2000-10-18 18:42:54 +00:00
|
|
|
|
const char *type,
|
|
|
|
|
GError **error,
|
2000-10-06 18:19:18 +00:00
|
|
|
|
...);
|
|
|
|
|
|
|
|
|
|
gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf,
|
|
|
|
|
const char *filename,
|
2000-10-18 18:42:54 +00:00
|
|
|
|
const char *type,
|
2000-10-06 18:19:18 +00:00
|
|
|
|
char **option_keys,
|
|
|
|
|
char **option_values,
|
2000-10-18 18:42:54 +00:00
|
|
|
|
GError **error);
|
2000-10-06 18:19:18 +00:00
|
|
|
|
|
2000-01-02 03:59:22 +00:00
|
|
|
|
/* Adding an alpha channel */
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color,
|
1999-12-02 17:45:47 +00:00
|
|
|
|
guchar r, guchar g, guchar b);
|
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* Copy an area of a pixbuf onto another one */
|
|
|
|
|
void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf,
|
|
|
|
|
int src_x, int src_y,
|
|
|
|
|
int width, int height,
|
|
|
|
|
GdkPixbuf *dest_pixbuf,
|
|
|
|
|
int dest_x, int dest_y);
|
|
|
|
|
|
Move more text widget headers into the private header list
2000-09-26 Havoc Pennington <hp@redhat.com>
* gtk/Makefile.am (gtk_private_h_sources): Move more text widget
headers into the private header list
* Makefile.am (pkgconfig_DATA): install pkg-config files
* configure.in: add pkg-config files
* gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files
* gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate
outstanding icon caches on theme change.
* gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three
important types:
(GtkIconSource): Specification for creating a pixbuf
appropriate for a direction/state/size triplet from
a source pixbuf or filename
(GtkIconSet): List of GtkIconSource objects that are used to
create the "same" icon (e.g. an OK button icon), and cache for
rendered icons
(GtkIconFactory): Hash from stock ID to GtkIconSet; used to look
up the icon set for a given stock ID. GTK maintains a stack of
GtkIconFactory to search, and applications or libraries can add
additional icon factories on top of the stack
* gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse
the set of GtkIconSource specified for a given stock ID into
a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the
RcStyle, under the specified stock ID.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function
render_icon used to derive a GdkPixbuf from a GtkIconSource.
This allows people to theme how prelight, insensitive, etc. are
done.
(gtk_style_lookup_icon_set): Look up a stock ID in the list of
icon factories for a style, and return the resulting
icon set if any.
(gtk_style_render_icon): Render an icon using the render_icon
method in the GtkStyleClass.
* gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon):
Use the style for a given widget to look up a stock ID, get the
icon set, and render an icon using the render_icon method
of the style
* gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type
(contains information about a stock item), the built-in stock item
IDs, and functions to add/lookup stock items.
* gtk/stock-icons/*: Stock icons that come with GTK
* gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns
a button based on a GtkStockItem
(gtk_button_new_accel): Takes a uline string and accel group, and
installs the accelerator.
* gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic
image-display widget.
2000-09-26 20:22:17 +00:00
|
|
|
|
/* Brighten/darken and optionally make it pixelated-looking */
|
|
|
|
|
void gdk_pixbuf_saturate_and_pixelate (const GdkPixbuf *src,
|
|
|
|
|
GdkPixbuf *dest,
|
|
|
|
|
gfloat saturation,
|
|
|
|
|
gboolean pixelate);
|
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
|
|
|
|
|
|
1999-10-27 23:36:44 +00:00
|
|
|
|
/* Rendering to a drawable */
|
2000-04-11 07:03:25 +00:00
|
|
|
|
|
2000-01-13 07:24:49 +00:00
|
|
|
|
|
2000-01-05 21:33:58 +00:00
|
|
|
|
/* Scaling */
|
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* Interpolation modes */
|
|
|
|
|
typedef enum {
|
|
|
|
|
GDK_INTERP_NEAREST,
|
|
|
|
|
GDK_INTERP_TILES,
|
|
|
|
|
GDK_INTERP_BILINEAR,
|
|
|
|
|
GDK_INTERP_HYPER
|
|
|
|
|
} GdkInterpType;
|
|
|
|
|
|
2000-02-03 23:36:14 +00:00
|
|
|
|
void gdk_pixbuf_scale (const GdkPixbuf *src,
|
|
|
|
|
GdkPixbuf *dest,
|
|
|
|
|
int dest_x,
|
|
|
|
|
int dest_y,
|
|
|
|
|
int dest_width,
|
|
|
|
|
int dest_height,
|
|
|
|
|
double offset_x,
|
|
|
|
|
double offset_y,
|
|
|
|
|
double scale_x,
|
|
|
|
|
double scale_y,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkInterpType interp_type);
|
2000-02-03 23:36:14 +00:00
|
|
|
|
void gdk_pixbuf_composite (const GdkPixbuf *src,
|
|
|
|
|
GdkPixbuf *dest,
|
|
|
|
|
int dest_x,
|
|
|
|
|
int dest_y,
|
|
|
|
|
int dest_width,
|
|
|
|
|
int dest_height,
|
|
|
|
|
double offset_x,
|
|
|
|
|
double offset_y,
|
|
|
|
|
double scale_x,
|
|
|
|
|
double scale_y,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkInterpType interp_type,
|
2000-02-03 23:36:14 +00:00
|
|
|
|
int overall_alpha);
|
|
|
|
|
void gdk_pixbuf_composite_color (const GdkPixbuf *src,
|
|
|
|
|
GdkPixbuf *dest,
|
|
|
|
|
int dest_x,
|
|
|
|
|
int dest_y,
|
|
|
|
|
int dest_width,
|
|
|
|
|
int dest_height,
|
|
|
|
|
double offset_x,
|
|
|
|
|
double offset_y,
|
|
|
|
|
double scale_x,
|
|
|
|
|
double scale_y,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkInterpType interp_type,
|
2000-02-03 23:36:14 +00:00
|
|
|
|
int overall_alpha,
|
|
|
|
|
int check_x,
|
|
|
|
|
int check_y,
|
|
|
|
|
int check_size,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
guint32 color1,
|
|
|
|
|
guint32 color2);
|
2000-02-03 23:36:14 +00:00
|
|
|
|
|
|
|
|
|
GdkPixbuf *gdk_pixbuf_scale_simple (const GdkPixbuf *src,
|
|
|
|
|
int dest_width,
|
|
|
|
|
int dest_height,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkInterpType interp_type);
|
|
|
|
|
|
2000-02-03 23:36:14 +00:00
|
|
|
|
GdkPixbuf *gdk_pixbuf_composite_color_simple (const GdkPixbuf *src,
|
|
|
|
|
int dest_width,
|
|
|
|
|
int dest_height,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
GdkInterpType interp_type,
|
2000-02-03 23:36:14 +00:00
|
|
|
|
int overall_alpha,
|
|
|
|
|
int check_size,
|
2000-04-11 07:03:25 +00:00
|
|
|
|
guint32 color1,
|
|
|
|
|
guint32 color2);
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 21:33:58 +00:00
|
|
|
|
|
2000-01-02 03:59:22 +00:00
|
|
|
|
/* Animation support */
|
1999-12-10 23:15:20 +00:00
|
|
|
|
|
2000-08-30 00:33:38 +00:00
|
|
|
|
GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST;
|
2000-06-22 15:36:12 +00:00
|
|
|
|
|
2000-10-18 18:42:54 +00:00
|
|
|
|
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename,
|
|
|
|
|
GError **error);
|
1999-12-10 23:15:20 +00:00
|
|
|
|
|
2000-04-04 05:17:49 +00:00
|
|
|
|
GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
|
|
|
|
|
void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation);
|
|
|
|
|
|
|
|
|
|
int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation);
|
|
|
|
|
int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation);
|
2001-05-07 15:58:47 +00:00
|
|
|
|
gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *animation);
|
|
|
|
|
GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation);
|
1999-12-11 00:21:27 +00:00
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation,
|
|
|
|
|
const GTimeVal *start_time);
|
|
|
|
|
GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST;
|
|
|
|
|
int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter);
|
|
|
|
|
GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter);
|
|
|
|
|
gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter);
|
|
|
|
|
gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter,
|
|
|
|
|
const GTimeVal *current_time);
|
2000-04-11 07:03:25 +00:00
|
|
|
|
|
|
|
|
|
|
2001-10-05 18:51:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
G_CONST_RETURN gchar * gdk_pixbuf_get_option (GdkPixbuf *pixbuf,
|
|
|
|
|
const gchar *key);
|
|
|
|
|
|
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
|
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
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
|
2001-09-16 23:54:37 +00:00
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf-enum-types.h>
|
2000-01-10 19:17:42 +00:00
|
|
|
|
|
1999-10-18 19:29:45 +00:00
|
|
|
|
|
1999-10-08 23:01:05 +00:00
|
|
|
|
|
1999-10-18 19:29:45 +00:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
1999-10-08 23:01:05 +00:00
|
|
|
|
|
1999-10-18 19:29:45 +00:00
|
|
|
|
#endif
|