diff options
Diffstat (limited to 'libs/libgui/gui.h')
-rw-r--r-- | libs/libgui/gui.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/libgui/gui.h b/libs/libgui/gui.h index c7dc24f..66c6733 100644 --- a/libs/libgui/gui.h +++ b/libs/libgui/gui.h @@ -18,9 +18,30 @@ enum gui_layer { GUI_LAYER_FG, }; +struct gui_event_mouse { + u32 win; + u32 widget; + vec2 pos; + s8 scroll; // Dir: -1 neg, +1 pos + struct { + u8 left : 1; + u8 right : 1; + u8 middle : 1; + } but; +}; + +/** + * Window operations + */ + void gui_new_custom_window(u32 *id, vec2 pos, vec2 size); void gui_new_window(u32 *id); void gui_redraw_window(u32 id); +void gui_redraw_window_only(u32 id); // Without widgets + +/** + * GFX wrappers + */ void gui_clear(u32 win_id, u32 widget_id, enum gui_layer layer); void gui_fill(u32 win_id, u32 widget_id, enum gui_layer layer, u32 c); @@ -30,6 +51,15 @@ void gui_load_image(u32 win_id, u32 widget_id, enum gui_layer layer, vec2 pos, v const char *path) NONNULL; void gui_load_image_filter(u32 win_id, u32 widget_id, enum gui_layer layer, vec2 pos, vec2 size, enum gfx_filter filter, const char *path) NONNULL; +void gui_draw_rectangle(u32 win_id, u32 widget_id, enum gui_layer layer, vec2 pos1, vec2 pos2, + u32 c); +void gui_draw_border(u32 win_id, u32 widget_id, enum gui_layer layer, u32 width, u32 c); +void gui_draw_line(u32 win_id, u32 widget_id, enum gui_layer layer, vec2 pos1, vec2 pos2, u32 scale, + u32 c); + +/** + * Widget operations + */ void gui_add_widget(u32 *widget, u32 win_id, u32 widget_id, vec2 pos, vec2 size); void gui_new_widget(u32 *widget, u32 win_id, vec2 pos, vec2 size); |