Kaydet (Commit) bd008844 authored tarafından Jack Jansen's avatar Jack Jansen

First tweaks to allow MacPython to be compiled with

Universal Headers 3.4
üst 34cbe718
...@@ -36,7 +36,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *); ...@@ -36,7 +36,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *);
#define DlgObj_Convert _DlgObj_Convert #define DlgObj_Convert _DlgObj_Convert
#endif #endif
#if !ACCESSOR_CALLS_ARE_FUNCTIONS #if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
#define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH) #define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
#define SetPortDialogPort(dlg) SetPort(dlg) #define SetPortDialogPort(dlg) SetPort(dlg)
#define GetDialogPort(dlg) ((CGrafPtr)(dlg)) #define GetDialogPort(dlg) ((CGrafPtr)(dlg))
...@@ -769,20 +769,6 @@ static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args) ...@@ -769,20 +769,6 @@ static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args)
return _res; 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[] = { static PyMethodDef DlgObj_methods[] = {
{"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1, {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
"() -> None"}, "() -> None"},
...@@ -865,10 +851,6 @@ static PyMethodDef DlgObj_methods[] = { ...@@ -865,10 +851,6 @@ static PyMethodDef DlgObj_methods[] = {
{"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1, {"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
"() -> (CGrafPtr _rv)"}, "() -> (CGrafPtr _rv)"},
#if !TARGET_API_MAC_CARBON
{"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
"() -> None"},
#endif
{NULL, NULL, 0} {NULL, NULL, 0}
}; };
......
...@@ -53,6 +53,7 @@ class MyScanner(Scanner): ...@@ -53,6 +53,7 @@ class MyScanner(Scanner):
## # Can't find these in the CW Pro 3 libraries ## # Can't find these in the CW Pro 3 libraries
'SetDialogMovableModal', 'SetDialogMovableModal',
'GetDialogControlNotificationProc', 'GetDialogControlNotificationProc',
'SetGrafPortOfDialog', # Funny, and probably not useful
] ]
def makegreylist(self): def makegreylist(self):
......
...@@ -47,7 +47,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *); ...@@ -47,7 +47,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *);
#define DlgObj_Convert _DlgObj_Convert #define DlgObj_Convert _DlgObj_Convert
#endif #endif
#if !ACCESSOR_CALLS_ARE_FUNCTIONS #if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
#define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH) #define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
#define SetPortDialogPort(dlg) SetPort(dlg) #define SetPortDialogPort(dlg) SetPort(dlg)
#define GetDialogPort(dlg) ((CGrafPtr)(dlg)) #define GetDialogPort(dlg) ((CGrafPtr)(dlg))
......
...@@ -36,11 +36,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *); ...@@ -36,11 +36,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
#define WinObj_Convert _WinObj_Convert #define WinObj_Convert _WinObj_Convert
#endif #endif
#if !ACCESSOR_CALLS_ARE_FUNCTIONS #if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
/* Carbon calls that we emulate in classic mode */ /* Carbon calls that we emulate in classic mode */
#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag) #define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
#define GetWindowFromPort(port) ((WindowRef)(port)) #define GetWindowFromPort(port) ((WindowRef)(port))
#define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect) #define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
#endif
#if !ACCESSOR_CALLS_ARE_FUNCTIONS
#define IsPointerValid(p) (((long)p&3) == 0) #define IsPointerValid(p) (((long)p&3) == 0)
#endif #endif
#if ACCESSOR_CALLS_ARE_FUNCTIONS #if ACCESSOR_CALLS_ARE_FUNCTIONS
......
...@@ -70,11 +70,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *); ...@@ -70,11 +70,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
#define WinObj_Convert _WinObj_Convert #define WinObj_Convert _WinObj_Convert
#endif #endif
#if !ACCESSOR_CALLS_ARE_FUNCTIONS #if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
/* Carbon calls that we emulate in classic mode */ /* Carbon calls that we emulate in classic mode */
#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag) #define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
#define GetWindowFromPort(port) ((WindowRef)(port)) #define GetWindowFromPort(port) ((WindowRef)(port))
#define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect) #define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
#endif
#if !ACCESSOR_CALLS_ARE_FUNCTIONS
#define IsPointerValid(p) (((long)p&3) == 0) #define IsPointerValid(p) (((long)p&3) == 0)
#endif #endif
#if ACCESSOR_CALLS_ARE_FUNCTIONS #if ACCESSOR_CALLS_ARE_FUNCTIONS
......
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