2005-07-15 16:45:23 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2005, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Axel Dörfler, axeld@pinc-software.de
|
|
|
|
*/
|
|
|
|
#ifndef VIRTUAL_SCREEN_H
|
|
|
|
#define VIRTUAL_SCREEN_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ScreenManager.h"
|
|
|
|
|
|
|
|
#include <Message.h>
|
|
|
|
|
|
|
|
class Desktop;
|
|
|
|
class DisplayDriver;
|
|
|
|
class HWInterface;
|
|
|
|
|
|
|
|
|
|
|
|
class VirtualScreen {
|
|
|
|
public:
|
|
|
|
VirtualScreen();
|
|
|
|
~VirtualScreen();
|
|
|
|
|
|
|
|
::DisplayDriver* DisplayDriver() const
|
|
|
|
{ return fDisplayDriver; }
|
|
|
|
// TODO: can we have a multiplexing HWInterface as well?
|
|
|
|
// If not, this would need to be hidden, and only made
|
|
|
|
// available for the Screen class
|
|
|
|
::HWInterface* HWInterface() const
|
|
|
|
{ return fHWInterface; }
|
|
|
|
|
2005-07-17 20:25:48 +04:00
|
|
|
status_t RestoreConfiguration(Desktop& desktop, const BMessage* settings);
|
2005-07-15 16:45:23 +04:00
|
|
|
status_t StoreConfiguration(BMessage& settings);
|
|
|
|
|
|
|
|
status_t AddScreen(Screen* screen);
|
|
|
|
status_t RemoveScreen(Screen* screen);
|
|
|
|
|
|
|
|
BRect Frame() const;
|
|
|
|
|
|
|
|
// TODO: we need to play with a real multi-screen configuration to
|
|
|
|
// figure out the specifics here - possibly in the test environment?
|
|
|
|
void SetScreenFrame(int32 index, BRect frame);
|
|
|
|
|
|
|
|
Screen* ScreenAt(int32 index) const;
|
|
|
|
BRect ScreenFrameAt(int32 index) const;
|
|
|
|
int32 CountScreens() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
status_t _FindConfiguration(Screen* screen, BMessage& settings);
|
2005-07-17 20:25:48 +04:00
|
|
|
void _Reset();
|
2005-07-15 16:45:23 +04:00
|
|
|
|
|
|
|
struct screen_item {
|
|
|
|
Screen* screen;
|
|
|
|
BRect frame;
|
|
|
|
// TODO: do we want to have a different color per screen as well?
|
|
|
|
};
|
|
|
|
|
|
|
|
BMessage fSettings;
|
|
|
|
BRect fFrame;
|
|
|
|
BObjectList<screen_item> fScreenList;
|
|
|
|
::DisplayDriver* fDisplayDriver;
|
|
|
|
::HWInterface* fHWInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* VIRTUAL_SCREEN_H */
|