2006-11-14 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
[hildon] / src / hildon-banner.h
1 /*
2  * This file is part of hildon-libs
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
32 G_BEGIN_DECLS 
33
34 #define HILDON_TYPE_BANNER (hildon_banner_get_type())
35
36 #define HILDON_BANNER(obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), HILDON_TYPE_BANNER, HildonBanner))
37 #define HILDON_IS_BANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), HILDON_TYPE_BANNER))
38
39 typedef struct _HildonBanner        HildonBanner;
40 typedef struct _HildonBannerClass   HildonBannerClass;
41 typedef struct _HildonBannerPrivate HildonBannerPrivate;
42
43 struct _HildonBanner
44 {
45    GtkWindow parent;
46    HildonBannerPrivate *priv;
47 };
48
49 struct _HildonBannerClass
50 {
51    GtkWindowClass parent_class;
52 };
53
54 GType      hildon_banner_get_type          (void) G_GNUC_CONST;
55
56 void       hildon_banner_show_information  (GtkWidget      *widget, 
57                                             const gchar    *icon_name,
58                                             const gchar    *text);
59
60 void       hildon_banner_show_information_with_markup (GtkWidget   *widget, 
61                                                        const gchar *icon_name,
62                                                        const gchar *markup);
63
64 GtkWidget *hildon_banner_show_animation    (GtkWidget      *widget, 
65                                             const gchar    *animation_name,
66                                             const gchar    *text);
67
68 GtkWidget *hildon_banner_show_progress     (GtkWidget      *widget, 
69                                             GtkProgressBar *bar,
70                                             const gchar    *text);
71
72 void       hildon_banner_set_text          (HildonBanner   *self,
73                                             const gchar    *text);
74
75 void       hildon_banner_set_markup        (HildonBanner   *self,
76                                             const gchar    *markup);
77
78 void       hildon_banner_set_fraction      (HildonBanner   *self,
79                                             gdouble         fraction);
80
81
82
83 /* For internal use of hildon libraries only */
84 void _hildon_gtk_label_set_text_n_lines(GtkLabel *label, const gchar *text, gint max_lines);
85
86 G_END_DECLS
87
88 #endif /* __HILDON_BANNER_H__ */