-
Notifications
You must be signed in to change notification settings - Fork 1
/
null_gfx.cpp
80 lines (64 loc) · 1.26 KB
/
null_gfx.cpp
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "native_window.h"
#include "native_window_drawing.h"
#include "environment.h"
#include "wintypes.h"
using namespace wintypes;
#include "user32.h"
namespace native_window {
struct window_impl {
};
window::window() {
impl = std::make_unique<window_impl>();
}
window::~window() {
}
bool window::create(const char* title, DWORD style, DWORD ex_style, int x, int y, int width, int height) {
return false;
}
void window::get_cursor_pos(int* x, int* y) {
*x = 0;
*y = 0;
}
bool window::peek_message(MSG* msg) {
return false;
}
bool window::show_cursor(bool show) {
return false;
}
bool window::get_key_state(int vkey) {
return false;
}
}
namespace native_window_drawing {
struct palette_impl : palette {
palette_impl() {
}
virtual ~palette_impl() override {
}
virtual void set_colors(color colors[256]) {
}
};
struct surface_impl : surface {
virtual void create(wintypes::HWND wnd) override {
}
virtual void set_palette(palette* pal) override {
}
virtual void* lock() override {
return nullptr;
}
virtual void unlock() override {
}
};
palette* new_palette() {
return new palette_impl();
}
void delete_palette(palette* pal) {
delete pal;
}
surface* new_surface() {
return new surface_impl();
}
void delete_surface(surface* surf) {
delete surf;
}
};