mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef.
This commit is contained in:
parent
2d391f2f39
commit
74a1e63a89
44 changed files with 223 additions and 223 deletions
|
@ -48,7 +48,7 @@ staticforward PyObject *CtlObj_WhichControl(ControlHandle);
|
|||
|
||||
#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 @@ ControlFontStyle_Convert(v, itself)
|
|||
/* 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 @@ static ControlUserPaneTrackingUPP mytrackingproc_upp;
|
|||
|
||||
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 @@ mytracker(ControlHandle ctl, short part)
|
|||
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 @@ mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc
|
|||
|
||||
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 @@ _res = Py_None;
|
|||
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 @@ _res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID);
|
|||
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 @@ hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
|
|||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue