Jack Jansen | a1a0fef | 1999-12-23 14:32:06 +0000 | [diff] [blame] | 1 | f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode)) |
Jack Jansen | e058189 | 1999-02-07 14:02:03 +0000 | [diff] [blame] | 2 | functions.append(f) |
| 3 | |
Jack Jansen | a1a0fef | 1999-12-23 14:32:06 +0000 | [diff] [blame] | 4 | f = Method(Handle, 'as_Resource', (MenuHandle, 'h', InMode)) |
Jack Jansen | a177228 | 1995-06-18 20:17:27 +0000 | [diff] [blame] | 5 | methods.append(f) |
Jack Jansen | e180d99 | 1998-04-24 10:28:20 +0000 | [diff] [blame] | 6 | |
| 7 | # The following have "Mac" prepended to their names in the include file |
| 8 | # since UH 3.1, sigh... |
| 9 | f = Function(MenuHandle, 'GetMenu', |
| 10 | (short, 'resourceID', InMode), |
| 11 | ) |
| 12 | functions.append(f) |
| 13 | |
| 14 | f = Method(void, 'AppendMenu', |
| 15 | (MenuHandle, 'menu', InMode), |
| 16 | (ConstStr255Param, 'data', InMode), |
| 17 | ) |
| 18 | methods.append(f) |
| 19 | |
| 20 | f = Method(void, 'InsertMenu', |
| 21 | (MenuHandle, 'theMenu', InMode), |
| 22 | (short, 'beforeID', InMode), |
| 23 | ) |
| 24 | methods.append(f) |
| 25 | |
| 26 | f = Function(void, 'DeleteMenu', |
| 27 | (short, 'menuID', InMode), |
| 28 | ) |
| 29 | functions.append(f) |
| 30 | |
| 31 | f = Method(void, 'InsertMenuItem', |
| 32 | (MenuHandle, 'theMenu', InMode), |
| 33 | (ConstStr255Param, 'itemString', InMode), |
| 34 | (short, 'afterItem', InMode), |
| 35 | ) |
| 36 | methods.append(f) |
| 37 | |
Jack Jansen | 54c0787 | 2001-01-29 13:32:10 +0000 | [diff] [blame] | 38 | f = Method(void, 'EnableMenuItem', |
| 39 | (MenuHandle, 'theMenu', InMode), |
| 40 | (UInt16, 'item', InMode), |
| 41 | ) |
| 42 | methods.append(f) |
| 43 | |
| 44 | f = Method(void, 'CheckMenuItem', |
| 45 | (MenuRef, 'theMenu', InMode), |
| 46 | (short, 'item', InMode), |
| 47 | (Boolean, 'checked', InMode), |
| 48 | ) |
| 49 | methods.append(f) |
| 50 | |
| 51 | |
Jack Jansen | e180d99 | 1998-04-24 10:28:20 +0000 | [diff] [blame] | 52 | f = Function(void, 'DrawMenuBar', |
| 53 | ) |
| 54 | functions.append(f) |
| 55 | |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 56 | |
| 57 | # |
| 58 | # The following functions take an *optional* MenuRef as their first argument |
| 59 | # |
| 60 | |
| 61 | f = Function(ItemCount, 'CountMenuItemsWithCommandID', |
| 62 | (OptMenuRef, 'inMenu', InMode), |
| 63 | (MenuCommand, 'inCommandID', InMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 64 | ) |
| 65 | functions.append(f) |
| 66 | |
| 67 | f = Function(OSStatus, 'GetIndMenuItemWithCommandID', |
| 68 | (OptMenuRef, 'inMenu', InMode), |
| 69 | (MenuCommand, 'inCommandID', InMode), |
| 70 | (UInt32, 'inItemIndex', InMode), |
| 71 | (MenuRef, 'outMenu', OutMode), |
| 72 | (MenuItemIndex, 'outIndex', OutMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 73 | ) |
| 74 | functions.append(f) |
| 75 | |
| 76 | f = Function(void, 'EnableMenuCommand', |
| 77 | (OptMenuRef, 'inMenu', InMode), |
| 78 | (MenuCommand, 'inCommandID', InMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 79 | ) |
| 80 | functions.append(f) |
| 81 | |
| 82 | f = Function(void, 'DisableMenuCommand', |
| 83 | (OptMenuRef, 'inMenu', InMode), |
| 84 | (MenuCommand, 'inCommandID', InMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 85 | ) |
| 86 | functions.append(f) |
| 87 | |
| 88 | f = Function(Boolean, 'IsMenuCommandEnabled', |
| 89 | (OptMenuRef, 'inMenu', InMode), |
| 90 | (MenuCommand, 'inCommandID', InMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 91 | ) |
| 92 | functions.append(f) |
| 93 | |
| 94 | f = Function(OSStatus, 'SetMenuCommandMark', |
| 95 | (OptMenuRef, 'inMenu', InMode), |
| 96 | (MenuCommand, 'inCommandID', InMode), |
| 97 | (UniChar, 'inMark', InMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 98 | ) |
| 99 | functions.append(f) |
| 100 | |
| 101 | f = Function(OSStatus, 'GetMenuCommandMark', |
| 102 | (OptMenuRef, 'inMenu', InMode), |
| 103 | (MenuCommand, 'inCommandID', InMode), |
| 104 | (UniChar, 'outMark', OutMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 105 | ) |
| 106 | functions.append(f) |
| 107 | |
| 108 | f = Function(OSStatus, 'GetMenuCommandPropertySize', |
| 109 | (OptMenuRef, 'inMenu', InMode), |
| 110 | (MenuCommand, 'inCommandID', InMode), |
| 111 | (OSType, 'inPropertyCreator', InMode), |
| 112 | (OSType, 'inPropertyTag', InMode), |
| 113 | (ByteCount, 'outSize', OutMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 114 | ) |
| 115 | functions.append(f) |
| 116 | |
| 117 | f = Function(OSStatus, 'RemoveMenuCommandProperty', |
| 118 | (OptMenuRef, 'inMenu', InMode), |
| 119 | (MenuCommand, 'inCommandID', InMode), |
| 120 | (OSType, 'inPropertyCreator', InMode), |
| 121 | (OSType, 'inPropertyTag', InMode), |
Just van Rossum | ca3cff3 | 2002-01-02 14:48:36 +0000 | [diff] [blame] | 122 | ) |
| 123 | functions.append(f) |