2004-01-17 21:37:57 +03:00
|
|
|
//------------------------------------------------------------------------------
|
2005-06-24 03:46:17 +04:00
|
|
|
// Copyright (c) 2001-2005, Haiku, Inc. All rights reserved.
|
|
|
|
// Distributed under the terms of the MIT license.
|
2004-01-17 21:37:57 +03:00
|
|
|
//
|
|
|
|
// File Name: ServerScreen.h
|
|
|
|
// Author: Adi Oanca <adioanca@myrealbox.com>
|
2005-05-26 13:21:51 +04:00
|
|
|
// Axel Dörfler, axeld@pinc-software.de
|
2005-06-24 03:46:17 +04:00
|
|
|
// Stephan Aßmus, <superstippi@gmx.de>
|
2004-01-17 21:37:57 +03:00
|
|
|
// Description: Handles individual screens
|
2005-05-26 13:21:51 +04:00
|
|
|
//
|
2004-01-17 21:37:57 +03:00
|
|
|
//------------------------------------------------------------------------------
|
2004-01-13 14:00:22 +03:00
|
|
|
#ifndef _SCREEN_H_
|
|
|
|
#define _SCREEN_H_
|
2004-01-12 01:12:55 +03:00
|
|
|
|
2005-06-24 03:46:17 +04:00
|
|
|
#include <Accelerant.h>
|
2004-01-12 01:12:55 +03:00
|
|
|
#include <Point.h>
|
2005-05-26 13:21:51 +04:00
|
|
|
|
2004-01-13 14:00:22 +03:00
|
|
|
class DisplayDriver;
|
2005-06-24 03:46:17 +04:00
|
|
|
class HWInterface;
|
2004-01-12 01:12:55 +03:00
|
|
|
|
2005-05-26 13:21:51 +04:00
|
|
|
class Screen {
|
2005-06-24 03:46:17 +04:00
|
|
|
public:
|
|
|
|
Screen(HWInterface *interface, int32 id);
|
|
|
|
Screen();
|
|
|
|
virtual ~Screen();
|
|
|
|
|
|
|
|
status_t Initialize();
|
|
|
|
void Shutdown();
|
|
|
|
|
|
|
|
void SetID(int32 ID)
|
|
|
|
{ fID = ID; }
|
|
|
|
|
|
|
|
status_t SetMode(display_mode mode);
|
|
|
|
status_t SetMode(uint16 width,
|
|
|
|
uint16 height,
|
|
|
|
uint32 colorspace,
|
|
|
|
float frequency);
|
|
|
|
void GetMode(display_mode* mode) const;
|
|
|
|
void GetMode(uint16 &width,
|
|
|
|
uint16 &height,
|
|
|
|
uint32 &colorspace,
|
|
|
|
float &frequency) const;
|
|
|
|
|
|
|
|
inline int32 ScreenNumber() const
|
|
|
|
{ return fID; }
|
|
|
|
|
|
|
|
inline DisplayDriver* GetDisplayDriver() const
|
|
|
|
{ return fDriver; }
|
|
|
|
inline HWInterface* GetHWInterface() const
|
|
|
|
{ return fHWInterface; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
status_t _FindMode(uint16 width,
|
|
|
|
uint16 height,
|
|
|
|
uint32 colorspace,
|
|
|
|
float frequency,
|
|
|
|
display_mode* mode) const;
|
|
|
|
|
|
|
|
int32 fID;
|
|
|
|
DisplayDriver* fDriver;
|
|
|
|
HWInterface* fHWInterface;
|
2004-01-12 01:12:55 +03:00
|
|
|
};
|
|
|
|
|
2005-05-26 13:21:51 +04:00
|
|
|
#endif /* _SCREEN_H_ */
|