summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/menu/Menumodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/menu/Menumodule.c')
-rw-r--r--Mac/Modules/menu/Menumodule.c525
1 files changed, 137 insertions, 388 deletions
diff --git a/Mac/Modules/menu/Menumodule.c b/Mac/Modules/menu/Menumodule.c
index f965586..f3c2df9 100644
--- a/Mac/Modules/menu/Menumodule.c
+++ b/Mac/Modules/menu/Menumodule.c
@@ -8,8 +8,13 @@
#include "macglue.h"
#include "pymactoolbox.h"
+#ifdef WITHOUT_FRAMEWORKS
#include <Devices.h> /* Defines OpenDeskAcc in universal headers */
#include <Menus.h>
+#else
+#include <Carbon/Carbon.h>
+#endif
+
#ifdef USE_TOOLBOX_OBJECT_GLUE
@@ -46,8 +51,7 @@ typedef struct MenuObject {
MenuHandle ob_itself;
} MenuObject;
-PyObject *MenuObj_New(itself)
- MenuHandle itself;
+PyObject *MenuObj_New(MenuHandle itself)
{
MenuObject *it;
it = PyObject_NEW(MenuObject, &Menu_Type);
@@ -55,9 +59,7 @@ PyObject *MenuObj_New(itself)
it->ob_itself = itself;
return (PyObject *)it;
}
-MenuObj_Convert(v, p_itself)
- PyObject *v;
- MenuHandle *p_itself;
+MenuObj_Convert(PyObject *v, MenuHandle *p_itself)
{
if (!MenuObj_Check(v))
{
@@ -68,16 +70,13 @@ MenuObj_Convert(v, p_itself)
return 1;
}
-static void MenuObj_dealloc(self)
- MenuObject *self;
+static void MenuObj_dealloc(MenuObject *self)
{
/* Cleanup of self->ob_itself goes here */
PyMem_DEL(self);
}
-static PyObject *MenuObj_DisposeMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DisposeMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -88,9 +87,7 @@ static PyObject *MenuObj_DisposeMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_CalcMenuSize(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CalcMenuSize(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -101,9 +98,7 @@ static PyObject *MenuObj_CalcMenuSize(_self, _args)
return _res;
}
-static PyObject *MenuObj_CountMenuItems(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CountMenuItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short _rv;
@@ -117,9 +112,7 @@ static PyObject *MenuObj_CountMenuItems(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *MenuObj_CountMItems(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CountMItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short _rv;
@@ -132,9 +125,7 @@ static PyObject *MenuObj_CountMItems(_self, _args)
}
#endif
-static PyObject *MenuObj_GetMenuFont(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuFont(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -152,9 +143,7 @@ static PyObject *MenuObj_GetMenuFont(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuFont(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuFont(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -173,9 +162,7 @@ static PyObject *MenuObj_SetMenuFont(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuExcludesMarkColumn(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -187,9 +174,7 @@ static PyObject *MenuObj_GetMenuExcludesMarkColumn(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuExcludesMarkColumn(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -205,9 +190,7 @@ static PyObject *MenuObj_SetMenuExcludesMarkColumn(_self, _args)
return _res;
}
-static PyObject *MenuObj_MacAppendMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_MacAppendMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Str255 data;
@@ -221,9 +204,7 @@ static PyObject *MenuObj_MacAppendMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_InsertResMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_InsertResMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
ResType theType;
@@ -240,9 +221,7 @@ static PyObject *MenuObj_InsertResMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_AppendResMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_AppendResMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
ResType theType;
@@ -256,9 +235,7 @@ static PyObject *MenuObj_AppendResMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_MacInsertMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_MacInsertMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Str255 itemString;
@@ -275,9 +252,7 @@ static PyObject *MenuObj_MacInsertMenuItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_DeleteMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DeleteMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -291,9 +266,7 @@ static PyObject *MenuObj_DeleteMenuItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_InsertFontResMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_InsertFontResMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short afterItem;
@@ -310,9 +283,7 @@ static PyObject *MenuObj_InsertFontResMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_InsertIntlResMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_InsertIntlResMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
ResType theType;
@@ -332,9 +303,7 @@ static PyObject *MenuObj_InsertIntlResMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_AppendMenuItemText(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_AppendMenuItemText(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -350,9 +319,7 @@ static PyObject *MenuObj_AppendMenuItemText(_self, _args)
return _res;
}
-static PyObject *MenuObj_InsertMenuItemText(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_InsertMenuItemText(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -371,9 +338,7 @@ static PyObject *MenuObj_InsertMenuItemText(_self, _args)
return _res;
}
-static PyObject *MenuObj_PopUpMenuSelect(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_PopUpMenuSelect(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
long _rv;
@@ -394,9 +359,7 @@ static PyObject *MenuObj_PopUpMenuSelect(_self, _args)
return _res;
}
-static PyObject *MenuObj_MacInsertMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_MacInsertMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID beforeID;
@@ -410,9 +373,7 @@ static PyObject *MenuObj_MacInsertMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_MacCheckMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_MacCheckMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -431,9 +392,7 @@ static PyObject *MenuObj_MacCheckMenuItem(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *MenuObj_CheckItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CheckItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -451,9 +410,7 @@ static PyObject *MenuObj_CheckItem(_self, _args)
}
#endif
-static PyObject *MenuObj_SetMenuItemText(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemText(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -470,9 +427,7 @@ static PyObject *MenuObj_SetMenuItemText(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemText(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemText(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -488,9 +443,7 @@ static PyObject *MenuObj_GetMenuItemText(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetItemMark(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetItemMark(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -507,9 +460,7 @@ static PyObject *MenuObj_SetItemMark(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetItemMark(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetItemMark(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -525,9 +476,7 @@ static PyObject *MenuObj_GetItemMark(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetItemCmd(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetItemCmd(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -544,9 +493,7 @@ static PyObject *MenuObj_SetItemCmd(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetItemCmd(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetItemCmd(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -562,9 +509,7 @@ static PyObject *MenuObj_GetItemCmd(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetItemIcon(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetItemIcon(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -581,9 +526,7 @@ static PyObject *MenuObj_SetItemIcon(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetItemIcon(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetItemIcon(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -599,9 +542,7 @@ static PyObject *MenuObj_GetItemIcon(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetItemStyle(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetItemStyle(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -618,9 +559,7 @@ static PyObject *MenuObj_SetItemStyle(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetItemStyle(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetItemStyle(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -638,9 +577,7 @@ static PyObject *MenuObj_GetItemStyle(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *MenuObj_DisableItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DisableItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -657,9 +594,7 @@ static PyObject *MenuObj_DisableItem(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *MenuObj_EnableItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_EnableItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -674,9 +609,7 @@ static PyObject *MenuObj_EnableItem(_self, _args)
}
#endif
-static PyObject *MenuObj_SetMenuItemCommandID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemCommandID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -695,9 +628,7 @@ static PyObject *MenuObj_SetMenuItemCommandID(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemCommandID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemCommandID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -715,9 +646,7 @@ static PyObject *MenuObj_GetMenuItemCommandID(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuItemModifiers(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemModifiers(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -736,9 +665,7 @@ static PyObject *MenuObj_SetMenuItemModifiers(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemModifiers(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemModifiers(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -756,9 +683,7 @@ static PyObject *MenuObj_GetMenuItemModifiers(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuItemIconHandle(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemIconHandle(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -780,9 +705,7 @@ static PyObject *MenuObj_SetMenuItemIconHandle(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemIconHandle(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemIconHandle(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -803,9 +726,7 @@ static PyObject *MenuObj_GetMenuItemIconHandle(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuItemTextEncoding(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemTextEncoding(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -824,9 +745,7 @@ static PyObject *MenuObj_SetMenuItemTextEncoding(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemTextEncoding(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemTextEncoding(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -844,9 +763,7 @@ static PyObject *MenuObj_GetMenuItemTextEncoding(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuItemHierarchicalID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -865,9 +782,7 @@ static PyObject *MenuObj_SetMenuItemHierarchicalID(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemHierarchicalID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -885,9 +800,7 @@ static PyObject *MenuObj_GetMenuItemHierarchicalID(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuItemFontID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemFontID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -906,9 +819,7 @@ static PyObject *MenuObj_SetMenuItemFontID(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemFontID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemFontID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -926,9 +837,7 @@ static PyObject *MenuObj_GetMenuItemFontID(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuItemRefCon(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemRefCon(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -947,9 +856,7 @@ static PyObject *MenuObj_SetMenuItemRefCon(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemRefCon(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemRefCon(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -969,9 +876,7 @@ static PyObject *MenuObj_GetMenuItemRefCon(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemRefCon2(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -993,9 +898,7 @@ static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemRefCon2(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -1014,9 +917,7 @@ static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args)
}
#endif
-static PyObject *MenuObj_SetMenuItemKeyGlyph(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -1035,9 +936,7 @@ static PyObject *MenuObj_SetMenuItemKeyGlyph(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuItemKeyGlyph(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
@@ -1055,9 +954,7 @@ static PyObject *MenuObj_GetMenuItemKeyGlyph(_self, _args)
return _res;
}
-static PyObject *MenuObj_MacEnableMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_MacEnableMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuItemIndex item;
@@ -1071,9 +968,7 @@ static PyObject *MenuObj_MacEnableMenuItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_DisableMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DisableMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuItemIndex item;
@@ -1087,9 +982,7 @@ static PyObject *MenuObj_DisableMenuItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_IsMenuItemEnabled(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_IsMenuItemEnabled(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -1104,9 +997,7 @@ static PyObject *MenuObj_IsMenuItemEnabled(_self, _args)
return _res;
}
-static PyObject *MenuObj_EnableMenuItemIcon(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_EnableMenuItemIcon(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuItemIndex item;
@@ -1120,9 +1011,7 @@ static PyObject *MenuObj_EnableMenuItemIcon(_self, _args)
return _res;
}
-static PyObject *MenuObj_DisableMenuItemIcon(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DisableMenuItemIcon(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuItemIndex item;
@@ -1136,9 +1025,7 @@ static PyObject *MenuObj_DisableMenuItemIcon(_self, _args)
return _res;
}
-static PyObject *MenuObj_IsMenuItemIconEnabled(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_IsMenuItemIconEnabled(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -1155,9 +1042,7 @@ static PyObject *MenuObj_IsMenuItemIconEnabled(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetMenuItemPropertyAttributes(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1184,9 +1069,7 @@ static PyObject *MenuObj_GetMenuItemPropertyAttributes(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1217,9 +1100,7 @@ static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetMenuAttributes(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuAttributes(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1237,9 +1118,7 @@ static PyObject *MenuObj_GetMenuAttributes(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_ChangeMenuAttributes(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_ChangeMenuAttributes(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1261,9 +1140,7 @@ static PyObject *MenuObj_ChangeMenuAttributes(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetMenuItemAttributes(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuItemAttributes(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1284,9 +1161,7 @@ static PyObject *MenuObj_GetMenuItemAttributes(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_ChangeMenuItemAttributes(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_ChangeMenuItemAttributes(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1311,9 +1186,7 @@ static PyObject *MenuObj_ChangeMenuItemAttributes(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_DisableAllMenuItems(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -1327,9 +1200,7 @@ static PyObject *MenuObj_DisableAllMenuItems(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_EnableAllMenuItems(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -1343,9 +1214,7 @@ static PyObject *MenuObj_EnableAllMenuItems(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_MenuHasEnabledItems(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_MenuHasEnabledItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -1360,9 +1229,7 @@ static PyObject *MenuObj_MenuHasEnabledItems(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_CountMenuItemsWithCommandID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CountMenuItemsWithCommandID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
ItemCount _rv;
@@ -1380,9 +1247,7 @@ static PyObject *MenuObj_CountMenuItemsWithCommandID(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetIndMenuItemWithCommandID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetIndMenuItemWithCommandID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1409,9 +1274,7 @@ static PyObject *MenuObj_GetIndMenuItemWithCommandID(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_EnableMenuCommand(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_EnableMenuCommand(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuCommand commandID;
@@ -1428,9 +1291,7 @@ static PyObject *MenuObj_EnableMenuCommand(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_DisableMenuCommand(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_DisableMenuCommand(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuCommand commandID;
@@ -1447,9 +1308,7 @@ static PyObject *MenuObj_DisableMenuCommand(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_IsMenuCommandEnabled(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_IsMenuCommandEnabled(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -1467,9 +1326,7 @@ static PyObject *MenuObj_IsMenuCommandEnabled(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetMenuCommandPropertySize(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuCommandPropertySize(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1496,9 +1353,7 @@ static PyObject *MenuObj_GetMenuCommandPropertySize(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_RemoveMenuCommandProperty(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_RemoveMenuCommandProperty(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1523,9 +1378,7 @@ static PyObject *MenuObj_RemoveMenuCommandProperty(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_CreateStandardFontMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CreateStandardFontMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1552,9 +1405,7 @@ static PyObject *MenuObj_CreateStandardFontMenu(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_UpdateStandardFontMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_UpdateStandardFontMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1572,9 +1423,7 @@ static PyObject *MenuObj_UpdateStandardFontMenu(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *MenuObj_GetFontFamilyFromMenuSelection(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetFontFamilyFromMenuSelection(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -1596,9 +1445,7 @@ static PyObject *MenuObj_GetFontFamilyFromMenuSelection(_self, _args)
}
#endif
-static PyObject *MenuObj_GetMenuID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID _rv;
@@ -1610,9 +1457,7 @@ static PyObject *MenuObj_GetMenuID(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuWidth(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuWidth(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
SInt16 _rv;
@@ -1624,9 +1469,7 @@ static PyObject *MenuObj_GetMenuWidth(_self, _args)
return _res;
}
-static PyObject *MenuObj_GetMenuHeight(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_GetMenuHeight(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
SInt16 _rv;
@@ -1638,9 +1481,7 @@ static PyObject *MenuObj_GetMenuHeight(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuID(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuID(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID menuID;
@@ -1654,9 +1495,7 @@ static PyObject *MenuObj_SetMenuID(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuWidth(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuWidth(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
SInt16 width;
@@ -1670,9 +1509,7 @@ static PyObject *MenuObj_SetMenuWidth(_self, _args)
return _res;
}
-static PyObject *MenuObj_SetMenuHeight(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_SetMenuHeight(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
SInt16 height;
@@ -1686,9 +1523,7 @@ static PyObject *MenuObj_SetMenuHeight(_self, _args)
return _res;
}
-static PyObject *MenuObj_as_Resource(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_as_Resource(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Handle _rv;
@@ -1700,9 +1535,7 @@ static PyObject *MenuObj_as_Resource(_self, _args)
return _res;
}
-static PyObject *MenuObj_AppendMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_AppendMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Str255 data;
@@ -1716,9 +1549,7 @@ static PyObject *MenuObj_AppendMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_InsertMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_InsertMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short beforeID;
@@ -1732,9 +1563,7 @@ static PyObject *MenuObj_InsertMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_InsertMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_InsertMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Str255 itemString;
@@ -1751,9 +1580,7 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_EnableMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_EnableMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
UInt16 item;
@@ -1767,9 +1594,7 @@ static PyObject *MenuObj_EnableMenuItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_CheckMenuItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
+static PyObject *MenuObj_CheckMenuItem(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short item;
@@ -2043,9 +1868,7 @@ static PyMethodDef MenuObj_methods[] = {
PyMethodChain MenuObj_chain = { MenuObj_methods, NULL };
-static PyObject *MenuObj_getattr(self, name)
- MenuObject *self;
- char *name;
+static PyObject *MenuObj_getattr(MenuObject *self, char *name)
{
return Py_FindMethodInChain(&MenuObj_chain, (PyObject *)self, name);
}
@@ -2082,9 +1905,7 @@ PyTypeObject Menu_Type = {
#if !TARGET_API_MAC_CARBON
-static PyObject *Menu_InitProcMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_InitProcMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short resID;
@@ -2100,9 +1921,7 @@ static PyObject *Menu_InitProcMenu(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *Menu_InitMenus(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_InitMenus(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2114,9 +1933,7 @@ static PyObject *Menu_InitMenus(_self, _args)
}
#endif
-static PyObject *Menu_NewMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_NewMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuHandle _rv;
@@ -2133,9 +1950,7 @@ static PyObject *Menu_NewMenu(_self, _args)
return _res;
}
-static PyObject *Menu_MacGetMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MacGetMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuHandle _rv;
@@ -2151,9 +1966,7 @@ static PyObject *Menu_MacGetMenu(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *Menu_CreateNewMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_CreateNewMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -2174,9 +1987,7 @@ static PyObject *Menu_CreateNewMenu(_self, _args)
}
#endif
-static PyObject *Menu_MenuKey(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MenuKey(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
long _rv;
@@ -2190,9 +2001,7 @@ static PyObject *Menu_MenuKey(_self, _args)
return _res;
}
-static PyObject *Menu_MenuSelect(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MenuSelect(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
long _rv;
@@ -2206,9 +2015,7 @@ static PyObject *Menu_MenuSelect(_self, _args)
return _res;
}
-static PyObject *Menu_MenuChoice(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MenuChoice(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
long _rv;
@@ -2220,9 +2027,7 @@ static PyObject *Menu_MenuChoice(_self, _args)
return _res;
}
-static PyObject *Menu_MenuEvent(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MenuEvent(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
UInt32 _rv;
@@ -2236,9 +2041,7 @@ static PyObject *Menu_MenuEvent(_self, _args)
return _res;
}
-static PyObject *Menu_GetMBarHeight(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_GetMBarHeight(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short _rv;
@@ -2250,9 +2053,7 @@ static PyObject *Menu_GetMBarHeight(_self, _args)
return _res;
}
-static PyObject *Menu_MacDrawMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MacDrawMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2263,9 +2064,7 @@ static PyObject *Menu_MacDrawMenuBar(_self, _args)
return _res;
}
-static PyObject *Menu_InvalMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_InvalMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2276,9 +2075,7 @@ static PyObject *Menu_InvalMenuBar(_self, _args)
return _res;
}
-static PyObject *Menu_HiliteMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_HiliteMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID menuID;
@@ -2291,9 +2088,7 @@ static PyObject *Menu_HiliteMenu(_self, _args)
return _res;
}
-static PyObject *Menu_GetNewMBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_GetNewMBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuBarHandle _rv;
@@ -2307,9 +2102,7 @@ static PyObject *Menu_GetNewMBar(_self, _args)
return _res;
}
-static PyObject *Menu_GetMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_GetMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuBarHandle _rv;
@@ -2321,9 +2114,7 @@ static PyObject *Menu_GetMenuBar(_self, _args)
return _res;
}
-static PyObject *Menu_SetMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_SetMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuBarHandle mbar;
@@ -2338,9 +2129,7 @@ static PyObject *Menu_SetMenuBar(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *Menu_DuplicateMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_DuplicateMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -2360,9 +2149,7 @@ static PyObject *Menu_DuplicateMenuBar(_self, _args)
#if TARGET_API_MAC_CARBON
-static PyObject *Menu_DisposeMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_DisposeMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -2378,9 +2165,7 @@ static PyObject *Menu_DisposeMenuBar(_self, _args)
}
#endif
-static PyObject *Menu_GetMenuHandle(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_GetMenuHandle(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuHandle _rv;
@@ -2394,9 +2179,7 @@ static PyObject *Menu_GetMenuHandle(_self, _args)
return _res;
}
-static PyObject *Menu_MacDeleteMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_MacDeleteMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID menuID;
@@ -2409,9 +2192,7 @@ static PyObject *Menu_MacDeleteMenu(_self, _args)
return _res;
}
-static PyObject *Menu_ClearMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_ClearMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2422,9 +2203,7 @@ static PyObject *Menu_ClearMenuBar(_self, _args)
return _res;
}
-static PyObject *Menu_SetMenuFlashCount(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_SetMenuFlashCount(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short count;
@@ -2439,9 +2218,7 @@ static PyObject *Menu_SetMenuFlashCount(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *Menu_SetMenuFlash(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_SetMenuFlash(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short count;
@@ -2455,9 +2232,7 @@ static PyObject *Menu_SetMenuFlash(_self, _args)
}
#endif
-static PyObject *Menu_FlashMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_FlashMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID menuID;
@@ -2472,9 +2247,7 @@ static PyObject *Menu_FlashMenuBar(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *Menu_SystemEdit(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_SystemEdit(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -2491,9 +2264,7 @@ static PyObject *Menu_SystemEdit(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *Menu_SystemMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_SystemMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
long menuResult;
@@ -2507,9 +2278,7 @@ static PyObject *Menu_SystemMenu(_self, _args)
}
#endif
-static PyObject *Menu_IsMenuBarVisible(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_IsMenuBarVisible(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -2521,9 +2290,7 @@ static PyObject *Menu_IsMenuBarVisible(_self, _args)
return _res;
}
-static PyObject *Menu_ShowMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_ShowMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2534,9 +2301,7 @@ static PyObject *Menu_ShowMenuBar(_self, _args)
return _res;
}
-static PyObject *Menu_HideMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_HideMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2547,9 +2312,7 @@ static PyObject *Menu_HideMenuBar(_self, _args)
return _res;
}
-static PyObject *Menu_DeleteMCEntries(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_DeleteMCEntries(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuID menuID;
@@ -2565,9 +2328,7 @@ static PyObject *Menu_DeleteMCEntries(_self, _args)
return _res;
}
-static PyObject *Menu_InitContextualMenus(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_InitContextualMenus(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
@@ -2580,9 +2341,7 @@ static PyObject *Menu_InitContextualMenus(_self, _args)
return _res;
}
-static PyObject *Menu_IsShowContextualMenuClick(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_IsShowContextualMenuClick(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
@@ -2598,9 +2357,7 @@ static PyObject *Menu_IsShowContextualMenuClick(_self, _args)
#if !TARGET_API_MAC_CARBON
-static PyObject *Menu_OpenDeskAcc(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_OpenDeskAcc(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Str255 name;
@@ -2614,9 +2371,7 @@ static PyObject *Menu_OpenDeskAcc(_self, _args)
}
#endif
-static PyObject *Menu_as_Menu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_as_Menu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuHandle _rv;
@@ -2630,9 +2385,7 @@ static PyObject *Menu_as_Menu(_self, _args)
return _res;
}
-static PyObject *Menu_GetMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_GetMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
MenuHandle _rv;
@@ -2646,9 +2399,7 @@ static PyObject *Menu_GetMenu(_self, _args)
return _res;
}
-static PyObject *Menu_DeleteMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_DeleteMenu(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short menuID;
@@ -2661,9 +2412,7 @@ static PyObject *Menu_DeleteMenu(_self, _args)
return _res;
}
-static PyObject *Menu_DrawMenuBar(_self, _args)
- PyObject *_self;
- PyObject *_args;
+static PyObject *Menu_DrawMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
@@ -2782,15 +2531,15 @@ static PyMethodDef Menu_methods[] = {
-void initMenu()
+void initMenu(void)
{
PyObject *m;
PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
m = Py_InitModule("Menu", Menu_methods);