1 /**
2  * @file ui_dialog.h UI dialog handling
3  *
4  * Copyright (C) 2007-2016  Lars Windolf <lars.windolf@gmx.de>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB.  If not, write to
18  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef _UI_DIALOG_H
23 #define _UI_DIALOG_H
24 
25 #include <gtk/gtk.h>
26 #include <glib-object.h>
27 #include <glib.h>
28 
29 G_BEGIN_DECLS
30 
31 #define LIFEREA_DIALOG_TYPE		(liferea_dialog_get_type ())
32 #define LIFEREA_DIALOG(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), LIFEREA_DIALOG_TYPE, LifereaDialog))
33 #define LIFEREA_DIALOG_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), LIFEREA_DIALOG_TYPE, LifereaDialogClass))
34 #define IS_LIFEREA_DIALOG(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIFEREA_DIALOG_TYPE))
35 #define IS_LIFEREA_DIALOG_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), LIFEREA_DIALOG_TYPE))
36 
37 typedef struct LifereaDialog		LifereaDialog;
38 typedef struct LifereaDialogClass	LifereaDialogClass;
39 typedef struct LifereaDialogPrivate	LifereaDialogPrivate;
40 
41 struct LifereaDialog
42 {
43 	GObject		parent;
44 
45 	/*< private >*/
46 	LifereaDialogPrivate	*priv;
47 };
48 
49 struct LifereaDialogClass
50 {
51 	GObjectClass parent_class;
52 };
53 
54 GType liferea_dialog_get_type	(void);
55 
56 /**
57  * Convenience wrapper to create a new dialog and set up its GUI
58  *
59  * @param name		the dialog name
60  *
61  * @returns the dialog widget
62  */
63 GtkWidget * liferea_dialog_new (const gchar *name);
64 
65 /**
66  * Helper function to look up child widgets of a dialog window.
67  *
68  * @param widget	the dialog widget
69  * @param name		widget name
70  *
71  * @returns found widget (or NULL)
72  */
73 GtkWidget * liferea_dialog_lookup (GtkWidget *widget, const gchar *name);
74 
75 G_END_DECLS
76 
77 #endif
78