]> granicus.if.org Git - python/commitdiff
Added support for WCTabHandle, AuxWinHandle, PixPatHandle: no reason
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 15 Aug 1997 14:38:05 +0000 (14:38 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 15 Aug 1997 14:38:05 +0000 (14:38 +0000)
for blacklisting them.

Mac/Modules/win/Winmodule.c
Mac/Modules/win/winscan.py
Mac/Modules/win/winsupport.py

index afac85f32158c299e94315fae3e20fc63b1a69d3..7077b12d6a04d77a0f939004b4a74f14872db01a 100644 (file)
@@ -522,6 +522,22 @@ static PyObject *WinObj_TrackBox(_self, _args)
        return _res;
 }
 
+static PyObject *WinObj_SetWinColor(_self, _args)
+       WindowObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       WCTabHandle newColorTable;
+       if (!PyArg_ParseTuple(_args, "O&",
+                             ResObj_Convert, &newColorTable))
+               return NULL;
+       SetWinColor(_self->ob_itself,
+                   newColorTable);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
 static PyObject *WinObj_GetWVariant(_self, _args)
        WindowObject *_self;
        PyObject *_args;
@@ -588,6 +604,23 @@ static PyObject *WinObj_DragWindow(_self, _args)
        return _res;
 }
 
+static PyObject *WinObj_GetAuxWin(_self, _args)
+       WindowObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       Boolean _rv;
+       AuxWinHandle awHndl;
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _rv = GetAuxWin(_self->ob_itself,
+                       &awHndl);
+       _res = Py_BuildValue("bO&",
+                            _rv,
+                            ResObj_New, awHndl);
+       return _res;
+}
+
 static PyObject *WinObj_GetWindowPort(_self, _args)
        WindowObject *_self;
        PyObject *_args;
@@ -894,6 +927,8 @@ static PyMethodDef WinObj_methods[] = {
         "(Point startPt, Rect bBox) -> (long _rv)"},
        {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
         "(Point thePt, short partCode) -> (Boolean _rv)"},
+       {"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
+        "(WCTabHandle newColorTable) -> None"},
        {"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
         "() -> (short _rv)"},
        {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
@@ -902,6 +937,8 @@ static PyMethodDef WinObj_methods[] = {
         "(Point thePt) -> (Boolean _rv)"},
        {"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
         "(Point startPt, Rect boundsRect) -> None"},
+       {"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
+        "() -> (Boolean _rv, AuxWinHandle awHndl)"},
        {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
         "() -> (CGrafPtr _rv)"},
        {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
@@ -1204,6 +1241,21 @@ static PyObject *Win_GetCWMgrPort(_self, _args)
        return _res;
 }
 
+static PyObject *Win_SetDeskCPat(_self, _args)
+       PyObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       PixPatHandle deskPixPat;
+       if (!PyArg_ParseTuple(_args, "O&",
+                             ResObj_Convert, &deskPixPat))
+               return NULL;
+       SetDeskCPat(deskPixPat);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
 static PyObject *Win_NewCWindow(_self, _args)
        PyObject *_self;
        PyObject *_args;
@@ -1302,6 +1354,8 @@ static PyMethodDef Win_methods[] = {
         "(Rect theRect, Point thePt) -> (long _rv)"},
        {"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
         "() -> (CGrafPtr wMgrCPort)"},
+       {"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
+        "(PixPatHandle deskPixPat) -> None"},
        {"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
         "(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"},
        {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
index 2d332ad16245b52962d7ee029207937b5135a0d8..cafe36f4129dda00c545aeff728c34c02ed89bc3 100644 (file)
@@ -37,9 +37,6 @@ class MyScanner(Scanner):
        def makeblacklisttypes(self):
                return [
                        'ProcPtr',
-                       'WCTabHandle',
-                       'AuxWinHandle',
-                       'PixPatHandle',
                        'DragGrayRgnUPP',
                        ]
 
index 9aed179a80a633a85d4d11429b4d4cd043f56f76..5b1b45e2cede7217198e8a3e5bdf2c88e896f534 100644 (file)
@@ -34,6 +34,9 @@ GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
 
 RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
 PicHandle = OpaqueByValueType("PicHandle", "ResObj")
+WCTabHandle = OpaqueByValueType("WCTabHandle", "ResObj")
+AuxWinHandle = OpaqueByValueType("AuxWinHandle", "ResObj")
+PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
 
 includestuff = includestuff + """
 #include <%s>""" % MACHEADERFILE + """
@@ -100,8 +103,8 @@ functions = []
 methods = []
 execfile(INPUTFILE)
 
-# Add a manual routine for converting integer WindowPtr's (as returned by
-# various event routines) to a WindowObject.
+# Add manual routines for converting integer WindowPtr's (as returned by
+# various event routines)  and Dialog objects to a WindowObject.
 whichwin_body = """
 long ptr;