2006-08-30 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
[hildon] / hildon-widgets / hildon-color-button.h
1 /*
2  * This file is part of hildon-libs
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; version 2.1 of
11  * the License.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24
25 #ifndef __HILDON_COLOR_BUTTON_H__
26 #define __HILDON_COLOR_BUTTON_H__
27
28 #include <gtk/gtkbutton.h>
29
30 G_BEGIN_DECLS
31
32 #define HILDON_TYPE_COLOR_BUTTON             (hildon_color_button_get_type ())
33 #define HILDON_COLOR_BUTTON(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_TYPE_COLOR_BUTTON, HildonColorButton))
34 #define HILDON_COLOR_BUTTON_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_BUTTON, HildonColorButtonClass))
35 #define HILDON_IS_COLOR_BUTTON(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_COLOR_BUTTON))
36 #define HILDON_IS_COLOR_BUTTON_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_COLOR_BUTTON))
37 #define HILDON_COLOR_BUTTON_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), HILDON_TYPE_COLOR_BUTTON, HildonColorButtonClass))
38
39 typedef struct _HildonColorButton          HildonColorButton;
40 typedef struct _HildonColorButtonClass     HildonColorButtonClass;
41 typedef struct _HildonColorButtonPrivate   HildonColorButtonPrivate;
42
43 struct _HildonColorButton
44 {
45   GtkButton button;
46   HildonColorButtonPrivate *priv;
47 };
48
49 struct _HildonColorButtonClass
50 {
51   GtkButtonClass parent_class;
52
53   /* Padding for future expansion */
54   void (*_gtk_reserved1) (void);
55   void (*_gtk_reserved2) (void);
56   void (*_gtk_reserved3) (void);
57   void (*_gtk_reserved4) (void);
58 };
59
60
61 GType      
62 hildon_color_button_get_type( void ) G_GNUC_CONST;
63
64 GtkWidget *
65 hildon_color_button_new( void );
66
67 GtkWidget *
68 hildon_color_button_new_with_color( const GdkColor *color );
69
70 GdkColor *
71 hildon_color_button_get_color( HildonColorButton *button );
72
73 void
74 hildon_color_button_set_color( HildonColorButton *button, GdkColor *color );
75
76 G_END_DECLS
77
78 #endif  /* __HILDON_COLOR_BUTTON_H__ */
79
80
81
82