2 * This file is a part of hildon
4 * Copyright (C) 2008 Nokia Corporation, all rights reserved.
6 * Contact: Karl Lattimer <karl.lattimer@nokia.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser Public License as published by
10 * the Free Software Foundation; version 2 of the license.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser Public License for more details.
19 #ifndef __HILDON_BUTTON_H__
20 #define __HILDON_BUTTON_H__
22 #include "hildon-gtk.h"
26 #define HILDON_TYPE_BUTTON \
27 (hildon_button_get_type())
29 #define HILDON_BUTTON(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
31 HILDON_TYPE_BUTTON, HildonButton))
33 #define HILDON_BUTTON_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST ((klass), \
35 HILDON_TYPE_BUTTON, HildonButtonClass))
37 #define HILDON_IS_BUTTON(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_BUTTON))
40 #define HILDON_IS_BUTTON_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_BUTTON))
43 #define HILDON_BUTTON_GET_CLASS(obj) \
44 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
45 HILDON_TYPE_BUTTON, HildonButtonClass))
47 typedef struct _HildonButton HildonButton;
49 typedef struct _HildonButtonClass HildonButtonClass;
51 typedef struct _HildonButtonPrivate HildonButtonPrivate;
53 struct _HildonButtonClass
55 GtkButtonClass parent_class;
63 HildonButtonPrivate *priv;
67 HILDON_BUTTON_ARRANGEMENT_HORIZONTAL,
68 HILDON_BUTTON_ARRANGEMENT_VERTICAL
69 } HildonButtonArrangement;
72 hildon_button_get_type (void) G_GNUC_CONST;
75 hildon_button_new (HildonSizeType size,
76 HildonButtonArrangement arrangement);
79 hildon_button_new_with_text (HildonSizeType size,
80 HildonButtonArrangement arrangement,
85 hildon_button_set_title (HildonButton *button,
89 hildon_button_set_value (HildonButton *button,
93 hildon_button_get_title (HildonButton *button);
96 hildon_button_get_value (HildonButton *button);
99 hildon_button_set_text (HildonButton *button,
104 hildon_button_set_image (HildonButton *button,
108 hildon_button_get_image (HildonButton *button);
111 hildon_button_set_image_position (HildonButton *button,
112 GtkPositionType position);
115 hildon_button_set_alignment (HildonButton *button,
121 hildon_button_set_title_alignment (HildonButton *button,
126 hildon_button_set_value_alignment (HildonButton *button,
131 hildon_button_set_image_alignment (HildonButton *button,
136 hildon_button_add_title_size_group (HildonButton *button,
137 GtkSizeGroup *size_group);
139 hildon_button_add_value_size_group (HildonButton *button,
140 GtkSizeGroup *size_group);
143 hildon_button_add_image_size_group (HildonButton *button,
144 GtkSizeGroup *size_group);
147 hildon_button_add_size_groups (HildonButton *button,
148 GtkSizeGroup *title_size_group,
149 GtkSizeGroup *value_size_group,
150 GtkSizeGroup *image_size_group);
154 #endif /* __HILDON_BUTTON_H__ */