btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / app / VirtualScreen.h
blobb370add7b19da7cc6166980ed4c51a04a80ce77f
1 /*
2 * Copyright 2005-2009, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Axel Dörfler, axeld@pinc-software.de
7 */
8 #ifndef VIRTUAL_SCREEN_H
9 #define VIRTUAL_SCREEN_H
12 #include "ScreenConfigurations.h"
13 #include "ScreenManager.h"
15 #include <Message.h>
18 class Desktop;
19 class DrawingEngine;
20 class HWInterface;
23 class VirtualScreen {
24 public:
25 VirtualScreen();
26 ~VirtualScreen();
28 ::DrawingEngine* DrawingEngine() const
29 { return fDrawingEngine; }
31 // TODO: can we have a multiplexing HWInterface as well?
32 // If not, this would need to be hidden, and only made
33 // available for the Screen class
34 ::HWInterface* HWInterface() const
35 { return fHWInterface; }
37 status_t SetConfiguration(Desktop& desktop,
38 ScreenConfigurations& configurations,
39 uint32* _changedScreens = NULL);
41 status_t AddScreen(Screen* screen,
42 ScreenConfigurations& configurations);
43 status_t RemoveScreen(Screen* screen);
45 void UpdateFrame();
46 BRect Frame() const;
48 // TODO: we need to play with a real multi-screen configuration to
49 // figure out the specifics here
50 void SetScreenFrame(int32 index, BRect frame);
52 Screen* ScreenAt(int32 index) const;
53 Screen* ScreenByID(int32 id) const;
54 BRect ScreenFrameAt(int32 index) const;
55 int32 CountScreens() const;
57 private:
58 status_t _GetMode(Screen* screen,
59 ScreenConfigurations& configurations,
60 display_mode& mode) const;
61 void _Reset();
63 struct screen_item {
64 Screen* screen;
65 BRect frame;
66 // TODO: do we want to have a different color per screen as well?
69 BRect fFrame;
70 BObjectList<screen_item> fScreenList;
71 ::DrawingEngine* fDrawingEngine;
72 ::HWInterface* fHWInterface;
75 #endif /* VIRTUAL_SCREEN_H */