Expose wakeup main loop in python api.

This commit is contained in:
Nicolas Ochsner 2022-06-17 15:26:16 +02:00
parent a27dfd8b7c
commit c147fda6ca
2 changed files with 10 additions and 0 deletions

View File

@ -892,6 +892,10 @@ def cell_size_for_window(os_window_id: int) -> Tuple[int, int]:
pass
def wakeup_main_loop() -> None:
pass
class Region:
left: int
top: int

View File

@ -1128,6 +1128,11 @@ PYWRAP0(destroy_global_data) {
Py_RETURN_NONE;
}
PYWRAP0(wakeup_main_loop) {
wakeup_main_loop();
Py_RETURN_NONE;
}
static void
destroy_mock_window(PyObject *capsule) {
Window *w = PyCapsule_GetPointer(capsule, "Window");
@ -1305,6 +1310,7 @@ static PyMethodDef module_methods[] = {
MW(patch_global_colors, METH_VARARGS),
MW(create_mock_window, METH_VARARGS),
MW(destroy_global_data, METH_NOARGS),
MW(wakeup_main_loop, METH_NOARGS),
{NULL, NULL, 0, NULL} /* Sentinel */
};