-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIDreamDevice.h
More file actions
56 lines (55 loc) · 2.11 KB
/
Copy pathIDreamDevice.h
File metadata and controls
56 lines (55 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/******************************************************************************************************
Dream2d is 2d game engine written by Changer.
Copyright (C) Changer Stdio.
This program is free software;
you can redistribute it and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
******************************************************************************************************/
#ifndef __D_CDREAMDEVICE_H
#define __D_CDREAMDEVICE_H
#include "IReferenceCounted.h"
#include "IVideoDriver.h"
#include "ICursorControl.h"
class IDreamDevice:public IReferenceCounted {
public:
typedef enum {
DEVICE_WIN32,DEVICE_LINUX
} DEVICE_TYPE;
public:
IDreamDevice(DEVICE_TYPE type) {
m_DeviceType = type;
m_videoDriver = NULL;
}
virtual ~IDreamDevice() {
if(m_videoDriver != NULL ) {
m_videoDriver->drop();
m_videoDriver = NULL;
}
}
DEVICE_TYPE getDeviceType() const {
return m_DeviceType;
}
virtual void showVersion() const = 0;
virtual char* getVersionString() const = 0;
virtual s32 run() = 0;
virtual void yield() = 0;
IVideoDriver* getVideoDriver() const {
return m_videoDriver;
}
virtual ICursorControl* getCursorControl() const = 0;
virtual void sleep(u32 t) = 0;
virtual void setWindowCaption(const wchar_t* text) = 0;
virtual bool isWindowActive() const = 0;
virtual bool isWindowFocused() const = 0;
virtual bool isFullscreen() const = 0;
protected:
DEVICE_TYPE m_DeviceType;
IVideoDriver* m_videoDriver;
};
#endif