Fix a problem that caused the new interface code to not actually be
[mesa.git] / src / glut / beos / glutCallback.cpp
1 /***********************************************************
2 * Copyright (C) 1997, Be Inc. All rights reserved.
3 *
4 * FILE: glutCallback.cpp
5 *
6 * DESCRIPTION: put all the callback setting routines in
7 * one place
8 ***********************************************************/
9
10 /***********************************************************
11 * Headers
12 ***********************************************************/
13 #include <GL/glut.h>
14 #include "glutint.h"
15 #include "glutState.h"
16
17 /***********************************************************
18 * Window related callbacks
19 ***********************************************************/
20 void APIENTRY
21 glutDisplayFunc(GLUTdisplayCB displayFunc)
22 {
23 /* XXX Remove the warning after GLUT 3.0. */
24 if (!displayFunc)
25 __glutFatalError("NULL display callback not allowed in GLUT 3.0; update your code.");
26 gState.currentWindow->display = displayFunc;
27 }
28
29 void APIENTRY
30 glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)
31 {
32 gState.currentWindow->keyboard = keyboardFunc;
33 }
34
35 void APIENTRY
36 glutSpecialFunc(GLUTspecialCB specialFunc)
37 {
38 gState.currentWindow->special = specialFunc;
39 }
40
41 void APIENTRY
42 glutMouseFunc(GLUTmouseCB mouseFunc)
43 {
44 gState.currentWindow->mouse = mouseFunc;
45 }
46
47 void APIENTRY
48 glutMotionFunc(GLUTmotionCB motionFunc)
49 {
50 gState.currentWindow->motion = motionFunc;
51 }
52
53 void APIENTRY
54 glutPassiveMotionFunc(GLUTpassiveCB passiveMotionFunc)
55 {
56 gState.currentWindow->passive = passiveMotionFunc;
57 }
58
59 void APIENTRY
60 glutEntryFunc(GLUTentryCB entryFunc)
61 {
62 gState.currentWindow->entry = entryFunc;
63 if (!entryFunc) {
64 gState.currentWindow->entryState = -1;
65 }
66 }
67
68 void APIENTRY
69 glutVisibilityFunc(GLUTvisibilityCB visibilityFunc)
70 {
71 gState.currentWindow->visibility = visibilityFunc;
72 }
73
74 void APIENTRY
75 glutReshapeFunc(GLUTreshapeCB reshapeFunc)
76 {
77 if (reshapeFunc) {
78 gState.currentWindow->reshape = reshapeFunc;
79 } else {
80 gState.currentWindow->reshape = __glutDefaultReshape;
81 }
82 }
83
84 /***********************************************************
85 * General callbacks (timer callback in glutEvent.cpp)
86 ***********************************************************/
87 /* DEPRICATED, use glutMenuStatusFunc instead. */
88 void APIENTRY
89 glutMenuStateFunc(GLUTmenuStateCB menuStateFunc)
90 {
91 gState.menuStatus = (GLUTmenuStatusCB) menuStateFunc;
92 }
93
94 void APIENTRY
95 glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc)
96 {
97 gState.menuStatus = menuStatusFunc;
98 }
99
100 void APIENTRY
101 glutIdleFunc(GLUTidleCB idleFunc)
102 {
103 gState.idle = idleFunc;
104 }
105
106 /***********************************************************
107 * Unsupported callbacks
108 ***********************************************************/
109 void APIENTRY
110 glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)
111 {
112 }
113
114 void APIENTRY
115 glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)
116 {
117 }
118
119 void APIENTRY
120 glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)
121 {
122 }
123
124 void APIENTRY
125 glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)
126 {
127 }
128
129 void APIENTRY
130 glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)
131 {
132 }
133
134 void APIENTRY
135 glutDialsFunc(GLUTdialsCB dialsFunc)
136 {
137 }
138
139 void APIENTRY
140 glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
141 {
142 }
143
144 void APIENTRY
145 glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
146 {
147 }