add wrapper functions for typed obj access

Fri, 05 Jun 2026 19:04:22 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 05 Jun 2026 19:04:22 +0200
changeset 1171
d5500e601996
parent 1170
b79469a55540
child 1172
e1c1559f2522

add wrapper functions for typed obj access

ui/common/wrapper.c file | annotate | diff | comparison | revisions
ui/common/wrapper.h file | annotate | diff | comparison | revisions
--- a/ui/common/wrapper.c	Fri Jun 05 18:02:54 2026 +0200
+++ b/ui/common/wrapper.c	Fri Jun 05 19:04:22 2026 +0200
@@ -250,6 +250,17 @@
 }
 
 
+/* ---------------------------- UiTypedObj ---------------------------- */
+
+void* ui_typed_obj_get_ptr(UiTypedObj *obj) {
+    return obj->ptr;
+}
+
+uint64_t ui_typed_obj_get_type(UiTypedObj *obj) {
+    return obj->type;
+}
+
+
 /* ------------------------- SubListItem (public) ------------------------- */
 
 void ui_sublist_item_set_icon(UiSubListItem *item, const char *icon) {
--- a/ui/common/wrapper.h	Fri Jun 05 18:02:54 2026 +0200
+++ b/ui/common/wrapper.h	Fri Jun 05 19:04:22 2026 +0200
@@ -84,6 +84,9 @@
 UIEXPORT int ui_event_get_int(UiEvent *event);
 UIEXPORT int ui_event_get_set(UiEvent *event);
 
+UIEXPORT void* ui_typed_obj_get_ptr(UiTypedObj *obj);
+UIEXPORT uint64_t ui_typed_obj_get_type(UiTypedObj *obj);
+
 UIEXPORT int ui_list_selection_get_count(UiListSelection *sel);
 UIEXPORT int* ui_list_selection_get_rows(UiListSelection *sel);
 UIEXPORT void ui_list_set_selected_indices(UiList *list, int *indices, int num);

mercurial