diff -r e377456302df -r a82d9beaa94a ui/ui/display.h --- a/ui/ui/display.h Tue Oct 17 21:50:48 2023 +0200 +++ b/ui/ui/display.h Thu Oct 19 18:30:19 2023 +0200 @@ -75,6 +75,17 @@ const char* varname; } UiProgressbarArgs; +typedef struct UiProgressbarSpinnerArgs { + UiTri fill; + UiBool hexpand; + UiBool vexpand; + int colspan; + int rowspan; + + UiInteger* value; + const char* varname; +} UiProgressbarSpinnerArgs; + /* label widgets */ #define ui_label(obj, ...) ui_label_create(obj, (UiLabelArgs) { __VA_ARGS__ }) @@ -89,11 +100,13 @@ UIWIDGET ui_space(UiObject *obj); UIWIDGET ui_separator(UiObject *obj); -/* progress bar */ +/* progress bar/spinner */ #define ui_progressbar(obj, ...) ui_progressbar_create(obj, (UiProgressbarArgs) { __VA_ARGS__ } ) +#define ui_progressspinner(obj, ...) ui_progressspinner_create(obj, (UiProgressbarSpinnerArgs) { __VA_ARGS__ } ) UIEXPORT UIWIDGET ui_progressbar_create(UiObject *obj, UiProgressbarArgs args); +UIEXPORT UIWIDGET ui_progressspinner_create(UiObject* obj, UiProgressbarSpinnerArgs args); #ifdef __cplusplus