Debian Codegraph @

tools/wgl.h

raw symbols SCIP
1 /* These are function prototypes and constants needed for WGL. Derived
2 * from WinGDI.h and gl/GL.h in Visual Studio .NET (7).
3 *
4 * $Id: $
5 */
6
7 #ifndef WGL_H
8 #define WGL_H
9
10 #define WINAPI
11 #define WINGDIAPI
12 #define FAR
13 #define NEAR
14 #define CONST const
15
16
17 typedef unsigned int GLenum;
18 typedef unsigned char GLboolean;
19 typedef unsigned int GLbitfield;
20 typedef signed char GLbyte;
21 typedef short GLshort;
22 typedef int GLint;
23 typedef int GLsizei;
24 typedef unsigned char GLubyte;
25 typedef unsigned short GLushort;
26 typedef unsigned int GLuint;
27 typedef float GLfloat;
28 typedef float GLclampf;
29 typedef double GLdouble;
30 typedef double GLclampd;
31 typedef void GLvoid;
32
33 typedef signed char INT8, *PINT8;
34 typedef signed short INT16, *PINT16;
35 typedef signed int INT32, *PINT32;
36 typedef unsigned char UINT8, *PUINT8;
37 typedef unsigned short UINT16, *PUINT16;
38 typedef unsigned int UINT32, *PUINT32;
39 typedef signed int LONG32, *PLONG32;
40 typedef unsigned int ULONG32, *PULONG32;
41 typedef unsigned int DWORD32, *PDWORD32;
42 typedef long long int INT64, *PINT64;
43 typedef unsigned long long int UINT64, *PUINT64;
44
45 typedef void VOID, *LPVOID;
46 typedef const char *LPCSTR;
47 typedef char CHAR;
48 typedef unsigned char BYTE;
49 typedef unsigned short WORD, USHORT;
50 typedef unsigned int UINT;
51 typedef int INT, *INT_PTR;
52 typedef long BOOL;
53 typedef long LONG;
54 typedef unsigned long DWORD;
55 typedef float FLOAT;
56 typedef DWORD COLORREF, *LPCOLORREF;
57
58 typedef void *HANDLE;
59 #define DECLARE_HANDLE(name) typedef HANDLE name
60 DECLARE_HANDLE(HGLRC);
61 DECLARE_HANDLE(HDC);
62
63 typedef INT_PTR (WINAPI *PROC)();
64
65 WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC, HGLRC, UINT);
66 WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
67 WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
68 WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
69 WINGDIAPI HGLRC WINAPI wglGetCurrentContext();
70 WINGDIAPI HDC WINAPI wglGetCurrentDC();
71 WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
72 WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC, HGLRC);
73 WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC);
74 WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD);
75 WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
76 WINGDIAPI BOOL WINAPI SwapBuffers(HDC);
77
78 typedef struct _POINTFLOAT {
79 FLOAT x;
80 FLOAT y;
81 } POINTFLOAT, *PPOINTFLOAT;
82
83 typedef struct _GLYPHMETRICSFLOAT {
84 FLOAT gmfBlackBoxX;
85 FLOAT gmfBlackBoxY;
86 POINTFLOAT gmfptGlyphOrigin;
87 FLOAT gmfCellIncX;
88 FLOAT gmfCellIncY;
89 } GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, FAR *LPGLYPHMETRICSFLOAT;
90
91 #define WGL_FONT_LINES 0
92 #define WGL_FONT_POLYGONS 1
93 WINGDIAPI BOOL WINAPI wglUseFontOutlinesA(HDC, DWORD, DWORD, DWORD, FLOAT,
94 FLOAT, int, LPGLYPHMETRICSFLOAT);
95 WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC, DWORD, DWORD, DWORD, FLOAT,
96 FLOAT, int, LPGLYPHMETRICSFLOAT);
97
98 /* Layer plane descriptor */
99 typedef struct tagLAYERPLANEDESCRIPTOR { // lpd
100 WORD nSize;
101 WORD nVersion;
102 DWORD dwFlags;
103 BYTE iPixelType;
104 BYTE cColorBits;
105 BYTE cRedBits;
106 BYTE cRedShift;
107 BYTE cGreenBits;
108 BYTE cGreenShift;
109 BYTE cBlueBits;
110 BYTE cBlueShift;
111 BYTE cAlphaBits;
112 BYTE cAlphaShift;
113 BYTE cAccumBits;
114 BYTE cAccumRedBits;
115 BYTE cAccumGreenBits;
116 BYTE cAccumBlueBits;
117 BYTE cAccumAlphaBits;
118 BYTE cDepthBits;
119 BYTE cStencilBits;
120 BYTE cAuxBuffers;
121 BYTE iLayerPlane;
122 BYTE bReserved;
123 COLORREF crTransparent;
124 } LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, FAR *LPLAYERPLANEDESCRIPTOR;
125
126 /* LAYERPLANEDESCRIPTOR flags */
127 #define LPD_DOUBLEBUFFER 0x00000001
128 #define LPD_STEREO 0x00000002
129 #define LPD_SUPPORT_GDI 0x00000010
130 #define LPD_SUPPORT_OPENGL 0x00000020
131 #define LPD_SHARE_DEPTH 0x00000040
132 #define LPD_SHARE_STENCIL 0x00000080
133 #define LPD_SHARE_ACCUM 0x00000100
134 #define LPD_SWAP_EXCHANGE 0x00000200
135 #define LPD_SWAP_COPY 0x00000400
136 #define LPD_TRANSPARENT 0x00001000
137
138 #define LPD_TYPE_RGBA 0
139 #define LPD_TYPE_COLORINDEX 1
140
141 /* wglSwapLayerBuffers flags */
142 #define WGL_SWAP_MAIN_PLANE 0x00000001
143 #define WGL_SWAP_OVERLAY1 0x00000002
144 #define WGL_SWAP_OVERLAY2 0x00000004
145 #define WGL_SWAP_OVERLAY3 0x00000008
146 #define WGL_SWAP_OVERLAY4 0x00000010
147 #define WGL_SWAP_OVERLAY5 0x00000020
148 #define WGL_SWAP_OVERLAY6 0x00000040
149 #define WGL_SWAP_OVERLAY7 0x00000080
150 #define WGL_SWAP_OVERLAY8 0x00000100
151 #define WGL_SWAP_OVERLAY9 0x00000200
152 #define WGL_SWAP_OVERLAY10 0x00000400
153 #define WGL_SWAP_OVERLAY11 0x00000800
154 #define WGL_SWAP_OVERLAY12 0x00001000
155 #define WGL_SWAP_OVERLAY13 0x00002000
156 #define WGL_SWAP_OVERLAY14 0x00004000
157 #define WGL_SWAP_OVERLAY15 0x00008000
158 #define WGL_SWAP_UNDERLAY1 0x00010000
159 #define WGL_SWAP_UNDERLAY2 0x00020000
160 #define WGL_SWAP_UNDERLAY3 0x00040000
161 #define WGL_SWAP_UNDERLAY4 0x00080000
162 #define WGL_SWAP_UNDERLAY5 0x00100000
163 #define WGL_SWAP_UNDERLAY6 0x00200000
164 #define WGL_SWAP_UNDERLAY7 0x00400000
165 #define WGL_SWAP_UNDERLAY8 0x00800000
166 #define WGL_SWAP_UNDERLAY9 0x01000000
167 #define WGL_SWAP_UNDERLAY10 0x02000000
168 #define WGL_SWAP_UNDERLAY11 0x04000000
169 #define WGL_SWAP_UNDERLAY12 0x08000000
170 #define WGL_SWAP_UNDERLAY13 0x10000000
171 #define WGL_SWAP_UNDERLAY14 0x20000000
172 #define WGL_SWAP_UNDERLAY15 0x40000000
173
174 WINGDIAPI BOOL WINAPI wglDescribeLayerPlane(HDC, int, int, UINT,
175 LPLAYERPLANEDESCRIPTOR);
176 WINGDIAPI int WINAPI wglSetLayerPaletteEntries(HDC, int, int, int,
177 CONST COLORREF *);
178 WINGDIAPI int WINAPI wglGetLayerPaletteEntries(HDC, int, int, int,
179 COLORREF *);
180 WINGDIAPI BOOL WINAPI wglRealizeLayerPalette(HDC, int, BOOL);
181 WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC, UINT);
182
183 typedef struct _WGLSWAP
184 {
185 HDC hdc;
186 UINT uiFlags;
187 } WGLSWAP, *PWGLSWAP, FAR *LPWGLSWAP;
188
189 #define WGL_SWAPMULTIPLE_MAX 16
190
191 WINGDIAPI DWORD WINAPI wglSwapMultipleBuffers(UINT, CONST WGLSWAP *);
192
193 typedef struct tagRECT
194 {
195 LONG left;
196 LONG top;
197 LONG right;
198 LONG bottom;
199 } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
200
201 #endif /* WGL_H */