labwc/include/theme.h

55 lines
1.4 KiB
C
Raw Normal View History

2020-06-29 19:27:59 +01:00
/*
* Theme engine for labwc - trying to be consistent with openbox
*
* Copyright Johan Malm 2020
*/
2020-08-03 20:56:38 +01:00
#ifndef __LABWC_THEME_H
#define __LABWC_THEME_H
2020-06-11 21:20:43 +01:00
#include <stdio.h>
2020-06-29 19:27:59 +01:00
#include <wlr/render/wlr_renderer.h>
2020-06-11 21:20:43 +01:00
struct theme {
2021-03-27 21:09:45 +00:00
int border_width;
2020-06-11 21:20:43 +01:00
float window_active_title_bg_color[4];
float window_inactive_title_bg_color[4];
2020-08-21 20:35:06 +01:00
float window_active_border_color[4];
float window_active_button_unpressed_image_color[4];
2020-08-21 20:35:06 +01:00
float window_inactive_button_unpressed_image_color[4];
2021-02-16 20:43:20 +00:00
float menu_items_bg_color[4];
float menu_items_text_color[4];
float menu_items_active_bg_color[4];
float menu_items_active_text_color[4];
2020-08-21 20:35:06 +01:00
struct wlr_texture *xbm_close_active_unpressed;
struct wlr_texture *xbm_maximize_active_unpressed;
struct wlr_texture *xbm_iconify_active_unpressed;
struct wlr_texture *xbm_close_inactive_unpressed;
struct wlr_texture *xbm_maximize_inactive_unpressed;
struct wlr_texture *xbm_iconify_inactive_unpressed;
2020-06-11 21:20:43 +01:00
};
2020-08-07 20:21:14 +01:00
/**
2021-02-21 21:54:40 +00:00
* theme_init - read openbox theme and generate button textures
2021-02-21 22:03:14 +00:00
* @theme: theme data
2021-02-21 21:54:40 +00:00
* @renderer: wlr_renderer for creating button textures
2020-08-07 20:21:14 +01:00
* @theme_name: theme-name in <theme-dir>/<theme-name>/openbox-3/themerc
* Note <theme-dir> is obtained in theme-dir.c
*/
2021-02-21 21:54:40 +00:00
void theme_init(struct theme *theme, struct wlr_renderer *renderer,
const char *theme_name);
2020-06-11 21:20:43 +01:00
2021-02-21 22:03:14 +00:00
/**
* theme_finish - free button textures
* @theme: theme data
*/
void theme_finish(struct theme *theme);
2020-08-03 20:56:38 +01:00
#endif /* __LABWC_THEME_H */