X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_internal.h;h=ea311b6be9014a8d9ade3785e0548c2004d5bc65;hb=13bc069810e3f513a9aa6cd44e8a37d02c7baabf;hp=9cfe936f51c121ddd54c35db1e1ed7be33eedd00;hpb=224638013a9db16bbbe6e3ff05d6cac9a939c262;p=freeglut diff --git a/src/freeglut_internal.h b/src/freeglut_internal.h index 9cfe936..ea311b6 100644 --- a/src/freeglut_internal.h +++ b/src/freeglut_internal.h @@ -389,13 +389,14 @@ struct tagSFG_WindowState * */ #define INVOKE_WCB(window,cbname,arg_list) \ +do \ { \ if( FETCH_WCB( window, cbname ) ) \ { \ fgSetWindow( &window ); \ FETCH_WCB( window, cbname ) arg_list; \ } \ -} +} while( 0 ) /* * The window callbacks the user can supply us with. Should be kept portable. @@ -697,6 +698,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly, /* * Window creation, opening, closing and destruction. + * Also CallBack clearing/initialization. * Defined in freeglut_structure.c, freeglut_window.c. */ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, @@ -710,6 +712,7 @@ void fgAddToWindowDestroyList ( SFG_Window* window, GLboolean needToClose ) ; void fgCloseWindows (); void fgDestroyWindow( SFG_Window* window, GLboolean needToClose ); +void fgClearCallBacks( SFG_Window *window ); /* * Menu creation and destruction. Defined in freeglut_structure.c