First attempt at adding John Tsiombikas' spaceball support for X11. It compiles...
[freeglut] / src / freeglut_internal.h
index 05cdddf..5b2784a 100644 (file)
@@ -324,6 +324,7 @@ struct tagSFG_State
     int              MajorVersion;         /* Major OpenGL context version  */
     int              MinorVersion;         /* Minor OpenGL context version  */
     int              ContextFlags;         /* OpenGL context flags          */
+    int              ContextProfile;       /* OpenGL context profile        */
 };
 
 /* The structure used by display initialization in freeglut_init.c */
@@ -563,9 +564,9 @@ enum
     /* Presently ignored */
     CB_Select,
     CB_OverlayDisplay,
-    CB_SpaceMotion,
-    CB_SpaceRotation,
-    CB_SpaceButton,
+    CB_SpaceMotion,     /* presently implemented only on UNIX/X11 */
+    CB_SpaceRotation,   /* presently implemented only on UNIX/X11 */
+    CB_SpaceButton,     /* presently implemented only on UNIX/X11 */
     CB_Dials,
     CB_ButtonBox,
     CB_TabletMotion,
@@ -852,6 +853,19 @@ int         fgInputDeviceDetect( void );
 void        fgInitialiseInputDevices( void );
 void        fgInputDeviceClose( void );
 
+/* spaceball device functions, defined in freeglut_spaceball.c */
+void        fgInitialiseSpaceball( void );
+void        fgSpaceballClose( void );
+void        fgSpaceballSetWindow( SFG_Window *window );
+
+int         fgHasSpaceball( void );
+int         fgSpaceballNumButtons( void );
+
+#if TARGET_HOST_POSIX_X11
+int         fgIsSpaceballXEvent( const XEvent *ev );
+void        fgSpaceballHandleXEvent( const XEvent *ev );
+#endif
+
 /* Setting the cursor for a given window */
 void fgSetCursor ( SFG_Window *window, int cursorID );
 
@@ -933,8 +947,8 @@ int fgHintPresent(Window window, Atom property, Atom hint);
 
 SFG_Proc fghGetProcAddress( const char *procName );
 
-#ifdef _WIN32
-extern void (__cdecl *__glutExitFunc)( int retval );
+#if TARGET_HOST_MS_WINDOWS
+extern void (__cdecl *__glutExitFunc)( int return_value );
 #endif
 
 #endif /* FREEGLUT_INTERNAL_H */