haiku/src/servers/app/VirtualScreen.h

68 lines
1.6 KiB
C
Raw Normal View History

/*
* 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; }
status_t RestoreConfiguration(Desktop& desktop, const BMessage* settings);
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);
void _Reset();
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 */