diff options
Diffstat (limited to 'make/stub_includes')
-rw-r--r-- | make/stub_includes/jni/macosx/jawt_md.h | 20 | ||||
-rw-r--r-- | make/stub_includes/macosx/AppKit/NSOpenGL.h | 3 | ||||
-rw-r--r-- | make/stub_includes/macosx/AppKit/NSOpenGLLayer.h | 1 | ||||
-rw-r--r-- | make/stub_includes/macosx/AppKit/NSOpenGLView.h | 1 | ||||
-rw-r--r-- | make/stub_includes/macosx/OpenGL/CGLDevice.h | 2 | ||||
-rw-r--r-- | make/stub_includes/macosx/OpenGL/OpenGL.h | 33 | ||||
-rw-r--r-- | make/stub_includes/macosx/QuartzCore/CALayer.h | 1 | ||||
-rw-r--r-- | make/stub_includes/opengl/macosx-window-system.h | 70 | ||||
-rw-r--r-- | make/stub_includes/win32/windows.h | 10 | ||||
-rw-r--r-- | make/stub_includes/win32/wingdi.h | 167 | ||||
-rw-r--r-- | make/stub_includes/win32/wingdi_types.h | 166 | ||||
-rw-r--r-- | make/stub_includes/win32/winwgl.h | 11 |
12 files changed, 269 insertions, 216 deletions
diff --git a/make/stub_includes/jni/macosx/jawt_md.h b/make/stub_includes/jni/macosx/jawt_md.h index aca47f66e..3a371af0d 100644 --- a/make/stub_includes/jni/macosx/jawt_md.h +++ b/make/stub_includes/jni/macosx/jawt_md.h @@ -9,17 +9,35 @@ #include <jawt.h> #include <AppKit/NSView.h> +#include <QuartzCore/CALayer.h> #ifdef __cplusplus extern "C" { #endif +/** + * JAWT_DrawingSurfaceInfo.getPlatformInfo() + * + * Only if not JAWT_SurfaceLayers, see below! + */ typedef struct JAWT_MacOSXDrawingSurfaceInfo { - NSView *cocoaViewRef; // the view is guaranteed to be valid only for the duration of Component.paint method + /** the view is guaranteed to be valid only for the duration of Component.paint method */ + NSView *cocoaViewRef; } JAWT_MacOSXDrawingSurfaceInfo; +/** + * JAWT_DrawingSurfaceInfo.getPlatformInfo() + * + * >= 10.6.4 if JAWT_MACOSX_USE_CALAYER is set in JAWT version + */ +typedef struct JAWT_SurfaceLayers +{ + CALayer *layer; +} +JAWT_SurfaceLayers; + #ifdef __cplusplus } #endif diff --git a/make/stub_includes/macosx/AppKit/NSOpenGL.h b/make/stub_includes/macosx/AppKit/NSOpenGL.h new file mode 100644 index 000000000..1b7656dc1 --- /dev/null +++ b/make/stub_includes/macosx/AppKit/NSOpenGL.h @@ -0,0 +1,3 @@ +typedef struct _NSOpenGLPixelFormat NSOpenGLPixelFormat; +typedef struct _NSOpenGLContext NSOpenGLContext; +typedef struct _NSOpenGLPixelBuffer NSOpenGLPixelBuffer; diff --git a/make/stub_includes/macosx/AppKit/NSOpenGLLayer.h b/make/stub_includes/macosx/AppKit/NSOpenGLLayer.h new file mode 100644 index 000000000..2e5e81a68 --- /dev/null +++ b/make/stub_includes/macosx/AppKit/NSOpenGLLayer.h @@ -0,0 +1 @@ +typedef struct _NSOpenGLLayer NSOpenGLLayer; diff --git a/make/stub_includes/macosx/AppKit/NSOpenGLView.h b/make/stub_includes/macosx/AppKit/NSOpenGLView.h new file mode 100644 index 000000000..6492287df --- /dev/null +++ b/make/stub_includes/macosx/AppKit/NSOpenGLView.h @@ -0,0 +1 @@ +typedef struct _NSOpenGLView NSOpenGLView; diff --git a/make/stub_includes/macosx/OpenGL/CGLDevice.h b/make/stub_includes/macosx/OpenGL/CGLDevice.h new file mode 100644 index 000000000..1d4170975 --- /dev/null +++ b/make/stub_includes/macosx/OpenGL/CGLDevice.h @@ -0,0 +1,2 @@ +typedef struct _cglShareGroupObj* CGLShareGroupObj; + diff --git a/make/stub_includes/macosx/OpenGL/OpenGL.h b/make/stub_includes/macosx/OpenGL/OpenGL.h index 1a3ddf203..3347209b3 100644 --- a/make/stub_includes/macosx/OpenGL/OpenGL.h +++ b/make/stub_includes/macosx/OpenGL/OpenGL.h @@ -2,10 +2,13 @@ OpenGL.h to expose portions of the low-level CGL API to Java */ /* Typedefs to get things working */ -typedef struct _cglObj* CGLContextObj; -typedef struct _cglObj* CGLShareGroupObj; -typedef struct _cglObj* CGLPBufferObj; -typedef struct _cglObj* CGLPixelFormatObj; +typedef struct _cglContextObj* CGLContextObj; +typedef struct _cglPBufferObj* CGLPBufferObj; +typedef struct _cglPixelFormatObj* CGLPixelFormatObj; + +typedef int GLint; /* 4-byte signed */ +typedef unsigned int GLenum; +typedef int GLsizei; /* 4-byte signed */ /* ** Attribute names for CGLChoosePixelFormat and CGLDescribePixelFormat. @@ -105,7 +108,7 @@ typedef enum _CGLContextParameter { /* Pixel format manipulation */ CGLError CGLChoosePixelFormat(const CGLPixelFormatAttribute *attribs, CGLPixelFormatObj *pix, - long *npix); + GLint *npix); CGLError CGLDestroyPixelFormat(CGLPixelFormatObj pix); CGLPixelFormatObj CGLGetPixelFormat ( CGLContextObj ctx ); @@ -115,6 +118,8 @@ CGLError CGLCreateContext(CGLPixelFormatObj pix, CGLContextObj* ctx); void CGLReleaseContext(CGLContextObj ctx); CGLError CGLDestroyContext(CGLContextObj ctx); +CGLError CGLLockContext (CGLContextObj ctx); +CGLError CGLUnlockContext (CGLContextObj ctx); CGLError CGLSetCurrentContext(CGLContextObj ctx); CGLContextObj CGLGetCurrentContext (void); CGLError CGLFlushDrawable ( CGLContextObj ctx); @@ -123,16 +128,16 @@ CGLError CGLCopyContext ( CGLContextObj src, CGLContextObj dst, int mask ); CGLShareGroupObj CGLGetShareGroup(CGLContextObj ctx); -/* PBuffer manipulation */ -CGLError CGLCreatePBuffer(long width, - long height, - unsigned long target, - unsigned long internalFormat, - long max_level, +/* PBuffer manipulation (deprecated in 10.7) */ +CGLError CGLCreatePBuffer(GLsizei width, + GLsizei height, + GLenum target, + GLenum internalFormat, + GLint max_level, CGLPBufferObj* pbuffer); CGLError CGLDestroyPBuffer(CGLPBufferObj pbuffer); CGLError CGLSetPBuffer(CGLContextObj ctx, CGLPBufferObj pbuffer, - unsigned long face, - long level, - long screen); + GLenum face, + GLint level, + GLint screen); diff --git a/make/stub_includes/macosx/QuartzCore/CALayer.h b/make/stub_includes/macosx/QuartzCore/CALayer.h new file mode 100644 index 000000000..a5a6579a6 --- /dev/null +++ b/make/stub_includes/macosx/QuartzCore/CALayer.h @@ -0,0 +1 @@ +typedef struct _CALayer CALayer; diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h index 65d8e41f7..347de6299 100644 --- a/make/stub_includes/opengl/macosx-window-system.h +++ b/make/stub_includes/opengl/macosx-window-system.h @@ -7,55 +7,63 @@ compilation then the build fails. */ +#include <AppKit/NSView.h> +#include <AppKit/NSOpenGL.h> +#include <AppKit/NSOpenGLView.h> +#include <AppKit/NSOpenGLLayer.h> +#include <OpenGL/CGLDevice.h> +#include <OpenGL/OpenGL.h> + typedef int Bool; // CGL .. -void CGLQueryPixelFormat(void* pixelFormat, int* iattrs, int niattrs, int* ivalues); +void CGLQueryPixelFormat(CGLPixelFormatObj fmt, int* iattrs, int niattrs, int* ivalues); // NS .. -void* createPixelFormat(int* iattrs, int niattrs, int* ivalues); -void queryPixelFormat(void* pixelFormat, int* iattrs, int niattrs, int* ivalues); -void deletePixelFormat(void* pixelFormat); +NSOpenGLPixelFormat* createPixelFormat(int* iattrs, int niattrs, int* ivalues); +void queryPixelFormat(NSOpenGLPixelFormat* fmt, int* iattrs, int niattrs, int* ivalues); +void deletePixelFormat(NSOpenGLPixelFormat* fmt); // NS .. -void *getCurrentContext(void); -void *getNSView(void* nsContext); +NSOpenGLContext* getCurrentContext(void); +CGLContextObj getCGLContext(NSOpenGLContext* ctx); +NSView* getNSView(NSOpenGLContext* ctx); -void* createContext(void* shareContext, - void* nsView, - void* pixelFormat, +NSOpenGLContext* createContext(NSOpenGLContext* shareContext, + NSView* nsView, + Bool isBackingLayerView, + NSOpenGLPixelFormat* pixelFormat, Bool opaque, int* viewNotReady); -void *getCGLContext(void* nsContext); -Bool makeCurrentContext(void* nsContext); -Bool clearCurrentContext(void *nsContext); -Bool deleteContext(void* nsContext, Bool releaseOnMainThread); -Bool flushBuffer(void* nsContext); -void setContextOpacity(void* nsContext, int opacity); -void updateContext(void* nsContext); -void copyContext(void* destContext, void* srcContext, int mask); - -void* updateContextRegister(void* nsContext, void* nsView); +Bool makeCurrentContext(NSOpenGLContext* ctx); +Bool clearCurrentContext(NSOpenGLContext *ctx); +Bool deleteContext(NSOpenGLContext* ctx, Bool releaseOnMainThread); +Bool flushBuffer(NSOpenGLContext* ctx); +void setContextOpacity(NSOpenGLContext* ctx, int opacity); +void updateContext(NSOpenGLContext* ctx); +void copyContext(NSOpenGLContext* dest, NSOpenGLContext* src, int mask); + +void* updateContextRegister(NSOpenGLContext* ctx, NSView* view); Bool updateContextNeedsUpdate(void* updater); void updateContextUnregister(void* updater); -void* createPBuffer(int renderTarget, int internalFormat, int width, int height); -Bool destroyPBuffer(void* pBuffer); -void setContextPBuffer(void* nsContext, void* pBuffer); -void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer); +NSOpenGLPixelBuffer* createPBuffer(int renderTarget, int internalFormat, int width, int height); +Bool destroyPBuffer(NSOpenGLPixelBuffer* pBuffer); +void setContextPBuffer(NSOpenGLContext* ctx, NSOpenGLPixelBuffer* pBuffer); +void setContextTextureImageToPBuffer(NSOpenGLContext* ctx, NSOpenGLPixelBuffer* pBuffer, GLenum colorBuffer); + +// NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSView* view, Bool opaque); +NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSOpenGLPixelBuffer* pbuffer, Bool opaque, int texWidth, int texHeight); +void setNSOpenGLLayerSwapInterval(NSOpenGLLayer* layer, int interval); +void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer* layer, long to_ms); +void setNSOpenGLLayerNeedsDisplay(NSOpenGLLayer* glLayer); +void releaseNSOpenGLLayer(NSOpenGLLayer *glLayer); void* getProcAddress(const char *procName); -void setSwapInterval(void* nsContext, int interval); +void setSwapInterval(NSOpenGLContext* ctx, int interval); /* Gamma-related functionality */ Bool setGammaRamp(int tableSize, float* redRamp, float* greenRamp, float* blueRamp); void resetGammaRamp(); -/****************************************************************************************/ -/* Java2D/JOGL bridge support; need to be able to create pbuffers and - contexts using the CGL APIs to be able to share textures, etc. with - contexts created by Java2D/JOGL bridge, which are CGLContextObjs */ - -/* Pick up copies of CGL signatures from Mac OS X stub_includes/window-system-build directory */ -#include <OpenGL/OpenGL.h> diff --git a/make/stub_includes/win32/windows.h b/make/stub_includes/win32/windows.h index f2f3900ba..51ebbdcce 100644 --- a/make/stub_includes/win32/windows.h +++ b/make/stub_includes/win32/windows.h @@ -47,13 +47,3 @@ typedef HANDLE HPBUFFERARB; typedef HANDLE HPBUFFEREXT; typedef HANDLE HGPUNV; -typedef struct tagRECT { - LONG left; - LONG top; - LONG right; - LONG bottom; -} RECT; - -typedef RECT* PRECT; -typedef RECT* LPRECT; - diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h index 23ac428ca..2d3e33275 100644 --- a/make/stub_includes/win32/wingdi.h +++ b/make/stub_includes/win32/wingdi.h @@ -6,177 +6,24 @@ * 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 + * Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012 */ -#ifndef WGL_GDI_VERSION_1_X +#include "wingdi_types.h" -typedef struct tagRGBQUAD { - BYTE rgbBlue; - BYTE rgbGreen; - BYTE rgbRed; - BYTE rgbReserved; -} RGBQUAD; - -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,*LPBITMAPINFO,*PBITMAPINFO; - -/* constants for the biCompression field */ -#define BI_RGB 0 -#define BI_RLE8 1 -#define BI_RLE4 2 -#define BI_BITFIELDS 3 - -/* DIB color table identifiers */ - -#define DIB_RGB_COLORS 0 /* color table in RGBs */ -#define DIB_PAL_COLORS 1 /* color table in palette indices */ - -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; - DWORD dwLayerMask; - DWORD dwVisibleMask; - DWORD dwDamageMask; -} 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 - -/* error codes (from winerror.h) */ -/* FIXME: these should have a trailing "L" but apparently PCPP doesn't handle that syntax */ -#define ERROR_SUCCESS 0 -#define ERROR_INVALID_PIXEL_FORMAT 2000 -#define ERROR_NO_SYSTEM_RESOURCES 1450 -#define ERROR_INVALID_DATA 13 -#define ERROR_PROC_NOT_FOUND 127 -#define ERROR_INVALID_WINDOW_HANDLE 1400 - -/* - * ShowWindow() Commands - */ -#define SW_HIDE 0 -#define SW_SHOWNORMAL 1 -#define SW_NORMAL 1 -#define SW_SHOWMINIMIZED 2 -#define SW_SHOWMAXIMIZED 3 -#define SW_MAXIMIZE 3 -#define SW_SHOWNOACTIVATE 4 -#define SW_SHOW 5 -#define SW_MINIMIZE 6 -#define SW_SHOWMINNOACTIVE 7 -#define SW_SHOWNA 8 -#define SW_RESTORE 9 -#define SW_SHOWDEFAULT 10 -#define SW_FORCEMINIMIZE 11 -#define SW_MAX 11 - -/** - * GetObjectType() Command - */ -#define OBJ_PEN 1 -#define OBJ_BRUSH 2 -#define OBJ_DC 3 -#define OBJ_METADC 4 -#define OBJ_PAL 5 -#define OBJ_FONT 6 -#define OBJ_BITMAP 7 -#define OBJ_REGION 8 -#define OBJ_METAFILE 9 -#define OBJ_MEMDC 10 -#define OBJ_EXTPEN 11 -#define OBJ_ENHMETADC 12 -#define OBJ_ENHMETAFILE 13 -#define OBJ_COLORSPACE 14 - -#endif /* WGL_GDI_VERSION_1_X */ - -#ifndef WGL_GDI_VERSION_1_X -#define WGL_GDI_VERSION_1_X +#ifndef GDI_VERSION_1_X +#define GDI_VERSION_1_X // Windows routines WINBASEAPI DWORD WINAPI GetLastError(VOID); -// OpenGL-related routines +// GDI / ICD OpenGL-related routines WINGDIAPI int WINAPI ChoosePixelFormat(HDC, CONST PIXELFORMATDESCRIPTOR *); WINGDIAPI int WINAPI DescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); WINGDIAPI int WINAPI GetPixelFormat(HDC); WINGDIAPI BOOL WINAPI SetPixelFormat(HDC, int, CONST PIXELFORMATDESCRIPTOR *); WINGDIAPI BOOL WINAPI SwapBuffers(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 -*/ - // Routines related to bitmap creation for off-screen rendering WINGDIAPI HDC WINAPI CreateCompatibleDC(HDC); WINGDIAPI HBITMAP WINAPI CreateDIBSection(HDC, CONST BITMAPINFO *, UINT, VOID **, HANDLE, DWORD); @@ -195,6 +42,8 @@ WINUSERAPI HWND WINAPI WindowFromDC(HDC hDC); // avail in >= Win2k WINUSERAPI BOOL WINAPI GetClientRect(HWND hwnd, LPRECT lpRect); WINUSERAPI BOOL WINAPI DestroyWindow(HWND hWnd); WINUSERAPI DWORD WINAPI GetObjectType(HGDIOBJ h); +WINUSERAPI BOOL WINAPI IsWindowVisible(HWND hWnd); +WINUSERAPI BOOL WINAPI IsWindow(HWND hWnd); WINUSERAPI HANDLE WINAPI GetCurrentProcess(void); WINUSERAPI BOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask); @@ -205,5 +54,5 @@ WINUSERAPI BOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProces WINGDIAPI BOOL WINAPI GetDeviceGammaRamp(HDC,LPVOID); WINGDIAPI BOOL WINAPI SetDeviceGammaRamp(HDC,LPVOID); -#endif /* WGL_GDI_VERSION_1_X */ +#endif /* GDI_VERSION_1_X */ diff --git a/make/stub_includes/win32/wingdi_types.h b/make/stub_includes/win32/wingdi_types.h new file mode 100644 index 000000000..d23502cad --- /dev/null +++ b/make/stub_includes/win32/wingdi_types.h @@ -0,0 +1,166 @@ +/** + * + * 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 + */ + +#ifndef GDI_VERSION_1_X + +typedef struct tagRECT { + LONG left; + LONG top; + LONG right; + LONG bottom; +} RECT; + +typedef RECT* PRECT; +typedef RECT* LPRECT; + +typedef struct tagRGBQUAD { + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; +} RGBQUAD; + +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,*LPBITMAPINFO,*PBITMAPINFO; + +/* constants for the biCompression field */ +#define BI_RGB 0 +#define BI_RLE8 1 +#define BI_RLE4 2 +#define BI_BITFIELDS 3 + +/* DIB color table identifiers */ + +#define DIB_RGB_COLORS 0 /* color table in RGBs */ +#define DIB_PAL_COLORS 1 /* color table in palette indices */ + +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; + DWORD dwLayerMask; + DWORD dwVisibleMask; + DWORD dwDamageMask; +} 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 + +/* error codes (from winerror.h) */ +/* FIXME: these should have a trailing "L" but apparently PCPP doesn't handle that syntax */ +#define ERROR_SUCCESS 0 +#define ERROR_INVALID_PIXEL_FORMAT 2000 +#define ERROR_NO_SYSTEM_RESOURCES 1450 +#define ERROR_INVALID_DATA 13 +#define ERROR_PROC_NOT_FOUND 127 +#define ERROR_INVALID_WINDOW_HANDLE 1400 + +/* + * ShowWindow() Commands + */ +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 +#define SW_SHOWDEFAULT 10 +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 + +/** + * GetObjectType() Command + */ +#define OBJ_PEN 1 +#define OBJ_BRUSH 2 +#define OBJ_DC 3 +#define OBJ_METADC 4 +#define OBJ_PAL 5 +#define OBJ_FONT 6 +#define OBJ_BITMAP 7 +#define OBJ_REGION 8 +#define OBJ_METAFILE 9 +#define OBJ_MEMDC 10 +#define OBJ_EXTPEN 11 +#define OBJ_ENHMETADC 12 +#define OBJ_ENHMETAFILE 13 +#define OBJ_COLORSPACE 14 + +#endif /* GDI_VERSION_1_X */ + + diff --git a/make/stub_includes/win32/winwgl.h b/make/stub_includes/win32/winwgl.h index 5e9cc2fa0..c0dfb9bdb 100644 --- a/make/stub_includes/win32/winwgl.h +++ b/make/stub_includes/win32/winwgl.h @@ -6,9 +6,11 @@ * 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 + * Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012 */ +#include "wingdi_types.h" + #ifndef WGL_GDI_VERSION_1_X /* layer types */ @@ -59,6 +61,13 @@ 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); |