#include "config.h"
#endif
-#define G_LOG_DOMAIN "freeglut-structure"
-
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
/*
* This private function creates a menu and adds it to the menus list
*/
-SFG_Menu* fgCreateMenu( FGCBmenu menuCallback )
+SFG_Menu* fgCreateMenu( FGCBMenu menuCallback )
{
int x = 100, y = 100, w = 100, h = 100 ;
SFG_Window *current_window = fgStructure.Window ;
while ( (subWindow = (SFG_Window *)window->Children.First) != NULL )
fgDestroyWindow( subWindow, needToClose );
- if ( window->Callbacks.Destroy != NULL )
+ if ( FETCH_WCB( *window, Destroy ) )
{
SFG_Window *activeWindow = fgStructure.Window ;
- fgSetWindow ( window ) ;
- window->Callbacks.Destroy () ;
+ /* fgSetWindow ( window ) ; */
+ /* window->Callbacks.Destroy () ; */
+ INVOKE_WCB( *window, Destroy, ( ) );
fgSetWindow ( activeWindow ) ;
}
/*
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
*/
- if( window->ID == (int) (enumerator->data) )
+ if( window->ID == (int) (enumerator->data) ) /* XXX int/ptr conversion! */
{
enumerator->found = TRUE;
enumerator->data = window;
* Uses a method very similiar for fgWindowByHandle...
*/
enumerator.found = FALSE;
- enumerator.data = (void *) windowID;
+ enumerator.data = (void *) windowID; /* XXX int/pointer conversion! */
fgEnumWindows( fghcbWindowByID, &enumerator );
if( enumerator.found == TRUE )
return( SFG_Window *) enumerator.data;
/*
* It's enough to check all entries in fgStructure.Menus...
*/
- for( menu = (SFG_Menu *)fgStructure.Menus.First; menu; menu = (SFG_Menu *)menu->Node.Next )
- {
- /*
- * Does the ID number match?
- */
+ for( menu = (SFG_Menu *)fgStructure.Menus.First;
+ menu;
+ menu = (SFG_Menu *)menu->Node.Next )
if( menu->ID == menuID )
- return( menu );
- }
-
- /*
- * We have not found the requested menu ID
- */
- return( NULL );
+ return menu;
+ return NULL;
}
/*
for( node = (SFG_Node *)list->First; node; node = (SFG_Node *)node->Next )
++length;
- return( length );
+ return length;
}
/*** END OF FILE ***/