X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffreeglut_state_mswin.c;h=1f9966b7eed4777c44a850e6c71c1f1b44b4a29e;hb=90b777df737006ae0b92acfdd0efc29f7bec136c;hp=e5522916b25236df75e5a324926143e445fc627f;hpb=b7ffd3e60d961de87355b3027e589eb150337e60;p=freeglut diff --git a/src/mswin/freeglut_state_mswin.c b/src/mswin/freeglut_state_mswin.c index e552291..1f9966b 100644 --- a/src/mswin/freeglut_state_mswin.c +++ b/src/mswin/freeglut_state_mswin.c @@ -26,12 +26,20 @@ */ #include -#include "freeglut_internal_mswin.h" +#include "../Common/freeglut_internal.h" extern GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly, unsigned char layer_type ); +/* + * Helper functions for getting client area from the window rect + * and the window rect from the client area given the style of the window + * (or a valid window pointer from which the style can be queried). + */ +extern RECT fghGetClientArea( const SFG_Window *window, BOOL wantPosOutside ); +extern void fghGetBorderWidth(const DWORD windowStyle, int* xBorderWidth, int* yBorderWidth); + /* The following include file is available from SGI but is not standard: * #include @@ -221,7 +229,7 @@ int fgPlatformGlutGet ( GLenum eWhat ) case GLUT_WINDOW_FORMAT_ID: #if !defined(_WIN32_WCE) if( fgStructure.CurrentWindow != NULL ) - return GetPixelFormat( fgStructure.CurrentWindow->Window.Device ); + return GetPixelFormat( fgStructure.CurrentWindow->Window.pContext.Device ); #endif /* defined(_WIN32_WCE) */ return 0;