Ignore:
Timestamp:
Sep 23, 1999, 4:54:04 PM (26 years ago)
Author:
phaller
Message:

Fix: GetSubMenu now returns Win32MenuRes object instead of a PM handle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/winmenu.cpp

    r985 r1020  
    1 /* $Id: winmenu.cpp,v 1.3 1999-09-19 18:33:32 sandervl Exp $ */
     1/* $Id: winmenu.cpp,v 1.4 1999-09-23 14:53:05 phaller Exp $ */
    22
    33/*
     
    3030//******************************************************************************
    3131//******************************************************************************
    32 HMENU WIN32API LoadMenuA(HINSTANCE hinst, LPCSTR lpszMenu)
    33 {
    34  HMENU rc;
    35 
    36     rc = (HMENU)FindResourceA(hinst, lpszMenu, RT_MENUA);
    37     dprintf(("LoadMenuA (%X) returned %d\n", hinst, rc));
    38     return(rc);
    39 }
    40 //******************************************************************************
    41 //******************************************************************************
    42 HMENU WIN32API LoadMenuW(HINSTANCE hinst, LPCWSTR lpszMenu)
    43 {
    44  HMENU rc;
    45 
    46     rc = (HMENU)FindResourceW(hinst, lpszMenu, RT_MENUW);
    47     dprintf(("LoadMenuW (%X) returned %d\n", hinst, rc));
    48     return(rc);
     32ODINFUNCTION2(HMENU,     LoadMenuA,
     33              HINSTANCE, hinst,
     34              LPCSTR,    lpszMenu)
     35{
     36  return (HMENU)FindResourceA(hinst, lpszMenu, RT_MENUA);
     37}
     38//******************************************************************************
     39//******************************************************************************
     40ODINFUNCTION2(HMENU, LoadMenuW,
     41              HINSTANCE, hinst,
     42              LPCWSTR, lpszMenu)
     43{
     44  return (HMENU)FindResourceW(hinst, lpszMenu, RT_MENUW);
    4945}
    5046//******************************************************************************
     
    5248//NOTE: menutemplate strings are always in Unicode format
    5349//******************************************************************************
    54 HMENU WIN32API LoadMenuIndirectA( const MENUITEMTEMPLATEHEADER * menuTemplate)
    55 {
    56  Win32MenuRes *winres;
    57 
    58     dprintf(("OS2LoadMenuIndirectA\n"));
    59     winres = new Win32MenuRes((LPVOID)menuTemplate);
    60     if(winres == NULL) {
    61         return 0;
    62     }
     50ODINFUNCTION1(HMENU, LoadMenuIndirectA,
     51              const MENUITEMTEMPLATEHEADER *, menuTemplate)
     52{
     53  Win32MenuRes *winres;
     54
     55  winres = new Win32MenuRes((LPVOID)menuTemplate);
     56  if(winres == NULL)
     57    return 0;
     58  else
    6359    return (HMENU)winres;
    6460}
    6561//******************************************************************************
    6662//******************************************************************************
    67 HMENU WIN32API LoadMenuIndirectW(const MENUITEMTEMPLATEHEADER *menuTemplate)
    68 {
    69  Win32MenuRes *winres;
    70 
    71     dprintf(("OS2LoadMenuIndirectW\n"));
    72     winres = new Win32MenuRes((LPVOID)menuTemplate);
    73     if(winres == NULL) {
    74         return 0;
    75     }
     63ODINFUNCTION1(HMENU, LoadMenuIndirectW,
     64              const MENUITEMTEMPLATEHEADER *, menuTemplate)
     65{
     66  Win32MenuRes *winres;
     67
     68  winres = new Win32MenuRes((LPVOID)menuTemplate);
     69  if(winres == NULL)
     70    return 0;
     71  else
    7672    return (HMENU)winres;
    7773}
    7874//******************************************************************************
    7975//******************************************************************************
    80 BOOL WIN32API DestroyMenu(HMENU hmenu)
    81 {
    82  Win32MenuRes *winres;
    83 
    84     dprintf(("OS2DestroyMenu\n"));
    85     if(HIWORD(hmenu) == 0) {
    86         SetLastError(ERROR_INVALID_PARAMETER);
    87         return FALSE;
    88     }
    89     winres = (Win32MenuRes *)hmenu;
    90     delete winres;
    91     return TRUE;
    92 }
    93 //******************************************************************************
    94 //******************************************************************************
    95 HMENU WIN32API GetMenu( HWND hwnd)
     76ODINFUNCTION1(BOOL,  DestroyMenu,
     77              HMENU, hmenu)
     78{
     79  Win32MenuRes *winres;
     80
     81  if(HIWORD(hmenu) == 0)
     82  {
     83    SetLastError(ERROR_INVALID_PARAMETER);
     84    return FALSE;
     85  }
     86
     87  winres = (Win32MenuRes *)hmenu;
     88  delete winres;
     89  return TRUE;
     90}
     91//******************************************************************************
     92//******************************************************************************
     93ODINFUNCTION1(HMENU, GetMenu,
     94              HWND,  hwnd)
    9695{
    9796  Win32BaseWindow *window;
    9897
    99     window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    100     if(!window) {
    101         dprintf(("GetMenu, window %x not found", hwnd));
    102         return 0;
    103     }
    104     dprintf(("GetMenu %x", hwnd));
    105     return window->GetMenu();
    106 }
    107 //******************************************************************************
    108 //******************************************************************************
    109 BOOL WIN32API SetMenu( HWND hwnd, HMENU hmenu)
     98  window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     99  if(!window)
     100  {
     101    dprintf(("GetMenu, window %x not found", hwnd));
     102    return 0;
     103  }
     104
     105  return window->GetMenu();
     106}
     107//******************************************************************************
     108//******************************************************************************
     109ODINFUNCTION2(BOOL,  SetMenu,
     110              HWND,  hwnd,
     111              HMENU, hmenu)
    110112{
    111113  Win32BaseWindow *window;
    112114
    113     window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    114     if(!window) {
    115         dprintf(("SetMenu, window %x not found", hwnd));
    116         return 0;
    117     }
    118     dprintf(("SetMenu %x %x\n", hwnd, hmenu));
    119     window->SetMenu(hmenu);
    120     return TRUE;
    121 }
    122 //******************************************************************************
    123 //******************************************************************************
    124 DWORD WIN32API GetMenuCheckMarkDimensions(void)
    125 {
    126     dprintf(("USER32:  GetMenuCheckMarkDimensions\n"));
    127     return O32_GetMenuCheckMarkDimensions();
    128 }
    129 //******************************************************************************
    130 //******************************************************************************
    131 int WIN32API GetMenuItemCount( HMENU hMenu)
    132 {
    133  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    134 
    135     dprintf(("USER32:  GetMenuItemCount %x", hMenu));
    136     if(menu == NULL || menu->getOS2Handle() == 0)
    137     {
    138         SetLastError(ERROR_INVALID_PARAMETER);
    139         return 0;
    140     }
    141     return OSLibGetMenuItemCount(menu->getOS2Handle());
    142 }
    143 //******************************************************************************
    144 //******************************************************************************
    145 UINT WIN32API GetMenuItemID( HMENU hMenu, int nPos)
    146 {
    147  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    148 
    149     dprintf(("USER32:  GetMenuItemID %x %d\n", hMenu, nPos));
    150     if(menu == NULL || menu->getOS2Handle() == 0)
    151     {
    152         SetLastError(ERROR_INVALID_PARAMETER);
    153         return 0;
    154     }
    155     return O32_GetMenuItemID(menu->getOS2Handle(), nPos);
    156 }
    157 //******************************************************************************
    158 //******************************************************************************
    159 UINT WIN32API GetMenuState(HMENU hMenu, UINT arg2, UINT  arg3)
    160 {
    161  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    162 
    163     dprintf(("USER32:  GetMenuState\n"));
    164     if(menu == NULL || menu->getOS2Handle() == 0)
    165     {
    166         SetLastError(ERROR_INVALID_PARAMETER);
    167         return 0;
    168     }
    169     return O32_GetMenuState(menu->getOS2Handle(), arg2, arg3);
    170 }
    171 //******************************************************************************
    172 //******************************************************************************
    173 int WIN32API GetMenuStringA( HMENU hMenu, UINT arg2, LPSTR arg3, int arg4, UINT  arg5)
    174 {
    175  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    176 
    177     dprintf(("USER32:  GetMenuStringA"));
    178     if(menu == NULL || menu->getOS2Handle() == 0)
    179     {
    180         SetLastError(ERROR_INVALID_PARAMETER);
    181         return 0;
    182     }
    183     return O32_GetMenuString(menu->getOS2Handle(), arg2, arg3, arg4, arg5);
    184 }
    185 //******************************************************************************
    186 //******************************************************************************
    187 int WIN32API GetMenuStringW(HMENU hMenu, UINT idItem, LPWSTR lpsz, int cchMax, UINT fuFlags)
    188 {
    189  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    190  char *astring = (char *)malloc(cchMax);
    191  int   rc;
    192 
    193     dprintf(("USER32:  GetMenuStringW"));
    194     if(menu == NULL || menu->getOS2Handle() == 0)
    195     {
    196         SetLastError(ERROR_INVALID_PARAMETER);
    197         return 0;
    198     }
    199     rc = O32_GetMenuString(menu->getOS2Handle(), idItem, astring, cchMax, fuFlags);
    200     free(astring);
    201     if(rc) {
    202                 dprintf(("USER32: OS2GetMenuStringW %s\n", astring));
    203                 AsciiToUnicode(astring, lpsz);
    204     }
    205     else        lpsz[0] = 0;
    206     return(rc);
    207 }
    208 //******************************************************************************
    209 //******************************************************************************
    210 BOOL WIN32API SetMenuItemBitmaps( HMENU hMenu, UINT arg2, UINT arg3, HBITMAP arg4, HBITMAP  arg5)
     115  window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     116  if(!window)
     117  {
     118    dprintf(("SetMenu, window %x not found", hwnd));
     119    return 0;
     120  }
     121
     122  window->SetMenu(hmenu);
     123  return TRUE;
     124}
     125//******************************************************************************
     126//******************************************************************************
     127ODINFUNCTION0(DWORD, GetMenuCheckMarkDimensions)
     128{
     129  return O32_GetMenuCheckMarkDimensions();
     130}
     131//******************************************************************************
     132//******************************************************************************
     133ODINFUNCTION1(int,   GetMenuItemCount,
     134              HMENU, hMenu)
     135{
     136  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     137
     138  if(menu == NULL || menu->getOS2Handle() == 0)
     139  {
     140    SetLastError(ERROR_INVALID_PARAMETER);
     141    return 0;
     142  }
     143
     144  return OSLibGetMenuItemCount(menu->getOS2Handle());
     145}
     146//******************************************************************************
     147//******************************************************************************
     148ODINFUNCTION2(UINT,  GetMenuItemID,
     149              HMENU, hMenu,
     150              int,   nPos)
     151{
     152  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     153
     154  if(menu == NULL || menu->getOS2Handle() == 0)
     155  {
     156    SetLastError(ERROR_INVALID_PARAMETER);
     157    return 0;
     158  }
     159
     160  return O32_GetMenuItemID(menu->getOS2Handle(), nPos);
     161}
     162//******************************************************************************
     163//******************************************************************************
     164ODINFUNCTION3(UINT,  GetMenuState,
     165              HMENU, hMenu,
     166              UINT,  arg2,
     167              UINT,  arg3)
     168{
     169  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     170
     171  if(menu == NULL || menu->getOS2Handle() == 0)
     172  {
     173    SetLastError(ERROR_INVALID_PARAMETER);
     174    return 0;
     175  }
     176
     177  return O32_GetMenuState(menu->getOS2Handle(), arg2, arg3);
     178}
     179//******************************************************************************
     180//******************************************************************************
     181ODINFUNCTION5(int,   GetMenuStringA,
     182              HMENU, hMenu,
     183              UINT,  arg2,
     184              LPSTR, arg3,
     185              int,   arg4,
     186              UINT,  arg5)
     187{
     188  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     189
     190  if(menu == NULL || menu->getOS2Handle() == 0)
     191  {
     192    SetLastError(ERROR_INVALID_PARAMETER);
     193    return 0;
     194  }
     195
     196  return O32_GetMenuString(menu->getOS2Handle(), arg2, arg3, arg4, arg5);
     197}
     198//******************************************************************************
     199//******************************************************************************
     200ODINFUNCTION5(int,   GetMenuStringW,
     201              HMENU, hMenu,
     202              UINT,  idItem,
     203              LPWSTR,lpsz,
     204              int,   cchMax,
     205              UINT,  fuFlags)
     206{
     207  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     208  char *astring = (char *)malloc(cchMax);
     209  int   rc;
     210
     211  if(menu == NULL || menu->getOS2Handle() == 0)
     212  {
     213    SetLastError(ERROR_INVALID_PARAMETER);
     214    return 0;
     215  }
     216
     217  rc = O32_GetMenuString(menu->getOS2Handle(), idItem, astring, cchMax, fuFlags);
     218  free(astring);
     219  if(rc)
     220  {
     221    dprintf(("USER32: OS2GetMenuStringW %s\n", astring));
     222             AsciiToUnicode(astring, lpsz);
     223  }
     224  else
     225    lpsz[0] = 0;
     226
     227  return(rc);
     228}
     229//******************************************************************************
     230//******************************************************************************
     231ODINFUNCTION5(BOOL, SetMenuItemBitmaps,
     232              HMENU, hMenu,
     233              UINT, arg2,
     234              UINT, arg3,
     235              HBITMAP, arg4,
     236              HBITMAP, arg5)
    211237{
    212238 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    222248//******************************************************************************
    223249//******************************************************************************
    224 HMENU WIN32API GetSubMenu(HWND hMenu, int  arg2)
    225 {
    226  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    227 
    228     dprintf(("USER32:  GetSubMenu\n"));
    229     if(menu == NULL || menu->getOS2Handle() == 0)
    230     {
    231         SetLastError(ERROR_INVALID_PARAMETER);
    232         return 0;
    233     }
    234     return O32_GetSubMenu(menu->getOS2Handle(), arg2);
     250ODINFUNCTION2(HMENU, GetSubMenu,
     251              HWND, hMenu,
     252              int, arg2)
     253{
     254  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     255  Win32MenuRes *menuReturned;
     256  HMENU        hMenuReturned;
     257
     258  if(menu == NULL || menu->getOS2Handle() == 0)
     259  {
     260     SetLastError(ERROR_INVALID_PARAMETER);
     261     return 0;
     262  }
     263
     264  hMenuReturned = O32_GetSubMenu(menu->getOS2Handle(), arg2);
     265  /* @@@PH allocate Win32MenuRes object ! */
     266  menuReturned = new Win32MenuRes(hMenu);
     267  return ((HMENU)menuReturned);
    235268}
    236269//******************************************************************************
     
    254287//******************************************************************************
    255288//******************************************************************************
    256 BOOL WIN32API IsMenu( HMENU hMenu)
     289ODINFUNCTION1(BOOL, IsMenu,
     290              HMENU, hMenu)
    257291{
    258292 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    268302//******************************************************************************
    269303//******************************************************************************
    270 BOOL WIN32API TrackPopupMenu(HMENU hMenu, UINT arg2, int arg3, int arg4, int arg5, HWND arg6, const RECT *  arg7)
     304ODINFUNCTION7(BOOL, TrackPopupMenu,
     305              HMENU, hMenu,
     306              UINT, arg2,
     307              int, arg3,
     308              int, arg4,
     309              int, arg5,
     310              HWND, arg6,
     311              const RECT *, arg7)
    271312{
    272313 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    282323//******************************************************************************
    283324//******************************************************************************
    284 BOOL WIN32API TrackPopupMenuEx(HMENU hMenu, UINT flags, int X, int Y, HWND hwnd, LPTPMPARAMS lpPM)
     325ODINFUNCTION6(BOOL, TrackPopupMenuEx,
     326              HMENU, hMenu,
     327              UINT, flags,
     328              int, X,
     329              int, Y,
     330              HWND, hwnd,
     331              LPTPMPARAMS, lpPM)
    285332{
    286333 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    301348//******************************************************************************
    302349//******************************************************************************
    303 BOOL WIN32API AppendMenuA(HMENU hMenu, UINT uFlags, UINT ulDNewItem, LPCSTR lpNewItem)
     350ODINFUNCTION4(BOOL, AppendMenuA,
     351              HMENU, hMenu,
     352              UINT, uFlags,
     353              UINT, ulDNewItem,
     354              LPCSTR, lpNewItem)
    304355{
    305356 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    322373//******************************************************************************
    323374//******************************************************************************
    324 BOOL WIN32API AppendMenuW( HMENU hMenu, UINT arg2, UINT arg3, LPCWSTR  arg4)
     375ODINFUNCTION4(BOOL, AppendMenuW,
     376              HMENU, hMenu,
     377              UINT, arg2,
     378              UINT, arg3,
     379              LPCWSTR, arg4)
    325380{
    326381    Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    347402//******************************************************************************
    348403//******************************************************************************
    349 DWORD WIN32API CheckMenuItem( HMENU hMenu, UINT arg2, UINT  arg3)
     404ODINFUNCTION3(DWORD, CheckMenuItem,
     405              HMENU, hMenu,
     406              UINT, arg2,
     407              UINT, arg3)
    350408{
    351409 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    361419//******************************************************************************
    362420//******************************************************************************
    363 HMENU WIN32API CreateMenu(void)
    364 {
    365  Win32MenuRes *menu = 0;
    366  HMENU hMenu;
    367 
    368     hMenu = O32_CreateMenu();
    369     if(hMenu) {
    370         menu = new Win32MenuRes(hMenu);
    371         if(menu == NULL) {
    372             return 0;
    373         }
    374     }
    375     dprintf(("USER32:  OS2CreateMenu returned %d\n", hMenu));
    376     return (HMENU)menu;
    377 }
    378 //******************************************************************************
    379 //******************************************************************************
    380 HMENU WIN32API CreatePopupMenu(void)
    381 {
    382  Win32MenuRes *menu = 0;
    383  HMENU hMenu;
    384 
    385     dprintf(("USER32:  OS2CreatePopupMenu\n"));
    386     hMenu = O32_CreatePopupMenu();
    387     if(hMenu) {
    388         menu = new Win32MenuRes(hMenu);
    389         if(menu == NULL) {
    390             return 0;
    391         }
    392     }
    393     return (HMENU)menu;
    394 }
    395 //******************************************************************************
    396 //******************************************************************************
    397 BOOL WIN32API EnableMenuItem( HMENU hMenu, UINT arg2, UINT  arg3)
    398 {
    399  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
    400 
    401     dprintf(("USER32:  OS2EnableMenuItem\n"));
    402     if(menu == NULL || menu->getOS2Handle() == 0)
    403     {
    404         SetLastError(ERROR_INVALID_PARAMETER);
    405         return 0;
    406     }
    407     return O32_EnableMenuItem(menu->getOS2Handle(), arg2, arg3);
    408 }
    409 //******************************************************************************
    410 //******************************************************************************
    411 BOOL WIN32API ModifyMenuA( HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCSTR  arg5)
     421ODINFUNCTION0(HMENU, CreateMenu)
     422{
     423  Win32MenuRes *menu = 0;
     424  HMENU hMenu;
     425
     426  hMenu = O32_CreateMenu();
     427  if(hMenu)
     428  {
     429    menu = new Win32MenuRes(hMenu);
     430    if(menu == NULL)
     431      return 0;
     432  }
     433
     434  return (HMENU)menu;
     435}
     436//******************************************************************************
     437//******************************************************************************
     438ODINFUNCTION0(HMENU, CreatePopupMenu)
     439{
     440  Win32MenuRes *menu = 0;
     441  HMENU hMenu;
     442
     443  hMenu = O32_CreatePopupMenu();
     444  if(hMenu)
     445  {
     446    menu = new Win32MenuRes(hMenu);
     447    if(menu == NULL)
     448      return 0;
     449  }
     450
     451  return (HMENU)menu;
     452}
     453//******************************************************************************
     454//******************************************************************************
     455ODINFUNCTION3(BOOL,EnableMenuItem,HMENU,hMenu,
     456                                  UINT, uIDEnableItem,
     457                                  UINT, uEnable)
     458{
     459  Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     460
     461  if(menu == NULL || menu->getOS2Handle() == 0)
     462  {
     463    SetLastError(ERROR_INVALID_PARAMETER);
     464    return 0;
     465  }
     466
     467  return O32_EnableMenuItem(menu->getOS2Handle(),
     468                            uIDEnableItem,
     469                            uEnable);
     470}
     471//******************************************************************************
     472//******************************************************************************
     473ODINFUNCTION5(BOOL, ModifyMenuA,
     474              HMENU, hMenu,
     475              UINT, arg2,
     476              UINT, arg3,
     477              UINT, arg4,
     478              LPCSTR, arg5)
    412479{
    413480 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    423490//******************************************************************************
    424491//******************************************************************************
    425 BOOL WIN32API ModifyMenuW( HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCWSTR arg5)
     492ODINFUNCTION5(BOOL, ModifyMenuW,
     493              HMENU, hMenu,
     494              UINT, arg2,
     495              UINT, arg3,
     496              UINT, arg4,
     497              LPCWSTR, arg5)
    426498{
    427499 BOOL  rc;
     
    449521//******************************************************************************
    450522//******************************************************************************
    451 BOOL WIN32API RemoveMenu( HMENU hMenu, UINT arg2, UINT  arg3)
     523ODINFUNCTION3(BOOL, RemoveMenu,
     524              HMENU, hMenu,
     525              UINT, arg2,
     526              UINT, arg3)
    452527{
    453528 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    464539//******************************************************************************
    465540//******************************************************************************
    466 BOOL WIN32API DeleteMenu( HMENU hMenu, UINT arg2, UINT  arg3)
     541ODINFUNCTION3(BOOL, DeleteMenu,
     542              HMENU, hMenu,
     543              UINT, arg2,
     544              UINT, arg3)
    467545{
    468546 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    479557//******************************************************************************
    480558//******************************************************************************
    481 BOOL WIN32API HiliteMenuItem( HWND hMenu, HMENU arg2, UINT arg3, UINT  arg4)
     559ODINFUNCTION4(BOOL, HiliteMenuItem,
     560              HWND, hMenu,
     561              HMENU, arg2,
     562              UINT, arg3,
     563              UINT, arg4)
    482564{
    483565 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    494576//******************************************************************************
    495577//******************************************************************************
    496 BOOL WIN32API InsertMenuA( HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCSTR  arg5)
     578ODINFUNCTION5(BOOL, InsertMenuA,
     579              HMENU, hMenu,
     580              UINT, arg2,
     581              UINT, arg3,
     582              UINT, arg4,
     583              LPCSTR, arg5)
    497584{
    498585 Win32MenuRes *menu = (Win32MenuRes *)hMenu;
     
    509596//******************************************************************************
    510597//******************************************************************************
    511 BOOL WIN32API InsertMenuW(HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCWSTR arg5)
     598ODINFUNCTION5(BOOL, InsertMenuW,
     599              HMENU, hMenu,
     600              UINT, arg2,
     601              UINT, arg3,
     602              UINT, arg4,
     603              LPCWSTR, arg5)
    512604{
    513605 BOOL  rc;
     
    533625//******************************************************************************
    534626//******************************************************************************
    535 BOOL WIN32API SetMenuContextHelpId(HMENU hmenu, DWORD dwContextHelpId)
     627ODINFUNCTION2(BOOL, SetMenuContextHelpId,
     628              HMENU, hmenu,
     629              DWORD, dwContextHelpId)
    536630{
    537631  dprintf(("USER32:  OS2SetMenuContextHelpId, not implemented\n"));
     
    540634//******************************************************************************
    541635//******************************************************************************
    542 DWORD WIN32API GetMenuContextHelpId(HMENU hmenu)
     636ODINFUNCTION1(DWORD, GetMenuContextHelpId,
     637              HMENU, hmenu)
    543638{
    544639  dprintf(("USER32:  OS2GetMenuContextHelpId, not implemented\n"));
     
    547642//******************************************************************************
    548643//******************************************************************************
    549 BOOL WIN32API CheckMenuRadioItem(HMENU hmenu, UINT idFirst, UINT idLast,
    550                                     UINT idCheck, UINT uFlags)
     644ODINFUNCTION5(BOOL, CheckMenuRadioItem,
     645              HMENU, hmenu,
     646              UINT, idFirst,
     647              UINT, idLast,
     648              UINT, idCheck,
     649              UINT, uFlags)
    551650{
    552651  dprintf(("USER32:  OS2CheckMenuRadioItem, not implemented\n"));
     
    555654//******************************************************************************
    556655//******************************************************************************
    557 BOOL WIN32API ChangeMenuA(HMENU hMenu, UINT pos, LPCSTR data, UINT id, UINT flags)
     656ODINFUNCTION5(BOOL, ChangeMenuA,
     657              HMENU, hMenu,
     658              UINT, pos,
     659              LPCSTR, data,
     660              UINT, id,
     661              UINT, flags)
    558662{
    559663    dprintf(("USER32:  ChangeMenuA flags %X\n", flags));
     
    572676//******************************************************************************
    573677//******************************************************************************
    574 BOOL WIN32API ChangeMenuW(HMENU hMenu, UINT pos, LPCWSTR data,
    575                           UINT id, UINT flags )
     678ODINFUNCTION5(BOOL, ChangeMenuW,
     679              HMENU, hMenu,
     680              UINT, pos,
     681              LPCWSTR, data,
     682              UINT, id,
     683              UINT, flags)
    576684{
    577685    dprintf(("USER32:  ChangeMenuW flags %X\n", flags));
     
    590698//******************************************************************************
    591699//******************************************************************************
    592 BOOL WIN32API SetMenuItemInfoA(HMENU hmenu, UINT par1, BOOL par2,
    593                                const MENUITEMINFOA * lpMenuItemInfo)
     700ODINFUNCTION4(BOOL, SetMenuItemInfoA,
     701              HMENU, hmenu,
     702              UINT, par1,
     703              BOOL, par2,
     704              const MENUITEMINFOA *, lpMenuItemInfo)
    594705{
    595706  dprintf(("USER32:  SetMenuItemInfoA, faked\n"));
     
    597708}
    598709/*****************************************************************************
    599  * Name      : BOOL WIN32API SetMenuItemInfoW
     710 * Function  : SetMenuItemInfoW
    600711 * Purpose   : The SetMenuItemInfo function changes information about a menu item.
    601712 * Parameters:
     
    610721 *****************************************************************************/
    611722
    612 BOOL WIN32API SetMenuItemInfoW(HMENU            hMenu,
    613                                UINT             uItem,
    614                                BOOL             fByPosition,
    615                                const MENUITEMINFOW *lpmmi)
     723ODINFUNCTION4(BOOL, SetMenuItemInfoW,
     724              HMENU, hMenu,
     725              UINT, uItem,
     726              BOOL, fByPosition,
     727              const MENUITEMINFOW *, lpmmi)
    616728{
    617729  dprintf(("USER32:SetMenuItemInfoW (%08xh,%08xh,%08xh,%08x) not implemented.\n",
     
    628740//******************************************************************************
    629741//******************************************************************************
    630 BOOL WIN32API SetMenuDefaultItem(HMENU hmenu, UINT uItem, UINT fByPos )
     742ODINFUNCTION3(BOOL, SetMenuDefaultItem,
     743              HMENU, hmenu,
     744              UINT, uItem,
     745              UINT, fByPos)
    631746{
    632747  dprintf(("USER32:  SetMenuDefaultItem, faked\n"));
     
    635750//******************************************************************************
    636751//******************************************************************************
    637 BOOL WIN32API GetMenuItemInfoA(HMENU hmenu, UINT uItem, BOOL aBool,
    638                                MENUITEMINFOA *lpMenuItemInfo )
    639 
     752ODINFUNCTION4(BOOL, GetMenuItemInfoA,
     753              HMENU, hmenu,
     754              UINT, uItem,
     755              BOOL, aBool,
     756              MENUITEMINFOA *, lpMenuItemInfo)
    640757{
    641758  dprintf(("USER32:  GetMenuItemInfoA, faked\n"));
     
    643760}
    644761/*****************************************************************************
    645  * Name      : UINT WIN32API GetMenuDefaultItem
    646  * Purpose   : The GetMenuDefaultItem function determines the default menu item
     762 * Function  : GetMenuDefaultItem
     763 * Purpose   : TheGetMenuDefaultItem function determines the default menu item
    647764 *             on the specified menu.
    648765 * Parameters:
     
    657774 *****************************************************************************/
    658775
    659 UINT WIN32API GetMenuDefaultItem(HMENU hMenu,
    660                                     UINT  fByPos,
    661                                     UINT  gmdiFlags)
     776ODINFUNCTION3(UINT, GetMenuDefaultItem,
     777              HMENU, hMenu,
     778              UINT, fByPos,
     779              UINT, gmdiFlags)
    662780{
    663781  dprintf(("USER32:GetMenuDefaultItem (%08xh,%u,%08x) not implemented.\n",
     
    671789
    672790/*****************************************************************************
    673  * Name      : BOOL WIN32API GetMenuItemInfoW
     791 * Function  : GetMenuItemInfoW
    674792 * Purpose   : The GetMenuItemInfo function retrieves information about a menu item.
    675793 * Parameters:
     
    684802 *****************************************************************************/
    685803
    686 BOOL WIN32API GetMenuItemInfoW(HMENU           hMenu,
    687                                UINT            uItem,
    688                                BOOL            fByPosition,
    689                                MENUITEMINFOW * lpmii)
     804ODINFUNCTION4(BOOL, GetMenuItemInfoW,
     805              HMENU, hMenu,
     806              UINT, uItem,
     807              BOOL, fByPosition,
     808              MENUITEMINFOW *, lpmii)
    690809{
    691810  dprintf(("USER32:GetMenuItemInfoW (%08xh,%08xh,%u,%08x) not implemented.\n",
     
    703822
    704823/*****************************************************************************
    705  * Name      : BOOL WIN32API GetMenuItemRect
     824 * Function  : GetMenuItemRect
    706825 * Purpose   : The GetMenuItemRect function retrieves the bounding rectangle
    707826 *             for the specified menu item.
     
    717836 *****************************************************************************/
    718837
    719 BOOL WIN32API GetMenuItemRect(HWND   hWnd,
    720                                  HMENU  hMenu,
    721                                  UINT   uItem,
    722                                  LPRECT lprcItem)
     838ODINFUNCTION4(BOOL, GetMenuItemRect,
     839              HWND, hWnd,
     840              HMENU, hMenu,
     841              UINT, uItem,
     842              LPRECT, lprcItem)
    723843{
    724844  dprintf(("USER32:GetMenuItemRect (%08xh,%08xh,%08xh,%08x) not implemented.\n",
     
    731851}
    732852/*****************************************************************************
    733  * Name      : BOOL WIN32API InsertMenuItemA
     853 * Function  : InsertMenuItemA
    734854 * Purpose   : The InsertMenuItem function inserts a new menu item at the specified
    735855 *             position in a menu bar or pop-up menu.
     
    745865 *****************************************************************************/
    746866
    747 BOOL WIN32API InsertMenuItemA(HMENU           hMenu,
    748                               UINT            uItem,
    749                               BOOL            fByPosition,
    750                               const MENUITEMINFOA* lpmii)
     867ODINFUNCTION4(BOOL, InsertMenuItemA,
     868              HMENU, hMenu,
     869              UINT, uItem,
     870              BOOL, fByPosition,
     871              const MENUITEMINFOA*, lpmii)
    751872{
    752873  dprintf(("USER32:InsertMenuItemA (%08xh,%08xh,%u,%08x) not implemented.\n",
     
    761882
    762883/*****************************************************************************
    763  * Name      : BOOL WIN32API InsertMenuItemW
     884 * Function  : InsertMenuItemW
    764885 * Purpose   : The InsertMenuItem function inserts a new menu item at the specified
    765886 *             position in a menu bar or pop-up menu.
     
    775896 *****************************************************************************/
    776897
    777 BOOL WIN32API InsertMenuItemW(HMENU           hMenu,
    778                               UINT            uItem,
    779                               BOOL            fByPosition,
    780                               const MENUITEMINFOW * lpmii)
     898ODINFUNCTION4(BOOL, InsertMenuItemW,
     899              HMENU, hMenu,
     900              UINT, uItem,
     901              BOOL, fByPosition,
     902              const MENUITEMINFOW *, lpmii)
    781903{
    782904  dprintf(("USER32:InsertMenuItemW (%08xh,%08xh,%u,%08x) not implemented.\n",
     
    789911}
    790912/*****************************************************************************
    791  * Name      : UINT WIN32API MenuItemFromPoint
    792  * Purpose   : The MenuItemFromPoint function determines which menu item, if
     913 * Function  : MenuItemFromPoint
     914 * Purpose   : TheMenuItemFromPoint function determines which menu item, if
    793915 *             any, is at the specified location.
    794916 * Parameters:
     
    802924 *****************************************************************************/
    803925
    804 UINT WIN32API MenuItemFromPoint(HWND  hWnd,
    805                                    HMENU hMenu,
    806                                    POINT ptScreen)
     926ODINFUNCTION3(UINT, MenuItemFromPoint,
     927              HWND, hWnd,
     928              HMENU, hMenu,
     929              POINT, ptScreen)
    807930{
    808931  dprintf(("USER32:MenuItemFromPoint (%08xh,%08xh,%u) not implemented.\n",
     
    816939
    817940/*****************************************************************************
    818  * Name      : BOOL WIN32API GetMenuInfo
    819  * Purpose   :
     941 * Function  :  GetMenuInfo
    820942 * Parameters:
    821943 * Variables :
     
    827949 *****************************************************************************/
    828950
    829 BOOL WIN32API GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi)
     951ODINFUNCTION2(BOOL, GetMenuInfo,
     952              HMENU, hMenu,
     953              LPMENUINFO, lpmi)
    830954{
    831955  dprintf(("USER32: GetMenuInfo(%08xh,%08xh) not implemented.\n",
     
    867991
    868992/*****************************************************************************
    869  * Name      : BOOL WIN32API SetMenuInfo
     993 * Function  : SetMenuInfo
    870994 * Purpose   :
    871995 * Parameters:
     
    8811005 *****************************************************************************/
    8821006
    883 BOOL WIN32API SetMenuInfo (HMENU hMenu, LPCMENUINFO lpmi)
     1007ODINFUNCTION2(BOOL, SetMenuInfo,
     1008              HMENU, hMenu,
     1009              LPCMENUINFO, lpmi)
    8841010{
    8851011  dprintf(("USER32: SetMenuInfo(%08xh,%08xh) not implemented.\n",
     
    9201046#endif
    9211047
     1048
Note: See TracChangeset for help on using the changeset viewer.