added glutGetProcAddress() and GLUT_FPS env var option
[mesa.git] / src / glut / glx / win32_menu.c
index 9b330644af1d91ec0c26005116c16c2f7067c5ac..20485eea65b8d0e3d14f802d524e5396fae07ecc 100644 (file)
@@ -96,9 +96,8 @@ __glutFinishMenu(Window win, int x, int y)
 static void
 mapMenu(GLUTmenu * menu, int x, int y)
 {
-  TrackPopupMenu(menu->win, TPM_LEFTALIGN |
-    __glutMenuButton == TPM_RIGHTBUTTON ? 
-    TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
+  TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN |
+    (__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
     x, y, 0, __glutCurrentWindow->win, NULL);
 }
 
@@ -254,7 +253,7 @@ glutCreateMenu(GLUTselectCB selectFunc)
   menu->cascade = NULL;
   menu->highlighted = NULL;
   menu->anchor = NULL;
-  menu->win = CreatePopupMenu();
+  menu->win = (HWND) CreatePopupMenu();
   menuList[menuid] = menu;
   __glutSetMenu(menu);
   return menuid + 1;
@@ -277,7 +276,7 @@ glutDestroyMenu(int menunum)
     menuModificationError();
   }
   assert(menu->id == menunum - 1);
-  DestroyMenu(menu->win);
+  DestroyMenu( (HMENU) menu->win);
   menuList[menunum - 1] = NULL;
   /* free all menu entries */
   item = menu->list;
@@ -337,9 +336,9 @@ setMenuItem(GLUTmenuItem * item, const char *label,
   item->value = value;
   item->unique = uniqueMenuHandler++;
   if (isTrigger) {
-    AppendMenu(menu->win, MF_POPUP, (UINT)item->win, label);
+    AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label);
   } else {
-    AppendMenu(menu->win, MF_STRING, item->unique, label);
+    AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label);
   }
 }
 
@@ -405,7 +404,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)
            need to account for submenus.  */
         item->menu->submenus--;
        /* Nuke the Win32 menu. */
-       DestroyMenu(item->win);         
+       DestroyMenu((HMENU) item->win);
       }
       free(item->label);
 
@@ -416,7 +415,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)
       item->len = (int) strlen(label);
       item->value = value;
       item->unique = uniqueMenuHandler++;
-      ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
+      ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
         MF_BYPOSITION | MFT_STRING, item->unique, label);
 
       return;
@@ -445,7 +444,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)
         /* If changing a menu entry to as submenu trigger, we
            need to account for submenus.  */
         item->menu->submenus++;
-       item->win = CreatePopupMenu();
+       item->win = (HWND) CreatePopupMenu();
       }
       free(item->label);
       
@@ -459,7 +458,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)
       popupmenu = __glutGetMenuByNum(menu);
       if (popupmenu)
        item->win = popupmenu->win;
-      ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
+      ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
         MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);
       return;
     }
@@ -489,7 +488,7 @@ glutRemoveMenuItem(int num)
       /* Patch up menu's item list. */
       *prev = item->next;
 
-      RemoveMenu(__glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
+      RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
 
       free(item->label);
       free(item);