- Moved interrupt code to macglue.c

- Added possibility to turn off mainloop event handling
- Check interrupts even when not handling events
- Be more carefulabout which events we want
- Use different method to determine fg/bg
This commit is contained in:
Jack Jansen 1995-01-27 14:43:25 +00:00
parent 9fc3989c66
commit ee23d6ec87
3 changed files with 148 additions and 21 deletions

View file

@ -27,6 +27,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#include "macglue.h"
#include <Windows.h>
static PyObject *MacOS_Error; /* Exception MacOS.Error */
@ -188,6 +190,18 @@ MacOS_SetScheduleTimes(PyObject *self, PyObject *args)
return Py_None;
}
static PyObject *
MacOS_EnableAppswitch(PyObject *self, PyObject *args)
{
int enable;
if (!PyArg_ParseTuple(args, "i", &enable))
return NULL;
PyMac_DoYieldEnabled = enable;
Py_INCREF(Py_None);
return Py_None;
}
static PyMethodDef MacOS_Methods[] = {
{"AcceptHighLevelEvent", MacOS_AcceptHighLevelEvent, 1},
{"GetCreatorAndType", MacOS_GetCreatorAndType, 1},
@ -196,6 +210,7 @@ static PyMethodDef MacOS_Methods[] = {
{"SetHighLevelEventHandler", MacOS_SetHighLevelEventHandler, 1},
#endif
{"SetScheduleTimes", MacOS_SetScheduleTimes, 1},
{"EnableAppswitch", MacOS_EnableAppswitch, 1},
{NULL, NULL} /* Sentinel */
};