Render close, iconify and maximize buttons

This commit is contained in:
Johan Malm 2020-07-06 21:58:51 +01:00
parent e1b86555f4
commit f7fa28ab42
10 changed files with 140 additions and 53 deletions

View file

@ -34,8 +34,6 @@
#define XCURSOR_DEFAULT "left_ptr"
#define XCURSOR_SIZE 24
#define XCURSOR_MOVE "grabbing"
#define XWL_TITLEBAR_HEIGHT (10)
#define XWL_WINDOW_BORDER (3)
enum cursor_mode {
LAB_CURSOR_PASSTHROUGH,
@ -93,7 +91,9 @@ struct output {
enum view_type { LAB_XDG_SHELL_VIEW, LAB_XWAYLAND_VIEW };
enum deco_part {
LAB_DECO_ICON_CLOSE = 0,
LAB_DECO_BUTTON_CLOSE = 0,
LAB_DECO_BUTTON_MAXIMIZE,
LAB_DECO_BUTTON_ICONIFY,
LAB_DECO_PART_TITLE,
LAB_DECO_PART_TOP,
LAB_DECO_PART_RIGHT,

View file

@ -15,6 +15,8 @@ struct theme {
float window_active_handle_bg_color[4];
float window_inactive_title_bg_color[4];
struct wlr_texture *xbm_close;
struct wlr_texture *xbm_maximize;
struct wlr_texture *xbm_iconify;
};
extern struct theme theme;

View file

@ -22,4 +22,6 @@ struct pixmap {
*/
struct pixmap xbm_create_pixmap(struct token *tokens);
struct pixmap xbm_create_pixmap_builtin(const char *button);
#endif /* PARSE_H */

View file

@ -18,6 +18,7 @@ enum token_type {
#define MAX_TOKEN_SIZE (256)
struct token {
char name[MAX_TOKEN_SIZE];
int value;
size_t pos;
enum token_type type;
};