mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
bar: wip: define a 'backend' interface
Implement the current XCB backend in terms of this new interface.
This commit is contained in:
parent
f37dfbc727
commit
88daaf0ab7
6 changed files with 503 additions and 403 deletions
17
bar/backend.h
Normal file
17
bar/backend.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#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_surface)(const struct bar *bar);
|
||||
void (*refresh)(const struct bar *bar);
|
||||
void (*set_cursor)(struct bar *bar, const char *cursor);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue