projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweaking for menu behavior in Linux regarding mouse whatnot - John Fay
[freeglut]
/
src
/
freeglut_menu.c
diff --git
a/src/freeglut_menu.c
b/src/freeglut_menu.c
index
d7ee2ac
..
87e476f
100644
(file)
--- a/
src/freeglut_menu.c
+++ b/
src/freeglut_menu.c
@@
-62,7
+62,7
@@
static SFG_MenuEntry *fghFindMenuEntry( SFG_Menu* menu, int index )
SFG_MenuEntry *entry;
int i = 1;
SFG_MenuEntry *entry;
int i = 1;
- for( entry = menu->Entries.First; entry; entry = entry->Node.Next)
+ for( entry = (SFG_MenuEntry *)menu->Entries.First; entry; entry = (SFG_MenuEntry *)entry->Node.Next)
{
if (i == index)
break;
{
if (i == index)
break;
@@
-83,8
+83,8
@@
static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu )
/*
* First of all check any of the active sub menus...
*/
/*
* First of all check any of the active sub menus...
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Is that an active sub menu by any case?
{
/*
* Is that an active sub menu by any case?
@@
-117,8
+117,8
@@
static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu )
/*
* Mark all menu entries inactive...
*/
/*
* Mark all menu entries inactive...
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
menuEntry->IsActive = FALSE;
}
{
menuEntry->IsActive = FALSE;
}
@@
-255,8
+255,8
@@
static void fghDisplayMenuBox( SFG_Menu* menu )
/*
* Check if any of the submenus is currently active...
*/
/*
* Check if any of the submenus is currently active...
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Has the menu been marked as active, maybe?
{
/*
* Has the menu been marked as active, maybe?
@@
-288,8
+288,8
@@
static void fghDisplayMenuBox( SFG_Menu* menu )
*/
glColor4f( 1, 1, 1, 1 );
*/
glColor4f( 1, 1, 1, 1 );
- for( menuEntry = menu->Entries.First, i=0; menuEntry;
- menuEntry = menuEntry->Node.Next, ++i )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First, i=0; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next, ++i )
{
/*
* Move the raster into position...
{
/*
* Move the raster into position...
@@
-334,8
+334,8
@@
static void fghDisplayMenuBox( SFG_Menu* menu )
/*
* Now we are ready to check if any of our children needs to be redrawn:
*/
/*
* Now we are ready to check if any of our children needs to be redrawn:
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Is that an active sub menu by any case?
{
/*
* Is that an active sub menu by any case?
@@
-361,7
+361,7
@@
static void fghSetSubmenuParentWindow ( SFG_Window *window, SFG_Menu *menu )
menu->ParentWindow = window ;
menu->ParentWindow = window ;
- for ( menuEntry = menu->Entries.First; menuEntry; menuEntry = menuEntry->Node.Next )
+ for ( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
if ( menuEntry->SubMenu != NULL )
fghSetSubmenuParentWindow ( window, menuEntry->SubMenu ) ;
{
if ( menuEntry->SubMenu != NULL )
fghSetSubmenuParentWindow ( window, menuEntry->SubMenu ) ;
@@
-514,7
+514,7
@@
void fgExecuteMenuCallback( SFG_Menu* menu )
/*
* First of all check any of the active sub menus...
*/
/*
* First of all check any of the active sub menus...
*/
- for( menuEntry = menu->Entries.First; menuEntry; menuEntry = menuEntry->Node.Next)
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next)
{
/*
* Is this menu entry active?
{
/*
* Is this menu entry active?
@@
-584,8
+584,8
@@
void fgDeactivateMenu( SFG_Window *window )
/*
* Hide all submenu windows, and the root menu's window.
*/
/*
* Hide all submenu windows, and the root menu's window.
*/
- for ( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for ( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Is that an active submenu by any case?
{
/*
* Is that an active submenu by any case?
@@
-594,7
+594,7
@@
void fgDeactivateMenu( SFG_Window *window )
fgDeactivateSubMenu ( menuEntry ) ;
}
fgDeactivateSubMenu ( menuEntry ) ;
}
- fgStructure.Window = current_window ;
+ fgSetWindow ( current_window ) ;
}
/*
}
/*
@@
-619,8
+619,8
@@
void fgDeactivateSubMenu( SFG_MenuEntry *menuEntry )
/*
* Hide all submenu windows, and the root menu's window.
*/
/*
* Hide all submenu windows, and the root menu's window.
*/
- for ( subMenuIter = menuEntry->SubMenu->Entries.First; subMenuIter;
- subMenuIter = subMenuIter->Node.Next )
+ for ( subMenuIter = (SFG_MenuEntry *)menuEntry->SubMenu->Entries.First; subMenuIter;
+ subMenuIter = (SFG_MenuEntry *)subMenuIter->Node.Next )
{
/*
* Is that an active submenu by any case?
{
/*
* Is that an active submenu by any case?
@@
-629,7
+629,7
@@
void fgDeactivateSubMenu( SFG_MenuEntry *menuEntry )
fgDeactivateSubMenu ( subMenuIter ) ;
}
fgDeactivateSubMenu ( subMenuIter ) ;
}
- fgStructure.Window = current_window ;
+ fgSetWindow ( current_window ) ;
}
/*
}
/*
@@
-648,8
+648,8
@@
void fghCalculateMenuBoxSize( void )
/*
* The menu's box size depends on the menu entries:
*/
/*
* The menu's box size depends on the menu entries:
*/
- for( menuEntry = fgStructure.Menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next)
+ for( menuEntry = (SFG_MenuEntry *)fgStructure.Menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next)
{
/*
* Update the menu entry's width value
{
/*
* Update the menu entry's width value
@@
-752,7
+752,7
@@
void FGAPIENTRY glutSetMenu( int menuID )
*/
void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
{
*/
void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
{
- SFG_MenuEntry* menuEntry = calloc( sizeof(SFG_MenuEntry), 1 );
+ SFG_MenuEntry* menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
/*
* Make sure there is a current menu set
/*
* Make sure there is a current menu set
@@
-781,7
+781,7
@@
void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
*/
void FGAPIENTRY glutAddSubMenu( const char* label, int subMenuID )
{
*/
void FGAPIENTRY glutAddSubMenu( const char* label, int subMenuID )
{
- SFG_MenuEntry* menuEntry = calloc( sizeof(SFG_MenuEntry), 1 );
+ SFG_MenuEntry* menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
SFG_Menu* subMenu = fgMenuByID( subMenuID );
/*
SFG_Menu* subMenu = fgMenuByID( subMenuID );
/*