2001-05-07 15:58:47 +00:00
|
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* GdkPixbuf library - Private declarations
|
|
|
|
|
*
|
|
|
|
|
* 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>
|
|
|
|
|
* Havoc Pennington <hp@redhat.com>
|
|
|
|
|
*
|
|
|
|
|
* 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
|
2000-04-11 07:03:25 +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.
|
2000-04-11 07:03:25 +00:00
|
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2000-04-11 07:03:25 +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_PRIVATE_H
|
|
|
|
|
#define GDK_PIXBUF_PRIVATE_H
|
|
|
|
|
|
|
|
|
|
#include "gdk-pixbuf.h"
|
2002-10-03 22:39:51 +00:00
|
|
|
|
#include "gdk-pixbuf-io.h"
|
|
|
|
|
#include "gdk-pixbuf-i18n.h"
|
|
|
|
|
#include <stdio.h>
|
2000-04-11 07:03:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-06-22 15:36:12 +00:00
|
|
|
|
typedef struct _GdkPixbufClass GdkPixbufClass;
|
|
|
|
|
|
|
|
|
|
#define GDK_PIXBUF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF, GdkPixbufClass))
|
|
|
|
|
#define GDK_IS_PIXBUF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF))
|
|
|
|
|
#define GDK_PIXBUF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF, GdkPixbufClass))
|
|
|
|
|
|
2000-04-11 07:03:25 +00:00
|
|
|
|
/* Private part of the GdkPixbuf structure */
|
|
|
|
|
struct _GdkPixbuf {
|
2000-06-22 15:36:12 +00:00
|
|
|
|
GObject parent_instance;
|
2000-04-11 07:03:25 +00:00
|
|
|
|
|
|
|
|
|
/* Color space */
|
|
|
|
|
GdkColorspace colorspace;
|
|
|
|
|
|
|
|
|
|
/* Number of channels, alpha included */
|
|
|
|
|
int n_channels;
|
|
|
|
|
|
|
|
|
|
/* Bits per channel */
|
|
|
|
|
int bits_per_sample;
|
|
|
|
|
|
|
|
|
|
/* Size */
|
|
|
|
|
int width, height;
|
|
|
|
|
|
|
|
|
|
/* Offset between rows */
|
|
|
|
|
int rowstride;
|
|
|
|
|
|
|
|
|
|
/* The pixel array */
|
|
|
|
|
guchar *pixels;
|
|
|
|
|
|
|
|
|
|
/* Destroy notification function; it is supposed to free the pixel array */
|
|
|
|
|
GdkPixbufDestroyNotify destroy_fn;
|
|
|
|
|
|
|
|
|
|
/* User data for the destroy notification function */
|
|
|
|
|
gpointer destroy_fn_data;
|
|
|
|
|
|
|
|
|
|
/* Do we have an alpha channel? */
|
|
|
|
|
guint has_alpha : 1;
|
|
|
|
|
};
|
|
|
|
|
|
2000-06-22 15:36:12 +00:00
|
|
|
|
struct _GdkPixbufClass {
|
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
#ifdef GDK_PIXBUF_ENABLE_BACKEND
|
2000-06-22 15:36:12 +00:00
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
GdkPixbufModule *_gdk_pixbuf_get_module (guchar *buffer, guint size,
|
|
|
|
|
const gchar *filename,
|
|
|
|
|
GError **error);
|
|
|
|
|
GdkPixbufModule *_gdk_pixbuf_get_named_module (const char *name,
|
|
|
|
|
GError **error);
|
|
|
|
|
gboolean _gdk_pixbuf_load_module (GdkPixbufModule *image_module,
|
|
|
|
|
GError **error);
|
2000-06-22 15:36:12 +00:00
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
GdkPixbuf *_gdk_pixbuf_generic_image_load (GdkPixbufModule *image_module,
|
|
|
|
|
FILE *f,
|
|
|
|
|
GError **error);
|
2001-05-07 15:58:47 +00:00
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
GdkPixbufFormat *_gdk_pixbuf_get_format (GdkPixbufModule *image_module);
|
2000-06-22 15:36:12 +00:00
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
#ifdef USE_GMODULE
|
|
|
|
|
#define MODULE_ENTRY(type,function) function
|
|
|
|
|
#else
|
|
|
|
|
#define MODULE_ENTRY(type,function) _gdk_pixbuf__ ## type ## _ ## function
|
|
|
|
|
#endif
|
2001-10-05 18:51:47 +00:00
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
#endif /* GDK_PIXBUF_ENABLE_BACKEND */
|
2001-10-05 18:51:47 +00:00
|
|
|
|
|
2002-10-03 22:39:51 +00:00
|
|
|
|
#endif /* GDK_PIXBUF_PRIVATE_H */
|
2001-10-05 18:51:47 +00:00
|
|
|
|
|
|
|
|
|
|