diff -r 39cb60b6a81b -r 1d47e71f26b6 ui/server/toolkit.h --- a/ui/server/toolkit.h Mon Dec 08 16:21:24 2025 +0100 +++ b/ui/server/toolkit.h Mon Dec 08 18:11:54 2025 +0100 @@ -34,15 +34,20 @@ #include "../common/context.h" #include "../common/object.h" +#include #include #ifdef __cplusplus extern "C" { #endif +typedef struct UiSrvObj UiSrvObj; + typedef struct UiServerEvent UiServerEvent; typedef struct UiServerEventData UiServerEventData; typedef void(*ui_srvevent_func)(UiServerEventData *event, void *userdata); + +typedef cxmutstr (*ui_serialize_func)(UiWidget *w); struct UiServerEventData { UiObject *obj; @@ -56,6 +61,23 @@ void *userdata; }; +struct UiSrvObj { + cxmutstr id; +}; + +struct UiWidget { + UiSrvObj *obj; + cxmutstr id; + UiVar *var; + cxmutstr var_id; + UiVarType var_type; + CxList *children; + cxmutstr args; + UiBool visible; + UiBool enabled; + ui_serialize_func *serialize; +}; + void ui_server_message_received(cxstring msg);