summaryrefslogtreecommitdiff
path: root/src/glut/beos/glutCallback.cpp
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-09-16 22:45:24 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-09-16 22:45:24 +0000
commit4811b7c7e02c0612975a8526f8ebba49ece0e72b (patch)
treed039cf9b6dd2a9d4fb47b856f1f89adec4ff81f8 /src/glut/beos/glutCallback.cpp
parentb9e8741c8f0e5d683df4be09a232aa722589645e (diff)
initial check-in
Diffstat (limited to 'src/glut/beos/glutCallback.cpp')
-rw-r--r--src/glut/beos/glutCallback.cpp147
1 files changed, 147 insertions, 0 deletions
diff --git a/src/glut/beos/glutCallback.cpp b/src/glut/beos/glutCallback.cpp
new file mode 100644
index 0000000000..82707d5db2
--- /dev/null
+++ b/src/glut/beos/glutCallback.cpp
@@ -0,0 +1,147 @@
+/***********************************************************
+ * Copyright (C) 1997, Be Inc. All rights reserved.
+ *
+ * FILE: glutCallback.cpp
+ *
+ * DESCRIPTION: put all the callback setting routines in
+ * one place
+ ***********************************************************/
+
+/***********************************************************
+ * Headers
+ ***********************************************************/
+#include <GL/glut.h>
+#include "glutint.h"
+#include "glutState.h"
+
+/***********************************************************
+ * Window related callbacks
+ ***********************************************************/
+void APIENTRY
+glutDisplayFunc(GLUTdisplayCB displayFunc)
+{
+ /* XXX Remove the warning after GLUT 3.0. */
+ if (!displayFunc)
+ __glutFatalError("NULL display callback not allowed in GLUT 3.0; update your code.");
+ gState.currentWindow->display = displayFunc;
+}
+
+void APIENTRY
+glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)
+{
+ gState.currentWindow->keyboard = keyboardFunc;
+}
+
+void APIENTRY
+glutSpecialFunc(GLUTspecialCB specialFunc)
+{
+ gState.currentWindow->special = specialFunc;
+}
+
+void APIENTRY
+glutMouseFunc(GLUTmouseCB mouseFunc)
+{
+ gState.currentWindow->mouse = mouseFunc;
+}
+
+void APIENTRY
+glutMotionFunc(GLUTmotionCB motionFunc)
+{
+ gState.currentWindow->motion = motionFunc;
+}
+
+void APIENTRY
+glutPassiveMotionFunc(GLUTpassiveCB passiveMotionFunc)
+{
+ gState.currentWindow->passive = passiveMotionFunc;
+}
+
+void APIENTRY
+glutEntryFunc(GLUTentryCB entryFunc)
+{
+ gState.currentWindow->entry = entryFunc;
+ if (!entryFunc) {
+ gState.currentWindow->entryState = -1;
+ }
+}
+
+void APIENTRY
+glutVisibilityFunc(GLUTvisibilityCB visibilityFunc)
+{
+ gState.currentWindow->visibility = visibilityFunc;
+}
+
+void APIENTRY
+glutReshapeFunc(GLUTreshapeCB reshapeFunc)
+{
+ if (reshapeFunc) {
+ gState.currentWindow->reshape = reshapeFunc;
+ } else {
+ gState.currentWindow->reshape = __glutDefaultReshape;
+ }
+}
+
+/***********************************************************
+ * General callbacks (timer callback in glutEvent.cpp)
+ ***********************************************************/
+/* DEPRICATED, use glutMenuStatusFunc instead. */
+void APIENTRY
+glutMenuStateFunc(GLUTmenuStateCB menuStateFunc)
+{
+ gState.menuStatus = (GLUTmenuStatusCB) menuStateFunc;
+}
+
+void APIENTRY
+glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc)
+{
+ gState.menuStatus = menuStatusFunc;
+}
+
+void APIENTRY
+glutIdleFunc(GLUTidleCB idleFunc)
+{
+ gState.idle = idleFunc;
+}
+
+/***********************************************************
+ * Unsupported callbacks
+ ***********************************************************/
+void APIENTRY
+glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)
+{
+}
+
+void APIENTRY
+glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)
+{
+}
+
+void APIENTRY
+glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)
+{
+}
+
+void APIENTRY
+glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)
+{
+}
+
+void APIENTRY
+glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)
+{
+}
+
+void APIENTRY
+glutDialsFunc(GLUTdialsCB dialsFunc)
+{
+}
+
+void APIENTRY
+glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
+{
+}
+
+void APIENTRY
+glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
+{
+} \ No newline at end of file