summaryrefslogtreecommitdiffstats
path: root/src/glut/beos/glutCallback.cpp
diff options
context:
space:
mode:
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 82707d5db25..cf3daaaf36f 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
+}