append(): Fixing the test for convertability after consultation with
[python/dscho.git] / Mac / Modules / menu / menuedit.py
blobd1f1f24a6b311db0e504d9d6d6cfb8174ff741eb
1 f = Function(void, 'OpenDeskAcc',
2 (Str255, 'name', InMode),
3 condition='#if !TARGET_API_MAC_CARBON'
5 functions.append(f)
7 f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode))
8 functions.append(f)
10 f = Method(Handle, 'as_Resource', (MenuHandle, 'h', InMode))
11 methods.append(f)
13 # The following have "Mac" prepended to their names in the include file
14 # since UH 3.1, sigh...
15 f = Function(MenuHandle, 'GetMenu',
16 (short, 'resourceID', InMode),
18 functions.append(f)
20 f = Method(void, 'AppendMenu',
21 (MenuHandle, 'menu', InMode),
22 (ConstStr255Param, 'data', InMode),
24 methods.append(f)
26 f = Method(void, 'InsertMenu',
27 (MenuHandle, 'theMenu', InMode),
28 (short, 'beforeID', InMode),
30 methods.append(f)
32 f = Function(void, 'DeleteMenu',
33 (short, 'menuID', InMode),
35 functions.append(f)
37 f = Method(void, 'InsertMenuItem',
38 (MenuHandle, 'theMenu', InMode),
39 (ConstStr255Param, 'itemString', InMode),
40 (short, 'afterItem', InMode),
42 methods.append(f)
44 f = Method(void, 'EnableMenuItem',
45 (MenuHandle, 'theMenu', InMode),
46 (UInt16, 'item', InMode),
48 methods.append(f)
50 f = Method(void, 'CheckMenuItem',
51 (MenuRef, 'theMenu', InMode),
52 (short, 'item', InMode),
53 (Boolean, 'checked', InMode),
55 methods.append(f)
58 f = Function(void, 'DrawMenuBar',
60 functions.append(f)
64 # The following functions take an *optional* MenuRef as their first argument
67 f = Function(ItemCount, 'CountMenuItemsWithCommandID',
68 (OptMenuRef, 'inMenu', InMode),
69 (MenuCommand, 'inCommandID', InMode),
70 condition='#if TARGET_API_MAC_CARBON',
72 functions.append(f)
74 f = Function(OSStatus, 'GetIndMenuItemWithCommandID',
75 (OptMenuRef, 'inMenu', InMode),
76 (MenuCommand, 'inCommandID', InMode),
77 (UInt32, 'inItemIndex', InMode),
78 (MenuRef, 'outMenu', OutMode),
79 (MenuItemIndex, 'outIndex', OutMode),
80 condition='#if TARGET_API_MAC_CARBON',
82 functions.append(f)
84 f = Function(void, 'EnableMenuCommand',
85 (OptMenuRef, 'inMenu', InMode),
86 (MenuCommand, 'inCommandID', InMode),
87 condition='#if TARGET_API_MAC_CARBON',
89 functions.append(f)
91 f = Function(void, 'DisableMenuCommand',
92 (OptMenuRef, 'inMenu', InMode),
93 (MenuCommand, 'inCommandID', InMode),
94 condition='#if TARGET_API_MAC_CARBON',
96 functions.append(f)
98 f = Function(Boolean, 'IsMenuCommandEnabled',
99 (OptMenuRef, 'inMenu', InMode),
100 (MenuCommand, 'inCommandID', InMode),
101 condition='#if TARGET_API_MAC_CARBON',
103 functions.append(f)
105 f = Function(OSStatus, 'SetMenuCommandMark',
106 (OptMenuRef, 'inMenu', InMode),
107 (MenuCommand, 'inCommandID', InMode),
108 (UniChar, 'inMark', InMode),
109 condition='#if TARGET_API_MAC_CARBON',
111 functions.append(f)
113 f = Function(OSStatus, 'GetMenuCommandMark',
114 (OptMenuRef, 'inMenu', InMode),
115 (MenuCommand, 'inCommandID', InMode),
116 (UniChar, 'outMark', OutMode),
117 condition='#if TARGET_API_MAC_CARBON',
119 functions.append(f)
121 f = Function(OSStatus, 'GetMenuCommandPropertySize',
122 (OptMenuRef, 'inMenu', InMode),
123 (MenuCommand, 'inCommandID', InMode),
124 (OSType, 'inPropertyCreator', InMode),
125 (OSType, 'inPropertyTag', InMode),
126 (ByteCount, 'outSize', OutMode),
127 condition='#if TARGET_API_MAC_CARBON',
129 functions.append(f)
131 f = Function(OSStatus, 'RemoveMenuCommandProperty',
132 (OptMenuRef, 'inMenu', InMode),
133 (MenuCommand, 'inCommandID', InMode),
134 (OSType, 'inPropertyCreator', InMode),
135 (OSType, 'inPropertyTag', InMode),
136 condition='#if TARGET_API_MAC_CARBON',
138 functions.append(f)