]> granicus.if.org Git - python/commitdiff
SetPort was missing, and the defs file needs the FOUR_CHAR_CODE define.
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 23 Apr 1998 13:21:09 +0000 (13:21 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 23 Apr 1998 13:21:09 +0000 (13:21 +0000)
Mac/Modules/qd/Qdmodule.c
Mac/Modules/qd/qdedit.py
Mac/Modules/qd/qdscan.py
Mac/Modules/qd/qdsupport.py

index 94ddce54ccc3d4efb8602d5cd8423d62d0c51c10..9c73bc85bc5e5b30ad2213fb692d81a881ccedf1 100644 (file)
@@ -3833,6 +3833,36 @@ static PyObject *Qd_CharExtra(_self, _args)
        return _res;
 }
 
+static PyObject *Qd_SetPort(_self, _args)
+       PyObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       WindowPtr thePort;
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &thePort))
+               return NULL;
+       SetPort(thePort);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *Qd_OpenDeskAcc(_self, _args)
+       PyObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       Str255 name;
+       if (!PyArg_ParseTuple(_args, "O&",
+                             PyMac_GetStr255, name))
+               return NULL;
+       OpenDeskAcc(name);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
 static PyObject *Qd_BitMap(_self, _args)
        PyObject *_self;
        PyObject *_args;
@@ -4277,6 +4307,10 @@ static PyMethodDef Qd_methods[] = {
         "() -> (FontInfo info)"},
        {"CharExtra", (PyCFunction)Qd_CharExtra, 1,
         "(Fixed extra) -> None"},
+       {"SetPort", (PyCFunction)Qd_SetPort, 1,
+        "(WindowPtr thePort) -> None"},
+       {"OpenDeskAcc", (PyCFunction)Qd_OpenDeskAcc, 1,
+        "(Str255 name) -> None"},
        {"BitMap", (PyCFunction)Qd_BitMap, 1,
         "Take (string, int, Rect) argument and create BitMap"},
        {"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
index 2242c5a355365d9b190818873d957bb0630f43e8..313916864084339d640fd98de842abeb9e5f99b5 100644 (file)
@@ -1,28 +1,8 @@
-f = Function(void, 'GlobalToLocal',
-       (Point, 'thePoint', InOutMode),
-)
-functions.append(f)
-
-f = Function(void, 'LocalToGlobal',
-       (Point, 'thePoint', InOutMode),
-)
-functions.append(f)
-
 f = Function(void, 'SetPort',
        (WindowPtr, 'thePort', InMode),
 )
 functions.append(f)
 
-f = Function(void, 'ClipRect',
-       (Rect, 'r', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'EraseRect',
-       (Rect, 'r', InMode),
-)
-functions.append(f)
-
 f = Function(void, 'OpenDeskAcc',
        (Str255, 'name', InMode),
 )
index 86f69aaee7431596e5f92e5f8b3f55802d8c00f9..81a5b1c08aa1b90125ec8d352e96ba00b80531d1 100644 (file)
@@ -60,6 +60,10 @@ class MyScanner(Scanner):
 ##                             listname = "r_methods"
                return classname, listname
 
+
+       def writeinitialdefs(self):
+               self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
+
        def makeblacklistnames(self):
                return [
                        'InitGraf',
index 9b1151b88b3e04b831b6f37dee025993dbf8184c..7f1db824fedac625541ba4848ffac72b8f26f519 100644 (file)
@@ -302,7 +302,7 @@ Method = OSErrMethodGenerator
 functions = []
 methods = []
 execfile(INPUTFILE)
-#execfile(EXTRAFILE)
+execfile(EXTRAFILE)
 
 # add the populated lists to the generator groups
 # (in a different wordl the scan program would generate this)