Fix missing translation
[geeqie.git] / src / color-man.h
1 /*
2  * Copyright (C) 2006 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef COLOR_MAN_H
23 #define COLOR_MAN_H
24
25 #include <gdk-pixbuf/gdk-pixbuf.h>
26
27 struct FileData;
28 struct ImageWindow;
29
30 enum ColorManProfileType {
31         COLOR_PROFILE_NONE = -1,
32         COLOR_PROFILE_MEM = -2,
33         COLOR_PROFILE_SRGB = 0,
34         COLOR_PROFILE_ADOBERGB,
35         COLOR_PROFILE_FILE,
36 };
37
38 enum ColorManReturnType {
39         COLOR_RETURN_SUCCESS = 0,
40         COLOR_RETURN_ERROR,
41         COLOR_RETURN_IMAGE_CHANGED
42 };
43
44
45 struct ColorMan {
46         ImageWindow *imd;
47         GdkPixbuf *pixbuf;
48         gint incremental_sync;
49         gint row;
50
51         gpointer profile;
52
53         guint idle_id; /* event source id */
54
55         using DoneFunc = void (*)(ColorMan *, ColorManReturnType, gpointer);
56         DoneFunc func_done;
57         gpointer func_done_data;
58 };
59
60
61 ColorMan *color_man_new(ImageWindow *imd, GdkPixbuf *pixbuf,
62                         ColorManProfileType input_type, const gchar *input_file,
63                         ColorManProfileType screen_type, const gchar *screen_file,
64                         guchar *screen_data, guint screen_data_len);
65 ColorMan *color_man_new_embedded(ImageWindow *imd, GdkPixbuf *pixbuf,
66                                  guchar *input_data, guint input_data_len,
67                                  ColorManProfileType screen_type, const gchar *screen_file,
68                                  guchar *screen_data, guint screen_data_len);
69 void color_man_free(ColorMan *cm);
70
71 void color_man_update();
72
73 void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h);
74
75 gboolean color_man_get_status(ColorMan *cm, gchar **image_profile, gchar **screen_profile);
76
77 guchar *heif_color_profile(FileData *fd, guint *profile_len);
78 #endif
79 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */