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

Backport of _Appmodule.c 1.10, appsupport.py 1.14:

Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.

Should finally fix 531398. 2.2.1 candidate.

Also blacklisted some constants with definitions that were not Python-compatible.
üst c629efaf
...@@ -77,6 +77,9 @@ static PyObject *ThemeDrawingStateObj_SetThemeDrawingState(ThemeDrawingStateObje ...@@ -77,6 +77,9 @@ static PyObject *ThemeDrawingStateObj_SetThemeDrawingState(ThemeDrawingStateObje
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _rv; OSStatus _rv;
Boolean inDisposeNow; Boolean inDisposeNow;
#ifndef SetThemeDrawingState
PyMac_PRECHECK(SetThemeDrawingState);
#endif
if (!PyArg_ParseTuple(_args, "b", if (!PyArg_ParseTuple(_args, "b",
&inDisposeNow)) &inDisposeNow))
return NULL; return NULL;
...@@ -91,6 +94,9 @@ static PyObject *ThemeDrawingStateObj_DisposeThemeDrawingState(ThemeDrawingState ...@@ -91,6 +94,9 @@ static PyObject *ThemeDrawingStateObj_DisposeThemeDrawingState(ThemeDrawingState
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _rv; OSStatus _rv;
#ifndef DisposeThemeDrawingState
PyMac_PRECHECK(DisposeThemeDrawingState);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_rv = DisposeThemeDrawingState(_self->ob_itself); _rv = DisposeThemeDrawingState(_self->ob_itself);
...@@ -148,6 +154,9 @@ static PyObject *App_RegisterAppearanceClient(PyObject *_self, PyObject *_args) ...@@ -148,6 +154,9 @@ static PyObject *App_RegisterAppearanceClient(PyObject *_self, PyObject *_args)
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
#ifndef RegisterAppearanceClient
PyMac_PRECHECK(RegisterAppearanceClient);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = RegisterAppearanceClient(); _err = RegisterAppearanceClient();
...@@ -161,6 +170,9 @@ static PyObject *App_UnregisterAppearanceClient(PyObject *_self, PyObject *_args ...@@ -161,6 +170,9 @@ static PyObject *App_UnregisterAppearanceClient(PyObject *_self, PyObject *_args
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
#ifndef UnregisterAppearanceClient
PyMac_PRECHECK(UnregisterAppearanceClient);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = UnregisterAppearanceClient(); _err = UnregisterAppearanceClient();
...@@ -177,6 +189,9 @@ static PyObject *App_SetThemePen(PyObject *_self, PyObject *_args) ...@@ -177,6 +189,9 @@ static PyObject *App_SetThemePen(PyObject *_self, PyObject *_args)
ThemeBrush inBrush; ThemeBrush inBrush;
SInt16 inDepth; SInt16 inDepth;
Boolean inIsColorDevice; Boolean inIsColorDevice;
#ifndef SetThemePen
PyMac_PRECHECK(SetThemePen);
#endif
if (!PyArg_ParseTuple(_args, "hhb", if (!PyArg_ParseTuple(_args, "hhb",
&inBrush, &inBrush,
&inDepth, &inDepth,
...@@ -198,6 +213,9 @@ static PyObject *App_SetThemeBackground(PyObject *_self, PyObject *_args) ...@@ -198,6 +213,9 @@ static PyObject *App_SetThemeBackground(PyObject *_self, PyObject *_args)
ThemeBrush inBrush; ThemeBrush inBrush;
SInt16 inDepth; SInt16 inDepth;
Boolean inIsColorDevice; Boolean inIsColorDevice;
#ifndef SetThemeBackground
PyMac_PRECHECK(SetThemeBackground);
#endif
if (!PyArg_ParseTuple(_args, "hhb", if (!PyArg_ParseTuple(_args, "hhb",
&inBrush, &inBrush,
&inDepth, &inDepth,
...@@ -219,6 +237,9 @@ static PyObject *App_SetThemeTextColor(PyObject *_self, PyObject *_args) ...@@ -219,6 +237,9 @@ static PyObject *App_SetThemeTextColor(PyObject *_self, PyObject *_args)
ThemeTextColor inColor; ThemeTextColor inColor;
SInt16 inDepth; SInt16 inDepth;
Boolean inIsColorDevice; Boolean inIsColorDevice;
#ifndef SetThemeTextColor
PyMac_PRECHECK(SetThemeTextColor);
#endif
if (!PyArg_ParseTuple(_args, "hhb", if (!PyArg_ParseTuple(_args, "hhb",
&inColor, &inColor,
&inDepth, &inDepth,
...@@ -240,6 +261,9 @@ static PyObject *App_SetThemeWindowBackground(PyObject *_self, PyObject *_args) ...@@ -240,6 +261,9 @@ static PyObject *App_SetThemeWindowBackground(PyObject *_self, PyObject *_args)
WindowPtr inWindow; WindowPtr inWindow;
ThemeBrush inBrush; ThemeBrush inBrush;
Boolean inUpdate; Boolean inUpdate;
#ifndef SetThemeWindowBackground
PyMac_PRECHECK(SetThemeWindowBackground);
#endif
if (!PyArg_ParseTuple(_args, "O&hb", if (!PyArg_ParseTuple(_args, "O&hb",
WinObj_Convert, &inWindow, WinObj_Convert, &inWindow,
&inBrush, &inBrush,
...@@ -260,6 +284,9 @@ static PyObject *App_DrawThemeWindowHeader(PyObject *_self, PyObject *_args) ...@@ -260,6 +284,9 @@ static PyObject *App_DrawThemeWindowHeader(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeWindowHeader
PyMac_PRECHECK(DrawThemeWindowHeader);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -278,6 +305,9 @@ static PyObject *App_DrawThemeWindowListViewHeader(PyObject *_self, PyObject *_a ...@@ -278,6 +305,9 @@ static PyObject *App_DrawThemeWindowListViewHeader(PyObject *_self, PyObject *_a
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeWindowListViewHeader
PyMac_PRECHECK(DrawThemeWindowListViewHeader);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -296,6 +326,9 @@ static PyObject *App_DrawThemePlacard(PyObject *_self, PyObject *_args) ...@@ -296,6 +326,9 @@ static PyObject *App_DrawThemePlacard(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemePlacard
PyMac_PRECHECK(DrawThemePlacard);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -314,6 +347,9 @@ static PyObject *App_DrawThemeEditTextFrame(PyObject *_self, PyObject *_args) ...@@ -314,6 +347,9 @@ static PyObject *App_DrawThemeEditTextFrame(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeEditTextFrame
PyMac_PRECHECK(DrawThemeEditTextFrame);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -332,6 +368,9 @@ static PyObject *App_DrawThemeListBoxFrame(PyObject *_self, PyObject *_args) ...@@ -332,6 +368,9 @@ static PyObject *App_DrawThemeListBoxFrame(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeListBoxFrame
PyMac_PRECHECK(DrawThemeListBoxFrame);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -350,6 +389,9 @@ static PyObject *App_DrawThemeFocusRect(PyObject *_self, PyObject *_args) ...@@ -350,6 +389,9 @@ static PyObject *App_DrawThemeFocusRect(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
Boolean inHasFocus; Boolean inHasFocus;
#ifndef DrawThemeFocusRect
PyMac_PRECHECK(DrawThemeFocusRect);
#endif
if (!PyArg_ParseTuple(_args, "O&b", if (!PyArg_ParseTuple(_args, "O&b",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inHasFocus)) &inHasFocus))
...@@ -368,6 +410,9 @@ static PyObject *App_DrawThemePrimaryGroup(PyObject *_self, PyObject *_args) ...@@ -368,6 +410,9 @@ static PyObject *App_DrawThemePrimaryGroup(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemePrimaryGroup
PyMac_PRECHECK(DrawThemePrimaryGroup);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -386,6 +431,9 @@ static PyObject *App_DrawThemeSecondaryGroup(PyObject *_self, PyObject *_args) ...@@ -386,6 +431,9 @@ static PyObject *App_DrawThemeSecondaryGroup(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeSecondaryGroup
PyMac_PRECHECK(DrawThemeSecondaryGroup);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -404,6 +452,9 @@ static PyObject *App_DrawThemeSeparator(PyObject *_self, PyObject *_args) ...@@ -404,6 +452,9 @@ static PyObject *App_DrawThemeSeparator(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeSeparator
PyMac_PRECHECK(DrawThemeSeparator);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -422,6 +473,9 @@ static PyObject *App_DrawThemeModelessDialogFrame(PyObject *_self, PyObject *_ar ...@@ -422,6 +473,9 @@ static PyObject *App_DrawThemeModelessDialogFrame(PyObject *_self, PyObject *_ar
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeModelessDialogFrame
PyMac_PRECHECK(DrawThemeModelessDialogFrame);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -441,6 +495,9 @@ static PyObject *App_DrawThemeGenericWell(PyObject *_self, PyObject *_args) ...@@ -441,6 +495,9 @@ static PyObject *App_DrawThemeGenericWell(PyObject *_self, PyObject *_args)
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
Boolean inFillCenter; Boolean inFillCenter;
#ifndef DrawThemeGenericWell
PyMac_PRECHECK(DrawThemeGenericWell);
#endif
if (!PyArg_ParseTuple(_args, "O&lb", if (!PyArg_ParseTuple(_args, "O&lb",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState, &inState,
...@@ -460,6 +517,9 @@ static PyObject *App_DrawThemeFocusRegion(PyObject *_self, PyObject *_args) ...@@ -460,6 +517,9 @@ static PyObject *App_DrawThemeFocusRegion(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
Boolean inHasFocus; Boolean inHasFocus;
#ifndef DrawThemeFocusRegion
PyMac_PRECHECK(DrawThemeFocusRegion);
#endif
if (!PyArg_ParseTuple(_args, "b", if (!PyArg_ParseTuple(_args, "b",
&inHasFocus)) &inHasFocus))
return NULL; return NULL;
...@@ -477,6 +537,9 @@ static PyObject *App_IsThemeInColor(PyObject *_self, PyObject *_args) ...@@ -477,6 +537,9 @@ static PyObject *App_IsThemeInColor(PyObject *_self, PyObject *_args)
Boolean _rv; Boolean _rv;
SInt16 inDepth; SInt16 inDepth;
Boolean inIsColorDevice; Boolean inIsColorDevice;
#ifndef IsThemeInColor
PyMac_PRECHECK(IsThemeInColor);
#endif
if (!PyArg_ParseTuple(_args, "hb", if (!PyArg_ParseTuple(_args, "hb",
&inDepth, &inDepth,
&inIsColorDevice)) &inIsColorDevice))
...@@ -493,6 +556,9 @@ static PyObject *App_GetThemeAccentColors(PyObject *_self, PyObject *_args) ...@@ -493,6 +556,9 @@ static PyObject *App_GetThemeAccentColors(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
CTabHandle outColors; CTabHandle outColors;
#ifndef GetThemeAccentColors
PyMac_PRECHECK(GetThemeAccentColors);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeAccentColors(&outColors); _err = GetThemeAccentColors(&outColors);
...@@ -509,6 +575,9 @@ static PyObject *App_DrawThemeMenuBarBackground(PyObject *_self, PyObject *_args ...@@ -509,6 +575,9 @@ static PyObject *App_DrawThemeMenuBarBackground(PyObject *_self, PyObject *_args
Rect inBounds; Rect inBounds;
ThemeMenuBarState inState; ThemeMenuBarState inState;
UInt32 inAttributes; UInt32 inAttributes;
#ifndef DrawThemeMenuBarBackground
PyMac_PRECHECK(DrawThemeMenuBarBackground);
#endif
if (!PyArg_ParseTuple(_args, "O&Hl", if (!PyArg_ParseTuple(_args, "O&Hl",
PyMac_GetRect, &inBounds, PyMac_GetRect, &inBounds,
&inState, &inState,
...@@ -528,6 +597,9 @@ static PyObject *App_GetThemeMenuBarHeight(PyObject *_self, PyObject *_args) ...@@ -528,6 +597,9 @@ static PyObject *App_GetThemeMenuBarHeight(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
SInt16 outHeight; SInt16 outHeight;
#ifndef GetThemeMenuBarHeight
PyMac_PRECHECK(GetThemeMenuBarHeight);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeMenuBarHeight(&outHeight); _err = GetThemeMenuBarHeight(&outHeight);
...@@ -543,6 +615,9 @@ static PyObject *App_DrawThemeMenuBackground(PyObject *_self, PyObject *_args) ...@@ -543,6 +615,9 @@ static PyObject *App_DrawThemeMenuBackground(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inMenuRect; Rect inMenuRect;
ThemeMenuType inMenuType; ThemeMenuType inMenuType;
#ifndef DrawThemeMenuBackground
PyMac_PRECHECK(DrawThemeMenuBackground);
#endif
if (!PyArg_ParseTuple(_args, "O&H", if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetRect, &inMenuRect, PyMac_GetRect, &inMenuRect,
&inMenuType)) &inMenuType))
...@@ -561,6 +636,9 @@ static PyObject *App_GetThemeMenuBackgroundRegion(PyObject *_self, PyObject *_ar ...@@ -561,6 +636,9 @@ static PyObject *App_GetThemeMenuBackgroundRegion(PyObject *_self, PyObject *_ar
OSStatus _err; OSStatus _err;
Rect inMenuRect; Rect inMenuRect;
ThemeMenuType menuType; ThemeMenuType menuType;
#ifndef GetThemeMenuBackgroundRegion
PyMac_PRECHECK(GetThemeMenuBackgroundRegion);
#endif
if (!PyArg_ParseTuple(_args, "O&H", if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetRect, &inMenuRect, PyMac_GetRect, &inMenuRect,
&menuType)) &menuType))
...@@ -579,6 +657,9 @@ static PyObject *App_DrawThemeMenuSeparator(PyObject *_self, PyObject *_args) ...@@ -579,6 +657,9 @@ static PyObject *App_DrawThemeMenuSeparator(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
Rect inItemRect; Rect inItemRect;
#ifndef DrawThemeMenuSeparator
PyMac_PRECHECK(DrawThemeMenuSeparator);
#endif
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &inItemRect)) PyMac_GetRect, &inItemRect))
return NULL; return NULL;
...@@ -594,6 +675,9 @@ static PyObject *App_GetThemeMenuSeparatorHeight(PyObject *_self, PyObject *_arg ...@@ -594,6 +675,9 @@ static PyObject *App_GetThemeMenuSeparatorHeight(PyObject *_self, PyObject *_arg
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
SInt16 outHeight; SInt16 outHeight;
#ifndef GetThemeMenuSeparatorHeight
PyMac_PRECHECK(GetThemeMenuSeparatorHeight);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeMenuSeparatorHeight(&outHeight); _err = GetThemeMenuSeparatorHeight(&outHeight);
...@@ -610,6 +694,9 @@ static PyObject *App_GetThemeMenuItemExtra(PyObject *_self, PyObject *_args) ...@@ -610,6 +694,9 @@ static PyObject *App_GetThemeMenuItemExtra(PyObject *_self, PyObject *_args)
ThemeMenuItemType inItemType; ThemeMenuItemType inItemType;
SInt16 outHeight; SInt16 outHeight;
SInt16 outWidth; SInt16 outWidth;
#ifndef GetThemeMenuItemExtra
PyMac_PRECHECK(GetThemeMenuItemExtra);
#endif
if (!PyArg_ParseTuple(_args, "H", if (!PyArg_ParseTuple(_args, "H",
&inItemType)) &inItemType))
return NULL; return NULL;
...@@ -629,6 +716,9 @@ static PyObject *App_GetThemeMenuTitleExtra(PyObject *_self, PyObject *_args) ...@@ -629,6 +716,9 @@ static PyObject *App_GetThemeMenuTitleExtra(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
SInt16 outWidth; SInt16 outWidth;
Boolean inIsSquished; Boolean inIsSquished;
#ifndef GetThemeMenuTitleExtra
PyMac_PRECHECK(GetThemeMenuTitleExtra);
#endif
if (!PyArg_ParseTuple(_args, "b", if (!PyArg_ParseTuple(_args, "b",
&inIsSquished)) &inIsSquished))
return NULL; return NULL;
...@@ -646,6 +736,9 @@ static PyObject *App_DrawThemeTabPane(PyObject *_self, PyObject *_args) ...@@ -646,6 +736,9 @@ static PyObject *App_DrawThemeTabPane(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect inRect; Rect inRect;
ThemeDrawState inState; ThemeDrawState inState;
#ifndef DrawThemeTabPane
PyMac_PRECHECK(DrawThemeTabPane);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inState)) &inState))
...@@ -665,6 +758,9 @@ static PyObject *App_GetThemeTabRegion(PyObject *_self, PyObject *_args) ...@@ -665,6 +758,9 @@ static PyObject *App_GetThemeTabRegion(PyObject *_self, PyObject *_args)
Rect inRect; Rect inRect;
ThemeTabStyle inStyle; ThemeTabStyle inStyle;
ThemeTabDirection inDirection; ThemeTabDirection inDirection;
#ifndef GetThemeTabRegion
PyMac_PRECHECK(GetThemeTabRegion);
#endif
if (!PyArg_ParseTuple(_args, "O&HH", if (!PyArg_ParseTuple(_args, "O&HH",
PyMac_GetRect, &inRect, PyMac_GetRect, &inRect,
&inStyle, &inStyle,
...@@ -685,6 +781,9 @@ static PyObject *App_SetThemeCursor(PyObject *_self, PyObject *_args) ...@@ -685,6 +781,9 @@ static PyObject *App_SetThemeCursor(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeCursor inCursor; ThemeCursor inCursor;
#ifndef SetThemeCursor
PyMac_PRECHECK(SetThemeCursor);
#endif
if (!PyArg_ParseTuple(_args, "l", if (!PyArg_ParseTuple(_args, "l",
&inCursor)) &inCursor))
return NULL; return NULL;
...@@ -701,6 +800,9 @@ static PyObject *App_SetAnimatedThemeCursor(PyObject *_self, PyObject *_args) ...@@ -701,6 +800,9 @@ static PyObject *App_SetAnimatedThemeCursor(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
ThemeCursor inCursor; ThemeCursor inCursor;
UInt32 inAnimationStep; UInt32 inAnimationStep;
#ifndef SetAnimatedThemeCursor
PyMac_PRECHECK(SetAnimatedThemeCursor);
#endif
if (!PyArg_ParseTuple(_args, "ll", if (!PyArg_ParseTuple(_args, "ll",
&inCursor, &inCursor,
&inAnimationStep)) &inAnimationStep))
...@@ -718,6 +820,9 @@ static PyObject *App_GetThemeScrollBarThumbStyle(PyObject *_self, PyObject *_arg ...@@ -718,6 +820,9 @@ static PyObject *App_GetThemeScrollBarThumbStyle(PyObject *_self, PyObject *_arg
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeScrollBarThumbStyle outStyle; ThemeScrollBarThumbStyle outStyle;
#ifndef GetThemeScrollBarThumbStyle
PyMac_PRECHECK(GetThemeScrollBarThumbStyle);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeScrollBarThumbStyle(&outStyle); _err = GetThemeScrollBarThumbStyle(&outStyle);
...@@ -732,6 +837,9 @@ static PyObject *App_GetThemeScrollBarArrowStyle(PyObject *_self, PyObject *_arg ...@@ -732,6 +837,9 @@ static PyObject *App_GetThemeScrollBarArrowStyle(PyObject *_self, PyObject *_arg
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeScrollBarArrowStyle outStyle; ThemeScrollBarArrowStyle outStyle;
#ifndef GetThemeScrollBarArrowStyle
PyMac_PRECHECK(GetThemeScrollBarArrowStyle);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeScrollBarArrowStyle(&outStyle); _err = GetThemeScrollBarArrowStyle(&outStyle);
...@@ -746,6 +854,9 @@ static PyObject *App_GetThemeCheckBoxStyle(PyObject *_self, PyObject *_args) ...@@ -746,6 +854,9 @@ static PyObject *App_GetThemeCheckBoxStyle(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeCheckBoxStyle outStyle; ThemeCheckBoxStyle outStyle;
#ifndef GetThemeCheckBoxStyle
PyMac_PRECHECK(GetThemeCheckBoxStyle);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeCheckBoxStyle(&outStyle); _err = GetThemeCheckBoxStyle(&outStyle);
...@@ -761,6 +872,9 @@ static PyObject *App_UseThemeFont(PyObject *_self, PyObject *_args) ...@@ -761,6 +872,9 @@ static PyObject *App_UseThemeFont(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
ThemeFontID inFontID; ThemeFontID inFontID;
ScriptCode inScript; ScriptCode inScript;
#ifndef UseThemeFont
PyMac_PRECHECK(UseThemeFont);
#endif
if (!PyArg_ParseTuple(_args, "Hh", if (!PyArg_ParseTuple(_args, "Hh",
&inFontID, &inFontID,
&inScript)) &inScript))
...@@ -785,6 +899,9 @@ static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args) ...@@ -785,6 +899,9 @@ static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args)
Boolean inWrapToWidth; Boolean inWrapToWidth;
Rect inBoundingBox; Rect inBoundingBox;
SInt16 inJust; SInt16 inJust;
#ifndef DrawThemeTextBox
PyMac_PRECHECK(DrawThemeTextBox);
#endif
if (!PyArg_ParseTuple(_args, "O&HlbO&h", if (!PyArg_ParseTuple(_args, "O&HlbO&h",
CFStringRefObj_Convert, &inString, CFStringRefObj_Convert, &inString,
&inFontID, &inFontID,
...@@ -819,6 +936,9 @@ static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args) ...@@ -819,6 +936,9 @@ static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args)
SInt16 inPixelWidthLimit; SInt16 inPixelWidthLimit;
TruncCode inTruncWhere; TruncCode inTruncWhere;
Boolean outTruncated; Boolean outTruncated;
#ifndef TruncateThemeText
PyMac_PRECHECK(TruncateThemeText);
#endif
if (!PyArg_ParseTuple(_args, "O&Hlhh", if (!PyArg_ParseTuple(_args, "O&Hlhh",
CFMutableStringRefObj_Convert, &inString, CFMutableStringRefObj_Convert, &inString,
&inFontID, &inFontID,
...@@ -851,6 +971,9 @@ static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args) ...@@ -851,6 +971,9 @@ static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args)
Boolean inWrapToWidth; Boolean inWrapToWidth;
Point ioBounds; Point ioBounds;
SInt16 outBaseline; SInt16 outBaseline;
#ifndef GetThemeTextDimensions
PyMac_PRECHECK(GetThemeTextDimensions);
#endif
if (!PyArg_ParseTuple(_args, "O&HlbO&", if (!PyArg_ParseTuple(_args, "O&HlbO&",
CFStringRefObj_Convert, &inString, CFStringRefObj_Convert, &inString,
&inFontID, &inFontID,
...@@ -881,6 +1004,9 @@ static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args) ...@@ -881,6 +1004,9 @@ static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args)
ThemeFontID inFontID; ThemeFontID inFontID;
ThemeDrawState inState; ThemeDrawState inState;
Rect outOutset; Rect outOutset;
#ifndef GetThemeTextShadowOutset
PyMac_PRECHECK(GetThemeTextShadowOutset);
#endif
if (!PyArg_ParseTuple(_args, "Hl", if (!PyArg_ParseTuple(_args, "Hl",
&inFontID, &inFontID,
&inState)) &inState))
...@@ -904,6 +1030,9 @@ static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args) ...@@ -904,6 +1030,9 @@ static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args)
ThemeTrackPressState pressState; ThemeTrackPressState pressState;
Boolean isHoriz; Boolean isHoriz;
Rect trackBounds; Rect trackBounds;
#ifndef DrawThemeScrollBarArrows
PyMac_PRECHECK(DrawThemeScrollBarArrows);
#endif
if (!PyArg_ParseTuple(_args, "O&bbb", if (!PyArg_ParseTuple(_args, "O&bbb",
PyMac_GetRect, &bounds, PyMac_GetRect, &bounds,
&enableState, &enableState,
...@@ -930,6 +1059,9 @@ static PyObject *App_GetThemeScrollBarTrackRect(PyObject *_self, PyObject *_args ...@@ -930,6 +1059,9 @@ static PyObject *App_GetThemeScrollBarTrackRect(PyObject *_self, PyObject *_args
ThemeTrackPressState pressState; ThemeTrackPressState pressState;
Boolean isHoriz; Boolean isHoriz;
Rect trackBounds; Rect trackBounds;
#ifndef GetThemeScrollBarTrackRect
PyMac_PRECHECK(GetThemeScrollBarTrackRect);
#endif
if (!PyArg_ParseTuple(_args, "O&bbb", if (!PyArg_ParseTuple(_args, "O&bbb",
PyMac_GetRect, &bounds, PyMac_GetRect, &bounds,
&enableState, &enableState,
...@@ -958,6 +1090,9 @@ static PyObject *App_HitTestThemeScrollBarArrows(PyObject *_self, PyObject *_arg ...@@ -958,6 +1090,9 @@ static PyObject *App_HitTestThemeScrollBarArrows(PyObject *_self, PyObject *_arg
Point ptHit; Point ptHit;
Rect trackBounds; Rect trackBounds;
ControlPartCode partcode; ControlPartCode partcode;
#ifndef HitTestThemeScrollBarArrows
PyMac_PRECHECK(HitTestThemeScrollBarArrows);
#endif
if (!PyArg_ParseTuple(_args, "O&bbbO&", if (!PyArg_ParseTuple(_args, "O&bbbO&",
PyMac_GetRect, &scrollBarBounds, PyMac_GetRect, &scrollBarBounds,
&enableState, &enableState,
...@@ -987,6 +1122,9 @@ static PyObject *App_DrawThemeScrollBarDelimiters(PyObject *_self, PyObject *_ar ...@@ -987,6 +1122,9 @@ static PyObject *App_DrawThemeScrollBarDelimiters(PyObject *_self, PyObject *_ar
Rect inContRect; Rect inContRect;
ThemeDrawState state; ThemeDrawState state;
ThemeWindowAttributes attributes; ThemeWindowAttributes attributes;
#ifndef DrawThemeScrollBarDelimiters
PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
#endif
if (!PyArg_ParseTuple(_args, "HO&ll", if (!PyArg_ParseTuple(_args, "HO&ll",
&flavor, &flavor,
PyMac_GetRect, &inContRect, PyMac_GetRect, &inContRect,
...@@ -1012,6 +1150,9 @@ static PyObject *App_DrawThemeButton(PyObject *_self, PyObject *_args) ...@@ -1012,6 +1150,9 @@ static PyObject *App_DrawThemeButton(PyObject *_self, PyObject *_args)
ThemeButtonDrawInfo inNewInfo; ThemeButtonDrawInfo inNewInfo;
ThemeButtonDrawInfo inPrevInfo; ThemeButtonDrawInfo inPrevInfo;
UInt32 inUserData; UInt32 inUserData;
#ifndef DrawThemeButton
PyMac_PRECHECK(DrawThemeButton);
#endif
if (!PyArg_ParseTuple(_args, "O&HO&O&l", if (!PyArg_ParseTuple(_args, "O&HO&O&l",
PyMac_GetRect, &inBounds, PyMac_GetRect, &inBounds,
&inKind, &inKind,
...@@ -1039,6 +1180,9 @@ static PyObject *App_GetThemeButtonRegion(PyObject *_self, PyObject *_args) ...@@ -1039,6 +1180,9 @@ static PyObject *App_GetThemeButtonRegion(PyObject *_self, PyObject *_args)
Rect inBounds; Rect inBounds;
UInt16 inKind; UInt16 inKind;
ThemeButtonDrawInfo inNewInfo; ThemeButtonDrawInfo inNewInfo;
#ifndef GetThemeButtonRegion
PyMac_PRECHECK(GetThemeButtonRegion);
#endif
if (!PyArg_ParseTuple(_args, "O&HO&", if (!PyArg_ParseTuple(_args, "O&HO&",
PyMac_GetRect, &inBounds, PyMac_GetRect, &inBounds,
&inKind, &inKind,
...@@ -1062,6 +1206,9 @@ static PyObject *App_GetThemeButtonContentBounds(PyObject *_self, PyObject *_arg ...@@ -1062,6 +1206,9 @@ static PyObject *App_GetThemeButtonContentBounds(PyObject *_self, PyObject *_arg
UInt16 inKind; UInt16 inKind;
ThemeButtonDrawInfo inDrawInfo; ThemeButtonDrawInfo inDrawInfo;
Rect outBounds; Rect outBounds;
#ifndef GetThemeButtonContentBounds
PyMac_PRECHECK(GetThemeButtonContentBounds);
#endif
if (!PyArg_ParseTuple(_args, "O&HO&", if (!PyArg_ParseTuple(_args, "O&HO&",
PyMac_GetRect, &inBounds, PyMac_GetRect, &inBounds,
&inKind, &inKind,
...@@ -1085,6 +1232,9 @@ static PyObject *App_GetThemeButtonBackgroundBounds(PyObject *_self, PyObject *_ ...@@ -1085,6 +1232,9 @@ static PyObject *App_GetThemeButtonBackgroundBounds(PyObject *_self, PyObject *_
UInt16 inKind; UInt16 inKind;
ThemeButtonDrawInfo inDrawInfo; ThemeButtonDrawInfo inDrawInfo;
Rect outBounds; Rect outBounds;
#ifndef GetThemeButtonBackgroundBounds
PyMac_PRECHECK(GetThemeButtonBackgroundBounds);
#endif
if (!PyArg_ParseTuple(_args, "O&HO&", if (!PyArg_ParseTuple(_args, "O&HO&",
PyMac_GetRect, &inBounds, PyMac_GetRect, &inBounds,
&inKind, &inKind,
...@@ -1105,6 +1255,9 @@ static PyObject *App_PlayThemeSound(PyObject *_self, PyObject *_args) ...@@ -1105,6 +1255,9 @@ static PyObject *App_PlayThemeSound(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeSoundKind kind; ThemeSoundKind kind;
#ifndef PlayThemeSound
PyMac_PRECHECK(PlayThemeSound);
#endif
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetOSType, &kind)) PyMac_GetOSType, &kind))
return NULL; return NULL;
...@@ -1120,6 +1273,9 @@ static PyObject *App_BeginThemeDragSound(PyObject *_self, PyObject *_args) ...@@ -1120,6 +1273,9 @@ static PyObject *App_BeginThemeDragSound(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeDragSoundKind kind; ThemeDragSoundKind kind;
#ifndef BeginThemeDragSound
PyMac_PRECHECK(BeginThemeDragSound);
#endif
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetOSType, &kind)) PyMac_GetOSType, &kind))
return NULL; return NULL;
...@@ -1134,6 +1290,9 @@ static PyObject *App_EndThemeDragSound(PyObject *_self, PyObject *_args) ...@@ -1134,6 +1290,9 @@ static PyObject *App_EndThemeDragSound(PyObject *_self, PyObject *_args)
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
#ifndef EndThemeDragSound
PyMac_PRECHECK(EndThemeDragSound);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = EndThemeDragSound(); _err = EndThemeDragSound();
...@@ -1149,6 +1308,9 @@ static PyObject *App_DrawThemeTickMark(PyObject *_self, PyObject *_args) ...@@ -1149,6 +1308,9 @@ static PyObject *App_DrawThemeTickMark(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
Rect bounds; Rect bounds;
ThemeDrawState state; ThemeDrawState state;
#ifndef DrawThemeTickMark
PyMac_PRECHECK(DrawThemeTickMark);
#endif
if (!PyArg_ParseTuple(_args, "O&l", if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetRect, &bounds, PyMac_GetRect, &bounds,
&state)) &state))
...@@ -1169,6 +1331,9 @@ static PyObject *App_DrawThemeChasingArrows(PyObject *_self, PyObject *_args) ...@@ -1169,6 +1331,9 @@ static PyObject *App_DrawThemeChasingArrows(PyObject *_self, PyObject *_args)
UInt32 index; UInt32 index;
ThemeDrawState state; ThemeDrawState state;
UInt32 eraseData; UInt32 eraseData;
#ifndef DrawThemeChasingArrows
PyMac_PRECHECK(DrawThemeChasingArrows);
#endif
if (!PyArg_ParseTuple(_args, "O&lll", if (!PyArg_ParseTuple(_args, "O&lll",
PyMac_GetRect, &bounds, PyMac_GetRect, &bounds,
&index, &index,
...@@ -1195,6 +1360,9 @@ static PyObject *App_DrawThemePopupArrow(PyObject *_self, PyObject *_args) ...@@ -1195,6 +1360,9 @@ static PyObject *App_DrawThemePopupArrow(PyObject *_self, PyObject *_args)
ThemePopupArrowSize size; ThemePopupArrowSize size;
ThemeDrawState state; ThemeDrawState state;
UInt32 eraseData; UInt32 eraseData;
#ifndef DrawThemePopupArrow
PyMac_PRECHECK(DrawThemePopupArrow);
#endif
if (!PyArg_ParseTuple(_args, "O&HHll", if (!PyArg_ParseTuple(_args, "O&HHll",
PyMac_GetRect, &bounds, PyMac_GetRect, &bounds,
&orientation, &orientation,
...@@ -1222,6 +1390,9 @@ static PyObject *App_DrawThemeStandaloneGrowBox(PyObject *_self, PyObject *_args ...@@ -1222,6 +1390,9 @@ static PyObject *App_DrawThemeStandaloneGrowBox(PyObject *_self, PyObject *_args
ThemeGrowDirection growDirection; ThemeGrowDirection growDirection;
Boolean isSmall; Boolean isSmall;
ThemeDrawState state; ThemeDrawState state;
#ifndef DrawThemeStandaloneGrowBox
PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
#endif
if (!PyArg_ParseTuple(_args, "O&Hbl", if (!PyArg_ParseTuple(_args, "O&Hbl",
PyMac_GetPoint, &origin, PyMac_GetPoint, &origin,
&growDirection, &growDirection,
...@@ -1246,6 +1417,9 @@ static PyObject *App_DrawThemeStandaloneNoGrowBox(PyObject *_self, PyObject *_ar ...@@ -1246,6 +1417,9 @@ static PyObject *App_DrawThemeStandaloneNoGrowBox(PyObject *_self, PyObject *_ar
ThemeGrowDirection growDirection; ThemeGrowDirection growDirection;
Boolean isSmall; Boolean isSmall;
ThemeDrawState state; ThemeDrawState state;
#ifndef DrawThemeStandaloneNoGrowBox
PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
#endif
if (!PyArg_ParseTuple(_args, "O&Hbl", if (!PyArg_ParseTuple(_args, "O&Hbl",
PyMac_GetPoint, &origin, PyMac_GetPoint, &origin,
&growDirection, &growDirection,
...@@ -1270,6 +1444,9 @@ static PyObject *App_GetThemeStandaloneGrowBoxBounds(PyObject *_self, PyObject * ...@@ -1270,6 +1444,9 @@ static PyObject *App_GetThemeStandaloneGrowBoxBounds(PyObject *_self, PyObject *
ThemeGrowDirection growDirection; ThemeGrowDirection growDirection;
Boolean isSmall; Boolean isSmall;
Rect bounds; Rect bounds;
#ifndef GetThemeStandaloneGrowBoxBounds
PyMac_PRECHECK(GetThemeStandaloneGrowBoxBounds);
#endif
if (!PyArg_ParseTuple(_args, "O&Hb", if (!PyArg_ParseTuple(_args, "O&Hb",
PyMac_GetPoint, &origin, PyMac_GetPoint, &origin,
&growDirection, &growDirection,
...@@ -1289,6 +1466,9 @@ static PyObject *App_NormalizeThemeDrawingState(PyObject *_self, PyObject *_args ...@@ -1289,6 +1466,9 @@ static PyObject *App_NormalizeThemeDrawingState(PyObject *_self, PyObject *_args
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
#ifndef NormalizeThemeDrawingState
PyMac_PRECHECK(NormalizeThemeDrawingState);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = NormalizeThemeDrawingState(); _err = NormalizeThemeDrawingState();
...@@ -1303,6 +1483,9 @@ static PyObject *App_GetThemeDrawingState(PyObject *_self, PyObject *_args) ...@@ -1303,6 +1483,9 @@ static PyObject *App_GetThemeDrawingState(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _err; OSStatus _err;
ThemeDrawingState outState; ThemeDrawingState outState;
#ifndef GetThemeDrawingState
PyMac_PRECHECK(GetThemeDrawingState);
#endif
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_err = GetThemeDrawingState(&outState); _err = GetThemeDrawingState(&outState);
...@@ -1321,6 +1504,9 @@ static PyObject *App_ApplyThemeBackground(PyObject *_self, PyObject *_args) ...@@ -1321,6 +1504,9 @@ static PyObject *App_ApplyThemeBackground(PyObject *_self, PyObject *_args)
ThemeDrawState inState; ThemeDrawState inState;
SInt16 inDepth; SInt16 inDepth;
Boolean inColorDev; Boolean inColorDev;
#ifndef ApplyThemeBackground
PyMac_PRECHECK(ApplyThemeBackground);
#endif
if (!PyArg_ParseTuple(_args, "lO&lhb", if (!PyArg_ParseTuple(_args, "lO&lhb",
&inKind, &inKind,
PyMac_GetRect, &bounds, PyMac_GetRect, &bounds,
...@@ -1347,6 +1533,9 @@ static PyObject *App_SetThemeTextColorForWindow(PyObject *_self, PyObject *_args ...@@ -1347,6 +1533,9 @@ static PyObject *App_SetThemeTextColorForWindow(PyObject *_self, PyObject *_args
Boolean isActive; Boolean isActive;
SInt16 depth; SInt16 depth;
Boolean isColorDev; Boolean isColorDev;
#ifndef SetThemeTextColorForWindow
PyMac_PRECHECK(SetThemeTextColorForWindow);
#endif
if (!PyArg_ParseTuple(_args, "O&bhb", if (!PyArg_ParseTuple(_args, "O&bhb",
WinObj_Convert, &window, WinObj_Convert, &window,
&isActive, &isActive,
...@@ -1368,6 +1557,9 @@ static PyObject *App_IsValidAppearanceFileType(PyObject *_self, PyObject *_args) ...@@ -1368,6 +1557,9 @@ static PyObject *App_IsValidAppearanceFileType(PyObject *_self, PyObject *_args)
PyObject *_res = NULL; PyObject *_res = NULL;
Boolean _rv; Boolean _rv;
OSType fileType; OSType fileType;
#ifndef IsValidAppearanceFileType
PyMac_PRECHECK(IsValidAppearanceFileType);
#endif
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetOSType, &fileType)) PyMac_GetOSType, &fileType))
return NULL; return NULL;
...@@ -1385,6 +1577,9 @@ static PyObject *App_GetThemeBrushAsColor(PyObject *_self, PyObject *_args) ...@@ -1385,6 +1577,9 @@ static PyObject *App_GetThemeBrushAsColor(PyObject *_self, PyObject *_args)
SInt16 inDepth; SInt16 inDepth;
Boolean inColorDev; Boolean inColorDev;
RGBColor outColor; RGBColor outColor;
#ifndef GetThemeBrushAsColor
PyMac_PRECHECK(GetThemeBrushAsColor);
#endif
if (!PyArg_ParseTuple(_args, "hhb", if (!PyArg_ParseTuple(_args, "hhb",
&inBrush, &inBrush,
&inDepth, &inDepth,
...@@ -1408,6 +1603,9 @@ static PyObject *App_GetThemeTextColor(PyObject *_self, PyObject *_args) ...@@ -1408,6 +1603,9 @@ static PyObject *App_GetThemeTextColor(PyObject *_self, PyObject *_args)
SInt16 inDepth; SInt16 inDepth;
Boolean inColorDev; Boolean inColorDev;
RGBColor outColor; RGBColor outColor;
#ifndef GetThemeTextColor
PyMac_PRECHECK(GetThemeTextColor);
#endif
if (!PyArg_ParseTuple(_args, "hhb", if (!PyArg_ParseTuple(_args, "hhb",
&inColor, &inColor,
&inDepth, &inDepth,
...@@ -1431,6 +1629,9 @@ static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args) ...@@ -1431,6 +1629,9 @@ static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args)
OSStatus _err; OSStatus _err;
ThemeMetric inMetric; ThemeMetric inMetric;
SInt32 outMetric; SInt32 outMetric;
#ifndef GetThemeMetric
PyMac_PRECHECK(GetThemeMetric);
#endif
if (!PyArg_ParseTuple(_args, "l", if (!PyArg_ParseTuple(_args, "l",
&inMetric)) &inMetric))
return NULL; return NULL;
......
...@@ -118,12 +118,12 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE) ...@@ -118,12 +118,12 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
module.addobject(object) module.addobject(object)
ThemeDrawingState = OpaqueByValueType("ThemeDrawingState", "ThemeDrawingStateObj") ThemeDrawingState = OpaqueByValueType("ThemeDrawingState", "ThemeDrawingStateObj")
Method = MethodGenerator Method = WeakLinkMethodGenerator
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
##Method = OSErrMethodGenerator ##Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] 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