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_layout.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/saffron_layout.h (limited to 'include/saffron_layout.h') diff --git a/include/saffron_layout.h b/include/saffron_layout.h new file mode 100644 index 0000000..9e5ff40 --- /dev/null +++ b/include/saffron_layout.h @@ -0,0 +1,33 @@ +#ifndef SAFFRON_LAYOUT_H +#define SAFFRON_LAYOUT_H + +#include "saffron_widget.h" + +typedef enum { + SAFFRON_ORIENTATION_VERTICAL, + SAFFRON_ORIENTATION_HORIZONTAL +} SaffronOrientation; + +typedef enum { + SAFFRON_HALIGN_LEFT, + SAFFRON_HALIGN_CENTER, + SAFFRON_HALIGN_RIGHT +} SaffronHorizontalAlignment; + +typedef enum { + SAFFRON_VALIGN_TOP, + SAFFRON_VALIGN_CENTER, + SAFFRON_VALIGN_BOTTOM +} SaffronVerticalAlignment; + +typedef struct { + SaffronWidget base; + SaffronOrientation orientation; + SaffronHorizontalAlignment halign; + SaffronVerticalAlignment valign; + int spacing; + int padding; + int margin; +} SaffronBox; + +#endif -- cgit v1.2.3