2008-09-30 Alejandro Pinheiro <apinheiro@igalia.com>
[hildon] / src / hildon-picker-dialog.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2005, 2008 Nokia Corporation.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version. or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free
18  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  */
20
21 #ifndef                                         __HILDON_PICKER_DIALOG_H__
22 #define                                         __HILDON_PICKER_DIALOG_H__
23
24 #include                                        <gtk/gtk.h>
25
26 G_BEGIN_DECLS
27
28 #define                                         HILDON_TYPE_PICKER_DIALOG \
29                                                 (hildon_picker_dialog_get_type ())
30
31 #define                                         HILDON_PICKER_DIALOG(obj) \
32                                                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
33                                                 HILDON_TYPE_PICKER_DIALOG, HildonPickerDialog))
34
35 #define                                         HILDON_PICKER_DIALOG_CLASS(vtable) \
36                                                 (G_TYPE_CHECK_CLASS_CAST ((vtable), \
37                                                 HILDON_TYPE_PICKER_DIALOG, HildonPickerDialogClass))
38
39 #define                                         HILDON_IS_PICKER_DIALOG(obj) \
40                                                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_PICKER_DIALOG))
41
42 #define                                         HILDON_IS_PICKER_DIALOG_CLASS(vtable) \
43                                                 (G_TYPE_CHECK_CLASS_TYPE ((vtable), HILDON_TYPE_PICKER_DIALOG))
44
45 #define                                         HILDON_PICKER_DIALOG_GET_CLASS(inst) \
46                                                 (G_TYPE_INSTANCE_GET_CLASS ((inst), \
47                                                 HILDON_TYPE_PICKER_DIALOG, HildonPickerDialogClass))
48
49 typedef struct                                  _HildonPickerDialog HildonPickerDialog;
50 typedef struct                                  _HildonPickerDialogClass HildonPickerDialogClass;
51 typedef struct                                  _HildonPickerDialogPrivate HildonPickerDialogPrivate;
52
53 struct                                          _HildonPickerDialog
54 {
55   GtkDialog parent_instance;
56
57   /*< private > */
58   HildonPickerDialogPrivate *priv;
59 };
60
61 struct                                          _HildonPickerDialogClass
62 {
63   GtkDialogClass parent_class;
64
65   gboolean (* set_selector)                     (HildonPickerDialog  *dialog,
66                                                  HildonTouchSelector *selector);
67 };
68
69 /* construction */
70 GType G_GNUC_CONST
71 hildon_picker_dialog_get_type                   (void);
72
73 GtkWidget*
74 hildon_picker_dialog_new                        (GtkWindow * parent);
75
76 gboolean
77 hildon_picker_dialog_set_selector               (HildonPickerDialog  *dialog,
78                                                  HildonTouchSelector *selector);
79
80 void
81 hildon_picker_dialog_set_done_label             (HildonPickerDialog *dialog,
82                                                  const gchar        *label);
83
84 const gchar*
85 hildon_picker_dialog_get_done_label             (HildonPickerDialog *dialog);
86
87 HildonTouchSelector*
88 hildon_picker_dialog_get_selector               (HildonPickerDialog *dialog);
89
90 G_END_DECLS
91
92 #endif /* __HILDON_PICKER_SELECTOR_H__ */