Add HildonAppMenu::changed signal
[hildon] / hildon / hildon-note.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_NOTE_H__
26 #define                                         __HILDON_NOTE_H__
27
28 #include                                        <gtk/gtk.h>
29
30 G_BEGIN_DECLS
31
32 #define                                         HILDON_TYPE_NOTE \
33                                                 (hildon_note_get_type())
34
35 #define                                         HILDON_NOTE(obj) \
36                                                 (G_TYPE_CHECK_INSTANCE_CAST (obj, \
37                                                 HILDON_TYPE_NOTE, HildonNote))
38
39 #define                                         HILDON_NOTE_CLASS(klass) \
40                                                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
41                                                 HILDON_TYPE_NOTE, HildonNoteClass))
42
43 #define                                         HILDON_IS_NOTE(obj) \
44                                                 (G_TYPE_CHECK_INSTANCE_TYPE (obj, HILDON_TYPE_NOTE))
45
46 #define                                         HILDON_IS_NOTE_CLASS(klass) \
47                                                 (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_NOTE))
48
49 typedef struct                                  _HildonNote HildonNote;
50
51 typedef struct                                  _HildonNoteClass HildonNoteClass;
52
53 struct                                          _HildonNote 
54 {
55     GtkDialog parent;
56 };
57
58 struct _HildonNoteClass 
59 {
60     GtkDialogClass parent_class;
61 };
62
63 GType G_GNUC_CONST
64 hildon_note_get_type                            (void);
65
66 GtkWidget*
67 hildon_note_new_confirmation                    (GtkWindow *parent,
68                                                  const gchar *description);
69
70 GtkWidget*
71 hildon_note_new_confirmation_add_buttons        (GtkWindow *parent,
72                                                  const gchar *description, 
73                                                  ...);
74
75 #ifndef HILDON_DISABLE_DEPRECATED
76 GtkWidget*
77 hildon_note_new_confirmation_with_icon_name     (GtkWindow *parent,
78                                                  const gchar *description,
79                                                  const gchar *icon_name);
80 #endif
81
82 GtkWidget*
83 hildon_note_new_cancel_with_progress_bar        (GtkWindow *parent,
84                                                  const gchar *description,
85                                                  GtkProgressBar *progressbar);
86
87 GtkWidget*
88 hildon_note_new_information                     (GtkWindow *parent,
89                                                  const gchar *description);
90 #ifndef HILDON_DISABLE_DEPRECATED
91 GtkWidget*
92 hildon_note_new_information_with_icon_name      (GtkWindow *parent,
93                                                  const gchar *description,
94                                                  const gchar *icon_name);
95 #endif
96
97 void 
98 hildon_note_set_button_text                     (HildonNote *note, 
99                                                  const gchar *text);
100
101 void 
102 hildon_note_set_button_texts                    (HildonNote *note, 
103                                                  const gchar *text_ok,
104                                                  const gchar *text_cancel);
105
106 /**
107  * HildonNoteType:
108  * @HILDON_NOTE_TYPE_CONFIRMATION: Standard confirmation note with 'Yes'
109  * and 'No' buttons.
110  * @HILDON_NOTE_TYPE_CONFIRMATION_BUTTON: Confirmation note with
111  * custom buttons.
112  * @HILDON_NOTE_TYPE_INFORMATION: Information note with an 'OK' button.
113  * @HILDON_NOTE_TYPE_INFORMATION_THEME: Deprecated information note with a themed
114  * icon. Equivalent to %HILDON_NOTE_TYPE_INFORMATION.
115  * @HILDON_NOTE_TYPE_PROGRESSBAR: Note with a #GtkProgressBar and an 'OK' button.
116  *
117  * Type of a #HildonNote, defining its behavior, contents, and theming.
118  */
119 typedef enum
120 {
121     HILDON_NOTE_TYPE_CONFIRMATION = 0,
122     HILDON_NOTE_TYPE_CONFIRMATION_BUTTON,
123     HILDON_NOTE_TYPE_INFORMATION,
124     HILDON_NOTE_TYPE_INFORMATION_THEME,
125     HILDON_NOTE_TYPE_PROGRESSBAR
126 }                                               HildonNoteType;
127
128 G_END_DECLS
129
130 #endif                                          /* __HILDON_NOTE_H__ */