1 /* gstyle-color-filter.h
2  *
3  * Copyright 2016 sebastien lafargue <slafargue@gnome.org>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  * SPDX-License-Identifier: GPL-3.0-or-later
19  */
20 
21 #pragma once
22 
23 #include <glib.h>
24 #include <gdk/gdk.h>
25 
26 G_BEGIN_DECLS
27 
28 typedef void (*GstyleColorFilterFunc)(GdkRGBA *rgba, GdkRGBA *filter_rgba, gpointer user_data);
29 
30 #define GSTYLE_TYPE_COLOR_FILTER (gstyle_color_filter_get_type())
31 
32 typedef enum
33 {
34   GSTYLE_COLOR_FILTER_NONE,
35   GSTYLE_COLOR_FILTER_ACHROMATOPSIA,
36   GSTYLE_COLOR_FILTER_ACHROMATOMALY,
37   GSTYLE_COLOR_FILTER_DEUTERANOPIA,
38   GSTYLE_COLOR_FILTER_DEUTERANOMALY,
39   GSTYLE_COLOR_FILTER_PROTANOPIA,
40   GSTYLE_COLOR_FILTER_PROTANOMALY,
41   GSTYLE_COLOR_FILTER_TRITANOPIA,
42   GSTYLE_COLOR_FILTER_TRITANOMALY,
43   GSTYLE_COLOR_FILTER_WEBSAFE
44 } GstyleColorFilter;
45 
46 GType          gstyle_color_filter_get_type       (void);
47 
48 void           gstyle_color_filter_achromatopsia  (GdkRGBA          *rgba,
49                                                    GdkRGBA          *filter_rgba,
50                                                    gpointer          user_data);
51 void           gstyle_color_filter_achromatomaly  (GdkRGBA          *rgba,
52                                                    GdkRGBA          *filter_rgba,
53                                                    gpointer          user_data);
54 void           gstyle_color_filter_deuteranopia   (GdkRGBA          *rgba,
55                                                    GdkRGBA          *filter_rgba,
56                                                    gpointer          user_data);
57 void           gstyle_color_filter_deuteranomaly  (GdkRGBA          *rgba,
58                                                    GdkRGBA          *filter_rgba,
59                                                    gpointer          user_data);
60 void           gstyle_color_filter_protanopia     (GdkRGBA          *rgba,
61                                                    GdkRGBA          *filter_rgba,
62                                                    gpointer          user_data);
63 void           gstyle_color_filter_protanomaly    (GdkRGBA          *rgba,
64                                                    GdkRGBA          *filter_rgba,
65                                                    gpointer          user_data);
66 void           gstyle_color_filter_tritanopia     (GdkRGBA          *rgba,
67                                                    GdkRGBA          *filter_rgba,
68                                                    gpointer          user_data);
69 void           gstyle_color_filter_tritanomaly    (GdkRGBA          *rgba,
70                                                    GdkRGBA          *filter_rgba,
71                                                    gpointer          user_data);
72 void           gstyle_color_filter_websafe        (GdkRGBA          *rgba,
73                                                    GdkRGBA          *filter_rgba,
74                                                    gpointer          user_data);
75 
76 G_END_DECLS
77