bar.h (729B)
1 /* See LICENSE file for copyright and license details. */ 2 #include <stdint.h> 3 4 struct swc_screen; 5 struct wl_display; 6 struct wld_font; 7 struct wld_renderer; 8 9 struct Bar { 10 struct swc_screen *screen; 11 struct wl_surface *surface; 12 struct swc_panel *panel; 13 struct swc_screen *output; 14 struct Canvas *buffers; 15 struct wl_event_source *idle; 16 int width, height, shown, wanted; 17 }; 18 19 void bar_init(struct wl_display *, const char *, int); 20 void bar_finish(void); 21 void bar_close(struct Bar *); 22 void bar_update(struct Bar *, int); 23 int textwidth(const char *); 24 extern struct wld_font *barfont; 25 26 struct Bar *bar_for_screen(struct swc_screen *); 27 void bar_paint(struct Bar *, struct wld_renderer *); 28 void bar_click(struct Bar *, int, uint32_t);