dbe5a8d5685fc9f28c8f923490b3efd5f16a084e
[hildon] / src / hildon-time-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_TIME_BUTTON
18 #define _HILDON_TIME_BUTTON
19
20 #include <glib-object.h>
21
22 G_BEGIN_DECLS
23
24 #define HILDON_TYPE_TIME_BUTTON            hildon_time_button_get_type()
25 #define HILDON_TIME_BUTTON(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_TYPE_TIME_BUTTON, HildonTimeButton))
26 #define HILDON_TIME_BUTTON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HILDON_TYPE_TIME_BUTTON, HildonTimeButtonClass))
27 #define HILDON_IS_TIME_BUTTON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_TIME_BUTTON))
28 #define HILDON_IS_TIME_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_TIME_BUTTON))
29 #define HILDON_TIME_BUTTON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), HILDON_TYPE_TIME_BUTTON, HildonTimeButtonClass))
30
31 typedef struct _HildonTimeButton      HildonTimeButton;
32 typedef struct _HildonTimeButtonClass HildonTimeButtonClass;
33
34 struct _HildonTimeButton
35 {
36   HildonPickerButton parent;
37 };
38
39 struct _HildonTimeButtonClass
40 {
41   HildonPickerButtonClass parent_class;
42 };
43
44 GType      hildon_time_button_get_type (void);
45 GtkWidget *hildon_time_button_new      (HildonSizeType          size,
46                                         HildonButtonArrangement arrangement);
47
48 void hildon_time_button_get_time       (HildonTimeButton * button,
49                                         guint * hours, guint * minutes);
50 void hildon_time_button_set_time       (HildonTimeButton * button,
51                                         guint hours, guint minutes);
52
53 G_END_DECLS
54
55 #endif /* _HILDON_TIME_BUTTON */