Clean code and added a few amendments (if()).
[irreco.git] / irreco / src / core / irreco_style_browser_dlg.h
blobad9a80fe8b466b2511a1a655e9a46499a7604c7c
1 /*
2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi),
4 * Harri Vattulainen (t5vaha01@students.oamk.fi)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program 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
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 /**
22 * @addtogroup IrrecoStyleBrowserDlg
23 * @{
26 /**
27 * @file
28 * Header file of @ref IrrecoStyleBrowserDlg.
31 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
32 /* Typedef */
33 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
35 * Make sure that typedefs are available before we include anything elese.
37 * This makes sure that whatever other structures that depend on structures
38 * defined in this file will compile OK recardles of header inclusion order.
41 #ifndef __IRRECO_STYLE_BROWSER_DLG_H_TYPEDEF__
42 #define __IRRECO_STYLE_BROWSER_DLG_H_TYPEDEF__
44 typedef struct _IrrecoStyleBrowserDlg IrrecoStyleBrowserDlg;
45 typedef struct _IrrecoStyleBrowserDlgLoading IrrecoStyleBrowserDlgLoading;
46 typedef struct _IrrecoStyleBrowserDlgClass IrrecoStyleBrowserDlgClass;
48 #define IRRECO_TYPE_STYLE_BROWSER_DLG irreco_style_browser_dlg_get_type()
50 #define IRRECO_STYLE_BROWSER_DLG(obj) \
51 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
52 IRRECO_TYPE_STYLE_BROWSER_DLG, IrrecoStyleBrowserDlg))
54 #define IRRECO_STYLE_BROWSER_DLG_CLASS(klass) \
55 (G_TYPE_CHECK_CLASS_CAST ((klass), \
56 IRRECO_TYPE_STYLE_BROWSER_DLG, IrrecoStyleBrowserDlgClass))
58 #define IRRECO_IS_STYLE_BROWSER_DLG(obj) \
59 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
60 IRRECO_TYPE_STYLE_BROWSER_DLG))
62 #define IRRECO_IS_STYLE_BROWSER_DLG_CLASS(klass) \
63 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
64 IRRECO_TYPE_STYLE_BROWSER_DLG))
66 #define IRRECO_STYLE_BROWSER_DLG_GET_CLASS(obj) \
67 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
68 IRRECO_TYPE_STYLE_BROWSER_DLG, IrrecoStyleBrowserDlgClass))
70 #endif /* __IRRECO_STYLE_BROWSER_DLG_H_TYPEDEF__ */
73 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
74 /* Include */
75 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
76 #ifndef __IRRECO_STYLE_BROWSER_DLG_H__
77 #define __IRRECO_STYLE_BROWSER_DLG_H__
78 #include "irreco.h"
79 #include "irreco_dlg.h"
80 #include "irreco_data.h"
81 #include "irreco_listbox.h"
82 #include "irreco_listbox_text.h"
83 #include "irreco_button_browser_widget.h"
86 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
87 /* Datatypes */
88 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
90 struct _IrrecoStyleBrowserDlg{
91 IrrecoDlg parent;
92 IrrecoData *irreco_data;
93 IrrecoThemeButton *style;
94 IrrecoButtonBrowserWidget *button_widget;
95 IrrecoStyleBrowserDlgLoading *loading;
96 gboolean once;
99 struct _IrrecoStyleBrowserDlgLoading {
100 IrrecoStyleBrowserDlg *self;
101 GtkWidget *banner;
102 gint pos;
103 gint len;
106 struct _IrrecoStyleBrowserDlgClass{
107 IrrecoDlgClass parent_class;
111 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
112 /* Macro */
113 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
115 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
116 /* Prototypes */
117 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
118 GType irreco_style_browser_dlg_get_type (void);
119 GtkWidget* irreco_style_browser_dlg_new(IrrecoData *irreco_data,
120 GtkWindow *parent);
121 void irreco_style_browser_dlg_set_irreco_data(IrrecoStyleBrowserDlg *self,
122 IrrecoData *irreco_data);
123 gboolean irreco_show_style_browser_dlg(IrrecoData *irreco_data,
124 GtkWindow *parent,
125 IrrecoThemeButton ** style);
127 #endif /* __IRRECO_STYLE_BROWSER_DLG_H__ */
129 /** @} */