# HG changeset patch # User Olaf Wintermann # Date 1749891957 -7200 # Node ID 84b351712c195ada7233ef4775ccd2775bdd582f # Parent 174c11734dad230aa11eff4e7d103c8d508969eb add wrapper functions for accessing some UiObject members diff -r 174c11734dad -r 84b351712c19 ui/common/wrapper.c --- a/ui/common/wrapper.c Fri Jun 13 21:37:00 2025 +0200 +++ b/ui/common/wrapper.c Sat Jun 14 11:05:57 2025 +0200 @@ -28,6 +28,23 @@ #include "wrapper.h" +/* ---------------------------- UiObject ---------------------------- */ + +UiContext* ui_object_get_context(UiObject *obj) { + return obj->ctx; +} + +void* ui_object_get_windowdata(UiObject *obj) { + return obj->window; +} + +void ui_object_set_windowdata(UiObject *obj, void *windowdata) { + obj->window = windowdata; +} + + +/* ---------------------------- UiEvent ---------------------------- */ + UiObject* ui_event_get_obj(UiEvent *event) { return event->obj; } diff -r 174c11734dad -r 84b351712c19 ui/common/wrapper.h --- a/ui/common/wrapper.h Fri Jun 13 21:37:00 2025 +0200 +++ b/ui/common/wrapper.h Sat Jun 14 11:05:57 2025 +0200 @@ -35,6 +35,10 @@ extern "C" { #endif +UIEXPORT UiContext* ui_object_get_context(UiObject *obj); +UIEXPORT void* ui_object_get_windowdata(UiObject *obj); +UIEXPORT void ui_object_set_windowdata(UiObject *obj, void *windowdata); + UIEXPORT UiObject* ui_event_get_obj(UiEvent *event); UIEXPORT void* ui_event_get_document(UiEvent *event); UIEXPORT void* ui_event_get_windowdata(UiEvent *event);