| 1281 | int bIsPumping = FALSE; |
| 1282 | BOOL bDebuggerPumpStopRequested = FALSE; |
| 1283 | static PyObject * |
| 1284 | ui_start_debugger_pump(PyObject *self, PyObject *args) |
| 1285 | { |
| 1286 | CHECK_NO_ARGS2(args,StartDebuggerPump); |
| 1287 | if (bIsPumping) |
| 1288 | RETURN_ERR("Error starting debugger pumper - already pumping"); |
| 1289 | bIsPumping = TRUE; |
| 1290 | bDebuggerPumpStopRequested = FALSE; |
| 1291 | CProtectedWinThread *pThread = GetProtectedThread(); |
| 1292 | if (!pThread) return NULL; |
| 1293 | GUI_BGN_SAVE; |
| 1294 | pThread->PumpMessages(); |
| 1295 | if (!bDebuggerPumpStopRequested) // App shutdown request. |
| 1296 | PostQuitMessage(0); |
| 1297 | GUI_END_SAVE; |
| 1298 | RETURN_NONE; |
| 1299 | // @comm This function is used by the debugger. It allows the debugger to |
| 1300 | // interact with the user, even while the Python code is stopped. |
| 1301 | // As the Python code may be responding to a Windows Event, this function |
| 1302 | // works around the inherent message queue problems. |
| 1303 | } |
| 1304 | // @pymethod |win32ui|StopDebuggerPump|Stops the debugger pump. See <om win32ui.StartDebuggerPump>. |
| 1305 | static PyObject * |
| 1306 | ui_stop_debugger_pump(PyObject *self, PyObject *args) |
nothing calls this directly
no test coverage detected