mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
More work. Audio driver works enough to play music now.
This commit is contained in:
52
PortabilityLayer/QDPort.h
Normal file
52
PortabilityLayer/QDPort.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "PixelFormat.h"
|
||||
#include "QDState.h"
|
||||
|
||||
struct PixMap;
|
||||
struct Rect;
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
enum QDPortType
|
||||
{
|
||||
QDPortType_Invalid,
|
||||
|
||||
QDPortType_CGraf,
|
||||
QDPortType_Window,
|
||||
};
|
||||
|
||||
class QDPort
|
||||
{
|
||||
public:
|
||||
explicit QDPort(QDPortType portType);
|
||||
~QDPort();
|
||||
|
||||
int Init(const Rect &rect, PixelFormat pixelFormat);
|
||||
QDPortType GetPortType() const;
|
||||
|
||||
PixMap **GetPixMap() const;
|
||||
const QDState *GetState() const;
|
||||
QDState *GetState();
|
||||
PixelFormat GetPixelFormat() const;
|
||||
Rect GetRect() const;
|
||||
|
||||
private:
|
||||
QDPortType m_portType;
|
||||
|
||||
QDState m_state;
|
||||
PixMap **m_pixMap;
|
||||
|
||||
int16_t m_left;
|
||||
int16_t m_top;
|
||||
uint16_t m_width;
|
||||
uint16_t m_height;
|
||||
PixelFormat m_pixelFormat;
|
||||
};
|
||||
|
||||
inline QDPortType QDPort::GetPortType() const
|
||||
{
|
||||
return m_portType;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user