summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mac/Modules/dlg/_Dlgmodule.c20
-rw-r--r--Mac/Modules/dlg/dlgscan.py1
-rw-r--r--Mac/Modules/dlg/dlgsupport.py2
-rw-r--r--Mac/Modules/win/_Winmodule.c4
-rw-r--r--Mac/Modules/win/winsupport.py4
5 files changed, 9 insertions, 22 deletions
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
index e465129..6983321 100644
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -36,7 +36,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *);
#define DlgObj_Convert _DlgObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
#define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
#define SetPortDialogPort(dlg) SetPort(dlg)
#define GetDialogPort(dlg) ((CGrafPtr)(dlg))
@@ -769,20 +769,6 @@ static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args)
return _res;
}
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *DlgObj_SetGrafPortOfDialog(DialogObject *_self, PyObject *_args)
-{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- SetGrafPortOfDialog(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-#endif
-
static PyMethodDef DlgObj_methods[] = {
{"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
"() -> None"},
@@ -865,10 +851,6 @@ static PyMethodDef DlgObj_methods[] = {
{"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
"() -> (CGrafPtr _rv)"},
-#if !TARGET_API_MAC_CARBON
- {"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
- "() -> None"},
-#endif
{NULL, NULL, 0}
};
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py
index 549d0b3..2c63080 100644
--- a/Mac/Modules/dlg/dlgscan.py
+++ b/Mac/Modules/dlg/dlgscan.py
@@ -53,6 +53,7 @@ class MyScanner(Scanner):
## # Can't find these in the CW Pro 3 libraries
'SetDialogMovableModal',
'GetDialogControlNotificationProc',
+ 'SetGrafPortOfDialog', # Funny, and probably not useful
]
def makegreylist(self):
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index af72b3a..e496eb2 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -47,7 +47,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *);
#define DlgObj_Convert _DlgObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
#define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
#define SetPortDialogPort(dlg) SetPort(dlg)
#define GetDialogPort(dlg) ((CGrafPtr)(dlg))
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
index 13ebe20..623782d 100644
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -36,11 +36,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
#define WinObj_Convert _WinObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
/* Carbon calls that we emulate in classic mode */
#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
#define GetWindowFromPort(port) ((WindowRef)(port))
#define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
+#endif
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS
#define IsPointerValid(p) (((long)p&3) == 0)
#endif
#if ACCESSOR_CALLS_ARE_FUNCTIONS
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 8a38b97..29afcc6 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -70,11 +70,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
#define WinObj_Convert _WinObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
/* Carbon calls that we emulate in classic mode */
#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
#define GetWindowFromPort(port) ((WindowRef)(port))
#define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
+#endif
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS
#define IsPointerValid(p) (((long)p&3) == 0)
#endif
#if ACCESSOR_CALLS_ARE_FUNCTIONS