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 int colors_per_line,
51 int n_colors,
52 GdkRGBA *colors);
53
54 /* Signals */
55 void (* color_activated) (GtkColorChooser *chooser,
56 const GdkRGBA *color);
57
58 /*< private >*/
59 /* Padding; remove in GTK-next */
60 gpointer padding[12];
61};
62
63GDK_AVAILABLE_IN_ALL
64GType gtk_color_chooser_get_type (void) G_GNUC_CONST;
65
66GDK_AVAILABLE_IN_ALL
67void gtk_color_chooser_get_rgba (GtkColorChooser *chooser,
68 GdkRGBA *color);
69GDK_AVAILABLE_IN_ALL
70void gtk_color_chooser_set_rgba (GtkColorChooser *chooser,
71 const GdkRGBA *color);
72GDK_AVAILABLE_IN_ALL
73gboolean gtk_color_chooser_get_use_alpha (GtkColorChooser *chooser);
74
75GDK_AVAILABLE_IN_ALL
76void gtk_color_chooser_set_use_alpha (GtkColorChooser *chooser,
77 gboolean use_alpha);
78
79GDK_AVAILABLE_IN_ALL
80void gtk_color_chooser_add_palette (GtkColorChooser *chooser,
81 GtkOrientation orientation,
82 int colors_per_line,
83 int n_colors,
84 GdkRGBA *colors);
85
86G_END_DECLS
87
88#endif /* __GTK_COLOR_CHOOSER_H__ */
89

source code of gtk/gtk/gtkcolorchooser.h