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
28G_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
35typedef struct _GtkColorChooser GtkColorChooser;
36typedef struct _GtkColorChooserInterface GtkColorChooserInterface;
37
38struct _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
62GDK_AVAILABLE_IN_3_4
63GType gtk_color_chooser_get_type (void) G_GNUC_CONST;
64
65GDK_AVAILABLE_IN_3_4
66void gtk_color_chooser_get_rgba (GtkColorChooser *chooser,
67 GdkRGBA *color);
68GDK_AVAILABLE_IN_3_4
69void gtk_color_chooser_set_rgba (GtkColorChooser *chooser,
70 const GdkRGBA *color);
71GDK_AVAILABLE_IN_3_4
72gboolean gtk_color_chooser_get_use_alpha (GtkColorChooser *chooser);
73
74GDK_AVAILABLE_IN_3_4
75void gtk_color_chooser_set_use_alpha (GtkColorChooser *chooser,
76 gboolean use_alpha);
77
78GDK_AVAILABLE_IN_3_4
79void gtk_color_chooser_add_palette (GtkColorChooser *chooser,
80 GtkOrientation orientation,
81 gint colors_per_line,
82 gint n_colors,
83 GdkRGBA *colors);
84
85G_END_DECLS
86
87#endif /* __GTK_COLOR_CHOOSER_H__ */
88