Moving the "glutCreateWindowWithExit" and its associated variable to the Windows-specific files

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1015 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2012-01-29 03:22:28 +00:00
parent d918fca3c0
commit d59e23ba2e
4 changed files with 11 additions and 12 deletions

View File

@ -991,10 +991,6 @@ int fgHintPresent(Window window, Atom property, Atom hint);
SFG_Proc fghGetProcAddress( const char *procName ); SFG_Proc fghGetProcAddress( const char *procName );
#if TARGET_HOST_MS_WINDOWS
extern void (__cdecl *__glutExitFunc)( int return_value );
#endif
#endif /* FREEGLUT_INTERNAL_H */ #endif /* FREEGLUT_INTERNAL_H */
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -986,14 +986,6 @@ int FGAPIENTRY glutCreateWindow( const char* title )
GL_FALSE, GL_FALSE )->ID; GL_FALSE, GL_FALSE )->ID;
} }
#if TARGET_HOST_MS_WINDOWS
int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) )
{
__glutExitFunc = exit_function;
return glutCreateWindow( title );
}
#endif
/* /*
* This function creates a sub window. * This function creates a sub window.
*/ */

View File

@ -49,6 +49,8 @@ struct tagSFG_PlatformContext
}; };
/* Function to be called on exit */
extern void (__cdecl *__glutExitFunc)( int return_value );
#endif /* FREEGLUT_INTERNAL_MSWIN_H */ #endif /* FREEGLUT_INTERNAL_MSWIN_H */

View File

@ -1078,3 +1078,12 @@ void fgPlatformGlutFullScreenToggle( SFG_Window *win )
} }
/* -- PLATFORM-SPECIFIC INTERFACE FUNCTION -------------------------------------------------- */
int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) )
{
__glutExitFunc = exit_function;
return glutCreateWindow( title );
}