From 7df06e801457cb1831699ad825ec43b6f13b893f Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Mon, 8 Nov 2010 04:44:09 +0100
Subject: Changed files wingdi.h/winwgl.h with content from w64 mingw-runtime
 package's mingw64/x86_64-w64-mingw32/include/wingdi.h (Public Domain) ; Fix
 wglext.h RECT

---
 make/stub_includes/opengl/GL/wglext.h |   7 ++
 make/stub_includes/win32/wingdi.h     | 172 +++++++++++++++++-----------------
 make/stub_includes/win32/winwgl.h     |  14 +--
 3 files changed, 99 insertions(+), 94 deletions(-)

(limited to 'make/stub_includes')

diff --git a/make/stub_includes/opengl/GL/wglext.h b/make/stub_includes/opengl/GL/wglext.h
index a34c63c43..4898ce4d9 100644
--- a/make/stub_includes/opengl/GL/wglext.h
+++ b/make/stub_includes/opengl/GL/wglext.h
@@ -387,6 +387,13 @@ DECLARE_HANDLE(HPBUFFEREXT);
 #ifndef SKIP_WGL_HANDLE_DEFINITIONS
 DECLARE_HANDLE(HGPUNV);
 #endif /* !SKIP_WGL_HANDLE_DEFINITIONS */
+typedef struct tagRECT {
+    LONG left;
+    LONG top;
+    LONG right;
+    LONG bottom;
+} RECT;
+
 typedef struct _GPU_DEVICE {
     DWORD  cb;
     CHAR   DeviceName[32];
diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h
index 4a034e81c..e97826e05 100644
--- a/make/stub_includes/win32/wingdi.h
+++ b/make/stub_includes/win32/wingdi.h
@@ -1,48 +1,50 @@
-/*
- * Essential wgl and supporting routines and data structures extracted
- * from WINGDI.H.
+/**
+ *
+ * This file is derived from w64 mingw-runtime package's mingw64/x86_64-w64-mingw32/include/wingdi.h file
+ * and states: 
  *
- * Copyright (c) 1985-1997, Microsoft Corp. All rights reserved.
+ *     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 + winwgl.h) were made by the JogAmp Community, 2010
  */
 
 #ifndef WGL_GDI_VERSION_1_X
 
-/**
-typedef struct tagRECT
-    {
+typedef struct tagRECT {
     LONG left;
     LONG top;
     LONG right;
     LONG bottom;
-    } 	RECT; */
+} RECT;
 
 typedef struct tagRGBQUAD {
-        BYTE    rgbBlue;
-        BYTE    rgbGreen;
-        BYTE    rgbRed;
-        BYTE    rgbReserved;
+    BYTE rgbBlue;
+    BYTE rgbGreen;
+    BYTE rgbRed;
+    BYTE rgbReserved;
 } RGBQUAD;
-typedef RGBQUAD FAR* LPRGBQUAD;
-
-typedef struct tagBITMAPINFOHEADER{
-        DWORD      biSize;
-        LONG       biWidth;
-        LONG       biHeight;
-        WORD       biPlanes;
-        WORD       biBitCount;
-        DWORD      biCompression;
-        DWORD      biSizeImage;
-        LONG       biXPelsPerMeter;
-        LONG       biYPelsPerMeter;
-        DWORD      biClrUsed;
-        DWORD      biClrImportant;
-} BITMAPINFOHEADER, FAR *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;
+
+typedef RGBQUAD *LPRGBQUAD;
+
+typedef struct tagBITMAPINFOHEADER {
+    DWORD biSize;
+    LONG biWidth;
+    LONG biHeight;
+    WORD biPlanes;
+    WORD biBitCount;
+    DWORD biCompression;
+    DWORD biSizeImage;
+    LONG biXPelsPerMeter;
+    LONG biYPelsPerMeter;
+    DWORD biClrUsed;
+    DWORD biClrImportant;
+} BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER;
 
 typedef struct tagBITMAPINFO {
-    BITMAPINFOHEADER    bmiHeader;
-    RGBQUAD             bmiColors[1];
-} BITMAPINFO, FAR *LPBITMAPINFO, *PBITMAPINFO;
+    BITMAPINFOHEADER bmiHeader;
+    RGBQUAD bmiColors[1];
+} BITMAPINFO,*LPBITMAPINFO,*PBITMAPINFO;
 
 /* constants for the biCompression field */
 #define BI_RGB        0
