Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef.

This commit is contained in:
Jack Jansen 2000-07-14 22:37:27 +00:00
parent 2d391f2f39
commit 74a1e63a89
44 changed files with 223 additions and 223 deletions

View file

@ -48,7 +48,7 @@
#define as_Control(h) ((ControlHandle)h)
#define as_Resource(ctl) ((Handle)ctl)
#ifdef TARGET_API_MAC_CARBON
#if TARGET_API_MAC_CARBON
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
#else
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
@ -83,7 +83,7 @@
/* TrackControl and HandleControlClick callback support */
static PyObject *tracker;
static ControlActionUPP mytracker_upp;
#ifndef TARGET_API_MAC_CARBON_NOTYET
#if !TARGET_API_MAC_CARBON_NOTYET
static ControlUserPaneDrawUPP mydrawproc_upp;
static ControlUserPaneIdleUPP myidleproc_upp;
static ControlUserPaneHitTestUPP myhittestproc_upp;
@ -92,7 +92,7 @@
extern int settrackfunc(PyObject *); /* forward */
extern void clrtrackfunc(void); /* forward */
#ifndef TARGET_API_MAC_CARBON_NOTYET
#if !TARGET_API_MAC_CARBON_NOTYET
staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
#endif
"""
@ -166,7 +166,7 @@
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n");
}
#ifndef TARGET_API_MAC_CARBON_NOTYET
#if !TARGET_API_MAC_CARBON_NOTYET
static int
setcallback(myself, which, callback, uppp)
PyObject *myself;
@ -288,7 +288,7 @@
initstuff = initstuff + """
mytracker_upp = NewControlActionProc(mytracker);
#ifndef TARGET_API_MAC_CARBON_NOTYET
#if !TARGET_API_MAC_CARBON_NOTYET
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
@ -570,7 +570,7 @@ def outputCleanupStructMembers(self):
return _res;
"""
f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET");
f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET");
f.docstring = lambda: "(callbackfunc) -> None"
object.add(f)
@ -588,7 +588,7 @@ def outputCleanupStructMembers(self):
HUnlock((Handle)hdl);
return _res;
"""
f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET")
f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET")
object.add(f)
setpopupdata_body = """
@ -608,7 +608,7 @@ def outputCleanupStructMembers(self):
Py_INCREF(Py_None);
return Py_None;
"""
f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET")
f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET")
object.add(f)