summaryrefslogtreecommitdiff
path: root/src/glut/beos/glutCallback.cpp
diff options
context:
space:
mode:
authorPhilippe Houdoin <phoudoin@freedesktop.org>2004-08-14 10:27:08 +0000
committerPhilippe Houdoin <phoudoin@freedesktop.org>2004-08-14 10:27:08 +0000
commita041e62418a72f0fd379e50263e1c9d2e6c6bb55 (patch)
tree578847e0704507461122c73f5fff867e284a5c37 /src/glut/beos/glutCallback.cpp
parentfad0e5d448d9a2b55a7faa3fcb569470c381fb4b (diff)
Update to Jake Hamby's BeOS GLUT 3.7 port.
Diffstat (limited to 'src/glut/beos/glutCallback.cpp')
-rw-r--r--src/glut/beos/glutCallback.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/glut/beos/glutCallback.cpp b/src/glut/beos/glutCallback.cpp
index 82707d5db2..cf3daaaf36 100644
--- a/src/glut/beos/glutCallback.cpp
+++ b/src/glut/beos/glutCallback.cpp
@@ -1,5 +1,10 @@
/***********************************************************
- * Copyright (C) 1997, Be Inc. All rights reserved.
+ * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby.
+ *
+ * This program is freely distributable without licensing fees
+ * and is provided without guarantee or warrantee expressed or
+ * implied. This program is -not- in the public domain.
+ *
*
* FILE: glutCallback.cpp
*
@@ -65,10 +70,29 @@ glutEntryFunc(GLUTentryCB entryFunc)
}
}
+void APIENTRY
+glutWindowStatusFunc(GLUTwindowStatusCB windowStatusFunc)
+{
+ gState.currentWindow->windowStatus = windowStatusFunc;
+}
+
+static void
+visibilityHelper(int status)
+{
+ if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED)
+ gState.currentWindow->visibility(GLUT_NOT_VISIBLE);
+ else
+ gState.currentWindow->visibility(GLUT_VISIBLE);
+}
+
void APIENTRY
glutVisibilityFunc(GLUTvisibilityCB visibilityFunc)
{
gState.currentWindow->visibility = visibilityFunc;
+ if (visibilityFunc)
+ glutWindowStatusFunc(visibilityHelper);
+ else
+ glutWindowStatusFunc(NULL);
}
void APIENTRY
@@ -144,4 +168,4 @@ glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
void APIENTRY
glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
{
-} \ No newline at end of file
+}