Mostly minor fixes up until version 0.8.10.
[irreco.git] / irreco / src / core / irreco_theme.h
blob6ac9568ebd8bd805f427326c8945aa5f0800b95e
1 /*
2 * irreco - Ir Remote Control
3 * Copyright (C) 2008 Joni Kokko (t5kojo01@students.oamk.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 /**
21 * @addtogroup IrrecoTheme
22 * @{
25 /**
26 * @file
27 * Header file of @ref IrrecoTheme.
30 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
31 /* Typedef */
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 * Make sure that typedefs are available before we include anything elese.
36 * This makes sure that whatever other structures that depend on structures
37 * defined in this file will compile OK recardles of header inclusion order.
39 #ifndef __IRRECO_THEME_H_TYPEDEF__
40 #define __IRRECO_THEME_H_TYPEDEF__
41 typedef struct _IrrecoTheme IrrecoTheme;
42 #endif /* __IRRECO_THEME_H_TYPEDEF__ */
46 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
47 /* Include */
48 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
49 #ifndef __IRRECO_THEME_H__
50 #define __IRRECO_THEME_H__
51 #include "irreco.h"
52 #include "irreco_theme_bg.h"
53 #include "irreco_theme_button.h"
54 #include "irreco_config.h"
55 #include <irreco_string_table.h>
60 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
61 /* Datatypes */
62 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
64 struct _IrrecoTheme
66 GString *name;
67 GString *path;
68 GString *source;
69 GString *author;
70 GString *comment;
71 GString *preview_button_name;
72 GString *version;
73 IrrecoStringTable *backgrounds;
74 IrrecoStringTable *buttons;
77 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
78 /* Macro */
79 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
83 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
84 /* Prototypes */
85 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
87 IrrecoTheme *irreco_theme_new();
88 void irreco_theme_free(IrrecoTheme *self);
89 void irreco_theme_print(IrrecoTheme *self);
90 IrrecoStringTable* irreco_theme_get_buttons(IrrecoTheme *self);
91 IrrecoThemeButton *irreco_theme_get_button(IrrecoTheme *self,
92 const char *button_name);
93 IrrecoStringTable* irreco_theme_get_backgrounds(IrrecoTheme *self);
94 IrrecoThemeBg *irreco_theme_get_background(IrrecoTheme *self,
95 const char *bg_name);
96 void irreco_theme_set_author(IrrecoTheme *self, const char * author);
97 void irreco_theme_set_comment(IrrecoTheme *self, const char * comment);
98 void irreco_theme_set_preview_button(IrrecoTheme *self,
99 const char * button_name);
100 void irreco_theme_update_keyfile(IrrecoTheme *self);
101 /*void irreco_theme_set_name(IrrecoTheme *self, IrrecoData *irreco_data,
102 const char * name);*/
103 void irreco_theme_set(IrrecoTheme *self, const char *name, const char *path,
104 const char *source, const char *author,
105 const char *comment, const char *preview_button_name,
106 const char *version);
107 void irreco_theme_check(IrrecoTheme *self);
108 IrrecoTheme *irreco_theme_copy(IrrecoTheme *self);
109 IrrecoTheme *theme_new_from_dir();
110 void irreco_theme_read(IrrecoTheme *self, const gchar *dir);
111 IrrecoTheme *irreco_theme_new_from_dir(const gchar *dir);
112 gboolean irreco_theme_save(IrrecoTheme *self,
113 const gchar *theme_path);
114 #endif /* __IRRECO_THEME_H__ */
116 /** @} */