projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unneeded line optimization for INVOKE_WCB macro
[freeglut]
/
src
/
fg_structure.c
diff --git
a/src/fg_structure.c
b/src/fg_structure.c
index
c279b4a
..
4274667
100644
(file)
--- a/
src/fg_structure.c
+++ b/
src/fg_structure.c
@@
-49,7
+49,7
@@
SFG_Structure fgStructure = { { NULL, NULL }, /* The list of windows */
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
extern void fgPlatformCreateWindow ( SFG_Window *window );
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
extern void fgPlatformCreateWindow ( SFG_Window *window );
-extern void fghDefaultReshape(int width, int height);
+extern void fghDefaultReshape(int width, int height, FGCBUserData userData);
static void fghClearCallBacks( SFG_Window *window )
{
static void fghClearCallBacks( SFG_Window *window )
{
@@
-57,7
+57,10
@@
static void fghClearCallBacks( SFG_Window *window )
{
int i;
for( i = 0; i < TOTAL_CALLBACKS; ++i )
{
int i;
for( i = 0; i < TOTAL_CALLBACKS; ++i )
+ {
window->CallBacks[ i ] = NULL;
window->CallBacks[ i ] = NULL;
+ window->CallbackDatas[ i ] = NULL;
+ }
}
}
}
}
@@
-83,7
+86,7
@@
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
fgPlatformCreateWindow ( window );
fghClearCallBacks( window );
fgPlatformCreateWindow ( window );
fghClearCallBacks( window );
- SET_WCB( *window, Reshape, fghDefaultReshape);
+ SET_WCB( *window, Reshape, fghDefaultReshape, NULL);
/* Initialize the object properties */
window->ID = ++fgStructure.WindowID;
/* Initialize the object properties */
window->ID = ++fgStructure.WindowID;
@@
-174,9
+177,10
@@
void fgAddToWindowDestroyList( SFG_Window* window )
* to ensure that they are no longer called after this point.
*/
{
* to ensure that they are no longer called after this point.
*/
{
- FGCBDestroy destroy = (FGCBDestroy)FETCH_WCB( *window, Destroy );
+ FGCBDestroyUC destroy = (FGCBDestroyUC)FETCH_WCB( *window, Destroy );
+ FGCBUserData destroyData = FETCH_USER_DATA_WCB( *window, Destroy );
fghClearCallBacks( window );
fghClearCallBacks( window );
- SET_WCB( *window, Destroy, destroy );
+ SET_WCB( *window, Destroy, destroy, destroyData );
}
}
}
}
@@
-303,7
+307,7
@@
void fgDestroyMenu( SFG_Menu* menu )
{
SFG_Menu *activeMenu=fgStructure.CurrentMenu;
fgStructure.CurrentMenu = menu;
{
SFG_Menu *activeMenu=fgStructure.CurrentMenu;
fgStructure.CurrentMenu = menu;
- menu->Destroy( );
+ menu->Destroy( menu->DestroyData );
fgStructure.CurrentMenu = activeMenu;
}
fgStructure.CurrentMenu = activeMenu;
}