Theme.h
/*
* $Id: Theme.h 3441 2012-11-01 20:40:30Z karijes $
*
* Theming stuff
* Copyright (c) 2009 edelib authors
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EDELIB_THEME_H__
#define __EDELIB_THEME_H__
#include "edelib-global.h"
/* make it visible outside namespace */
struct scheme;
EDELIB_NS_BEGIN
struct Theme_P;
#ifndef SKIP_DOCS
typedef void (*ThemeErrorHandler)(const char *str, void *data);
#endif
class EDELIB_API Theme {
private:
Theme_P *priv;
E_DISABLE_CLASS_COPY(Theme)
/* safe to be called multiple times */
void init_interpreter(void);
public:
Theme(const char *msg_domain = "edelib");
~Theme();
bool load(const char *f);
void clear(void);
bool loaded(void) const;
void set_error_handler(ThemeErrorHandler func, void *data = 0);
void *error_handler_data(void) const;
ThemeErrorHandler error_handler(void) const;
void prompt(void);
bool get_item(const char *style_name, const char *item_name, char *ret, unsigned int sz);
bool get_item(const char *style_name, const char *item_name, long &ret, long fallback = 0);
const char *author(void) const;
const char *name(void) const;
const char *sample_image(void) const;
scheme* get_interpreter(void);
};
EDELIB_NS_END
#endif
E_DISABLE_CLASS_COPY
#define E_DISABLE_CLASS_COPY(klass)
Definition: edelib-global.h:161
edelib::Theme
Theming engine for widgets.
Definition: Theme.h:48