projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Applied Christian's change to drop unnecessary dependency to X11 libraries we
[freeglut]
/
src
/
mswin
/
fg_window_mswin.c
diff --git
a/src/mswin/fg_window_mswin.c
b/src/mswin/fg_window_mswin.c
index
6047e42
..
69a698d
100644
(file)
--- a/
src/mswin/fg_window_mswin.c
+++ b/
src/mswin/fg_window_mswin.c
@@
-1,5
+1,5
@@
/*
/*
- * freeglut_window_mswin.c
+ * fg_window_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
*
* The Windows-specific mouse cursor related stuff.
*
@@
-233,13
+233,13
@@
static void fghFillPFD( PIXELFORMATDESCRIPTOR *ppfd, HDC hdc, unsigned char laye
ppfd->cDepthBits = 24;
ppfd->cStencilBits = 8;
ppfd->cDepthBits = 24;
ppfd->cStencilBits = 8;
- ppfd->cAuxBuffers = fghNumberOfAuxBuffersRequested();
+ ppfd->cAuxBuffers = (BYTE) fghNumberOfAuxBuffersRequested();
ppfd->iLayerType = layer_type;
ppfd->bReserved = 0;
ppfd->dwLayerMask = 0;
ppfd->dwVisibleMask = 0;
ppfd->dwDamageMask = 0;
ppfd->iLayerType = layer_type;
ppfd->bReserved = 0;
ppfd->dwLayerMask = 0;
ppfd->dwVisibleMask = 0;
ppfd->dwDamageMask = 0;
-
+
ppfd->cColorBits = (BYTE) GetDeviceCaps( hdc, BITSPIXEL );
}
ppfd->cColorBits = (BYTE) GetDeviceCaps( hdc, BITSPIXEL );
}
@@
-291,7
+291,7
@@
GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
/* windows hack for multismapling/sRGB */
if ( ( fgState.DisplayMode & GLUT_MULTISAMPLE ) ||
( fgState.DisplayMode & GLUT_SRGB ) )
/* windows hack for multismapling/sRGB */
if ( ( fgState.DisplayMode & GLUT_MULTISAMPLE ) ||
( fgState.DisplayMode & GLUT_SRGB ) )
- {
+ {
HGLRC rc, rc_before=wglGetCurrentContext();
HWND hWnd;
HDC hDC, hDC_before=wglGetCurrentDC();
HGLRC rc, rc_before=wglGetCurrentContext();
HWND hWnd;
HDC hDC, hDC_before=wglGetCurrentDC();
@@
-430,7
+430,7
@@
void fghComputeWindowRectFromClientArea_UseStyle( RECT *clientRect, const DWORD
windowRect.left = clientRect->left;
windowRect.top = clientRect->top;
}
windowRect.left = clientRect->left;
windowRect.top = clientRect->top;
}
-
+
/* done, copy windowRect to output */
CopyRect(clientRect,&windowRect);
}
/* done, copy windowRect to output */
CopyRect(clientRect,&windowRect);
}
@@
-467,7
+467,7
@@
void fghGetClientArea( RECT *clientRect, const SFG_Window *window, BOOL posIsOut
POINT topLeftClient = {0,0};
freeglut_return_if_fail((window && window->Window.Handle));
POINT topLeftClient = {0,0};
freeglut_return_if_fail((window && window->Window.Handle));
-
+
/* Get size of client rect */
GetClientRect(window->Window.Handle, clientRect);
if (posIsOutside)
/* Get size of client rect */
GetClientRect(window->Window.Handle, clientRect);
if (posIsOutside)
@@
-497,9
+497,9
@@
typedef struct
} m_proc_t;
static BOOL CALLBACK m_proc(HMONITOR mon,
} m_proc_t;
static BOOL CALLBACK m_proc(HMONITOR mon,
- HDC hdc,
- LPRECT rect,
- LPARAM data)
+ HDC hdc,
+ LPRECT rect,
+ LPARAM data)
{
m_proc_t *dp=(m_proc_t *)data;
MONITORINFOEX info;
{
m_proc_t *dp=(m_proc_t *)data;
MONITORINFOEX info;
@@
-518,7
+518,7
@@
static BOOL CALLBACK m_proc(HMONITOR mon,
return TRUE;
}
return TRUE;
}
-/*
+/*
* this function returns the origin of the screen identified by
* fgDisplay.pDisplay.DisplayName, and 0 otherwise.
* This is used in fgOpenWindow to open the gamemode window on the screen
* this function returns the origin of the screen identified by
* fgDisplay.pDisplay.DisplayName, and 0 otherwise.
* This is used in fgOpenWindow to open the gamemode window on the screen
@@
-570,7
+570,7
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
WNDCLASS wc;
DWORD flags = 0;
DWORD exFlags = 0;
WNDCLASS wc;
DWORD flags = 0;
DWORD exFlags = 0;
- ATOM atom;
+ BOOL atom;
/* Grab the window class we have registered on glutInit(): */
atom = GetClassInfo( fgDisplay.pDisplay.Instance, _T("FREEGLUT"), &wc );
/* Grab the window class we have registered on glutInit(): */
atom = GetClassInfo( fgDisplay.pDisplay.Instance, _T("FREEGLUT"), &wc );
@@
-727,9
+727,9
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
/* Enable multitouch: additional flag TWF_FINETOUCH, TWF_WANTPALM */
#ifdef WM_TOUCH
/* Enable multitouch: additional flag TWF_FINETOUCH, TWF_WANTPALM */
#ifdef WM_TOUCH
- if (fghRegisterTouchWindow == (pRegisterTouchWindow)0xDEADBEEF)
- fghRegisterTouchWindow = (pRegisterTouchWindow)GetProcAddress(GetModuleHandle("user32"),"RegisterTouchWindow");
- if (fghRegisterTouchWindow)
+ if (fghRegisterTouchWindow == (pRegisterTouchWindow)0xDEADBEEF)
+ fghRegisterTouchWindow = (pRegisterTouchWindow)GetProcAddress(GetModuleHandle("user32"),"RegisterTouchWindow");
+ if (fghRegisterTouchWindow)
fghRegisterTouchWindow( window->Window.Handle, TWF_FINETOUCH | TWF_WANTPALM );
#endif
fghRegisterTouchWindow( window->Window.Handle, TWF_FINETOUCH | TWF_WANTPALM );
#endif
@@
-787,6
+787,15
@@
void fgPlatformCloseWindow( SFG_Window* window )
free(window->State.pWState.IconTitle);
}
free(window->State.pWState.IconTitle);
}
+/*
+ * Hide's specified window. For windows, currently only used
+ * to immediately hide menu windows...
+ */
+void fgPlatformHideWindow( SFG_Window* window )
+{
+ ShowWindow(window->Window.Handle, SW_HIDE);
+}
+
/*
* Set the current window's title
/*
* Set the current window's title