PIKApp/app/core/pikaimagefile.h

95 lines
4.4 KiB
C

/* PIKA - Photo and Image Kooker Application
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
*
* Original copyright, applying to most contents (license remains unchanged):
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* pikaimagefile.h
*
* Thumbnail handling according to the Thumbnail Managing Standard.
* https://specifications.freedesktop.org/thumbnail-spec/
*
* Copyright (C) 2001-2002 Sven Neumann <sven@gimp.org>
* Michael Natterer <mitch@gimp.org>
*
* 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 3 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, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PIKA_IMAGEFILE_H__
#define __PIKA_IMAGEFILE_H__
#include "pikaviewable.h"
#define PIKA_TYPE_IMAGEFILE (pika_imagefile_get_type ())
#define PIKA_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_IMAGEFILE, PikaImagefile))
#define PIKA_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_IMAGEFILE, PikaImagefileClass))
#define PIKA_IS_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_IMAGEFILE))
#define PIKA_IS_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_IMAGEFILE))
#define PIKA_IMAGEFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_IMAGEFILE, PikaImagefileClass))
typedef struct _PikaImagefileClass PikaImagefileClass;
struct _PikaImagefile
{
PikaViewable parent_instance;
};
struct _PikaImagefileClass
{
PikaViewableClass parent_class;
void (* info_changed) (PikaImagefile *imagefile);
};
GType pika_imagefile_get_type (void) G_GNUC_CONST;
PikaImagefile * pika_imagefile_new (Pika *pika,
GFile *file);
GFile * pika_imagefile_get_file (PikaImagefile *imagefile);
void pika_imagefile_set_file (PikaImagefile *imagefile,
GFile *file);
PikaThumbnail * pika_imagefile_get_thumbnail (PikaImagefile *imagefile);
GIcon * pika_imagefile_get_gicon (PikaImagefile *imagefile);
void pika_imagefile_set_mime_type (PikaImagefile *imagefile,
const gchar *mime_type);
void pika_imagefile_update (PikaImagefile *imagefile);
gboolean pika_imagefile_create_thumbnail (PikaImagefile *imagefile,
PikaContext *context,
PikaProgress *progress,
gint size,
gboolean replace,
GError **error);
void pika_imagefile_create_thumbnail_weak (PikaImagefile *imagefile,
PikaContext *context,
PikaProgress *progress,
gint size,
gboolean replace);
gboolean pika_imagefile_check_thumbnail (PikaImagefile *imagefile);
gboolean pika_imagefile_save_thumbnail (PikaImagefile *imagefile,
const gchar *mime_type,
PikaImage *image,
GError **error);
const gchar * pika_imagefile_get_desc_string (PikaImagefile *imagefile);
#endif /* __PIKA_IMAGEFILE_H__ */