2008-07-29 Claudio Saavedra <csaavedra@igalia.com>
[hildon] / src / hildon-picker-button.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2008 Nokia Corporation, all rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser Public License as published by
8  * the Free Software Foundation; version 2 of the license.
9  *
10  * This program 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
13  * GNU Lesser Public License for more details.
14  *
15  */
16
17 #ifndef _HILDON_PICKER_BUTTON
18 #define _HILDON_PICKER_BUTTON
19
20 #include <glib-object.h>
21 #include "hildon-button.h"
22 #include "hildon-touch-picker.h"
23
24 G_BEGIN_DECLS
25
26 #define HILDON_TYPE_PICKER_BUTTON            hildon_picker_button_get_type()
27 #define HILDON_PICKER_BUTTON(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_TYPE_PICKER_BUTTON, HildonPickerButton))
28 #define HILDON_PICKER_BUTTON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HILDON_TYPE_PICKER_BUTTON, HildonPickerButtonClass))
29 #define HILDON_IS_PICKER_BUTTON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_PICKER_BUTTON))
30 #define HILDON_IS_PICKER_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_PICKER_BUTTON))
31 #define HILDON_PICKER_BUTTON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), HILDON_TYPE_PICKER_BUTTON, HildonPickerButtonClass))
32
33 typedef struct
34 {
35   HildonButton parent;
36 } HildonPickerButton;
37
38 typedef struct
39 {
40   HildonButtonClass parent_class;
41 } HildonPickerButtonClass;
42
43 GType      hildon_picker_button_get_type (void);
44 GtkWidget *hildon_picker_button_new      (HildonButtonFlags flags);
45 GtkWidget *hildon_picker_button_new_text (HildonButtonFlags flags);
46
47 void hildon_picker_button_append_text    (HildonPickerButton * button,
48                                           const gchar * text);
49 void hildon_picker_button_prepend_text   (HildonPickerButton * button,
50                                           const gchar * text);
51 void hildon_picker_button_insert_text    (HildonPickerButton * button,
52                                           gint position, const gchar * text);
53
54 void hildon_picker_button_set_picker     (HildonPickerButton * button,
55                                           HildonTouchPicker * picker);
56 HildonTouchPicker *hildon_picker_button_get_picker (HildonPickerButton * button);
57
58 G_END_DECLS
59
60 #endif /* _HILDON_PICKER_BUTTON */