Add a delayed callback helper for python

This commit is contained in:
baldurk
2025-09-08 17:29:27 +01:00
parent b3cec5a4cf
commit b4615dbd18
5 changed files with 22 additions and 0 deletions
+8
View File
@@ -2390,6 +2390,14 @@ If no bookmark exists, this function will do nothing.
)");
virtual void RemoveBookmark(uint32_t eventId) = 0;
DOCUMENT(R"(Registers a delayed callback to be called after a certain number of milliseconds
on the UI thread.
:param int milliseconds: The number of milliseconds (approximately) to wait before the callback.
:param Callable[[], None] callback: The function to call
)");
virtual void DelayedCallback(uint32_t milliseconds, std::function<void()> callback) = 0;
DOCUMENT(R"(Retrieve the current singleton :class:`MainWindow`.
:return: The current window.