* dependant, and resides in freeglut_window.c. Uses fgState.
*/
fgOpenWindow( window, title, x, y, w, h, gameMode,
- (parent != NULL) ? TRUE : FALSE );
+ parent ? GL_TRUE : GL_FALSE );
return window;
}
* global variable BuildingAMenu to true so we can ensure
* it is created without decorations.
*/
- fgState.BuildingAMenu = TRUE;
+ fgState.BuildingAMenu = GL_TRUE;
- fgCreateWindow( NULL, NULL, x, y, w, h, FALSE );
+ fgCreateWindow( NULL, NULL, x, y, w, h, GL_FALSE );
menu->Window = fgStructure.Window;
glutDisplayFunc( fgDisplayMenu );
* While BuildingAMenu is true, all windows built have no decorations.
* That's not a good default behavior, so let's set it false again.
*/
- fgState.BuildingAMenu = FALSE;
+ fgState.BuildingAMenu = GL_FALSE;
glutHideWindow( ); /* Hide the window for now */
fgSetWindow( current_window );
}
fgClearCallBacks( window );
- if( needToClose == TRUE )
+ if( needToClose )
fgCloseWindow( window );
free( window );
if( fgStructure.Window == window )
if( fgStructure.Window == menu->Window )
fgSetWindow( menu->ParentWindow );
- fgDestroyWindow( menu->Window, TRUE );
+ fgDestroyWindow( menu->Window, GL_TRUE );
fgListRemove( &fgStructure.Menus, &menu->Node );
if( fgStructure.Menu == menu )
fgStructure.Menu = NULL;
fgDestroyMenu( menu );
while( window = ( SFG_Window * )fgStructure.Windows.First )
- fgDestroyWindow( window, TRUE );
+ fgDestroyWindow( window, GL_TRUE );
}
/*
window = ( SFG_Window * )window->Node.Next )
{
enumCallback( window, enumerator );
- if( enumerator->found == TRUE )
+ if( enumerator->found )
return;
}
}
child = ( SFG_Window * )child->Node.Next )
{
enumCallback( child, enumerator );
- if( enumerator->found == TRUE )
+ if( enumerator->found )
return;
}
}
static void fghcbWindowByHandle( SFG_Window *window,
SFG_Enumerator *enumerator )
{
- freeglut_return_if_fail( enumerator->found == FALSE );
+ if ( enumerator->found )
+ return;
#if TARGET_HOST_UNIX_X11
#define WBHANDLE (Window)
*/
if( window->Window.Handle == WBHANDLE (enumerator->data) )
{
- enumerator->found = TRUE;
+ enumerator->found = GL_TRUE;
enumerator->data = window;
return;
/*
* This is easy and makes use of the windows enumeration defined above
*/
- enumerator.found = FALSE;
+ enumerator.found = GL_FALSE;
enumerator.data = (void *)hWindow;
fgEnumWindows( fghcbWindowByHandle, &enumerator );
- if( enumerator.found == TRUE )
+ if( enumerator.found )
return( SFG_Window *) enumerator.data;
return NULL;
}
/*
* Make sure we do not overwrite our precious results...
*/
- freeglut_return_if_fail( enumerator->found == FALSE );
+ if ( enumerator->found )
+ return;
/*
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
*/
if( window->ID == (int) (enumerator->data) ) /* XXX int/ptr conversion! */
{
- enumerator->found = TRUE;
+ enumerator->found = GL_TRUE;
enumerator->data = window;
return;
/*
* Uses a method very similiar for fgWindowByHandle...
*/
- enumerator.found = FALSE;
+ enumerator.found = GL_FALSE;
enumerator.data = (void *) windowID; /* XXX int/pointer conversion! */
fgEnumWindows( fghcbWindowByID, &enumerator );
- if( enumerator.found == TRUE )
+ if( enumerator.found )
return( SFG_Window *) enumerator.data;
return NULL;
}