summaryrefslogtreecommitdiffstats
path: root/make/stub_includes/win32/gluegen/winwgl.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-10-01 23:36:54 +0200
committerSven Gothel <[email protected]>2015-10-01 23:36:54 +0200
commita9b3f6d13b45284e81b91a1e1e31b35c31dd3670 (patch)
tree1a2550bc440cb27476d9d9a328600dc4b5fb296b /make/stub_includes/win32/gluegen/winwgl.h
parent4b0be44f54a7d89192c03725a16e396eba98a712 (diff)
Bug 1232 - NEWT Translucent Decorated Windows Not Working On Windows >= 8 (Lack of Aero / Blur )
Adopting new undocumented user32.dll Windows >= 8 API: - SetWindowCompositionAttribute / AccentState See: - <https://github.com/riverar/sample-win10-aeroglass/blob/master/MainWindow.xaml.cs> - <http://withinrafael.com/adding-the-aero-glass-blur-to-your-windows-10-apps/> - <http://undoc.airesoft.co.uk/user32.dll/SetWindowCompositionAttribute.php> - <http://undoc.airesoft.co.uk/user32.dll/GetWindowCompositionAttribute.php> +++ Cleaning up WindowsDWM.h, use on header file (in stub_includes) for GlueGen and implementation. +++ Merge java implementation within GDIUtil.DwmSetupTranslucency(..), to be utilized by NEWT and JOGL. NEWT issues GDIUtil.DwmSetupTranslucency(..) at creation and when toggling decoration. Toggling decoration on Win >= 8 leads to lost of translucency when returning to decorated window. On Win 7, this may work .. but is also buggy. +++ Followup patch is needed for NEWT to _not_ clear the background!
Diffstat (limited to 'make/stub_includes/win32/gluegen/winwgl.h')
-rw-r--r--make/stub_includes/win32/gluegen/winwgl.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/make/stub_includes/win32/gluegen/winwgl.h b/make/stub_includes/win32/gluegen/winwgl.h
new file mode 100644
index 000000000..ca743c9fe
--- /dev/null
+++ b/make/stub_includes/win32/gluegen/winwgl.h
@@ -0,0 +1,91 @@
+/**
+ *
+ * This file is derived from w64 mingw-runtime package's mingw64/x86_64-w64-mingw32/include/wingdi.h file
+ * and states:
+ *
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ *
+ * Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012
+ */
+
+/**
+ * These are standard include replacement files
+ * for gluegen processing only!
+ */
+#ifndef __GLUEGEN__
+ #error "This file is intended to be used for GlueGen code generation, not native compilation.
+#endif
+
+#ifndef WGL_GDI_VERSION_1_X
+
+#include "wingdi_types.h"
+
+/* layer types */
+#define WGL_SWAP_MAIN_PLANE 1
+#define WGL_SWAP_OVERLAY1 2
+#define WGL_SWAP_OVERLAY2 4
+#define WGL_SWAP_OVERLAY3 8
+#define WGL_SWAP_OVERLAY4 16
+#define WGL_SWAP_OVERLAY5 32
+#define WGL_SWAP_OVERLAY6 64
+#define WGL_SWAP_OVERLAY7 128
+#define WGL_SWAP_OVERLAY8 256
+#define WGL_SWAP_OVERLAY9 512
+#define WGL_SWAP_OVERLAY10 1024
+#define WGL_SWAP_OVERLAY11 2048
+#define WGL_SWAP_OVERLAY12 4096
+#define WGL_SWAP_OVERLAY13 8192
+#define WGL_SWAP_OVERLAY14 16384
+#define WGL_SWAP_OVERLAY15 32768
+#define WGL_SWAP_UNDERLAY1 65536
+#define WGL_SWAP_UNDERLAY2 0x20000
+#define WGL_SWAP_UNDERLAY3 0x40000
+#define WGL_SWAP_UNDERLAY4 0x80000
+#define WGL_SWAP_UNDERLAY5 0x100000
+#define WGL_SWAP_UNDERLAY6 0x200000
+#define WGL_SWAP_UNDERLAY7 0x400000
+#define WGL_SWAP_UNDERLAY8 0x800000
+#define WGL_SWAP_UNDERLAY9 0x1000000
+#define WGL_SWAP_UNDERLAY10 0x2000000
+#define WGL_SWAP_UNDERLAY11 0x4000000
+#define WGL_SWAP_UNDERLAY12 0x8000000
+#define WGL_SWAP_UNDERLAY13 0x10000000
+#define WGL_SWAP_UNDERLAY14 0x20000000
+#define WGL_SWAP_UNDERLAY15 0x40000000
+
+#endif /* WGL_GDI_VERSION_1_X */
+
+#ifndef WGL_GDI_VERSION_1_X
+#define WGL_GDI_VERSION_1_X
+
+WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
+WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
+WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
+WINGDIAPI HGLRC WINAPI wglGetCurrentContext(VOID);
+WINGDIAPI HDC WINAPI wglGetCurrentDC(VOID);
+WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC, HGLRC);
+WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC);
+WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
+WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
+
+// Runtime Link GDI/OpenGL-related routines
+WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, CONST PIXELFORMATDESCRIPTOR *);
+WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
+WINGDIAPI int WINAPI wglGetPixelFormat(HDC);
+WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
+WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC);
+
+/* --- FIXME: need to handle these entry points!
+WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
+WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD);
+WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
+#ifdef UNICODE
+#define wglUseFontBitmaps wglUseFontBitmapsW
+#else
+#define wglUseFontBitmaps wglUseFontBitmapsA
+#endif // !UNICODE
+*/
+
+#endif /* WGL_GDI_VERSION_1_X */
+