1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * gimpimagefile.h 5 * 6 * Thumbnail handling according to the Thumbnail Managing Standard. 7 * https://specifications.freedesktop.org/thumbnail-spec/ 8 * 9 * Copyright (C) 2001-2002 Sven Neumann <sven@gimp.org> 10 * Michael Natterer <mitch@gimp.org> 11 * 12 * This program is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; either version 3 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program. If not, see <https://www.gnu.org/licenses/>. 24 */ 25 26 #ifndef __GIMP_IMAGEFILE_H__ 27 #define __GIMP_IMAGEFILE_H__ 28 29 30 #include "gimpviewable.h" 31 32 33 #define GIMP_TYPE_IMAGEFILE (gimp_imagefile_get_type ()) 34 #define GIMP_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGEFILE, GimpImagefile)) 35 #define GIMP_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGEFILE, GimpImagefileClass)) 36 #define GIMP_IS_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGEFILE)) 37 #define GIMP_IS_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGEFILE)) 38 #define GIMP_IMAGEFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGEFILE, GimpImagefileClass)) 39 40 41 typedef struct _GimpImagefileClass GimpImagefileClass; 42 43 struct _GimpImagefile 44 { 45 GimpViewable parent_instance; 46 }; 47 48 struct _GimpImagefileClass 49 { 50 GimpViewableClass parent_class; 51 52 void (* info_changed) (GimpImagefile *imagefile); 53 }; 54 55 56 GType gimp_imagefile_get_type (void) G_GNUC_CONST; 57 58 GimpImagefile * gimp_imagefile_new (Gimp *gimp, 59 GFile *file); 60 61 GFile * gimp_imagefile_get_file (GimpImagefile *imagefile); 62 void gimp_imagefile_set_file (GimpImagefile *imagefile, 63 GFile *file); 64 65 GimpThumbnail * gimp_imagefile_get_thumbnail (GimpImagefile *imagefile); 66 GIcon * gimp_imagefile_get_gicon (GimpImagefile *imagefile); 67 68 void gimp_imagefile_set_mime_type (GimpImagefile *imagefile, 69 const gchar *mime_type); 70 void gimp_imagefile_update (GimpImagefile *imagefile); 71 gboolean gimp_imagefile_create_thumbnail (GimpImagefile *imagefile, 72 GimpContext *context, 73 GimpProgress *progress, 74 gint size, 75 gboolean replace, 76 GError **error); 77 void gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile, 78 GimpContext *context, 79 GimpProgress *progress, 80 gint size, 81 gboolean replace); 82 gboolean gimp_imagefile_check_thumbnail (GimpImagefile *imagefile); 83 gboolean gimp_imagefile_save_thumbnail (GimpImagefile *imagefile, 84 const gchar *mime_type, 85 GimpImage *image, 86 GError **error); 87 const gchar * gimp_imagefile_get_desc_string (GimpImagefile *imagefile); 88 89 90 #endif /* __GIMP_IMAGEFILE_H__ */ 91