9c44eb6b53a58be94edaf15d39b25c0603f9d3ac
[mesa.git] / src / glut / beos / glutState.h
1 /***********************************************************
2 * Copyright (C) 1997, Be Inc. Copyright (C) 1999, Jake Hamby.
3 *
4 * This program is freely distributable without licensing fees
5 * and is provided without guarantee or warrantee expressed or
6 * implied. This program is -not- in the public domain.
7 *
8 *
9 * FILE: glutState.h
10 *
11 * DESCRIPTION: the global state for GLUT
12 * (takes the place of glutint.h in the C version)
13 ***********************************************************/
14
15 /***********************************************************
16 * Headers
17 ***********************************************************/
18 #include <GL/glut.h>
19 #include <Application.h>
20 #include "glutWindow.h"
21 #include "glutMenu.h"
22
23 /***********************************************************
24 * CLASS: GlutState
25 *
26 * DESCRIPTION: all the global state variables
27 ***********************************************************/
28 struct GlutState {
29 BApplication *display;
30 thread_id appthread;
31
32 int initX, initY; // initial window position
33 int initWidth, initHeight; // initial window size
34 unsigned int displayMode; // initial display mode
35 char *displayString; // verbose display mode
36
37 GlutWindow *currentWindow; // current window
38 GlutMenu *currentMenu; // current menu
39
40 GlutWindow **windowList; // array of pointers to windows
41 int windowListSize; // size of window list
42
43 GLUTidleCB idle; // idle callback
44 GLUTmenuStatusCB menuStatus; // menu status callback
45 int modifierKeys; // only valid during keyboard callback
46
47 bool debug; // call glGetError
48 bool quitAll; // quit
49
50 GlutState() {
51 display = 0;
52 appthread = 0;
53 initX = initY = -1;
54 initWidth = initHeight = 300;
55 displayMode = GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;
56 displayString = 0;
57 currentWindow = 0;
58 currentMenu = 0;
59 windowList = 0;
60 windowListSize = 0;
61 idle = 0;
62 menuStatus = 0;
63 modifierKeys = ~0;
64 debug = quitAll = false;
65 }
66 };
67
68 /***********************************************************
69 * Global variable (declared in glutInit.cpp)
70 ***********************************************************/
71 extern GlutState gState;