@@ -55,66 +57,60 @@ typedef struct tagBITMAPINFO {
 #define DIB_RGB_COLORS      0 /* color table in RGBs */
 #define DIB_PAL_COLORS      1 /* color table in palette indices */
 
-/* Pixel format descriptor */
-typedef struct tagPIXELFORMATDESCRIPTOR
-{
-    WORD  nSize;
-    WORD  nVersion;
+typedef struct tagPIXELFORMATDESCRIPTOR {
+    WORD nSize;
+    WORD nVersion;
     DWORD dwFlags;
-    BYTE  iPixelType;
-    BYTE  cColorBits;
-    BYTE  cRedBits;
-    BYTE  cRedShift;
-    BYTE  cGreenBits;
-    BYTE  cGreenShift;
-    BYTE  cBlueBits;
-    BYTE  cBlueShift;
-    BYTE  cAlphaBits;
-    BYTE  cAlphaShift;
-    BYTE  cAccumBits;
-    BYTE  cAccumRedBits;
-    BYTE  cAccumGreenBits;
-    BYTE  cAccumBlueBits;
-    BYTE  cAccumAlphaBits;
-    BYTE  cDepthBits;
-    BYTE  cStencilBits;
-    BYTE  cAuxBuffers;
-    BYTE  iLayerType;
-    BYTE  bReserved;
+    BYTE iPixelType;
+    BYTE cColorBits;
+    BYTE cRedBits;
+    BYTE cRedShift;
+    BYTE cGreenBits;
+    BYTE cGreenShift;
+    BYTE cBlueBits;
+    BYTE cBlueShift;
+    BYTE cAlphaBits;
+    BYTE cAlphaShift;
+    BYTE cAccumBits;
+    BYTE cAccumRedBits;
+    BYTE cAccumGreenBits;
+    BYTE cAccumBlueBits;
+    BYTE cAccumAlphaBits;
+    BYTE cDepthBits;
+    BYTE cStencilBits;
+    BYTE cAuxBuffers;
+    BYTE iLayerType;
+    BYTE bReserved;
     DWORD dwLayerMask;
     DWORD dwVisibleMask;
     DWORD dwDamageMask;
-} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, FAR *LPPIXELFORMATDESCRIPTOR;
-
-/* pixel types */
-#define PFD_TYPE_RGBA        0
-#define PFD_TYPE_COLORINDEX  1
-
-/* layer types */
-#define PFD_MAIN_PLANE       0
-#define PFD_OVERLAY_PLANE    1
-#define PFD_UNDERLAY_PLANE   (-1)
-
-/* PIXELFORMATDESCRIPTOR flags */
-#define PFD_DOUBLEBUFFER            0x00000001
-#define PFD_STEREO                  0x00000002
-#define PFD_DRAW_TO_WINDOW          0x00000004
-#define PFD_DRAW_TO_BITMAP          0x00000008
-#define PFD_SUPPORT_GDI             0x00000010
-#define PFD_SUPPORT_OPENGL          0x00000020
-#define PFD_GENERIC_FORMAT          0x00000040
-#define PFD_NEED_PALETTE            0x00000080
-#define PFD_NEED_SYSTEM_PALETTE     0x00000100
-#define PFD_SWAP_EXCHANGE           0x00000200
-#define PFD_SWAP_COPY               0x00000400
-#define PFD_SWAP_LAYER_BUFFERS      0x00000800
-#define PFD_GENERIC_ACCELERATED     0x00001000
-#define PFD_SUPPORT_DIRECTDRAW      0x00002000
-
-/* PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only */
-#define PFD_DEPTH_DONTCARE          0x20000000
-#define PFD_DOUBLEBUFFER_DONTCARE   0x40000000
-#define PFD_STEREO_DONTCARE         0x80000000
+} PIXELFORMATDESCRIPTOR,*PPIXELFORMATDESCRIPTOR,*LPPIXELFORMATDESCRIPTOR;
+
+#define PFD_TYPE_RGBA 0
+#define PFD_TYPE_COLORINDEX 1
+
+#define PFD_MAIN_PLANE 0
+#define PFD_OVERLAY_PLANE 1
+#define PFD_UNDERLAY_PLANE (-1)
+
+#define PFD_DOUBLEBUFFER 0x00000001
+#define PFD_STEREO 0x00000002
+#define PFD_DRAW_TO_WINDOW 0x00000004
+#define PFD_DRAW_TO_BITMAP 0x00000008
+#define PFD_SUPPORT_GDI 0x00000010
+#define PFD_SUPPORT_OPENGL 0x00000020
+#define PFD_GENERIC_FORMAT 0x00000040
+#define PFD_NEED_PALETTE 0x00000080
+#define PFD_NEED_SYSTEM_PALETTE 0x00000100
+#define PFD_SWAP_EXCHANGE 0x00000200
+#define PFD_SWAP_COPY 0x00000400
+#define PFD_SWAP_LAYER_BUFFERS 0x00000800
+#define PFD_GENERIC_ACCELERATED 0x00001000
+#define PFD_SUPPORT_DIRECTDRAW 0x00002000
+
+#define PFD_DEPTH_DONTCARE 0x20000000
+#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000
+#define PFD_STEREO_DONTCARE 0x80000000
 
 /* OpenGL error codes (from winerror.h) */
 /* FIXME: these should have a trailing "L" but apparently PCPP doesn't handle that syntax */
@@ -165,7 +161,7 @@ WINGDIAPI BOOL  WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
 #ifdef UNICODE
 #define wglUseFontBitmaps  wglUseFontBitmapsW
 #else
-#define wglUseFontBitmaps  wglUseFontBitmapsA
+#define wglUseFontBitmaps wglUseFontBitmapsA
 #endif // !UNICODE
 */
 
@@ -179,7 +175,7 @@ WINGDIAPI HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ);
 // Routines for creation of a dummy window, device context and OpenGL
 // context for the purposes of getting wglChoosePixelFormatARB and
 // associated routines
