Commit, mostly of work from John:
[freeglut] / include / GL / freeglut_ext.h
1 #ifndef  __FREEGLUT_EXT_H__
2 #define  __FREEGLUT_EXT_H__
3
4 /*
5  * freeglut_ext.h
6  *
7  * The non-GLUT-compatible extensions to the freeglut library include file
8  *
9  * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
10  * Written by Pawel W. Olszta, <olszta@sourceforge.net>
11  * Creation date: Thu Dec 2 1999
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included
21  * in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
26  * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
27  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29  */
30
31 #ifdef __cplusplus
32     extern "C" {
33 #endif
34
35 /*
36  * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
37  */
38 #define GLUT_ACTION_EXIT                         0
39 #define GLUT_ACTION_GLUTMAINLOOP_RETURNS         1
40 #define GLUT_ACTION_CONTINUE_EXECUTION           2
41
42 /*
43  * Create a new rendering context when the user opens a new window?
44  */
45 #define GLUT_CREATE_NEW_CONTEXT                  0
46 #define GLUT_USE_CURRENT_CONTEXT                 1
47
48 /*
49  * GLUT API Extension macro definitions -- the glutGet parameters
50  */
51 #define  GLUT_ACTION_ON_WINDOW_CLOSE        0x01F9
52
53 #define  GLUT_WINDOW_BORDER_WIDTH           0x01FA
54 #define  GLUT_WINDOW_HEADER_HEIGHT          0x01FB
55
56 #define  GLUT_VERSION                       0x01FC
57
58 #define  GLUT_RENDERING_CONTEXT             0x01FD
59
60 /*
61  * Process loop function, see freeglut_main.c
62  */
63 FGAPI void    FGAPIENTRY glutMainLoopEvent( void );
64 FGAPI void    FGAPIENTRY glutLeaveMainLoop( void );
65
66 /*
67  * Window-specific callback functions, see freeglut_callbacks.c
68  */
69 FGAPI void    FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
70 FGAPI void    FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
71 FGAPI void    FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
72 /* A. Donev: Also a destruction callback for menus */
73 FGAPI void    FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );
74
75 /*
76  * State setting and retrieval functions, see freeglut_state.c
77  */
78 FGAPI void    FGAPIENTRY glutSetOption ( GLenum option_flag, int value ) ;
79 /* A.Donev: User-data manipulation */
80 FGAPI void*   FGAPIENTRY glutGetWindowData( void );
81 FGAPI void    FGAPIENTRY glutSetWindowData(void* data);
82 FGAPI void*   FGAPIENTRY glutGetMenuData( void );
83 FGAPI void    FGAPIENTRY glutSetMenuData(void* data);
84
85 /*
86  * Font stuff, see freeglut_font.c
87  */
88 FGAPI int     FGAPIENTRY glutBitmapHeight( void* font );
89 FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
90 FGAPI void    FGAPIENTRY glutBitmapString( void* font, const unsigned char *string );
91 FGAPI void    FGAPIENTRY glutStrokeString( void* font, const unsigned char *string );
92
93 /*
94  * Geometry functions, see freeglut_geometry.c
95  */
96 FGAPI void    FGAPIENTRY glutWireRhombicDodecahedron( void );
97 FGAPI void    FGAPIENTRY glutSolidRhombicDodecahedron( void );
98 FGAPI void    FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale ) ;
99 FGAPI void    FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale ) ;
100
101 /*
102  * Extension functions, see freeglut_ext.c
103  */
104 FGAPI void * FGAPIENTRY glutGetProcAddress( const char *procName );
105
106
107 #ifdef __cplusplus
108     }
109 #endif
110
111 /*** END OF FILE ***/
112
113 #endif /* __FREEGLUT_EXT_H__ */