summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/evt
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1998-02-20 16:02:09 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1998-02-20 16:02:09 (GMT)
commit21f96872f20080d5f07a72ea4141fac137ac9b15 (patch)
tree5a300f0e769bddbc7795b7bc955f9f84f3bc1f2e /Mac/Modules/evt
parentcbe6a53d1ffe76702a2873429f2c57f9609a7f48 (diff)
downloadcpython-21f96872f20080d5f07a72ea4141fac137ac9b15.zip
cpython-21f96872f20080d5f07a72ea4141fac137ac9b15.tar.gz
cpython-21f96872f20080d5f07a72ea4141fac137ac9b15.tar.bz2
Regenerated from Universal Headers 3.0.1. Some new calls are
blacklisted, because they are not available in classic 68k programs, and bgen doesn't have a way to put #ifdef/#endif in the generated code. For now we only implement calls that work on all three models.
Diffstat (limited to 'Mac/Modules/evt')
-rw-r--r--Mac/Modules/evt/Evtmodule.c196
1 files changed, 98 insertions, 98 deletions
diff --git a/Mac/Modules/evt/Evtmodule.c b/Mac/Modules/evt/Evtmodule.c
index b5bc573..edd8bc7 100644
--- a/Mac/Modules/evt/Evtmodule.c
+++ b/Mac/Modules/evt/Evtmodule.c
@@ -48,192 +48,192 @@ extern PyObject *WinObj_WhichWindow(WindowPtr);
static PyObject *Evt_Error;
-static PyObject *Evt_GetCaretTime(_self, _args)
+static PyObject *Evt_GetMouse(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- UInt32 _rv;
+ Point mouseLoc;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = GetCaretTime();
- _res = Py_BuildValue("l",
- _rv);
+ GetMouse(&mouseLoc);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, mouseLoc);
return _res;
}
-static PyObject *Evt_SetEventMask(_self, _args)
+static PyObject *Evt_Button(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- EventMask value;
- if (!PyArg_ParseTuple(_args, "h",
- &value))
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- SetEventMask(value);
- Py_INCREF(Py_None);
- _res = Py_None;
+ _rv = Button();
+ _res = Py_BuildValue("b",
+ _rv);
return _res;
}
-static PyObject *Evt_GetDblTime(_self, _args)
+static PyObject *Evt_StillDown(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- UInt32 _rv;
+ Boolean _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = GetDblTime();
- _res = Py_BuildValue("l",
+ _rv = StillDown();
+ _res = Py_BuildValue("b",
_rv);
return _res;
}
-static PyObject *Evt_GetNextEvent(_self, _args)
+static PyObject *Evt_WaitMouseUp(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Boolean _rv;
- EventMask eventMask;
- EventRecord theEvent;
- if (!PyArg_ParseTuple(_args, "h",
- &eventMask))
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = GetNextEvent(eventMask,
- &theEvent);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
+ _rv = WaitMouseUp();
+ _res = Py_BuildValue("b",
+ _rv);
return _res;
}
-static PyObject *Evt_WaitNextEvent(_self, _args)
+static PyObject *Evt_TickCount(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- Boolean _rv;
- EventMask eventMask;
- EventRecord theEvent;
- UInt32 sleep;
- if (!PyArg_ParseTuple(_args, "hl",
- &eventMask,
- &sleep))
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = WaitNextEvent(eventMask,
- &theEvent,
- sleep,
- (RgnHandle)0);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
+ _rv = TickCount();
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
-static PyObject *Evt_EventAvail(_self, _args)
+static PyObject *Evt_GetCaretTime(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- Boolean _rv;
- EventMask eventMask;
- EventRecord theEvent;
- if (!PyArg_ParseTuple(_args, "h",
- &eventMask))
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = EventAvail(eventMask,
- &theEvent);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
+ _rv = GetCaretTime();
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
-static PyObject *Evt_GetMouse(_self, _args)
+static PyObject *Evt_GetKeys(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- Point mouseLoc;
+ KeyMap theKeys__out__;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- GetMouse(&mouseLoc);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, mouseLoc);
+ GetKeys(theKeys__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&theKeys__out__, (int)sizeof(KeyMap));
+ theKeys__error__: ;
return _res;
}
-static PyObject *Evt_Button(_self, _args)
+static PyObject *Evt_GetDblTime(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- Boolean _rv;
+ UInt32 _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = Button();
- _res = Py_BuildValue("b",
+ _rv = GetDblTime();
+ _res = Py_BuildValue("l",
_rv);
return _res;
}
-static PyObject *Evt_StillDown(_self, _args)
+static PyObject *Evt_SetEventMask(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- Boolean _rv;
- if (!PyArg_ParseTuple(_args, ""))
+ EventMask value;
+ if (!PyArg_ParseTuple(_args, "h",
+ &value))
return NULL;
- _rv = StillDown();
- _res = Py_BuildValue("b",
- _rv);
+ SetEventMask(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
return _res;
}
-static PyObject *Evt_WaitMouseUp(_self, _args)
+static PyObject *Evt_GetNextEvent(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Boolean _rv;
- if (!PyArg_ParseTuple(_args, ""))
+ EventMask eventMask;
+ EventRecord theEvent;
+ if (!PyArg_ParseTuple(_args, "h",
+ &eventMask))
return NULL;
- _rv = WaitMouseUp();
- _res = Py_BuildValue("b",
- _rv);
+ _rv = GetNextEvent(eventMask,
+ &theEvent);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
return _res;
}
-static PyObject *Evt_GetKeys(_self, _args)
+static PyObject *Evt_WaitNextEvent(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- KeyMap theKeys__out__;
- if (!PyArg_ParseTuple(_args, ""))
+ Boolean _rv;
+ EventMask eventMask;
+ EventRecord theEvent;
+ UInt32 sleep;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &eventMask,
+ &sleep))
return NULL;
- GetKeys(theKeys__out__);
- _res = Py_BuildValue("s#",
- (char *)&theKeys__out__, (int)sizeof(KeyMap));
- theKeys__error__: ;
+ _rv = WaitNextEvent(eventMask,
+ &theEvent,
+ sleep,
+ (RgnHandle)0);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
return _res;
}
-static PyObject *Evt_TickCount(_self, _args)
+static PyObject *Evt_EventAvail(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- UInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
+ Boolean _rv;
+ EventMask eventMask;
+ EventRecord theEvent;
+ if (!PyArg_ParseTuple(_args, "h",
+ &eventMask))
return NULL;
- _rv = TickCount();
- _res = Py_BuildValue("l",
- _rv);
+ _rv = EventAvail(eventMask,
+ &theEvent);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
return _res;
}
@@ -361,18 +361,6 @@ static PyObject *Evt_SystemEvent(_self, _args)
}
static PyMethodDef Evt_methods[] = {
- {"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
- "() -> (UInt32 _rv)"},
- {"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
- "(EventMask value) -> None"},
- {"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
- "() -> (UInt32 _rv)"},
- {"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
- "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
- {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
- "(EventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"},
- {"EventAvail", (PyCFunction)Evt_EventAvail, 1,
- "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
{"GetMouse", (PyCFunction)Evt_GetMouse, 1,
"() -> (Point mouseLoc)"},
{"Button", (PyCFunction)Evt_Button, 1,
@@ -381,10 +369,22 @@ static PyMethodDef Evt_methods[] = {
"() -> (Boolean _rv)"},
{"WaitMouseUp", (PyCFunction)Evt_WaitMouseUp, 1,
"() -> (Boolean _rv)"},
+ {"TickCount", (PyCFunction)Evt_TickCount, 1,
+ "() -> (UInt32 _rv)"},
+ {"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
+ "() -> (UInt32 _rv)"},
{"GetKeys", (PyCFunction)Evt_GetKeys, 1,
"() -> (KeyMap theKeys)"},
- {"TickCount", (PyCFunction)Evt_TickCount, 1,
+ {"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
"() -> (UInt32 _rv)"},
+ {"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
+ "(EventMask value) -> None"},
+ {"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
+ "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
+ {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
+ "(EventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"},
+ {"EventAvail", (PyCFunction)Evt_EventAvail, 1,
+ "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
{"PostEvent", (PyCFunction)Evt_PostEvent, 1,
"(EventKind eventNum, UInt32 eventMsg) -> None"},
{"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,