summaryrefslogtreecommitdiff
path: root/src/eom-image-save-info.h
blob: 8a58185d3466be17ea40826c84a16cbe24a5cf8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef _EOM_IMAGE_SAVE_INFO_H_
#define _EOM_IMAGE_SAVE_INFO_H_

#include <glib-object.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

G_BEGIN_DECLS

#ifndef __EOM_IMAGE_DECLR__
#define __EOM_IMAGE_DECLR__
typedef struct _EomImage EomImage;
#endif

#define EOM_TYPE_IMAGE_SAVE_INFO            (eom_image_save_info_get_type ())
#define EOM_IMAGE_SAVE_INFO(o)         (G_TYPE_CHECK_INSTANCE_CAST ((o), EOM_TYPE_IMAGE_SAVE_INFO, EomImageSaveInfo))
#define EOM_IMAGE_SAVE_INFO_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST((k), EOM_TYPE_IMAGE_SAVE_INFO, EomImageSaveInfoClass))
#define EOM_IS_IMAGE_SAVE_INFO(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), EOM_TYPE_IMAGE_SAVE_INFO))
#define EOM_IS_IMAGE_SAVE_INFO_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), EOM_TYPE_IMAGE_SAVE_INFO))
#define EOM_IMAGE_SAVE_INFO_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), EOM_TYPE_IMAGE_SAVE_INFO, EomImageSaveInfoClass))

typedef struct _EomImageSaveInfo EomImageSaveInfo;
typedef struct _EomImageSaveInfoClass EomImageSaveInfoClass;

struct _EomImageSaveInfo {
	GObject parent;

	GFile       *file;
	char        *format;
	gboolean     exists;
	gboolean     local;
	gboolean     has_metadata;
	gboolean     modified;
	gboolean     overwrite;

	float        jpeg_quality; /* valid range: [0.0 ... 1.0] */
};

struct _EomImageSaveInfoClass {
	GObjectClass parent_klass;
};

#define EOM_FILE_FORMAT_JPEG   "jpeg"

GType             eom_image_save_info_get_type         (void) G_GNUC_CONST;

EomImageSaveInfo *eom_image_save_info_new_from_image   (EomImage        *image);

EomImageSaveInfo *eom_image_save_info_new_from_uri     (const char      *uri,
						       GdkPixbufFormat  *format);

EomImageSaveInfo *eom_image_save_info_new_from_file    (GFile           *file,
						       GdkPixbufFormat  *format);

G_END_DECLS

#endif /* _EOM_IMAGE_SAVE_INFO_H_ */