symbian-qemu-0.9.1-12/python-2.6.1/Mac/Modules/menu/menuedit.py
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode))
       
     2 functions.append(f)
       
     3 
       
     4 f = Method(Handle, 'as_Resource', (MenuHandle, 'h', InMode))
       
     5 methods.append(f)
       
     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 
       
    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 
       
    52 f = Function(void, 'DrawMenuBar',
       
    53 )
       
    54 functions.append(f)
       
    55 
       
    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),
       
    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),
       
    73 )
       
    74 functions.append(f)
       
    75 
       
    76 f = Function(void, 'EnableMenuCommand',
       
    77     (OptMenuRef, 'inMenu', InMode),
       
    78     (MenuCommand, 'inCommandID', InMode),
       
    79 )
       
    80 functions.append(f)
       
    81 
       
    82 f = Function(void, 'DisableMenuCommand',
       
    83     (OptMenuRef, 'inMenu', InMode),
       
    84     (MenuCommand, 'inCommandID', InMode),
       
    85 )
       
    86 functions.append(f)
       
    87 
       
    88 f = Function(Boolean, 'IsMenuCommandEnabled',
       
    89     (OptMenuRef, 'inMenu', InMode),
       
    90     (MenuCommand, 'inCommandID', InMode),
       
    91 )
       
    92 functions.append(f)
       
    93 
       
    94 f = Function(OSStatus, 'SetMenuCommandMark',
       
    95     (OptMenuRef, 'inMenu', InMode),
       
    96     (MenuCommand, 'inCommandID', InMode),
       
    97     (UniChar, 'inMark', InMode),
       
    98 )
       
    99 functions.append(f)
       
   100 
       
   101 f = Function(OSStatus, 'GetMenuCommandMark',
       
   102     (OptMenuRef, 'inMenu', InMode),
       
   103     (MenuCommand, 'inCommandID', InMode),
       
   104     (UniChar, 'outMark', OutMode),
       
   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),
       
   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),
       
   122 )
       
   123 functions.append(f)