Adding Lucas patch to enable settable timeout on the banners and settable icon.
[hildon] / src / hildon-banner.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@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.
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_BANNER_H__
26 #define                                         __HILDON_BANNER_H__
27
28 #include                                        <gtk/gtkwindow.h>
29 #include                                        <gtk/gtkprogressbar.h>
30 #include                                        <gtk/gtklabel.h>
31 #include                                        <gdk/gdkx.h>
32
33 G_BEGIN_DECLS 
34
35 #define                                         HILDON_TYPE_BANNER \
36                                                 (hildon_banner_get_type())
37
38 #define                                         HILDON_BANNER(obj) \
39                                                 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
40                                                 HILDON_TYPE_BANNER, HildonBanner))
41
42 #define                                         HILDON_IS_BANNER(obj) \
43                                                 (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
44                                                 HILDON_TYPE_BANNER))
45
46 typedef struct                                  _HildonBanner HildonBanner;
47
48 typedef struct                                  _HildonBannerClass HildonBannerClass;
49
50 struct                                          _HildonBanner
51 {
52    GtkWindow parent;
53 };
54
55 struct                                          _HildonBannerClass
56 {
57    GtkWindowClass parent_class;
58 };
59
60 GType G_GNUC_CONST
61 hildon_banner_get_type                          (void);
62
63 GtkWidget* 
64 hildon_banner_show_information                  (GtkWidget *widget, 
65                                                  const gchar *icon_name,
66                                                  const gchar *text);
67
68 GtkWidget*
69 hildon_banner_show_informationf                 (GtkWidget *widget, 
70                                                  const gchar *icon_name,
71                                                  const gchar *format, 
72                                                  ...);
73
74 GtkWidget*       
75 hildon_banner_show_information_with_markup      (GtkWidget *widget, 
76                                                  const gchar *icon_name,
77                                                  const gchar *markup);
78
79 GtkWidget*
80 hildon_banner_show_animation                    (GtkWidget *widget, 
81                                                  const gchar *animation_name,
82                                                  const gchar *text);
83
84 GtkWidget*
85 hildon_banner_show_progress                     (GtkWidget *widget, 
86                                                  GtkProgressBar *bar,
87                                                  const gchar *text);
88
89 void      
90 hildon_banner_set_text                          (HildonBanner *self,
91                                                  const gchar *text);
92
93 void      
94 hildon_banner_set_markup                        (HildonBanner *self,
95                                                  const gchar *markup);
96
97 void     
98 hildon_banner_set_fraction                      (HildonBanner *self,
99                                                  gdouble fraction);
100
101 void     
102 hildon_banner_set_icon                          (HildonBanner *self,
103                                                  const gchar *icon_name);
104
105 void     
106 hildon_banner_set_icon_from_file                (HildonBanner *self,
107                                                  const gchar *icon_file);
108
109 void
110 hildon_banner_set_timeout                       (HildonBanner *self,
111                                                  guint timeout);
112
113 G_END_DECLS
114
115 #endif                                          /* __HILDON_BANNER_H__ */