diff options
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; +} + + |
