projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nicely lining up the two windows for the callbackmaker demo, small other
[freeglut]
/
src
/
fg_internal.h
diff --git
a/src/fg_internal.h
b/src/fg_internal.h
index
b3d892d
..
370f176
100644
(file)
--- a/
src/fg_internal.h
+++ b/
src/fg_internal.h
@@
-166,7
+166,13
@@
typedef unsigned long fg_time_t;
#endif
typedef unsigned long fg_time_t;
#endif
-
+#ifndef __fg_unused
+# ifdef __GNUC__
+# define __fg_unused __attribute__((unused))
+# else
+# define __fg_unused
+# endif
+#endif
/* Platform-specific includes */
#if TARGET_HOST_POSIX_X11
/* Platform-specific includes */
#if TARGET_HOST_POSIX_X11
@@
-213,6
+219,10
@@
typedef void (* FGCBMultiButton )( int, int, int, int, int );
typedef void (* FGCBMultiMotion )( int, int, int );
typedef void (* FGCBMultiPassive )( int, int, int );
typedef void (* FGCBMultiMotion )( int, int, int );
typedef void (* FGCBMultiPassive )( int, int, int );
+typedef void (* FGCBInitContext)();
+typedef void (* FGCBPause)();
+typedef void (* FGCBResume)();
+
/* The global callbacks type definitions */
typedef void (* FGCBIdle )( void );
typedef void (* FGCBTimer )( int );
/* The global callbacks type definitions */
typedef void (* FGCBIdle )( void );
typedef void (* FGCBTimer )( int );
@@
-361,8
+371,8
@@
struct tagSFG_Context
SFG_PlatformContext pContext; /* The window's FBConfig (X11) or device context (Windows) */
int DoubleBuffered; /* Treat the window as double-buffered */
SFG_PlatformContext pContext; /* The window's FBConfig (X11) or device context (Windows) */
int DoubleBuffered; /* Treat the window as double-buffered */
- GLint attribute_v_coord;
- GLint attribute_v_normal;
+ GLint attribute_v_coord;
+ GLint attribute_v_normal;
};
};
@@
-391,6
+401,10
@@
struct tagSFG_WindowState
GLboolean NeedToResize; /* Do we need to resize the window? */
GLboolean IsFullscreen; /* is the window fullscreen? */
GLboolean NeedToResize; /* Do we need to resize the window? */
GLboolean IsFullscreen; /* is the window fullscreen? */
+
+ GLboolean NeedToInitContext; /* are OpenGL context/resources loaded? */
+
+ GLboolean VisualizeNormals; /* When drawing objects, draw vectors representing the normals as well? */
};
};
@@
-522,6
+536,11
@@
enum
CB_MultiMotion,
CB_MultiPassive,
CB_MultiMotion,
CB_MultiPassive,
+ /* Mobile platforms LifeCycle */
+ CB_InitContext,
+ CB_Pause,
+ CB_Resume,
+
/* Presently ignored */
CB_Select,
CB_OverlayDisplay,
/* Presently ignored */
CB_Select,
CB_OverlayDisplay,
@@
-644,7
+663,8
@@
struct tagSFG_Enumerator
GLboolean found; /* Used to terminate search */
void* data; /* Custom data pointer */
};
GLboolean found; /* Used to terminate search */
void* data; /* Custom data pointer */
};
-typedef void (* FGCBenumerator )( SFG_Window *, SFG_Enumerator * );
+typedef void (* FGCBWindowEnumerator )( SFG_Window *, SFG_Enumerator * );
+typedef void (* FGCBMenuEnumerator )( SFG_Menu *, SFG_Enumerator * );
/* The bitmap font structure */
typedef struct tagSFG_Font SFG_Font;
/* The bitmap font structure */
typedef struct tagSFG_Font SFG_Font;
@@
-898,8
+918,8
@@
void fgSetCursor ( SFG_Window *window, int cursorID );
* and userData is the a custom user-supplied pointer. Functions
* are defined and exported from freeglut_structure.c file.
*/
* and userData is the a custom user-supplied pointer. Functions
* are defined and exported from freeglut_structure.c file.
*/
-void fgEnumWindows( FGCBenumerator enumCallback, SFG_Enumerator* enumerator );
-void fgEnumSubWindows( SFG_Window* window, FGCBenumerator enumCallback,
+void fgEnumWindows( FGCBWindowEnumerator enumCallback, SFG_Enumerator* enumerator );
+void fgEnumSubWindows( SFG_Window* window, FGCBWindowEnumerator enumCallback,
SFG_Enumerator* enumerator );
/*
SFG_Enumerator* enumerator );
/*
@@
-923,6
+943,12
@@
SFG_Window* fgWindowByID( int windowID );
SFG_Menu* fgMenuByID( int menuID );
/*
SFG_Menu* fgMenuByID( int menuID );
/*
+ * Returns active menu, if any. Assumption: only one menu active throughout application at any one time.
+ * This is easier than fgWindowByXXX as all menus are placed in one doubly linked list...
+ */
+SFG_Menu* fgGetActiveMenu( );
+
+/*
* The menu activation and deactivation the code. This is the meat
* of the menu user interface handling code...
*/
* The menu activation and deactivation the code. This is the meat
* of the menu user interface handling code...
*/