* doc/visual_index.xml Fix reference to HildonLoginDialog in documentation
[hildon] / src / hildon-dialog.c
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2008 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Karl Lattimer <karl.lattimer@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 /**
26  * SECTION:hildon-dialog
27  * @short_description: Widget representing a popup window in the Hildon framework.
28  * @see_also: #HildonCodeDialog, #HildonColorChooserDialog, #HildonFontSelectionDialog, #HildonGetPasswordDialog, #HildonLoginDialog, #HildonSetPasswordDialog, #HildonSortDialog, #HildonWizardDialog
29  *
30  * The HildonDialog is a GTK widget which represent a popup window in the
31  * Hildon framework. It is derived from the GtkDialog and provides additional
32  * commodities specific to the Hildon framework.
33  *
34  * <example>
35  * <title>Simple <structname>HildonDialog</structname> usage</title>
36  * <programlisting>
37  * void quick_message (gchar *message)
38  * {
39  * <!-- -->
40  *     GtkWidget *dialog, *label;
41  * <!-- -->
42  *     dialog = hildon_dialog_new ();
43  *     label = gtk_label_new (message);
44  * <!-- -->
45  *     g_signal_connect_swapped (dialog,
46  *                               "response",
47  *                               G_CALLBACK (gtk_widget_destroy),
48  *                               dialog);
49  * <!-- -->
50  *     gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
51  *                        label);
52  *     gtk_widget_show_all (dialog);
53  * <!-- -->
54  * }
55  * </programlisting>
56  * </example>
57  */
58
59 #include                                        "hildon-dialog.h"
60
61 G_DEFINE_TYPE (HildonDialog, hildon_dialog, GTK_TYPE_DIALOG);
62
63 static void
64 hildon_dialog_class_init                        (HildonDialogClass * dialog_class)
65 {
66 }
67
68 static void
69 hildon_dialog_init (HildonDialog *self)
70 {
71 }
72
73 /**
74  * hildon_dialog_new:
75  *
76  * Creates a new #HildonDialog widget
77  *
78  * Returns: the newly created #HildonDialog
79  */
80 GtkWidget*
81 hildon_dialog_new                               (void)
82 {
83     GtkWidget *self = g_object_new (HILDON_TYPE_DIALOG, NULL);
84
85     return self;
86 }