forked from external/yambar
All decoration, particle and module interfaces now takes a pixman_image_t parameter, and all drawing is done using pixman APIs. The wayland/xcb backends implement a new interface functions, get_pixman_image(), that should return a pixman image instance that is suitable for rendering. In the wayland backend, the image uses the same backing data as the cairo surface. In the XCB backend, we create a new image each time, and then blit it to the cairo surface at commit time.
18 lines
603 B
C
18 lines
603 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "bar.h"
|
|
|
|
struct backend {
|
|
bool (*setup)(struct bar *bar);
|
|
void (*cleanup)(struct bar *bar);
|
|
void (*loop)(struct bar *bar,
|
|
void (*expose)(const struct bar *bar),
|
|
void (*on_mouse)(struct bar *bar, enum mouse_event event,
|
|
int x, int y));
|
|
pixman_image_t *(*get_pixman_image)(const struct bar *bar);
|
|
void (*commit_pixman)(const struct bar *bar, pixman_image_t *pix);
|
|
void (*refresh)(const struct bar *bar);
|
|
void (*set_cursor)(struct bar *bar, const char *cursor);
|
|
};
|