Add popup to display pressed keys

This commit is contained in:
Willow Barraco
2023-09-06 09:28:09 +02:00
parent b1890848d5
commit 24e354ce9e
5 changed files with 137 additions and 15 deletions

12
drw.c
View File

@@ -51,6 +51,18 @@ drw_draw_text(struct drwsurf *d, Color color, uint32_t x, uint32_t y,
cairo_restore(d->cairo);
}
void
drw_do_clear(struct drwsurf *d, uint32_t x, uint32_t y,
uint32_t w, uint32_t h) {
cairo_save(d->cairo);
cairo_set_operator(d->cairo, CAIRO_OPERATOR_CLEAR);
cairo_rectangle(d->cairo, x, y, w, h);
cairo_fill(d->cairo);
cairo_restore(d->cairo);
}
void
drw_do_rectangle(struct drwsurf *d, Color color, uint32_t x, uint32_t y,
uint32_t w, uint32_t h, bool over) {