Make sure that all timeouts in HildonBanner are removed
[hildon] / hildon / hildon-caption.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Rodrigo Novo <rodrigo.novo@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24  
25 #ifndef                                         __HILDON_CAPTION_H__
26 #define                                         __HILDON_CAPTION_H__
27
28 #include                                        <gtk/gtk.h>
29
30 #include                                        "hildon-enum-types.h"
31
32 G_BEGIN_DECLS
33
34 typedef struct                                  _HildonCaption HildonCaption;
35
36 typedef struct                                  _HildonCaptionClass HildonCaptionClass;
37
38 #define                                         HILDON_TYPE_CAPTION (hildon_caption_get_type())
39
40 #define                                         HILDON_CAPTION(obj) \
41                                                 (G_TYPE_CHECK_INSTANCE_CAST (obj, \
42                                                 HILDON_TYPE_CAPTION, HildonCaption))
43
44 #define                                         HILDON_CAPTION_CLASS(klass) \
45                                                 (G_TYPE_CHECK_CLASS_CAST ((klass),\
46                                                 HILDON_TYPE_CAPTION, HildonCaptionClass))
47
48 #define                                         HILDON_IS_CAPTION(obj) \
49                                                 (G_TYPE_CHECK_INSTANCE_TYPE (obj, HILDON_TYPE_CAPTION))
50
51 #define                                         HILDON_IS_CAPTION_CLASS(klass) \
52                                                 (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_CAPTION))
53     
54 /**
55  * HildonCaptionStatus:
56  * @HILDON_CAPTION_OPTIONAL: Optional.
57  * @HILDON_CAPTION_MANDATORY: Mandatory.
58  *
59  * Keys to set the #HildonCaption to be optional or mandatory.
60  */
61 typedef enum
62 {
63     HILDON_CAPTION_OPTIONAL = 0,
64     HILDON_CAPTION_MANDATORY
65 }                                               HildonCaptionStatus;
66
67 /**
68  * HildonCaptionIconPosition:
69  * @HILDON_CAPTION_POSITION_LEFT: Show the icon on the left side.
70  * @HILDON_CAPTION_POSITION_RIGHT: Show the icon on the right side.
71  *
72  * Keys to set the icon placement in #HildonCaption.
73  *
74  */
75 typedef enum
76 {
77     HILDON_CAPTION_POSITION_LEFT = 0,
78     HILDON_CAPTION_POSITION_RIGHT
79 }                                               HildonCaptionIconPosition;
80
81
82 struct                                          _HildonCaption
83 {
84     GtkEventBox parent;
85 };
86
87
88 struct                                          _HildonCaptionClass
89 {
90     GtkEventBoxClass parent_class;
91     void (*activate) (HildonCaption *widget);
92 };
93
94 GType G_GNUC_CONST
95 hildon_caption_get_type                         (void);
96
97 GtkWidget* 
98 hildon_caption_new                              (GtkSizeGroup *group, 
99                                                  const gchar *value,
100                                                  GtkWidget *control, 
101                                                  GtkWidget *icon,
102                                                  HildonCaptionStatus flag);
103
104 GtkSizeGroup*
105 hildon_caption_get_size_group                   (const HildonCaption *caption);
106
107 void 
108 hildon_caption_set_size_group                   (const HildonCaption *caption,
109                                                  GtkSizeGroup *new_group );
110
111 gboolean 
112 hildon_caption_is_mandatory                     (const HildonCaption *caption);
113
114 void 
115 hildon_caption_set_status                       (HildonCaption *caption,
116                                                  HildonCaptionStatus flag);
117
118 HildonCaptionStatus
119 hildon_caption_get_status                       (const HildonCaption *caption);
120
121 void 
122 hildon_caption_set_icon_position                (HildonCaption *caption,
123                                                  HildonCaptionIconPosition pos );
124
125 HildonCaptionIconPosition
126 hildon_caption_get_icon_position                (const HildonCaption *caption);
127
128 void
129 hildon_caption_set_icon_image                   (HildonCaption *caption, 
130                                                  GtkWidget *icon);
131
132 GtkWidget*
133 hildon_caption_get_icon_image                   (const HildonCaption *caption);
134
135 void
136 hildon_caption_set_label                        (HildonCaption *caption, 
137                                                  const gchar *label );
138
139 gchar*
140 hildon_caption_get_label                        (const HildonCaption *caption);
141
142 void 
143 hildon_caption_set_separator                    (HildonCaption *caption, 
144                                                  const gchar *separator);
145
146 gchar*
147 hildon_caption_get_separator                    (const HildonCaption *caption);
148
149 void 
150 hildon_caption_set_label_alignment              (HildonCaption *caption, 
151                                                  gfloat alignment);
152
153 gfloat 
154 hildon_caption_get_label_alignment              (HildonCaption *caption);
155
156 void 
157 hildon_caption_set_child_expand                 (HildonCaption *caption, 
158                                                  gboolean expand);
159
160 gboolean 
161 hildon_caption_get_child_expand                 (const HildonCaption *caption);
162
163 void
164 hildon_caption_set_label_markup                 (HildonCaption *caption,
165                                                  const gchar *markup);
166
167 G_END_DECLS
168
169 #endif                                          /* __HILDON_CAPTION_H__ */