-HWND                   CreateDummyWindow( int x, int y, int width, int height ) ;
+           HWND        CreateDummyWindow( int x, int y, int width, int height ) ;
 WINUSERAPI BOOL WINAPI ShowWindow(HWND hWnd, int nCmdShow);
 WINUSERAPI HDC  WINAPI GetDC(HWND);
 WINUSERAPI int  WINAPI ReleaseDC(HWND hWnd, HDC hDC);
diff --git a/make/stub_includes/win32/winwgl.h b/make/stub_includes/win32/winwgl.h
index 27b43f915..5e9cc2fa0 100644
--- a/make/stub_includes/win32/winwgl.h
+++ b/make/stub_includes/win32/winwgl.h
@@ -1,9 +1,12 @@
-/*
- * Essential wgl and supporting routines and data structures extracted
- * from WINGDI.H.
+/**
  *
- * Copyright (c) 1985-1997, Microsoft Corp. All rights reserved.
+ * 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 + winwgl.h) were made by the JogAmp Community, 2010
  */
 
 #ifndef WGL_GDI_VERSION_1_X
@@ -46,8 +49,7 @@
 #ifndef WGL_GDI_VERSION_1_X
 #define WGL_GDI_VERSION_1_X
 
-// OpenGL-related routines
-WINGDIAPI BOOL  WINAPI wglCopyContext(HGLRC, HGLRC, UINT);
+WINGDIAPI BOOL  WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
 WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
 WINGDIAPI BOOL  WINAPI wglDeleteContext(HGLRC);
 WINGDIAPI HGLRC WINAPI wglGetCurrentContext(VOID);
-- 
cgit v1.2.3