yambar/bar/private.h
Daniel Eklöf 01e71590e0
bar: don't use cairo
This is trivial in the Wayland backend; just instantiate a pixman
pointing to the same mmapped memory as the wayland buffer.

In the XCB backend, we change the implementation slightly; instead of
rendering via a cairo XCB surface backend (to a server side pixmap),
which is then blitted to the window in commit(), we now render to a
client-side pixman pixmap, and blit it using xcb_put_image() in
commit().
2019-09-22 11:46:46 +02:00

52 lines
1,018 B
C

#pragma once
#include "../bar/bar.h"
#include "backend.h"
struct private {
/* From bar_config */
char *monitor;
enum bar_location location;
int height;
int left_spacing, right_spacing;
int left_margin, right_margin;
pixman_color_t background;
struct {
int width;
pixman_color_t color;
int left_margin, right_margin;
int top_margin, bottom_margin;
} border;
struct {
struct module **mods;
struct exposable **exps;
size_t count;
} left;
struct {
struct module **mods;
struct exposable **exps;
size_t count;
} center;
struct {
struct module **mods;
struct exposable **exps;
size_t count;
} right;
/* Calculated run-time */
int width;
int height_with_border;
/* Name of currently active cursor */
char *cursor_name;
pixman_image_t *pix;
struct {
void *data;
const struct backend *iface;
} backend;
};