]> granicus.if.org Git - python/commitdiff
Fixed TrackMouseRegion() argument: ioWasInRgn is an in/out parameter.
authorJust van Rossum <just@letterror.com>
Wed, 9 Jan 2002 18:54:16 +0000 (18:54 +0000)
committerJust van Rossum <just@letterror.com>
Wed, 9 Jan 2002 18:54:16 +0000 (18:54 +0000)
Mac/Modules/carbonevt/CarbonEvtscan.py
Mac/Modules/carbonevt/_CarbonEvtmodule.c

index 353919658a1bbc37f29488f6cd5dd11961c248e1..0cc048a3268334d2545b92eedb61efbad137646a 100644 (file)
@@ -109,8 +109,10 @@ class CarbonEvents_Scanner(Scanner_OSX):
        def makerepairinstructions(self):
                return [
                        ([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")],
-                               [("MyInBuffer", 'inDataPtr', "InMode")])
+                        [("MyInBuffer", 'inDataPtr', "InMode")]),
+                       ([("Boolean", 'ioWasInRgn', "OutMode")],
+                        [("Boolean", 'ioWasInRgn', "InOutMode")]),
                ]
-               
+
 if __name__ == "__main__":
        main()
index 2099cffb3615f6860f06714e1329c152a5cbb34e..dca9d330ec835a80e897eea84017f1eac20bbf88 100755 (executable)
@@ -1447,9 +1447,10 @@ static PyObject *CarbonEvents_TrackMouseRegion(PyObject *_self, PyObject *_args)
        RgnHandle inRegion;
        Boolean ioWasInRgn;
        UInt16 outResult;
-       if (!PyArg_ParseTuple(_args, "O&O&",
+       if (!PyArg_ParseTuple(_args, "O&O&b",
                              GrafObj_Convert, &inPort,
-                             ResObj_Convert, &inRegion))
+                             ResObj_Convert, &inRegion,
+                             &ioWasInRgn))
                return NULL;
        _err = TrackMouseRegion(inPort,
                                inRegion,
@@ -1795,7 +1796,7 @@ static PyMethodDef CarbonEvents_methods[] = {
        {"TrackMouseLocationWithOptions", (PyCFunction)CarbonEvents_TrackMouseLocationWithOptions, 1,
         "(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)"},
        {"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,
         "() -> (double _rv)"},
        {"GetWindowEventTarget", (PyCFunction)CarbonEvents_GetWindowEventTarget, 1,