]> Pileus Git - ~andy/gtk/blob - gtk/gtkcolorchooser.h
Initial cut at implementing a new color chooser
[~andy/gtk] / gtk / gtkcolorchooser.h
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, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 #error "Only <gtk/gtk.h> can be included directly."
23 #endif
24
25 #ifndef __GTK_COLOR_CHOOSER_H__
26 #define __GTK_COLOR_CHOOSER_H__
27
28 #include <gtk/gtkwidget.h>
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_COLOR_CHOOSER                  (gtk_color_chooser_get_type ())
33 #define GTK_COLOR_CHOOSER(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_CHOOSER, GtkColorChooser))
34 #define GTK_IS_COLOR_CHOOSER(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COLOR_CHOOSER))
35 #define GTK_COLOR_CHOOSER_GET_IFACE(inst)       (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_COLOR_CHOOSER, GtkColorChooserInterface))
36
37 typedef struct _GtkColorChooser          GtkColorChooser;
38 typedef struct _GtkColorChooserInterface GtkColorChooserInterface;
39
40 struct _GtkColorChooserInterface
41 {
42   GTypeInterface base_interface;
43
44   /* Methods */
45   void (* get_color) (GtkColorChooser *chooser,
46                       GdkRGBA         *color);
47   void (* set_color) (GtkColorChooser *chooser,
48                       const GdkRGBA   *color);
49
50   /* Signals */
51   void (* color_activated) (GtkColorChooser *chooser,
52                             const GdkRGBA   *color);
53
54   /* Padding */
55   gpointer padding[12];
56 };
57
58 GType  gtk_color_chooser_get_type  (void) G_GNUC_CONST;
59
60 void   gtk_color_chooser_get_color (GtkColorChooser *chooser,
61                                     GdkRGBA         *color);
62 void   gtk_color_chooser_set_color (GtkColorChooser *chooser,
63                                     const GdkRGBA   *color);
64
65 G_END_DECLS
66
67 #endif /* __GTK_COLOR_CHOOSER_H__ */