Effectively drop empty newlines at end of files (missing from rev 535)
[geeqie.git] / src / color-man.h
1 /*
2  * Geeqie
3  * (C) 2006 John Ellis
4  *
5  * Author: John Ellis
6  *
7  * This software is released under the GNU General Public License (GNU GPL).
8  * Please read the included file COPYING for more information.
9  * This software comes with no warranty of any kind, use at your own risk!
10  */
11
12
13 #ifndef COLOR_MAN_H
14 #define COLOR_MAN_H
15
16 typedef enum {
17         COLOR_PROFILE_NONE = -1,
18         COLOR_PROFILE_MEM = -2,
19         COLOR_PROFILE_SRGB = 0,
20         COLOR_PROFILE_ADOBERGB,
21         COLOR_PROFILE_FILE,
22 } ColorManProfileType;
23
24 typedef enum {
25         COLOR_RETURN_SUCCESS = 0,
26         COLOR_RETURN_ERROR,
27         COLOR_RETURN_IMAGE_CHANGED
28 } ColorManReturnType;
29
30 typedef struct _ColorMan ColorMan;
31 typedef void (* ColorManDoneFunc)(ColorMan *cm, ColorManReturnType success, gpointer data);
32
33
34 struct _ColorMan {
35         ImageWindow *imd;
36         GdkPixbuf *pixbuf;
37         gint incremental_sync;
38         gint row;
39
40         gpointer profile;
41
42         gint idle_id;
43
44         ColorManDoneFunc func_done;
45         gpointer func_done_data;
46 };
47
48
49 ColorMan *color_man_new(ImageWindow *imd, GdkPixbuf *pixbuf,
50                         ColorManProfileType input_type, const gchar *input_file,
51                         ColorManProfileType screen_type, const gchar *screen_file);
52 ColorMan *color_man_new_embedded(ImageWindow *imd, GdkPixbuf *pixbuf,
53                                  unsigned char *input_data, guint input_data_len,
54                                  ColorManProfileType screen_type, const gchar *screen_file);
55 void color_man_free(ColorMan *cm);
56
57 void color_man_update(void);
58
59 void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h);
60
61 void color_man_start_bg(ColorMan *cm, ColorManDoneFunc don_func, gpointer done_data);
62
63 #endif