For builds not using cmake, generate fg_version.h to match cmake-specified version...
[freeglut] / src / fg_internal.h
index 2d2ab0b..5e35378 100644 (file)
@@ -32,6 +32,8 @@
 #    include "config.h"
 #endif
 
+#include "fg_version.h"
+
 /* Freeglut is intended to function under all Unix/X11 and Win32 platforms. */
 /* XXX: Don't all MS-Windows compilers (except Cygwin) have _WIN32 defined?
  * XXX: If so, remove the first set of defined()'s below.
@@ -45,6 +47,9 @@
 #elif defined (__ANDROID__)
 #   define  TARGET_HOST_ANDROID  1
 
+#elif defined (__QNXNTO__) || defined (__PLAYBOOK__)
+#   define  TARGET_HOST_BLACKBERRY  1
+
 #elif defined(__posix__) || defined(__unix__) || defined(__linux__) || defined(__sun)
 #   define  TARGET_HOST_POSIX_X11  1
 
 #   define  TARGET_HOST_MS_WINDOWS 0
 #endif
 
+#ifndef TARGET_HOST_ANDROID
+#   define  TARGET_HOST_ANDROID    0
+#endif
+
+#ifndef TARGET_HOST_BLACKBERRY
+#   define  TARGET_HOST_BLACKBERRY 0
+#endif
+
 #ifndef  TARGET_HOST_POSIX_X11
 #   define  TARGET_HOST_POSIX_X11  0
 #endif
 #if TARGET_HOST_ANDROID
 #include "android/fg_internal_android.h"
 #endif
+#if TARGET_HOST_BLACKBERRY
+#include "blackberry/fg_internal_blackberry.h"
+#endif
 
 
 /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
@@ -220,8 +236,7 @@ typedef void (* FGCBMultiMotion  )( int, int, int );
 typedef void (* FGCBMultiPassive )( int, int, int );
 
 typedef void (* FGCBInitContext)();
-typedef void (* FGCBPause)();
-typedef void (* FGCBResume)();
+typedef void (* FGCBAppStatus)(int);
 
 /* The global callbacks type definitions */
 typedef void (* FGCBIdle          )( void );
@@ -306,6 +321,7 @@ struct tagSFG_State
     int              ActiveMenus;          /* Num. of currently active menus */
     FGCBMenuState    MenuStateCallback;    /* Menu callbacks are global      */
     FGCBMenuStatus   MenuStatusCallback;
+    void*            MenuFont;             /* Font to be used for newly created menus */
 
     SFG_XYUse        GameModeSize;         /* Game mode screen's dimensions  */
     int              GameModeDepth;        /* The pixel depth for game mode  */
@@ -372,7 +388,7 @@ struct tagSFG_Context
 
     int             DoubleBuffered;  /* Treat the window as double-buffered */
 
-    /* When drawing geometry to vertex attribute buffers, user specifies 
+    /* When drawing geometry to vertex attribute buffers, user specifies
      * the attribute indices for vertices, normals and/or texture coords
      * to freeglut. Those are stored here
      */
@@ -392,6 +408,7 @@ struct tagSFG_Context
 #define GLUT_SIZE_WORK        (1<<3)
 #define GLUT_ZORDER_WORK      (1<<4)
 #define GLUT_FULL_SCREEN_WORK (1<<5)
+#define GLUT_DISPLAY_WORK     (1<<6)
 
 /*
  * An enumeration containing the state of the GLUT execution:
@@ -457,12 +474,8 @@ struct tagSFG_WindowState   /* as per notes above, sizes always refer to the cli
     int             DesiredZOrder;      /* desired window Z Order position */
     fgDesiredVisibility DesiredVisibility;/* desired visibility (hidden, iconic, shown/normal) */
 
-
        SFG_PlatformWindowState pWState;    /* Window width/height (X11) or rectangle/style (Windows) from before a resize, and other stuff only needed on specific platforms */
 
-    GLboolean       Redisplay;          /* Do we have to redisplay?          */
-
-
     long            JoystickPollRate;   /* The joystick polling rate         */
     fg_time_t       JoystickLastPoll;   /* When the last poll happened       */
 
@@ -601,8 +614,7 @@ enum
 
     /* Mobile platforms LifeCycle */
     WCB_InitContext,
-    WCB_Pause,
-    WCB_Resume,
+    WCB_AppStatus,
 
     /* Presently ignored */
     WCB_Select,
@@ -640,6 +652,7 @@ struct tagSFG_Menu
     FGCBMenu            Callback;     /* The menu callback                   */
     FGCBDestroy         Destroy;      /* Destruction callback                */
     GLboolean           IsActive;     /* Is the menu selected?               */
+    void*               Font;         /* Font to be used for displaying this menu */
     int                 Width;        /* Menu box width in pixels            */
     int                 Height;       /* Menu box height in pixels           */
     int                 X, Y;         /* Menu box raster position            */