haiku/src/servers/app/ScreenManager.h
Stephan Aßmus 58468dfed0 first step of geting rid of abstract DisplayDriver base class for less development overhead, DisplayDriverPainter is renamed to DrawingEngine
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:23:54 +00:00

63 lines
1.2 KiB
C++

/*
* Copyright 2005, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, axeld@pinc-software.de
*/
#ifndef SCREEN_MANAGER_H
#define SCREEN_MANAGER_H
#include <Looper.h>
#include <ObjectList.h>
class BMessage;
class DrawingEngine;
class HWInterface;
class Screen;
typedef BObjectList<Screen> ScreenList;
class ScreenOwner {
public:
virtual void ScreenRemoved(Screen* screen) = 0;
virtual void ScreenAdded(Screen* screen) = 0;
virtual bool ReleaseScreen(Screen* screen) = 0;
};
class ScreenManager : public BLooper {
public:
ScreenManager();
virtual ~ScreenManager();
Screen* ScreenAt(int32 index) const;
int32 CountScreens() const;
status_t AcquireScreens(ScreenOwner* owner, int32* wishList,
int32 wishCount, bool force, ScreenList& list);
void ReleaseScreens(ScreenList& list);
virtual void MessageReceived(BMessage* message);
private:
void _ScanDrivers();
void _AddHWInterface(HWInterface* interface);
struct screen_item {
Screen* screen;
ScreenOwner* owner;
};
BObjectList<screen_item> fScreenList;
};
extern ScreenManager *gScreenManager;
#endif /* SCREEN_MANAGER_H */