mirror of
https://github.com/labwc/labwc.git
synced 2026-02-08 10:06:59 -05:00
Un-global theme variable
This commit is contained in:
parent
9af7bd744f
commit
1b263e1f67
10 changed files with 64 additions and 57 deletions
|
|
@ -117,6 +117,7 @@ struct server {
|
|||
/* Set when in cycle (alt-tab) mode */
|
||||
struct view *cycle_view;
|
||||
|
||||
struct theme *theme;
|
||||
struct menu *rootmenu;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ struct theme {
|
|||
struct wlr_texture *xbm_iconify_inactive_unpressed;
|
||||
};
|
||||
|
||||
extern struct theme theme;
|
||||
|
||||
/**
|
||||
* parse_hexstr - parse #rrggbb
|
||||
* @hex: hex string to be parsed
|
||||
|
|
@ -43,17 +41,20 @@ extern struct theme theme;
|
|||
void parse_hexstr(const char *hex, float *rgba);
|
||||
|
||||
/**
|
||||
* theme_init - read theme incl. buttons into global theme struct
|
||||
* theme_init - read openbox theme and generate button textures
|
||||
* @theme: global theme struct
|
||||
* @renderer: wlr_renderer for creating button textures
|
||||
* @theme_name: theme-name in <theme-dir>/<theme-name>/openbox-3/themerc
|
||||
* Note <theme-dir> is obtained in theme-dir.c
|
||||
*/
|
||||
void theme_init(struct wlr_renderer *renderer, const char *theme_name);
|
||||
void theme_init(struct theme *theme, struct wlr_renderer *renderer,
|
||||
const char *theme_name);
|
||||
|
||||
/**
|
||||
* theme_builin - apply built-in theme similar to Clearlooks
|
||||
* Note: Only used if no theme can be found. Default values for individual
|
||||
* theme options are as per openbox spec and are typically black/white.
|
||||
*/
|
||||
void theme_builtin(void);
|
||||
void theme_builtin(struct theme *theme);
|
||||
|
||||
#endif /* __LABWC_THEME_H */
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
/**
|
||||
* xbm_load - load theme xbm files into global theme struct
|
||||
*/
|
||||
void xbm_load(struct wlr_renderer *renderer);
|
||||
void xbm_load(struct theme *theme, struct wlr_renderer *renderer);
|
||||
|
||||
#endif /* __LABWC_XBM_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue