Logo
Peripheral.h
1#pragma once
2
3#include "Types.h"
4#include "io/Peripheral.h"
5
6namespace XXSharpKmyIO
7{
8 private enum class INPUTID{
9
30
32 kWIN_MOUSE_POS_Y,//t@Ci_[̈̓
33
37
39
42
55
60
78
83
86
87 kANDROID_BUTTON_HOME,//JNI_~ƍ킹
90
94
98
102
106
110
114
118
122
126
130
132 kWIN_MOUSE_TOOL_POS_Y,//c[ŎgpłAɃEBhEŜ^[Qbgɂ
133
135
136 //keyboard
137 kKEYBOARD_BEGIN, //=0
138 kKEYBOARD_END = kKEYBOARD_BEGIN + 0xff, //=0xff
139
141 };
142
143 private ref class Controller{
144
145 public:
146 kmyIO::Controller *obj = nullptr;
147
148 Controller()
149 {
150 //obj = KMY_NEW kmyIO::Controller();
151 obj = kmyIO::Controller::newController();
152 }
153
154 void Release()
155 {
156 delete obj;
157 obj = nullptr;
158 }
159
160 void addInput(System::String ^name, int deviceId, INPUTID inputId, float threshold);
161
162 float getValue(System::String ^name);
163 float getOldValue(System::String ^name);
164 bool isDown(System::String ^name);
165 bool isUp(System::String ^name);
166 bool isHold(System::String ^name);
167 bool isRelease(System::String ^name);
168 bool isDownAny(int deviceId);
169 void update(float elapsed);
170
171 void setGamePadID(int id, bool force);
172 };
173
174
175 private ref class Peripheral
176 {
177 public:
178 static int getMinimumGamepadID();
179 static void setMousePos(int x, int y);
180 static void setMouseButtonState(int state, int flag);
181 static void setCheckActive(bool check);
182 static void setVibrationForce(float force);
183 };
184
185}
INPUTID
Definition: Controller.cs:8