Kaydet (Commit) 4b367359 authored tarafından Just van Rossum's avatar Just van Rossum

Fixed TrackMouseRegion() argument: ioWasInRgn is an in/out parameter.

üst 3e3eacb5
...@@ -109,8 +109,10 @@ class CarbonEvents_Scanner(Scanner_OSX): ...@@ -109,8 +109,10 @@ class CarbonEvents_Scanner(Scanner_OSX):
def makerepairinstructions(self): def makerepairinstructions(self):
return [ return [
([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")], ([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")],
[("MyInBuffer", 'inDataPtr', "InMode")]) [("MyInBuffer", 'inDataPtr', "InMode")]),
([("Boolean", 'ioWasInRgn', "OutMode")],
[("Boolean", 'ioWasInRgn', "InOutMode")]),
] ]
if __name__ == "__main__": if __name__ == "__main__":
main() main()
...@@ -1447,9 +1447,10 @@ static PyObject *CarbonEvents_TrackMouseRegion(PyObject *_self, PyObject *_args) ...@@ -1447,9 +1447,10 @@ static PyObject *CarbonEvents_TrackMouseRegion(PyObject *_self, PyObject *_args)
RgnHandle inRegion; RgnHandle inRegion;
Boolean ioWasInRgn; Boolean ioWasInRgn;
UInt16 outResult; UInt16 outResult;
if (!PyArg_ParseTuple(_args, "O&O&", if (!PyArg_ParseTuple(_args, "O&O&b",
GrafObj_Convert, &inPort, GrafObj_Convert, &inPort,
ResObj_Convert, &inRegion)) ResObj_Convert, &inRegion,
&ioWasInRgn))
return NULL; return NULL;
_err = TrackMouseRegion(inPort, _err = TrackMouseRegion(inPort,
inRegion, inRegion,
...@@ -1795,7 +1796,7 @@ static PyMethodDef CarbonEvents_methods[] = { ...@@ -1795,7 +1796,7 @@ static PyMethodDef CarbonEvents_methods[] = {
{"TrackMouseLocationWithOptions", (PyCFunction)CarbonEvents_TrackMouseLocationWithOptions, 1, {"TrackMouseLocationWithOptions", (PyCFunction)CarbonEvents_TrackMouseLocationWithOptions, 1,
"(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)"}, "(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)"},
{"TrackMouseRegion", (PyCFunction)CarbonEvents_TrackMouseRegion, 1, {"TrackMouseRegion", (PyCFunction)CarbonEvents_TrackMouseRegion, 1,
"(GrafPtr inPort, RgnHandle inRegion) -> (Boolean ioWasInRgn, UInt16 outResult)"}, "(GrafPtr inPort, RgnHandle inRegion, Boolean ioWasInRgn) -> (Boolean ioWasInRgn, UInt16 outResult)"},
{"GetLastUserEventTime", (PyCFunction)CarbonEvents_GetLastUserEventTime, 1, {"GetLastUserEventTime", (PyCFunction)CarbonEvents_GetLastUserEventTime, 1,
"() -> (double _rv)"}, "() -> (double _rv)"},
{"GetWindowEventTarget", (PyCFunction)CarbonEvents_GetWindowEventTarget, 1, {"GetWindowEventTarget", (PyCFunction)CarbonEvents_GetWindowEventTarget, 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment