-
Notifications
You must be signed in to change notification settings - Fork 6
/
C_LinkPS2Keyboard.cpp
34 lines (26 loc) · 961 Bytes
/
C_LinkPS2Keyboard.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
#include "C_LinkPS2Keyboard.h"
#include "../LinkPS2Keyboard.hpp"
extern "C" {
C_LinkPS2KeyboardHandle C_LinkPS2Keyboard_create(
C_LinkPS2Keyboard_EventCallback callback) {
return new LinkPS2Keyboard(callback);
}
void C_LinkPS2Keyboard_destroy(C_LinkPS2KeyboardHandle handle) {
delete static_cast<LinkPS2Keyboard*>(handle);
}
bool C_LinkPS2Keyboard_isActive(C_LinkPS2KeyboardHandle handle) {
return static_cast<LinkPS2Keyboard*>(handle)->isActive();
}
void C_LinkPS2Keyboard_activate(C_LinkPS2KeyboardHandle handle) {
static_cast<LinkPS2Keyboard*>(handle)->activate();
}
void C_LinkPS2Keyboard_deactivate(C_LinkPS2KeyboardHandle handle) {
static_cast<LinkPS2Keyboard*>(handle)->deactivate();
}
void C_LinkPS2Keyboard_onVBlank(C_LinkPS2KeyboardHandle handle) {
static_cast<LinkPS2Keyboard*>(handle)->_onVBlank();
}
void C_LinkPS2Keyboard_onSerial(C_LinkPS2KeyboardHandle handle) {
static_cast<LinkPS2Keyboard*>(handle)->_onSerial();
}
}