diff options
| author | Arslaan Pathan <[email protected]> | 2026-04-21 15:28:04 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-04-21 15:28:04 +1200 |
| commit | 12fb8e70c79fb262a06431bfbd0e4ce97380d2a8 (patch) | |
| tree | 684a4ef53637317486736c6a5bc7e9b823336b2f /src/saffron_layout.c | |
| parent | 3cdc4ac982c0a708dcd50a2f83f984303342902b (diff) | |
| download | saffron-12fb8e70c79fb262a06431bfbd0e4ce97380d2a8.tar.xz saffron-12fb8e70c79fb262a06431bfbd0e4ce97380d2a8.zip | |
Add foundations for layout
Diffstat (limited to 'src/saffron_layout.c')
| -rw-r--r-- | src/saffron_layout.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/saffron_layout.c b/src/saffron_layout.c new file mode 100644 index 0000000..cc91246 --- /dev/null +++ b/src/saffron_layout.c @@ -0,0 +1,26 @@ +#include "saffron_layout.h" +#include "saffron_api.h" +#include <SDL3/SDL_video.h> +#include <stdio.h> +#include <stdlib.h> +#include <SDL3/SDL.h> +#include <SDL3_ttf/SDL_ttf.h> +#include <saffron.h> + +SaffronBox* saffron_box_new(SaffronOrientation orientation, SaffronHorizontalAlignment halign, SaffronVerticalAlignment valign, int spacing, int padding, int margin) { + SaffronBox* box = malloc(sizeof(SaffronBox)); + if (!box) return NULL; + + saffron_widget_init((SaffronWidget*)box); + + box->orientation = orientation; + box->halign = halign; + box->valign = valign; + box->spacing = spacing; + box->padding = padding; + box->margin = margin; + + return box; +} + + |
