HaikuDepot: notify work status from main window
[haiku.git] / src / libs / glut / glutGameMode.h
blob4e6a58b7123f1227c0ec44569c8d52faa00daafb
1 /*
2 * Copyright 2010, Haiku Inc.
3 * Authors:
4 * Philippe Houdoin <phoudoin %at% haiku-os %dot% org>
6 * Distributed under the terms of the MIT License.
7 */
8 #ifndef GLUT_GAME_MODE_H
9 #define GLUT_GAME_MODE_H
11 #include <GL/glut.h>
12 #include <Screen.h>
15 /*! All information needed for game mode and
16 subwindows (handled as similarly as possible).
18 class GlutGameMode {
19 public:
20 GlutGameMode();
21 virtual ~GlutGameMode();
23 status_t Set(const char* modeString);
25 status_t Enter();
26 status_t Leave();
28 bool IsActive() const { return fActive; }
29 bool IsPossible();
30 bool HasDisplayChanged() const { return fDisplayChanged; }
32 int Width() const { return fWidth; }
33 int Height() const { return fHeight; }
34 int PixelDepth() const { return fPixelDepth; }
35 int RefreshRate() const { return fRefreshRate; }
37 private:
38 display_mode* _FindMatchingMode();
40 static int _CompareModes(const void* mode1, const void* mode2);
41 static int _GetModeRefreshRate(const display_mode* mode);
42 static int _GetModePixelDepth(const display_mode* mode);
44 bool fActive;
45 bool fDisplayChanged;
46 int fWidth;
47 int fHeight;
48 int fPixelDepth;
49 int fRefreshRate;
50 display_mode* fModesList;
51 uint32 fModesCount;
52 display_mode fOriginalMode;
53 int fGameModeWorkspace;
54 display_mode fCurrentMode;
55 int fGameModeWindow;
56 int fPreviousWindow;
60 #endif // GLUT_GAME_MODE_H