2001-08-09 17:07:17 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2004-10-09 03:29:33 +08:00
|
|
|
* gimpimagefile.h
|
|
|
|
*
|
2002-04-30 01:20:26 +08:00
|
|
|
* Thumbnail handling according to the Thumbnail Managing Standard.
|
|
|
|
* http://triq.net/~pearl/thumbnail-spec/
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001-2002 Sven Neumann <sven@gimp.org>
|
|
|
|
* Michael Natterer <mitch@gimp.org>
|
2001-08-09 17:07:17 +08:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_IMAGEFILE_H__
|
|
|
|
#define __GIMP_IMAGEFILE_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include "gimpviewable.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_TYPE_IMAGEFILE (gimp_imagefile_get_type ())
|
|
|
|
#define GIMP_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGEFILE, GimpImagefile))
|
|
|
|
#define GIMP_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGEFILE, GimpImagefileClass))
|
|
|
|
#define GIMP_IS_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGEFILE))
|
|
|
|
#define GIMP_IS_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGEFILE))
|
|
|
|
#define GIMP_IMAGEFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGEFILE, GimpImagefileClass))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GimpImagefileClass GimpImagefileClass;
|
|
|
|
|
|
|
|
struct _GimpImagefile
|
|
|
|
{
|
2002-04-17 07:03:23 +08:00
|
|
|
GimpViewable parent_instance;
|
2001-08-09 17:07:17 +08:00
|
|
|
|
2003-01-25 01:38:24 +08:00
|
|
|
Gimp *gimp;
|
2003-12-08 17:12:25 +08:00
|
|
|
GimpThumbnail *thumbnail;
|
2004-05-14 08:01:11 +08:00
|
|
|
gchar *mime_type;
|
2002-04-17 07:59:53 +08:00
|
|
|
gchar *description;
|
|
|
|
gboolean static_desc;
|
2001-08-09 17:07:17 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpImagefileClass
|
|
|
|
{
|
2004-05-14 08:01:11 +08:00
|
|
|
GimpViewableClass parent_class;
|
2002-04-17 04:25:27 +08:00
|
|
|
|
|
|
|
void (* info_changed) (GimpImagefile *imagefile);
|
2001-08-09 17:07:17 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-10-13 07:25:19 +08:00
|
|
|
GType gimp_imagefile_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GimpImagefile * gimp_imagefile_new (Gimp *gimp,
|
|
|
|
const gchar *uri);
|
|
|
|
void gimp_imagefile_update (GimpImagefile *imagefile);
|
|
|
|
void gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
|
|
|
|
GimpContext *context,
|
|
|
|
GimpProgress *progress,
|
2004-10-23 23:30:39 +08:00
|
|
|
gint size,
|
|
|
|
gboolean replace);
|
2004-10-13 07:25:19 +08:00
|
|
|
void gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile,
|
|
|
|
GimpContext *context,
|
|
|
|
GimpProgress *progress,
|
2004-10-23 23:30:39 +08:00
|
|
|
gint size,
|
|
|
|
gboolean replace);
|
|
|
|
gboolean gimp_imagefile_check_thumbnail (GimpImagefile *imagefile);
|
2004-10-13 07:25:19 +08:00
|
|
|
gboolean gimp_imagefile_save_thumbnail (GimpImagefile *imagefile,
|
2004-11-14 01:13:21 +08:00
|
|
|
const gchar *mime_type,
|
2004-10-13 07:25:19 +08:00
|
|
|
GimpImage *gimage);
|
|
|
|
const gchar * gimp_imagefile_get_desc_string (GimpImagefile *imagefile);
|
2001-08-09 17:07:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_IMAGEFILE_H__ */
|