Moving the platform dependencies from the "freeglut_menu.c" file to the platform-specific header files
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1066 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
a20f647aa4
commit
76c04a50f6
@ -53,11 +53,7 @@
|
|||||||
* that that wasn't the original intent...if not, perhaps we need another
|
* that that wasn't the original intent...if not, perhaps we need another
|
||||||
* symbolic constant, FREEGLUT_MENU_ITEM_BORDER, or such.)
|
* symbolic constant, FREEGLUT_MENU_ITEM_BORDER, or such.)
|
||||||
*/
|
*/
|
||||||
#if TARGET_HOST_MS_WINDOWS
|
/* See platform-specific header files for menu font and color definitions */
|
||||||
#define FREEGLUT_MENU_FONT GLUT_BITMAP_8_BY_13
|
|
||||||
#else
|
|
||||||
#define FREEGLUT_MENU_FONT GLUT_BITMAP_HELVETICA_18
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FREEGLUT_MENU_HEIGHT (glutBitmapHeight(FREEGLUT_MENU_FONT) + \
|
#define FREEGLUT_MENU_HEIGHT (glutBitmapHeight(FREEGLUT_MENU_FONT) + \
|
||||||
FREEGLUT_MENU_BORDER)
|
FREEGLUT_MENU_BORDER)
|
||||||
@ -72,17 +68,10 @@
|
|||||||
* too. These variables should be stuffed into global state and initialized
|
* too. These variables should be stuffed into global state and initialized
|
||||||
* via the glutInit*() system.
|
* via the glutInit*() system.
|
||||||
*/
|
*/
|
||||||
#if TARGET_HOST_MS_WINDOWS
|
static float menu_pen_fore [4] = FREEGLUT_MENU_PEN_FORE_COLORS ;
|
||||||
static float menu_pen_fore [4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
static float menu_pen_back [4] = FREEGLUT_MENU_PEN_BACK_COLORS ;
|
||||||
static float menu_pen_back [4] = {0.85f, 0.85f, 0.85f, 1.0f};
|
static float menu_pen_hfore [4] = FREEGLUT_MENU_PEN_HFORE_COLORS;
|
||||||
static float menu_pen_hfore [4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
static float menu_pen_hback [4] = FREEGLUT_MENU_PEN_HBACK_COLORS;
|
||||||
static float menu_pen_hback [4] = {0.15f, 0.15f, 0.45f, 1.0f};
|
|
||||||
#else
|
|
||||||
static float menu_pen_fore [4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
|
||||||
static float menu_pen_back [4] = {0.70f, 0.70f, 0.70f, 1.0f};
|
|
||||||
static float menu_pen_hfore [4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
|
||||||
static float menu_pen_hback [4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y );
|
extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y );
|
||||||
|
@ -108,6 +108,14 @@ struct tagSFG_PlatformJoystick
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Menu font and color definitions */
|
||||||
|
#define FREEGLUT_MENU_FONT GLUT_BITMAP_8_BY_13
|
||||||
|
|
||||||
|
#define FREEGLUT_MENU_PEN_FORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f}
|
||||||
|
#define FREEGLUT_MENU_PEN_BACK_COLORS {0.85f, 0.85f, 0.85f, 1.0f}
|
||||||
|
#define FREEGLUT_MENU_PEN_HFORE_COLORS {1.0f, 1.0f, 1.0f, 1.0f}
|
||||||
|
#define FREEGLUT_MENU_PEN_HBACK_COLORS {0.15f, 0.15f, 0.45f, 1.0f}
|
||||||
|
|
||||||
|
|
||||||
/* Function to be called on exit */
|
/* Function to be called on exit */
|
||||||
extern void (__cdecl *__glutExitFunc)( int return_value );
|
extern void (__cdecl *__glutExitFunc)( int return_value );
|
||||||
|
@ -198,6 +198,17 @@ struct tagSFG_PlatformJoystick
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Menu font and color definitions */
|
||||||
|
#define FREEGLUT_MENU_FONT GLUT_BITMAP_HELVETICA_18
|
||||||
|
|
||||||
|
#define FREEGLUT_MENU_PEN_FORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f}
|
||||||
|
#define FREEGLUT_MENU_PEN_BACK_COLORS {0.70f, 0.70f, 0.70f, 1.0f}
|
||||||
|
#define FREEGLUT_MENU_PEN_HFORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f}
|
||||||
|
#define FREEGLUT_MENU_PEN_HBACK_COLORS {1.0f, 1.0f, 1.0f, 1.0f}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -- PRIVATE FUNCTION DECLARATIONS ---------------------------------------- */
|
/* -- PRIVATE FUNCTION DECLARATIONS ---------------------------------------- */
|
||||||
/* spaceball device functions, defined in freeglut_spaceball.c */
|
/* spaceball device functions, defined in freeglut_spaceball.c */
|
||||||
int fgIsSpaceballXEvent( const XEvent *ev );
|
int fgIsSpaceballXEvent( const XEvent *ev );
|
||||||
|
Reference in New Issue
Block a user