X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_internal.h;h=c2fa064a2515fca305d0887d1fb274b4bf026822;hb=ce2e5aba172eb85cda2b4f047bdcf9f54d019fd7;hp=10086ea4b23b26430b513866babec2a4a5a08b53;hpb=34a475d386a10f8971c66212f9bb055726b72836;p=freeglut diff --git a/src/freeglut_internal.h b/src/freeglut_internal.h index 10086ea..c2fa064 100644 --- a/src/freeglut_internal.h +++ b/src/freeglut_internal.h @@ -42,7 +42,7 @@ # define TARGET_HOST_UNIX_X11 0 # define TARGET_HOST_WIN32 0 # define TARGET_HOST_WINCE 1 -#elif defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) +#elif defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__) # define TARGET_HOST_UNIX_X11 0 # define TARGET_HOST_WIN32 1 # define TARGET_HOST_WINCE 0 @@ -60,9 +60,20 @@ #include #include #include + +/* TODO: MinGW is lacking a prototype, this should better be handled via autoconf! */ +#ifndef ChangeDisplaySettingsEx +LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID); +LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID); +#ifdef UNICODE +#define ChangeDisplaySettingsEx ChangeDisplaySettingsExW +#else +#define ChangeDisplaySettingsEx ChangeDisplaySettingsExA +#endif +#endif #endif -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__WATCOMC__) #define strdup _strdup #endif @@ -115,6 +126,8 @@ # define FALSE 0 #endif +#define INVALID_MODIFIERS 0xffffffff + /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */ /* Freeglut callbacks type definitions */ @@ -244,6 +257,7 @@ struct tagSFG_State fgExecutionState ExecState; /* Used for GLUT termination */ char *ProgramName; /* Name of the invoking program */ GLboolean JoysticksInitialised; /* Only initialize if application calls for them */ + GLboolean InputDevsInitialised; /* Only initialize if application calls for them */ }; /* The structure used by display initialization in freeglut_init.c */ @@ -500,10 +514,10 @@ typedef struct tagSFG_MenuContext SFG_MenuContext; struct tagSFG_MenuContext { #if TARGET_HOST_UNIX_X11 - XVisualInfo* VisualInfo; /* The window's visual information */ + XVisualInfo* MVisualInfo; /* The window's visual information */ #endif - SFG_WindowContextType Context; /* The menu window's WGL context */ + SFG_WindowContextType MContext; /* The menu window's WGL context */ }; /* This structure describes a menu */ @@ -767,10 +781,10 @@ void fgInitialiseJoysticks( void ); void fgJoystickClose( void ); void fgJoystickPollWindow( SFG_Window* window ); -/* More joystick functions. Should these go into the API? */ -int glutJoystickGetNumAxes( int ident ); -int glutJoystickGetNumButtons( int ident ); -int glutJoystickNotWorking( int ident ); +/* InputDevice Initialisation and Closure */ +int fgInputDeviceDetect( void ); +void fgInitialiseInputDevices( void ); +void fgInputDeviceClose( void ); /* Setting the cursor for a given window */ void fgSetCursor ( SFG_Window *window, int cursorID );