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__
23 #include "hildon-helper.h"
27 #define HILDON_TYPE_BUTTON \
28 (hildon_button_get_type())
30 #define HILDON_BUTTON(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
32 HILDON_TYPE_BUTTON, HildonButton))
34 #define HILDON_BUTTON_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST ((klass), \
36 HILDON_TYPE_BUTTON, HildonButtonClass))
38 #define HILDON_IS_BUTTON(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_BUTTON))
41 #define HILDON_IS_BUTTON_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_BUTTON))
44 #define HILDON_BUTTON_GET_CLASS(obj) \
45 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
46 HILDON_TYPE_BUTTON, HildonButtonClass))
48 typedef struct _HildonButton HildonButton;
50 typedef struct _HildonButtonClass HildonButtonClass;
52 struct _HildonButtonClass
54 GtkButtonClass parent_class;
63 HILDON_BUTTON_ARRANGEMENT_HORIZONTAL,
64 HILDON_BUTTON_ARRANGEMENT_VERTICAL
65 } HildonButtonArrangement;
68 hildon_button_get_type (void) G_GNUC_CONST;
71 hildon_button_new (HildonSizeType size,
72 HildonButtonArrangement arrangement);
75 hildon_button_new_with_text (HildonSizeType size,
76 HildonButtonArrangement arrangement,
81 hildon_button_new_full (HildonSizeType size,
82 HildonButtonArrangement arrangement,
85 GtkSizeGroup *title_size_group,
86 GtkSizeGroup *value_size_group);
89 hildon_button_set_title (HildonButton *button,
93 hildon_button_set_value (HildonButton *button,
97 hildon_button_get_title (HildonButton *button);
100 hildon_button_get_value (HildonButton *button);
103 hildon_button_set_text (HildonButton *button,
108 hildon_button_set_size_groups (HildonButton *button,
109 GtkSizeGroup *title_size_group,
110 GtkSizeGroup *value_size_group);
114 #endif /* __HILDON_BUTTON_H__ */