Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / os / game / WindowScreen.h
blob662b0a22b156484e3206eb2380593f7ee2cc4221
1 /*
2 * Copyright 2006-2007, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _WINDOW_SCREEN_H
6 #define _WINDOW_SCREEN_H
9 #include <Accelerant.h>
10 #include <GraphicsCard.h>
11 #include <OS.h>
12 #include <SupportDefs.h>
13 #include <Window.h>
14 #include <kernel/image.h>
17 void set_mouse_position(int32 x, int32 y);
18 // Controls the mouse cursor position on screen
21 enum {
22 B_ENABLE_VIEW_DRAWING = 0x0001,
23 B_ENABLE_DEBUGGER = 0x0002
26 class BWindowScreen : public BWindow {
27 public:
28 BWindowScreen(const char* title, uint32 space,
29 status_t* _error, bool debugMode = false);
30 BWindowScreen(const char* title, uint32 space,
31 uint32 attributes, status_t* _error);
32 virtual ~BWindowScreen();
34 virtual void Quit();
35 virtual void ScreenConnected(bool active);
36 void Disconnect();
38 virtual void WindowActivated(bool active);
39 virtual void WorkspaceActivated(int32 workspace, bool active);
40 virtual void ScreenChanged(BRect screenSize, color_space depth);
42 virtual void Hide();
43 virtual void Show();
45 void SetColorList(rgb_color* list, int32 firstIndex = 0,
46 int32 lastIndex = 255);
47 status_t SetSpace(uint32 space);
49 bool CanControlFrameBuffer();
50 status_t SetFrameBuffer(int32 width, int32 height);
51 status_t MoveDisplayArea(int32 x, int32 y);
53 rgb_color* ColorList();
54 frame_buffer_info* FrameBufferInfo();
55 graphics_card_hook CardHookAt(int32 index);
56 graphics_card_info* CardInfo();
58 void RegisterThread(thread_id thread);
59 virtual void SuspensionHook(bool active);
60 void Suspend(char* label);
62 private:
63 virtual status_t Perform(perform_code d, void* arg);
65 #if 0
66 void* IOBase();
67 // deprecated API, always returns NULL
68 #endif
70 virtual void _ReservedWindowScreen1();
71 virtual void _ReservedWindowScreen2();
72 virtual void _ReservedWindowScreen3();
73 virtual void _ReservedWindowScreen4();
75 // not implemented:
76 BWindowScreen();
77 BWindowScreen(BWindowScreen& other);
78 BWindowScreen &operator=(BWindowScreen& other);
80 status_t _InitData(uint32 space, uint32 attributes);
81 void _DisposeData();
83 status_t _LockScreen(bool lock);
84 status_t _Activate();
85 status_t _Deactivate();
87 status_t _SetupAccelerantHooks();
88 void _ResetAccelerantHooks();
90 status_t _GetCardInfo();
91 void _Suspend();
92 void _Resume();
93 status_t _GetModeFromSpace(uint32 space, display_mode* mode);
94 status_t _InitClone();
95 status_t _AssertDisplayMode(display_mode* mode);
97 uint16 _reserved0;
98 bool _reserved1;
99 bool fWorkState;
100 bool fWindowState;
101 bool fActivateState;
102 int32 fLockState;
103 int32 fWorkspaceIndex;
105 display_mode* fOriginalDisplayMode;
106 display_mode* fDisplayMode;
107 sem_id fDebugSem;
108 image_id fAddonImage;
109 uint32 fAttributes;
111 rgb_color fPalette[256];
113 graphics_card_info fCardInfo;
114 frame_buffer_info fFrameBufferInfo;
116 char* fDebugFrameBuffer;
117 bool fDebugState;
118 bool fDebugFirst;
119 int32 fDebugWorkspace;
120 int32 fDebugThreadCount;
121 thread_id* fDebugThreads;
123 uint32 fModeCount;
124 display_mode* fModeList;
126 GetAccelerantHook fGetAccelerantHook;
127 wait_engine_idle fWaitEngineIdle;
129 uint32 _reserved[163];
132 #endif // _WINDOW_SCREEN_H