Merge branch 'xa_branch'
[mesa.git] / include / GL / mesa_wgl.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 3.1
4 *
5 * Copyright (C) 1999 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 /* prototypes for the Mesa WGL functions */
27 /* relocated here so that I could make GLUT get them properly */
28
29 #ifndef _mesa_wgl_h_
30 #define _mesa_wgl_h_
31
32 #if defined(__MINGW32__)
33 # define __W32API_USE_DLLIMPORT__
34 #endif
35
36 #include <GL/gl.h>
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42
43 #ifndef WGLAPI
44 #define WGLAPI GLAPI
45 #endif
46
47 #if defined(__MINGW32__)
48 # ifndef WIN32_LEAN_AND_MEAN
49 # define WIN32_LEAN_AND_MEAN 1
50 # endif
51 # include <windows.h>
52 #endif
53
54
55 #if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
56 #ifndef _GNU_H_WINDOWS32_FUNCTIONS
57 # ifdef UNICODE
58 # define wglUseFontBitmaps wglUseFontBitmapsW
59 # define wglUseFontOutlines wglUseFontOutlinesW
60 # else
61 # define wglUseFontBitmaps wglUseFontBitmapsA
62 # define wglUseFontOutlines wglUseFontOutlinesA
63 # endif /* !UNICODE */
64 #endif /* _GNU_H_WINDOWS32_FUNCTIONS */
65 typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
66 typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
67 typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
68 #endif
69
70
71 #ifdef _MSC_VER
72 # pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
73 # pragma warning( push )
74 # pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
75 #endif
76
77
78 WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
79 WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
80 WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
81 WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
82 WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
83
84 WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
85 WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
86 WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
87 WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
88 WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
89 WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
90 WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
91 WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
92 WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
93 WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
94 WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
95 WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
96 WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
97 WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
98 WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
99 WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
100 WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
101 WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
102
103 #ifndef __MINGW32__
104 WGLAPI int GLAPIENTRY SwapBuffers(HDC);
105 WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
106 WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
107 WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
108 WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
109 #endif
110
111
112 #ifdef _MSC_VER
113 # pragma warning( pop )
114 #endif
115
116 #ifdef __cplusplus
117 }
118 #endif
119
120
121 #endif /* _mesa_wgl_h_ */