--- a/ui/server/toolkit.h Sat Dec 06 14:12:11 2025 +0100 +++ b/ui/server/toolkit.h Sat Dec 06 15:24:13 2025 +0100 @@ -34,10 +34,29 @@ #include "../common/context.h" #include "../common/object.h" +#include <cx/string.h> + #ifdef __cplusplus extern "C" { #endif + +typedef struct UiServerEvent UiServerEvent; +typedef struct UiServerEventData UiServerEventData; +typedef void(*ui_srvevent_func)(UiServerEventData *event, void *userdata); + +struct UiServerEventData { + UiObject *obj; + cxmutstr str; + int intvalue; +}; +struct UiServerEvent { + UiServerEventData event; + ui_srvevent_func callback; + void *userdata; +}; + +void ui_server_message_received(cxstring msg); #ifdef __cplusplus