From 12fb8e70c79fb262a06431bfbd0e4ce97380d2a8 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Tue, 21 Apr 2026 15:28:04 +1200 Subject: Add foundations for layout --- include/saffron_api.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/saffron_api.h') diff --git a/include/saffron_api.h b/include/saffron_api.h index c2e6c9c..e8fdfb8 100644 --- a/include/saffron_api.h +++ b/include/saffron_api.h @@ -3,12 +3,14 @@ #include "saffron_widget.h" /* satisfy the lsp and also if someone includes api without the saffron.h wrapper (you lunatic) then it still works */ #include "saffron_window.h" +#include "saffron_layout.h" bool saffron_init(void); void saffron_quit(void); void saffron_widget_draw(SaffronWidget* widget, SDL_Renderer *renderer); void saffron_widget_add_child(SaffronWidget* parent, SaffronWidget* child); +void saffron_widget_init(SaffronWidget* widget); /* generic primitive for generic widgets as said below. saffron_widget_new just calls this under the hood */ SaffronWidget* saffron_widget_new(); /* generic primitive for generic widgets, e.g. the window root. ideally window root is a hbox/vbox/box once those are implemented */ void saffron_widget_free(SaffronWidget* widget); @@ -18,4 +20,6 @@ void saffron_window_show(SaffronWindow* window); void saffron_window_main(SaffronWindow* window); SaffronWidget* saffron_widget_hit_test(SaffronWidget* widget, int x, int y); +SaffronBox* saffron_box_new(SaffronOrientation orientation, SaffronHorizontalAlignment halign, SaffronVerticalAlignment valign, int spacing, int padding, int margin); + #endif -- cgit v1.2.3