projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split one last overlong line in freeglut_cursor.c.
[freeglut]
/
src
/
freeglut_structure.c
diff --git
a/src/freeglut_structure.c
b/src/freeglut_structure.c
index
6ebd106
..
8708d2b
100644
(file)
--- a/
src/freeglut_structure.c
+++ b/
src/freeglut_structure.c
@@
-29,8
+29,6
@@
#include "config.h"
#endif
#include "config.h"
#endif
-#define G_LOG_DOMAIN "freeglut-structure"
-
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
@@
-111,7
+109,7
@@
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
/*
* This private function creates a menu and adds it to the menus list
*/
/*
* 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 ;
{
int x = 100, y = 100, w = 100, h = 100 ;
SFG_Window *current_window = fgStructure.Window ;
@@
-268,11
+266,15
@@
void fgDestroyWindow( SFG_Window* window, GLboolean needToClose )
while ( (subWindow = (SFG_Window *)window->Children.First) != NULL )
fgDestroyWindow( subWindow, needToClose );
while ( (subWindow = (SFG_Window *)window->Children.First) != NULL )
fgDestroyWindow( subWindow, needToClose );
- if ( window->Callbacks.Destroy != NULL )
+ /*
+ * XXX Since INVOKE_WCB() tests the function pointer, why not make
+ * XXX this unconditional? Overhead is close to nil, and it would
+ * XXX clarify the code by omitting a conditional test.
+ */
+ if ( FETCH_WCB( *window, Destroy ) )
{
SFG_Window *activeWindow = fgStructure.Window ;
{
SFG_Window *activeWindow = fgStructure.Window ;
- fgSetWindow ( window ) ;
- window->Callbacks.Destroy () ;
+ INVOKE_WCB( *window, Destroy, ( ) );
fgSetWindow ( activeWindow ) ;
}
fgSetWindow ( activeWindow ) ;
}
@@
-561,7
+563,7
@@
static void fghcbWindowByID( SFG_Window *window, SFG_Enumerator *enumerator )
/*
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
*/
/*
* 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;
{
enumerator->found = TRUE;
enumerator->data = window;
@@
-588,7
+590,7
@@
SFG_Window* fgWindowByID( int windowID )
* Uses a method very similiar for fgWindowByHandle...
*/
enumerator.found = FALSE;
* 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;
fgEnumWindows( fghcbWindowByID, &enumerator );
if( enumerator.found == TRUE )
return( SFG_Window *) enumerator.data;