static pCloseTouchInputHandle fghCloseTouchInputHandle = (pCloseTouchInputHandle)0xDEADBEEF;\r
#endif\r
\r
-extern void fghPlatformReshapeWindow ( SFG_Window *window, int width, int height );\r
-extern void fghcbPlatformDisplayWindow ( SFG_Window *window );\r
-extern void fghPlatformSleepForEvents( long msec );\r
-extern void fghProcessSingleEvent ( void );\r
-extern void fghMainLoopPreliminaryWork ( void );\r
+extern void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height );\r
+extern void fgPlatformDisplayWindow ( SFG_Window *window );\r
+extern void fgPlatformSleepForEvents( long msec );\r
+extern void fgPlatformProcessSingleEvent ( void );\r
+extern void fgPlatformMainLoopPreliminaryWork ( void );\r
\r
\r
/*\r
* match the new window size.\r
*/\r
#if TARGET_HOST_POSIX_X11\r
-static void fghPlatformReshapeWindow ( SFG_Window *window, int width, int height )\r
+static void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height )\r
{\r
XResizeWindow( fgDisplay.Display, window->Window.Handle,\r
width, height );\r
\r
freeglut_return_if_fail( window != NULL );\r
\r
- fghPlatformReshapeWindow ( window, width, height );\r
+ fgPlatformReshapeWindow ( window, width, height );\r
\r
if( FETCH_WCB( *window, Reshape ) )\r
INVOKE_WCB( *window, Reshape, ( width, height ) );\r
* A static helper function to execute display callback for a window\r
*/\r
#if TARGET_HOST_POSIX_X11\r
-static void fghcbPlatformDisplayWindow ( SFG_Window *window )\r
+static void fgPlatformDisplayWindow ( SFG_Window *window )\r
{\r
fghRedrawWindow ( window ) ;\r
}\r
window->State.Visible )\r
{\r
window->State.Redisplay = GL_FALSE;\r
- fghcbPlatformDisplayWindow ( window );\r
+ fgPlatformDisplayWindow ( window );\r
}\r
\r
fgEnumSubWindows( window, fghcbDisplayWindow, enumerator );\r
*/\r
\r
#if TARGET_HOST_POSIX_X11\r
-static void fghPlatformSleepForEvents( long msec )\r
+static void fgPlatformSleepForEvents( long msec )\r
{\r
/*\r
* Possibly due to aggressive use of XFlush() and friends,\r
if( fghHaveJoystick( ) && ( msec > 10 ) ) \r
msec = 10;\r
\r
- fghPlatformSleepForEvents ( msec );\r
+ fgPlatformSleepForEvents ( msec );\r
}\r
\r
#if TARGET_HOST_POSIX_X11\r
/*\r
* Returns GLUT modifier mask for the state field of an X11 event.\r
*/\r
-int fghGetModifiers( int state )\r
+int fgPlatformGetModifiers( int state )\r
{\r
int ret = 0;\r
\r
}\r
\r
\r
-void fghProcessSingleEvent ( void )\r
+void fgPlatformProcessSingleEvent ( void )\r
{\r
SFG_Window* window;\r
XEvent event;\r
* XXX track ButtonPress/ButtonRelease events in our own\r
* XXX bit-mask?\r
*/\r
- fgState.Modifiers = fghGetModifiers( event.xmotion.state );\r
+ fgState.Modifiers = fgPlatformGetModifiers( event.xmotion.state );\r
if ( event.xmotion.state & ( Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) ) {\r
INVOKE_WCB( *window, Motion, ( event.xmotion.x,\r
event.xmotion.y ) );\r
! FETCH_WCB( *window, MouseWheel ) )\r
break;\r
\r
- fgState.Modifiers = fghGetModifiers( event.xbutton.state );\r
+ fgState.Modifiers = fgPlatformGetModifiers( event.xbutton.state );\r
\r
/* Finally execute the mouse or mouse wheel callback */\r
if( ( button < glutDeviceGet ( GLUT_NUM_MOUSE_BUTTONS ) ) || ( ! FETCH_WCB( *window, MouseWheel ) ) )\r
if( keyboard_cb )\r
{\r
fgSetWindow( window );\r
- fgState.Modifiers = fghGetModifiers( event.xkey.state );\r
+ fgState.Modifiers = fgPlatformGetModifiers( event.xkey.state );\r
keyboard_cb( asciiCode[ 0 ],\r
event.xkey.x, event.xkey.y\r
);\r
if( special_cb && (special != -1) )\r
{\r
fgSetWindow( window );\r
- fgState.Modifiers = fghGetModifiers( event.xkey.state );\r
+ fgState.Modifiers = fgPlatformGetModifiers( event.xkey.state );\r
special_cb( special, event.xkey.x, event.xkey.y );\r
fgState.Modifiers = INVALID_MODIFIERS;\r
}\r
}\r
\r
\r
-static void fghMainLoopPreliminaryWork ( void )\r
+static void fgPlatformMainLoopPreliminaryWork ( void )\r
{\r
}\r
#endif\r
*/\r
void FGAPIENTRY glutMainLoopEvent( void )\r
{\r
- fghProcessSingleEvent ();\r
+ fgPlatformProcessSingleEvent ();\r
\r
if( fgState.Timers.First )\r
fghCheckTimers( );\r
\r
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMainLoop" );\r
\r
- fghMainLoopPreliminaryWork ();\r
+ fgPlatformMainLoopPreliminaryWork ();\r
\r
fgState.ExecState = GLUT_EXEC_STATE_RUNNING ;\r
while( fgState.ExecState == GLUT_EXEC_STATE_RUNNING )\r