2 * DOS/DJGPP Mesa Utility Toolkit
5 * Copyright (C) 2005 Daniel Borca All Rights Reserved.
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:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
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 * DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN 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.
26 #ifndef INTERNAL_H_included
27 #define INTERNAL_H_included
35 #define MAX_TIMER_CB 8
36 #define RESERVED_COLORS 0
39 /* GLUT function types */
40 typedef void (GLUTCALLBACK
*GLUTdisplayCB
) (void);
41 typedef void (GLUTCALLBACK
*GLUTreshapeCB
) (int, int);
42 typedef void (GLUTCALLBACK
*GLUTkeyboardCB
) (unsigned char, int, int);
43 typedef void (GLUTCALLBACK
*GLUTmouseCB
) (int, int, int, int);
44 typedef void (GLUTCALLBACK
*GLUTmotionCB
) (int, int);
45 typedef void (GLUTCALLBACK
*GLUTpassiveCB
) (int, int);
46 typedef void (GLUTCALLBACK
*GLUTentryCB
) (int);
47 typedef void (GLUTCALLBACK
*GLUTvisibilityCB
) (int);
48 typedef void (GLUTCALLBACK
*GLUTwindowStatusCB
) (int);
49 typedef void (GLUTCALLBACK
*GLUTidleCB
) (void);
50 typedef void (GLUTCALLBACK
*GLUTtimerCB
) (int);
51 typedef void (GLUTCALLBACK
*GLUTmenuStateCB
) (int); /* DEPRECATED. */
52 typedef void (GLUTCALLBACK
*GLUTmenuStatusCB
) (int, int, int);
53 typedef void (GLUTCALLBACK
*GLUTselectCB
) (int);
54 typedef void (GLUTCALLBACK
*GLUTspecialCB
) (int, int, int);
55 typedef void (GLUTCALLBACK
*GLUTspaceMotionCB
) (int, int, int);
56 typedef void (GLUTCALLBACK
*GLUTspaceRotateCB
) (int, int, int);
57 typedef void (GLUTCALLBACK
*GLUTspaceButtonCB
) (int, int);
58 typedef void (GLUTCALLBACK
*GLUTdialsCB
) (int, int);
59 typedef void (GLUTCALLBACK
*GLUTbuttonBoxCB
) (int, int);
60 typedef void (GLUTCALLBACK
*GLUTtabletMotionCB
) (int, int);
61 typedef void (GLUTCALLBACK
*GLUTtabletButtonCB
) (int, int, int, int);
62 typedef void (GLUTCALLBACK
*GLUTjoystickCB
) (unsigned int, int, int, int);
64 typedef void (GLUTCALLBACK
*GLUTdestroyCB
) (void);
65 typedef void (GLUTCALLBACK
*GLUTmouseWheelCB
) (int, int, int, int);
66 typedef void (GLUTCALLBACK
*GLUTmenuDestroyCB
) (void);
71 GLuint depth
, stencil
;
92 typedef struct GLUTwindow
{
93 int num
; /* window id */
101 /* GLUT settable or visible window state. */
104 int width
; /* window width in pixels */
105 int height
; /* window height in pixels */
107 /* Per-window callbacks. */
108 GLUTdisplayCB display
; /* redraw */
109 GLUTreshapeCB reshape
; /* resize (width,height) */
110 GLUTmouseCB mouse
; /* mouse (button,state,x,y) */
111 GLUTmotionCB motion
; /* motion (x,y) */
112 GLUTpassiveCB passive
; /* passive motion (x,y) */
113 GLUTentryCB entry
; /* window entry/exit (state) */
114 GLUTkeyboardCB keyboard
; /* keyboard (ASCII,x,y) */
115 GLUTkeyboardCB keyboardUp
; /* keyboard up (ASCII,x,y) */
116 GLUTwindowStatusCB windowStatus
; /* window status */
117 GLUTvisibilityCB visibility
; /* visibility */
118 GLUTspecialCB special
; /* special key */
119 GLUTspecialCB specialUp
; /* special up key */
120 GLUTbuttonBoxCB buttonBox
; /* button box */
121 GLUTdialsCB dials
; /* dials */
122 GLUTspaceMotionCB spaceMotion
; /* Spaceball motion */
123 GLUTspaceRotateCB spaceRotate
; /* Spaceball rotate */
124 GLUTspaceButtonCB spaceButton
; /* Spaceball button */
125 GLUTtabletMotionCB tabletMotion
; /* tablet motion */
126 GLUTtabletButtonCB tabletButton
; /* tablet button */
127 GLUTjoystickCB joystick
; /* joystick */
129 GLUTdestroyCB destroy
; /* destroy */
130 GLUTmouseWheelCB mouseWheel
; /* mouse wheel */
140 const unsigned char *bitmap
;
147 const GLUTBitmapChar
*const *table
;
156 const GLUTStrokeVertex
*vertex
;
162 const GLUTStrokeStrip
*strip
;
168 const GLUTStrokeChar
*const *table
;
169 const GLfloat height
;
170 const GLfloat descent
;
174 extern char *__glutProgramName
;
176 extern GLUTvisual _glut_visual
;
177 extern GLUTdefault _glut_default
;
179 extern GLuint _glut_fps
;
180 extern GLUTidleCB _glut_idle_func
;
181 extern GLUTmenuStatusCB _glut_menu_status_func
;
182 extern GLUTSShotCB _glut_timer_cb
[];
184 extern GLUTwindow
*_glut_current
, *_glut_windows
[];
186 extern int _glut_mouse
; /* number of buttons, if mouse installed */
187 extern int _glut_mouse_x
, _glut_mouse_y
; /* mouse coords, relative to current win */
190 extern void _glut_mouse_init (void);
191 extern void _glut_fatal(char *format
,...);
192 extern void *_glut_font (void *font
);
195 #include "pc_hw/pc_hw.h"