2000-04-26 04:03:38 -04:00
|
|
|
#ifndef __THEMES_H
|
|
|
|
#define __THEMES_H
|
|
|
|
|
2000-05-15 04:25:45 -04:00
|
|
|
#include "printtext.h"
|
|
|
|
|
2000-04-26 04:03:38 -04:00
|
|
|
#define THEME_FLAG_BG_SCROLLABLE 0x0001
|
|
|
|
#define THEME_FLAG_BG_SCALED 0x0002
|
|
|
|
#define THEME_FLAG_BG_SHADED 0x0004
|
|
|
|
|
2000-05-15 04:25:45 -04:00
|
|
|
typedef struct {
|
2000-04-26 04:03:38 -04:00
|
|
|
char *name;
|
|
|
|
|
2000-05-15 04:25:45 -04:00
|
|
|
int count;
|
|
|
|
char **formats; /* in same order as in module's default formats */
|
|
|
|
} MODULE_THEME_REC;
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *path;
|
|
|
|
char *name;
|
|
|
|
|
|
|
|
int default_color;
|
|
|
|
char *bg_pixmap;
|
|
|
|
char *font;
|
|
|
|
int flags;
|
|
|
|
|
|
|
|
GHashTable *modules;
|
|
|
|
|
|
|
|
gpointer gui_data;
|
|
|
|
} THEME_REC;
|
|
|
|
|
|
|
|
extern GSList *themes;
|
|
|
|
extern THEME_REC *current_theme;
|
2000-05-15 04:25:45 -04:00
|
|
|
extern GHashTable *default_formats;
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
THEME_REC *theme_create(const char *path, const char *name);
|
|
|
|
void theme_destroy(THEME_REC *rec);
|
|
|
|
|
2000-05-15 04:25:45 -04:00
|
|
|
#define theme_register(formats) theme_register_module(MODULE_NAME, formats)
|
|
|
|
#define theme_unregister() theme_unregister_module(MODULE_NAME)
|
|
|
|
void theme_register_module(const char *module, FORMAT_REC *formats);
|
|
|
|
void theme_unregister_module(const char *module);
|
|
|
|
|
2000-04-26 04:03:38 -04:00
|
|
|
void themes_init(void);
|
|
|
|
void themes_deinit(void);
|
|
|
|
|
|
|
|
#endif
|