2006-08-30 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
[hildon] / hildon-widgets / hildon-note.h
1 /*
2  * This file is part of hildon-libs
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation.
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 #ifndef __HILDON_NOTE_H__
25 #define __HILDON_NOTE_H__
26
27 #include <gtk/gtkdialog.h>
28 #include <gtk/gtkprogressbar.h>
29
30 G_BEGIN_DECLS
31 #define HILDON_TYPE_NOTE ( hildon_note_get_type() )
32 #define HILDON_NOTE(obj) \
33   (GTK_CHECK_CAST (obj, HILDON_TYPE_NOTE, HildonNote))
34 #define HILDON_NOTE_CLASS(klass) \
35   (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_NOTE, HildonNoteClass))
36 #define HILDON_IS_NOTE(obj) (GTK_CHECK_TYPE (obj, HILDON_TYPE_NOTE))
37 #define HILDON_IS_NOTE_CLASS(klass) \
38   (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_NOTE))
39
40 typedef struct _HildonNote      HildonNote;
41 typedef struct _HildonNoteClass HildonNoteClass;
42
43 typedef enum /*< skip >*/
44 {
45     HILDON_NOTE_CONFIRMATION_TYPE = 0,
46     HILDON_NOTE_CONFIRMATION_BUTTON_TYPE,
47     HILDON_NOTE_INFORMATION_TYPE,
48     HILDON_NOTE_INFORMATION_THEME_TYPE,
49     HILDON_NOTE_PROGRESSBAR_TYPE
50 } HildonNoteType;
51
52 struct _HildonNote {
53     GtkDialog parent;
54 };
55
56 struct _HildonNoteClass {
57     GtkDialogClass parent_class;
58 };
59
60 GtkWidget *hildon_note_new_confirmation(GtkWindow * parent,
61                                         const gchar * description);
62
63 GtkWidget *hildon_note_new_confirmation_add_buttons(GtkWindow * parent,
64                                                     const gchar *
65                                                     description, ...);
66 #ifndef HILDON_DISABLE_DEPRECATED
67 GtkWidget *hildon_note_new_confirmation_with_icon_stock(GtkWindow * parent,
68                                                         const gchar *
69                                                         description,
70                                                         const gchar *
71                                                         stock_id);
72 #endif /* HILDON_DISABLE_DEPRECATED */
73
74 GtkWidget *hildon_note_new_confirmation_with_icon_name(GtkWindow * parent,
75                                                         const gchar *
76                                                         description,
77                                                         const gchar *
78                                                         icon_name);
79
80
81 GtkWidget *hildon_note_new_cancel_with_progress_bar(GtkWindow * parent,
82                                                     const gchar *
83                                                     description,
84                                                     GtkProgressBar *
85                                                     progressbar);
86
87 GtkWidget *hildon_note_new_information(GtkWindow * parent,
88                                        const gchar * description);
89                                        
90 GtkWidget *hildon_note_new_information_with_icon_name(GtkWindow * parent,
91                                                        const gchar *
92                                                        description,
93                                                        const gchar *
94                                                        icon_name);
95 #ifndef HILDON_DISABLE_DEPRECATED
96 GtkWidget *hildon_note_new_information_with_icon_stock(GtkWindow * parent,
97                                                        const gchar *
98                                                        description,
99                                                        const gchar *
100                                                        stock_id);
101                                                        
102 GtkWidget *hildon_note_new_information_with_icon_theme(GtkWindow * parent,
103                                                        const gchar *
104                                                        description,
105                                                        const gchar *
106                                                        icon);
107 #endif /* HILDON_DISABLE_DEPRECATED */
108                                                        
109 void hildon_note_set_button_text(HildonNote * note, const gchar * text);
110
111 void hildon_note_set_button_texts(HildonNote * note, const gchar * textOk,
112                                  const gchar * textCancel);
113
114 GType hildon_note_get_type(void) G_GNUC_CONST;
115 GType hildon_note_type_get_type(void) G_GNUC_CONST;
116
117 G_END_DECLS
118 #endif /* __HILDON_NOTE_H__ */