mirror of https://github.com/python/cpython.git
more stuff
This commit is contained in:
parent
a12ef9433b
commit
e26c263e71
|
@ -1,4 +1,5 @@
|
||||||
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Menus.h'
|
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Menus.h'
|
||||||
|
|
||||||
mDrawMsg = 0
|
mDrawMsg = 0
|
||||||
mChooseMsg = 1
|
mChooseMsg = 1
|
||||||
mSizeMsg = 2
|
mSizeMsg = 2
|
||||||
|
@ -9,4 +10,5 @@
|
||||||
hierMenu = -1
|
hierMenu = -1
|
||||||
mPopUpMsg = 3
|
mPopUpMsg = 3
|
||||||
mctAllItems = -98
|
mctAllItems = -98
|
||||||
mctLastIDIndic = -99 /*last color table entry has this in ID field*/
|
mctLastIDIndic = -99
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,10 @@ extern int MenuObj_Convert(PyObject *, MenuHandle *);
|
||||||
extern PyObject *CtlObj_New(ControlHandle);
|
extern PyObject *CtlObj_New(ControlHandle);
|
||||||
extern int CtlObj_Convert(PyObject *, ControlHandle *);
|
extern int CtlObj_Convert(PyObject *, ControlHandle *);
|
||||||
|
|
||||||
|
extern PyObject *WinObj_WhichWindow(WindowPtr);
|
||||||
|
|
||||||
#include <Events.h>
|
#include <Events.h>
|
||||||
|
#include <Desk.h>
|
||||||
|
|
||||||
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
|
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
|
||||||
|
|
||||||
|
@ -159,27 +162,30 @@ static PyObject *Evt_GetKeys(_self, _args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
KeyMap theKeys__out__;
|
KeyMap theKeys__out__;
|
||||||
int theKeys__len__;
|
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
return NULL;
|
return NULL;
|
||||||
GetKeys(theKeys__out__);
|
GetKeys(theKeys__out__);
|
||||||
_res = Py_BuildValue("s#",
|
_res = Py_BuildValue("s#",
|
||||||
(char *)&theKeys__out__, sizeof(KeyMap));
|
(char *)&theKeys__out__, (int)sizeof(KeyMap));
|
||||||
theKeys__error__: ;
|
theKeys__error__: ;
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *Evt_TickCount(_self, _args)
|
static PyObject *Evt_SystemClick(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
PyObject *_args;
|
PyObject *_args;
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
long _rv;
|
EventRecord theEvent;
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
WindowPtr theWindow;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
|
PyMac_GetEventRecord, &theEvent,
|
||||||
|
WinObj_Convert, &theWindow))
|
||||||
return NULL;
|
return NULL;
|
||||||
_rv = TickCount();
|
SystemClick(&theEvent,
|
||||||
_res = Py_BuildValue("l",
|
theWindow);
|
||||||
_rv);
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,8 +206,8 @@ static PyMethodDef Evt_methods[] = {
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
{"GetKeys", (PyCFunction)Evt_GetKeys, 1,
|
{"GetKeys", (PyCFunction)Evt_GetKeys, 1,
|
||||||
"() -> (KeyMap theKeys)"},
|
"() -> (KeyMap theKeys)"},
|
||||||
{"TickCount", (PyCFunction)Evt_TickCount, 1,
|
{"SystemClick", (PyCFunction)Evt_SystemClick, 1,
|
||||||
"() -> (long _rv)"},
|
"(EventRecord theEvent, WindowPtr theWindow) -> None"},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -226,3 +232,4 @@ void initEvt()
|
||||||
|
|
||||||
/* ========================= End module Evt ========================= */
|
/* ========================= End module Evt ========================= */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
|
|
||||||
# Create the type objects
|
# Create the type objects
|
||||||
|
|
||||||
WindowPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
|
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
|
||||||
WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
|
|
||||||
|
|
||||||
RgnHandle = FakeType("(RgnHandle)0") # XXX
|
RgnHandle = FakeType("(RgnHandle)0") # XXX
|
||||||
|
|
||||||
|
@ -31,6 +30,7 @@
|
||||||
|
|
||||||
includestuff = includestuff + """
|
includestuff = includestuff + """
|
||||||
#include <%s>""" % MACHEADERFILE + """
|
#include <%s>""" % MACHEADERFILE + """
|
||||||
|
#include <Desk.h>
|
||||||
|
|
||||||
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
|
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
|
||||||
"""
|
"""
|
||||||
|
@ -63,6 +63,7 @@ def outputCheckConvertArg(self):
|
||||||
functions = []
|
functions = []
|
||||||
##methods = []
|
##methods = []
|
||||||
execfile(INPUTFILE)
|
execfile(INPUTFILE)
|
||||||
|
execfile("evtedit.py")
|
||||||
|
|
||||||
# add the populated lists to the generator groups
|
# add the populated lists to the generator groups
|
||||||
# (in a different wordl the scan program would generate this)
|
# (in a different wordl the scan program would generate this)
|
||||||
|
@ -72,3 +73,4 @@ def outputCheckConvertArg(self):
|
||||||
# generate output (open the output file as late as possible)
|
# generate output (open the output file as late as possible)
|
||||||
SetOutputFileName(OUTPUTFILE)
|
SetOutputFileName(OUTPUTFILE)
|
||||||
module.generate()
|
module.generate()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue