/* Mobile platforms lifecycle */
FGAPI void FGAPIENTRY glutInitContextFunc(void (* callback)());
-FGAPI void FGAPIENTRY glutPauseFunc(void (* callback)());
-FGAPI void FGAPIENTRY glutResumeFunc(void (* callback)());
+FGAPI void FGAPIENTRY glutAppStatusFunc(void (* callback)(int));
+/* state flags that can be passed to callback set by glutAppStatusFunc */
+#define GLUT_APPSTATUS_PAUSE 0x0001
+#define GLUT_APPSTATUS_RESUME 0x0002
/*
* GLUT API macro definitions -- the display mode definitions
/* If we're not in RESUME state, Android paused us, so wait */\r
struct android_app* app = fgDisplay.pDisplay.app;\r
if (app->destroyRequested != 1 && app->activityState != APP_CMD_RESUME) {\r
- INVOKE_WCB(*window, Pause, ());\r
+ INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_PAUSE));\r
\r
int FOREVER = -1;\r
while (app->destroyRequested != 1 && (app->activityState != APP_CMD_RESUME)) {\r
fgWarning("Resuming application, but no callback to reload context resources (glutInitContextFunc)");\r
}\r
\r
- INVOKE_WCB(*window, Resume, ());\r
+ INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_RESUME));\r
}\r
}\r
\r
IMPLEMENT_CALLBACK_FUNC(MultiMotion);
IMPLEMENT_CALLBACK_FUNC(MultiPassive);
IMPLEMENT_CALLBACK_FUNC(InitContext);
-IMPLEMENT_CALLBACK_FUNC(Pause);
-IMPLEMENT_CALLBACK_FUNC(Resume);
+IMPLEMENT_CALLBACK_FUNC(AppStatus);
CHECK_NAME(glutInitContextProfile);
CHECK_NAME(glutInitErrorFunc);
CHECK_NAME(glutInitWarningFunc);
- CHECK_NAME(glutInitContextFunc)
- CHECK_NAME(glutPauseFunc)
- CHECK_NAME(glutResumeFunc)
- CHECK_NAME(glutSetVertexAttribCoord3)
- CHECK_NAME(glutSetVertexAttribNormal)
- CHECK_NAME(glutSetVertexAttribTexCoord2)
+ CHECK_NAME(glutInitContextFunc);
+ CHECK_NAME(glutAppStatusFunc);
+ CHECK_NAME(glutSetVertexAttribCoord3);
+ CHECK_NAME(glutSetVertexAttribNormal);
+ CHECK_NAME(glutSetVertexAttribTexCoord2);
#undef CHECK_NAME
return NULL;
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 );
/* Mobile platforms LifeCycle */
WCB_InitContext,
- WCB_Pause,
- WCB_Resume,
+ WCB_AppStatus,
/* Presently ignored */
WCB_Select,
glutMultiMotionFunc
glutMultiPassiveFunc
glutInitContextFunc
- glutPauseFunc
- glutResumeFunc
+ glutAppStatusFunc
glutSetVertexAttribCoord3
glutSetVertexAttribNormal
glutSetVertexAttribTexCoord2