forked from external/yambar
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().
17 lines
511 B
C
17 lines
511 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));
|
|
void (*commit)(const struct bar *bar);
|
|
void (*refresh)(const struct bar *bar);
|
|
void (*set_cursor)(struct bar *bar, const char *cursor);
|
|
};
|