X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_internal.h;h=129654a085ae33f3b8b315d685294788ce5b0301;hb=871c344a629dc834cd89ca1874bd8715e6726db9;hp=dbae6769378c3b99acf2c70b0a91982ed7595545;hpb=19242860f0cd6d3f2c3e32e87e15fe5e1151d072;p=freeglut diff --git a/src/fg_internal.h b/src/fg_internal.h index dbae676..129654a 100644 --- a/src/fg_internal.h +++ b/src/fg_internal.h @@ -219,9 +219,9 @@ typedef void (* FGCBMultiButton )( int, int, int, int, int ); typedef void (* FGCBMultiMotion )( int, int, int ); typedef void (* FGCBMultiPassive )( int, int, int ); -typedef void (* FGCBFixMyNameInitContext)(); -typedef void (* FGCBFixMyNamePause)(); -typedef void (* FGCBFixMyNameResume)(); +typedef void (* FGCBInitContext)(); +typedef void (* FGCBPause)(); +typedef void (* FGCBResume)(); /* The global callbacks type definitions */ typedef void (* FGCBIdle )( void ); @@ -371,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 */ - GLint attribute_v_coord; - GLint attribute_v_normal; + GLint attribute_v_coord; + GLint attribute_v_normal; }; @@ -402,7 +402,7 @@ struct tagSFG_WindowState GLboolean IsFullscreen; /* is the window fullscreen? */ - GLboolean NeedToFixMyNameInitContext; /* are OpenGL context/resources loaded? */ + GLboolean NeedToInitContext; /* are OpenGL context/resources loaded? */ }; @@ -535,9 +535,9 @@ enum CB_MultiPassive, /* Mobile platforms LifeCycle */ - CB_FixMyNameInitContext, - CB_FixMyNamePause, - CB_FixMyNameResume, + CB_InitContext, + CB_Pause, + CB_Resume, /* Presently ignored */ CB_Select, @@ -661,7 +661,8 @@ struct tagSFG_Enumerator 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; @@ -915,8 +916,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. */ -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 ); /* @@ -940,6 +941,12 @@ SFG_Window* fgWindowByID( int windowID ); 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... */