--- a/ui/ui/toolkit.h Sun Jan 28 17:05:46 2024 +0100 +++ b/ui/ui/toolkit.h Sun Jan 28 20:47:40 2024 +0100 @@ -163,6 +163,8 @@ typedef struct UiImage UiImage; typedef struct UiDnD UiDnD; + +typedef struct UiThreadpool UiThreadpool; /* end opaque types */ typedef struct UiTabbedPane UiTabbedPane; @@ -371,6 +373,10 @@ UIEXPORT void ui_close(UiObject *obj); UIEXPORT void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd); +UIEXPORT void ui_call_mainthread(ui_threadfunc tf, void* td); +UIEXPORT UiThreadpool* ui_threadpool_create(int nthreads); +UIEXPORT void ui_threadpool_destroy(UiThreadpool* pool); +UIEXPORT void ui_threadpool_job(UiThreadpool* pool, UiObject* obj, ui_threadfunc tf, void* td, ui_callback f, void* fd); UIEXPORT void* ui_document_new(size_t size); UIEXPORT void ui_document_destroy(void *doc);