istereo2

view libs/goatkit/theme.h @ 6:3bccfc7d10fe

goatkit is drawing
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 23 Sep 2015 05:44:58 +0300
parents
children a3c4fcc9f8f3
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 namespace goatkit {
23 class Widget;
25 typedef void (*WidgetDrawFunc)(const Widget*);
27 void add_theme_path(const char *path);
28 void default_draw_func(const Widget *w);
30 struct ThemeImpl;
32 class Theme {
33 private:
34 ThemeImpl *impl;
36 public:
37 Theme();
38 ~Theme();
40 bool load(const char *name);
41 void unload();
43 WidgetDrawFunc get_draw_func(const char *type) const;
44 };
46 extern Theme *theme; // the current theme
48 } // namespace goatkit
50 #endif // THEME_H_