X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_callbacks.c;h=f395716b64c353972df3450cad7e37dec3a6c7ef;hb=0b1a7966eeafc97ab68fcf331fddeeb22ca3b619;hp=854ce50dd551316352aea320f1369ae13303b3cd;hpb=8756c552d99adeed03a7bdd7c8b0da8c77f5c475;p=freeglut diff --git a/src/freeglut_callbacks.c b/src/freeglut_callbacks.c index 854ce50..f395716 100644 --- a/src/freeglut_callbacks.c +++ b/src/freeglut_callbacks.c @@ -49,8 +49,8 @@ void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ) { if( !callback ) - fgError ("Fatal error in program. NULL display callback not " - "permitted in GLUT 3.0+ or freeglut 2.0.1+\n"); + fgError ("Fatal error in program. NULL display callback not " + "permitted in GLUT 3.0+ or freeglut 2.0.1+\n"); SET_CALLBACK( Display ); fgStructure.Window->State.Redisplay = TRUE; } @@ -99,8 +99,8 @@ void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ), i timer = (SFG_Timer *)calloc( sizeof(SFG_Timer), 1 ); if (!timer) - fgError ("Fatal error: " - "Memory allocation failure in glutTimerFunc()\n"); + fgError ("Fatal error: " + "Memory allocation failure in glutTimerFunc()\n"); timer->Callback = callback; timer->ID = timerID; @@ -173,6 +173,14 @@ void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) ) } /* + * Sets the mouse wheel callback for the current window + */ +void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) ) +{ + SET_CALLBACK( MouseWheel ); +} + +/* * Sets the mouse motion callback for the current window (one or more buttons * are pressed) */ @@ -215,7 +223,7 @@ void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) ) void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) ) { if( fgStructure.Menu == NULL ) - return; + return; fgStructure.Menu->Destroy = callback; }