2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-08-09 17:07:17 +08:00
|
|
|
* 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.
|
2018-07-14 20:13:22 +08:00
|
|
|
* https://specifications.freedesktop.org/thumbnail-spec/
|
2002-04-30 01:20:26 +08:00
|
|
|
*
|
|
|
|
* Copyright (C) 2001-2002 Sven Neumann <sven@gimp.org>
|
|
|
|
* Michael Natterer <mitch@gimp.org>
|
2001-08-09 17:07:17 +08:00
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2001-08-09 17:07:17 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2001-08-09 17:07:17 +08:00
|
|
|
* (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
|
2018-07-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2001-08-09 17:07:17 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|
|
|
|
{
|
2011-03-02 19:26:04 +08:00
|
|
|
GimpViewable parent_instance;
|
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;
|
|
|
|
|
2013-05-27 03:26:08 +08:00
|
|
|
GimpImagefile * gimp_imagefile_new (Gimp *gimp,
|
2014-07-05 18:51:54 +08:00
|
|
|
GFile *file);
|
2013-05-27 03:26:08 +08:00
|
|
|
|
2014-07-07 06:46:25 +08:00
|
|
|
GFile * gimp_imagefile_get_file (GimpImagefile *imagefile);
|
2014-07-08 06:49:05 +08:00
|
|
|
void gimp_imagefile_set_file (GimpImagefile *imagefile,
|
|
|
|
GFile *file);
|
|
|
|
|
2013-05-27 03:26:08 +08:00
|
|
|
GimpThumbnail * gimp_imagefile_get_thumbnail (GimpImagefile *imagefile);
|
|
|
|
GIcon * gimp_imagefile_get_gicon (GimpImagefile *imagefile);
|
|
|
|
|
|
|
|
void gimp_imagefile_set_mime_type (GimpImagefile *imagefile,
|
|
|
|
const gchar *mime_type);
|
|
|
|
void gimp_imagefile_update (GimpImagefile *imagefile);
|
|
|
|
gboolean gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
|
|
|
|
GimpContext *context,
|
|
|
|
GimpProgress *progress,
|
|
|
|
gint size,
|
|
|
|
gboolean replace,
|
|
|
|
GError **error);
|
|
|
|
void gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile,
|
|
|
|
GimpContext *context,
|
|
|
|
GimpProgress *progress,
|
|
|
|
gint size,
|
|
|
|
gboolean replace);
|
|
|
|
gboolean gimp_imagefile_check_thumbnail (GimpImagefile *imagefile);
|
|
|
|
gboolean gimp_imagefile_save_thumbnail (GimpImagefile *imagefile,
|
|
|
|
const gchar *mime_type,
|
|
|
|
GimpImage *image,
|
|
|
|
GError **error);
|
|
|
|
const gchar * gimp_imagefile_get_desc_string (GimpImagefile *imagefile);
|
2001-08-09 17:07:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_IMAGEFILE_H__ */
|