1 | /* GTK - The GIMP Toolkit |
2 | * |
3 | * Copyright (C) 2012 Red Hat, Inc. |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Lesser General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. |
9 | * |
10 | * This library 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 GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public |
16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
17 | */ |
18 | |
19 | #ifndef __GTK_COLOR_CHOOSER_H__ |
20 | #define __GTK_COLOR_CHOOSER_H__ |
21 | |
22 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
23 | #error "Only <gtk/gtk.h> can be included directly." |
24 | #endif |
25 | |
26 | #include <gtk/gtkwidget.h> |
27 | |
28 | G_BEGIN_DECLS |
29 | |
30 | #define GTK_TYPE_COLOR_CHOOSER (gtk_color_chooser_get_type ()) |
31 | #define GTK_COLOR_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_CHOOSER, GtkColorChooser)) |
32 | #define GTK_IS_COLOR_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COLOR_CHOOSER)) |
33 | #define GTK_COLOR_CHOOSER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_COLOR_CHOOSER, GtkColorChooserInterface)) |
34 | |
35 | typedef struct _GtkColorChooser GtkColorChooser; |
36 | typedef struct _GtkColorChooserInterface GtkColorChooserInterface; |
37 | |
38 | struct _GtkColorChooserInterface |
39 | { |
40 | GTypeInterface base_interface; |
41 | |
42 | /* Methods */ |
43 | void (* get_rgba) (GtkColorChooser *chooser, |
44 | GdkRGBA *color); |
45 | void (* set_rgba) (GtkColorChooser *chooser, |
46 | const GdkRGBA *color); |
47 | |
48 | void (* add_palette) (GtkColorChooser *chooser, |
49 | GtkOrientation orientation, |
50 | gint colors_per_line, |
51 | gint n_colors, |
52 | GdkRGBA *colors); |
53 | |
54 | /* Signals */ |
55 | void (* color_activated) (GtkColorChooser *chooser, |
56 | const GdkRGBA *color); |
57 | |
58 | /* Padding */ |
59 | gpointer padding[12]; |
60 | }; |
61 | |
62 | GDK_AVAILABLE_IN_3_4 |
63 | GType gtk_color_chooser_get_type (void) G_GNUC_CONST; |
64 | |
65 | GDK_AVAILABLE_IN_3_4 |
66 | void gtk_color_chooser_get_rgba (GtkColorChooser *chooser, |
67 | GdkRGBA *color); |
68 | GDK_AVAILABLE_IN_3_4 |
69 | void gtk_color_chooser_set_rgba (GtkColorChooser *chooser, |
70 | const GdkRGBA *color); |
71 | GDK_AVAILABLE_IN_3_4 |
72 | gboolean gtk_color_chooser_get_use_alpha (GtkColorChooser *chooser); |
73 | |
74 | GDK_AVAILABLE_IN_3_4 |
75 | void gtk_color_chooser_set_use_alpha (GtkColorChooser *chooser, |
76 | gboolean use_alpha); |
77 | |
78 | GDK_AVAILABLE_IN_3_4 |
79 | void gtk_color_chooser_add_palette (GtkColorChooser *chooser, |
80 | GtkOrientation orientation, |
81 | gint colors_per_line, |
82 | gint n_colors, |
83 | GdkRGBA *colors); |
84 | |
85 | G_END_DECLS |
86 | |
87 | #endif /* __GTK_COLOR_CHOOSER_H__ */ |
88 | |