From 818bcb458f2d4073d6b5aca1a59fc8394c62ebb3 Mon Sep 17 00:00:00 2001 From: Able Date: Fri, 8 Nov 2024 10:29:06 -0600 Subject: [PATCH] widgets --- sysdata/libraries/horizon_api/examples/horizontal.lui | 4 ++++ sysdata/libraries/horizon_api/src/widgets/image.hb | 5 +++++ sysdata/libraries/horizon_api/src/widgets/widget_types.hb | 5 ++++- sysdata/libraries/horizon_api/src/widgets/widgets.hb | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 sysdata/libraries/horizon_api/examples/horizontal.lui create mode 100644 sysdata/libraries/horizon_api/src/widgets/image.hb diff --git a/sysdata/libraries/horizon_api/examples/horizontal.lui b/sysdata/libraries/horizon_api/examples/horizontal.lui new file mode 100644 index 000000000..895478097 --- /dev/null +++ b/sysdata/libraries/horizon_api/examples/horizontal.lui @@ -0,0 +1,4 @@ +(horizontal + spacing : 10 + (label "hi") + (label "goodbye")) \ No newline at end of file diff --git a/sysdata/libraries/horizon_api/src/widgets/image.hb b/sysdata/libraries/horizon_api/src/widgets/image.hb new file mode 100644 index 000000000..faa0d995a --- /dev/null +++ b/sysdata/libraries/horizon_api/src/widgets/image.hb @@ -0,0 +1,5 @@ +Image := struct { + magic: uint, + is_dirty: bool, + surface: Surface, +} \ No newline at end of file diff --git a/sysdata/libraries/horizon_api/src/widgets/widget_types.hb b/sysdata/libraries/horizon_api/src/widgets/widget_types.hb index 9755ec8bf..97ddcb80c 100644 --- a/sysdata/libraries/horizon_api/src/widgets/widget_types.hb +++ b/sysdata/libraries/horizon_api/src/widgets/widget_types.hb @@ -1,4 +1,7 @@ +NoWidget := 0 + VerticalWidgetType := 1 HorizontalWidgetType := 2 -LabelWidgetType := 3 \ No newline at end of file +LabelWidgetType := 3 +ImageWidgetType := 4 \ No newline at end of file diff --git a/sysdata/libraries/horizon_api/src/widgets/widgets.hb b/sysdata/libraries/horizon_api/src/widgets/widgets.hb index 360b99433..cb15cbbb3 100644 --- a/sysdata/libraries/horizon_api/src/widgets/widgets.hb +++ b/sysdata/libraries/horizon_api/src/widgets/widgets.hb @@ -11,6 +11,7 @@ render := @use("../../../../libraries/render/src/lib.hb"); widget_types := @use("widget_types.hb") label := @use("label.hb") +image := @use("image.hb") Size := struct { min_width: int,