istereo2

view libs/goatkit/theme.h @ 9:64e15874f3bd

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Sep 2015 02:56:07 +0300
parents 3bccfc7d10fe
children 03cc3b1884d1
line source
1 /*
2 GoatKit - a themable/animated widget toolkit for games
3 Copyright (C) 2014 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef THEME_H_
19 #define THEME_H_
21 #define GOATKIT_THEME_BUILTIN "GOATKIT_THEME_BUILTIN"
23 namespace goatkit {
25 class Widget;
27 typedef void (*WidgetDrawFunc)(const Widget*);
29 void add_theme_path(const char *path);
30 void default_draw_func(const Widget *w);
32 struct ThemeImpl;
34 class Theme {
35 private:
36 ThemeImpl *impl;
38 public:
39 Theme();
40 ~Theme();
42 bool load(const char *name);
43 void unload();
45 WidgetDrawFunc get_draw_func(const char *type) const;
46 };
48 extern Theme *theme; // the current theme
50 } // namespace goatkit
52 #endif // THEME_H_