@kmamal/sdl 1.0.0-5 → 1.0.0-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +12 -6
  2. package/README.md +2 -2
  3. package/binding.gyp +21 -4
  4. package/package.json +5 -12
  5. package/scripts/build.mjs +3 -1
  6. package/scripts/install.mjs +2 -0
  7. package/scripts/util/common.js +3 -2
  8. package/src/javascript/audio/audio-playback-stream.js +9 -10
  9. package/src/javascript/audio/audio-recording-stream.js +9 -8
  10. package/src/javascript/audio/audio-stream.js +101 -44
  11. package/src/javascript/audio/conversion.js +41 -0
  12. package/src/javascript/audio/devices.js +11 -0
  13. package/src/javascript/audio/events.js +65 -0
  14. package/src/javascript/audio/format-helpers.js +8 -4
  15. package/src/javascript/audio/index.js +25 -20
  16. package/src/javascript/audio/prevent-exit.js +13 -10
  17. package/src/javascript/audio/validate.js +9 -0
  18. package/src/javascript/cleanup.js +9 -6
  19. package/src/javascript/clipboard/index.js +8 -3
  20. package/src/javascript/device-instance.js +61 -0
  21. package/src/javascript/events/events-via-poll.js +32 -28
  22. package/src/javascript/events/index.js +85 -479
  23. package/src/javascript/events/try.js +25 -0
  24. package/src/javascript/gamepad/{device.js → devices.js} +4 -5
  25. package/src/javascript/gamepad/events.js +66 -0
  26. package/src/javascript/gamepad/gamepad-instance.js +12 -160
  27. package/src/javascript/gamepad/index.js +15 -16
  28. package/src/javascript/globals.js +10 -1
  29. package/src/javascript/index.js +2 -5
  30. package/src/javascript/joystick/devices.js +43 -0
  31. package/src/javascript/joystick/events.js +129 -0
  32. package/src/javascript/joystick/index.js +9 -18
  33. package/src/javascript/joystick/joystick-device-instance.js +176 -0
  34. package/src/javascript/joystick/joystick-instance.js +12 -158
  35. package/src/javascript/keyboard/index.js +20 -10
  36. package/src/javascript/keyboard/key-mapping.js +46 -27
  37. package/src/javascript/mouse/index.js +36 -29
  38. package/src/javascript/sensor/events.js +21 -0
  39. package/src/javascript/sensor/index.js +13 -2
  40. package/src/javascript/sensor/sensor-instance.js +7 -47
  41. package/src/javascript/subsystems.js +56 -0
  42. package/src/javascript/touch/index.js +9 -4
  43. package/src/javascript/validate.js +119 -0
  44. package/src/javascript/video/conversion.js +63 -0
  45. package/src/javascript/video/events.js +179 -0
  46. package/src/javascript/video/format-helpers.js +10 -8
  47. package/src/javascript/video/index.js +28 -14
  48. package/src/javascript/video/validate.js +45 -0
  49. package/src/javascript/video/window.js +196 -167
  50. package/src/native/audio.cpp +457 -153
  51. package/src/native/audio.h +25 -19
  52. package/src/native/clipboard.cpp +8 -37
  53. package/src/native/clipboard.h +2 -2
  54. package/src/native/enums.cpp +16 -1
  55. package/src/native/enums.h +1 -1
  56. package/src/native/events.cpp +351 -357
  57. package/src/native/events.h +70 -68
  58. package/src/native/gamepad.cpp +147 -103
  59. package/src/native/gamepad.h +10 -11
  60. package/src/native/global.cpp +183 -340
  61. package/src/native/global.h +51 -5
  62. package/src/native/joystick.cpp +204 -275
  63. package/src/native/joystick.h +21 -15
  64. package/src/native/keyboard.cpp +63 -25
  65. package/src/native/keyboard.h +5 -4
  66. package/src/native/module.cpp +23 -3
  67. package/src/native/mouse.cpp +28 -59
  68. package/src/native/mouse.h +9 -9
  69. package/src/native/packed.cpp +99 -0
  70. package/src/native/packed.h +86 -0
  71. package/src/native/power.cpp +13 -1
  72. package/src/native/power.h +3 -3
  73. package/src/native/sensor.cpp +78 -69
  74. package/src/native/sensor.h +7 -7
  75. package/src/native/testing.cpp +148 -0
  76. package/src/native/testing.h +17 -0
  77. package/src/native/threads.cpp +301 -0
  78. package/src/native/threads.h +36 -0
  79. package/src/native/touch.cpp +38 -44
  80. package/src/native/touch.h +3 -2
  81. package/src/native/video.cpp +211 -98
  82. package/src/native/video.h +7 -4
  83. package/src/native/window.cpp +201 -219
  84. package/src/native/window.h +24 -20
  85. package/src/types/index.d.ts +157 -70
  86. package/src/javascript/audio/device.js +0 -37
  87. package/src/javascript/joystick/device.js +0 -13
  88. package/src/javascript/joystick/shared.js +0 -90
  89. package/src/javascript/worker.js +0 -88
  90. package/src/types/worker.d.ts +0 -71
@@ -1,9 +1,16 @@
1
1
  #include "power.h"
2
+ #include "global.h"
2
3
  #include <SDL3/SDL.h>
3
4
  #include <map>
4
5
 
5
6
 
6
- std::map<SDL_PowerState, std::string> power::states;
7
+ const std::map<SDL_PowerState, packed::Str> power::states {
8
+ // { SDL_POWERSTATE_UNKNOWN, nullptr },
9
+ { SDL_POWERSTATE_NO_BATTERY, "noBattery" },
10
+ { SDL_POWERSTATE_ON_BATTERY, "battery" },
11
+ { SDL_POWERSTATE_CHARGING, "charging" },
12
+ { SDL_POWERSTATE_CHARGED, "charged" },
13
+ };
7
14
 
8
15
 
9
16
  Napi::Value
@@ -11,6 +18,11 @@ power::getInfo (const Napi::CallbackInfo &info)
11
18
  {
12
19
  Napi::Env env = info.Env();
13
20
 
21
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
22
+
23
+ // SDL_GetPowerInfo() reads the battery state straight from the OS and needs
24
+ // no SDL_Init(), so unlike the other worker-reachable bindings this one
25
+ // deliberately skips global::assertReady().
14
26
  int _seconds, _percent;
15
27
  SDL_PowerState _state = SDL_GetPowerInfo(&_seconds, &_percent);
16
28
 
@@ -2,15 +2,15 @@
2
2
  #define _POWER_H_
3
3
 
4
4
  #include <napi.h>
5
+ #include "packed.h"
5
6
  #include <SDL3/SDL.h>
6
7
  #include <map>
7
- #include <string>
8
8
 
9
9
  namespace power {
10
10
 
11
- extern std::map<SDL_PowerState, std::string> states;
11
+ extern const std::map<SDL_PowerState, packed::Str> states;
12
12
 
13
- Napi::Value getInfo(const Napi::CallbackInfo &info);
13
+ Napi::Value getInfo (const Napi::CallbackInfo &info);
14
14
 
15
15
  }; // namespace power
16
16
 
@@ -1,12 +1,30 @@
1
1
  #include "sensor.h"
2
+ #include "global.h"
3
+ #include "threads.h"
2
4
  #include <SDL3/SDL.h>
3
5
  #include <map>
4
6
  #include <string>
5
- #include <sstream>
6
7
 
7
8
 
8
- std::map<SDL_SensorType, std::string> sensor::types;
9
- std::map<SDL_SensorType, std::string> sensor::sides;
9
+ const std::map<SDL_SensorType, packed::Str> sensor::types {
10
+ // { SDL_SENSOR_UNKNOWN, nullptr },
11
+ { SDL_SENSOR_ACCEL, "accelerometer" },
12
+ { SDL_SENSOR_GYRO, "gyroscope" },
13
+ { SDL_SENSOR_ACCEL_L, "accelerometer" },
14
+ { SDL_SENSOR_GYRO_L, "gyroscope" },
15
+ { SDL_SENSOR_ACCEL_R, "accelerometer" },
16
+ { SDL_SENSOR_GYRO_R, "gyroscope" },
17
+ };
18
+
19
+ const std::map<SDL_SensorType, packed::Str> sensor::sides {
20
+ // { SDL_SENSOR_UNKNOWN, nullptr },
21
+ // { SDL_SENSOR_ACCEL, nullptr },
22
+ // { SDL_SENSOR_GYRO, nullptr },
23
+ { SDL_SENSOR_ACCEL_L, "left" },
24
+ { SDL_SENSOR_GYRO_L, "left" },
25
+ { SDL_SENSOR_ACCEL_R, "right" },
26
+ { SDL_SENSOR_GYRO_R, "right" },
27
+ };
10
28
 
11
29
 
12
30
  Napi::Value
@@ -14,56 +32,49 @@ sensor::getDevices (const Napi::CallbackInfo &info)
14
32
  {
15
33
  Napi::Env env = info.Env();
16
34
 
35
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
36
+ global::assertReady(env);
37
+
17
38
  int num_devices;
18
- SDL_SensorID *sensor_ids = SDL_GetSensors(&num_devices);
19
- if (sensor_ids == nullptr) {
20
- std::ostringstream message;
21
- message << "SDL_GetSensors() error: " << SDL_GetError();
22
- SDL_ClearError();
23
- throw Napi::Error::New(env, message.str());
39
+ global::SdlArray<SDL_SensorID> sensor_ids(SDL_GetSensors(&num_devices));
40
+ if (!sensor_ids) {
41
+ throw global::sdlError(env, "SDL_GetSensors");
24
42
  }
25
43
 
26
44
  Napi::Array devices = Napi::Array::New(env, num_devices);
27
45
 
28
- try {
29
- for (int i = 0; i < num_devices; i++) {
30
- SDL_SensorID id = sensor_ids[i];
31
-
32
- SDL_SensorType _type = SDL_GetSensorTypeForID(id);
33
- if (_type == SDL_SENSOR_INVALID) { SDL_ClearError(); }
34
- auto type_entry = sensor::types.find(_type);
35
- Napi::Value type = type_entry != sensor::types.end()
36
- ? Napi::String::New(env, type_entry->second)
37
- : env.Null();
38
- auto side_entry = sensor::sides.find(_type);
39
- Napi::Value side = side_entry != sensor::sides.end()
40
- ? Napi::String::New(env, side_entry->second)
41
- : env.Null();
42
-
43
- const char *_name = SDL_GetSensorNameForID(id);
44
- Napi::Value name;
45
- if (_name != nullptr) {
46
- name = Napi::String::New(env, _name);
47
- }
48
- else {
49
- SDL_ClearError();
50
- name = env.Null();
51
- }
52
-
53
- Napi::Object device = Napi::Object::New(env);
54
- device.Set("id", id);
55
- device.Set("name", name);
56
- device.Set("type", type);
57
- device.Set("side", side);
58
-
59
- devices.Set(i, device);
46
+ for (int i = 0; i < num_devices; i++) {
47
+ SDL_SensorID id = sensor_ids[i];
48
+
49
+ SDL_SensorType _type = SDL_GetSensorTypeForID(id);
50
+ if (_type == SDL_SENSOR_INVALID) { SDL_ClearError(); }
51
+ auto type_entry = sensor::types.find(_type);
52
+ Napi::Value type = type_entry != sensor::types.end()
53
+ ? Napi::String::New(env, type_entry->second)
54
+ : env.Null();
55
+ auto side_entry = sensor::sides.find(_type);
56
+ Napi::Value side = side_entry != sensor::sides.end()
57
+ ? Napi::String::New(env, side_entry->second)
58
+ : env.Null();
59
+
60
+ const char *_name = SDL_GetSensorNameForID(id);
61
+ Napi::Value name;
62
+ if (_name != nullptr) {
63
+ name = Napi::String::New(env, _name);
60
64
  }
65
+ else {
66
+ SDL_ClearError();
67
+ name = env.Null();
68
+ }
69
+
70
+ Napi::Object device = Napi::Object::New(env);
71
+ device.Set("id", id);
72
+ device.Set("name", name);
73
+ device.Set("type", type);
74
+ device.Set("side", side);
75
+
76
+ devices.Set(i, device);
61
77
  }
62
- catch (...) {
63
- SDL_free(sensor_ids);
64
- throw;
65
- }
66
- SDL_free(sensor_ids);
67
78
 
68
79
  return devices;
69
80
  }
@@ -73,15 +84,18 @@ sensor::open (const Napi::CallbackInfo &info)
73
84
  {
74
85
  Napi::Env env = info.Env();
75
86
 
76
- int id = info[0].As<Napi::Number>().Int32Value();
87
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
88
+ global::assertReady(env);
89
+
90
+ SDL_SensorID id = info[0].As<Napi::Number>().Uint32Value();
77
91
 
78
92
  SDL_Sensor *sensor = SDL_OpenSensor(id);
79
93
  if (sensor == nullptr) {
80
- std::ostringstream message;
81
- message << "SDL_OpenSensor(" << id << ") error: " << SDL_GetError();
82
- SDL_ClearError();
83
- throw Napi::Error::New(env, message.str());
94
+ throw global::sdlError(env, "SDL_OpenSensor", id);
84
95
  }
96
+ SDL_ClearError();
97
+
98
+ threads::trackOpen(env, threads::SENSOR, id);
85
99
 
86
100
  return env.Undefined();
87
101
  }
@@ -91,21 +105,16 @@ sensor::getData (const Napi::CallbackInfo &info)
91
105
  {
92
106
  Napi::Env env = info.Env();
93
107
 
94
- int sensor_id = info[0].As<Napi::Number>().Int32Value();
108
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
109
+ global::assertReady(env);
95
110
 
96
- SDL_Sensor *sensor = SDL_GetSensorFromID(sensor_id);
97
- if (sensor == nullptr) {
98
- std::ostringstream message;
99
- message << "SDL_GetSensorFromID(" << sensor_id << ") error: invalid sensor id";
100
- throw Napi::Error::New(env, message.str());
101
- }
111
+ SDL_SensorID sensor_id = info[0].As<Napi::Number>().Uint32Value();
112
+
113
+ SDL_Sensor *sensor = global::fromIdOrThrow(env, SDL_GetSensorFromID(sensor_id), "SDL_GetSensorFromID", "sensor", sensor_id);
102
114
 
103
115
  float data[3];
104
116
  if (!SDL_GetSensorData(sensor, data, 3)) {
105
- std::ostringstream message;
106
- message << "SDL_GetSensorData(" << sensor_id << ") error: " << SDL_GetError();
107
- SDL_ClearError();
108
- throw Napi::Error::New(env, message.str());
117
+ throw global::sdlError(env, "SDL_GetSensorData", sensor_id);
109
118
  }
110
119
 
111
120
  Napi::Object result = Napi::Object::New(env);
@@ -121,14 +130,14 @@ sensor::close (const Napi::CallbackInfo &info)
121
130
  {
122
131
  Napi::Env env = info.Env();
123
132
 
124
- int sensor_id = info[0].As<Napi::Number>().Int32Value();
133
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
134
+ global::assertReady(env);
125
135
 
126
- SDL_Sensor *sensor = SDL_GetSensorFromID(sensor_id);
127
- if (sensor == nullptr) {
128
- std::ostringstream message;
129
- message << "SDL_GetSensorFromID(" << sensor_id << ") error: invalid sensor id";
130
- throw Napi::Error::New(env, message.str());
131
- }
136
+ SDL_SensorID sensor_id = info[0].As<Napi::Number>().Uint32Value();
137
+
138
+ threads::trackClose(env, threads::SENSOR, sensor_id);
139
+
140
+ SDL_Sensor *sensor = global::fromIdOrThrow(env, SDL_GetSensorFromID(sensor_id), "SDL_GetSensorFromID", "sensor", sensor_id);
132
141
 
133
142
  SDL_CloseSensor(sensor);
134
143
 
@@ -2,19 +2,19 @@
2
2
  #define _SENSOR_H_
3
3
 
4
4
  #include <napi.h>
5
+ #include "packed.h"
5
6
  #include <SDL3/SDL.h>
6
7
  #include <map>
7
- #include <string>
8
8
 
9
9
  namespace sensor {
10
10
 
11
- extern std::map<SDL_SensorType, std::string> types;
12
- extern std::map<SDL_SensorType, std::string> sides;
11
+ extern const std::map<SDL_SensorType, packed::Str> types;
12
+ extern const std::map<SDL_SensorType, packed::Str> sides;
13
13
 
14
- Napi::Value getDevices(const Napi::CallbackInfo &info);
15
- Napi::Value open(const Napi::CallbackInfo &info);
16
- Napi::Value getData(const Napi::CallbackInfo &info);
17
- Napi::Value close(const Napi::CallbackInfo &info);
14
+ Napi::Value getDevices (const Napi::CallbackInfo &info);
15
+ Napi::Value open (const Napi::CallbackInfo &info);
16
+ Napi::Value getData (const Napi::CallbackInfo &info);
17
+ Napi::Value close (const Napi::CallbackInfo &info);
18
18
 
19
19
  }; // namespace sensor
20
20
 
@@ -0,0 +1,148 @@
1
+ #include "testing.h"
2
+ #include "global.h"
3
+ #include "window.h"
4
+ #include <SDL3/SDL.h>
5
+ #include <cmath>
6
+
7
+
8
+ static SDL_Joystick *
9
+ _getVirtual (Napi::Env &env, SDL_JoystickID id)
10
+ {
11
+ SDL_Joystick *joystick = SDL_GetJoystickFromID(id);
12
+ if (joystick == nullptr || !SDL_IsJoystickVirtual(id)) {
13
+ SDL_ClearError();
14
+ throw Napi::Error::New(env, "invalid virtual joystick id");
15
+ }
16
+ return joystick;
17
+ }
18
+
19
+ Napi::Value
20
+ testing::attachVirtualJoystick (const Napi::CallbackInfo &info)
21
+ {
22
+ Napi::Env env = info.Env();
23
+
24
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
25
+ global::assertReady(env);
26
+
27
+ bool is_gamepad = info[0].As<Napi::Boolean>().Value();
28
+
29
+ SDL_VirtualJoystickDesc desc;
30
+ SDL_INIT_INTERFACE(&desc);
31
+ desc.type = is_gamepad ? SDL_JOYSTICK_TYPE_GAMEPAD : SDL_JOYSTICK_TYPE_UNKNOWN;
32
+ desc.naxes = is_gamepad ? SDL_GAMEPAD_AXIS_COUNT : 2;
33
+ desc.nbuttons = is_gamepad ? SDL_GAMEPAD_BUTTON_COUNT : 2;
34
+ desc.name = is_gamepad ? "Virtual Gamepad" : "Virtual Joystick";
35
+
36
+ SDL_JoystickID id = SDL_AttachVirtualJoystick(&desc);
37
+ if (id == 0) { throw global::sdlError(env, "SDL_AttachVirtualJoystick"); }
38
+
39
+ SDL_Joystick *joystick = SDL_OpenJoystick(id);
40
+ if (joystick == nullptr) {
41
+ SDL_DetachVirtualJoystick(id);
42
+ throw global::sdlError(env, "SDL_OpenJoystick");
43
+ }
44
+ SDL_ClearError();
45
+
46
+ return Napi::Number::New(env, id);
47
+ }
48
+
49
+ Napi::Value
50
+ testing::setVirtualJoystickAxis (const Napi::CallbackInfo &info)
51
+ {
52
+ Napi::Env env = info.Env();
53
+
54
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
55
+ global::assertReady(env);
56
+
57
+ SDL_JoystickID id = info[0].As<Napi::Number>().Uint32Value();
58
+ int axis = info[1].As<Napi::Number>().Int32Value();
59
+ double value = info[2].As<Napi::Number>().DoubleValue();
60
+ if (value != std::trunc(value) || value < SDL_JOYSTICK_AXIS_MIN || value > SDL_JOYSTICK_AXIS_MAX) {
61
+ throw Napi::Error::New(env, "value must be a signed 16-bit integer");
62
+ }
63
+
64
+ if (!SDL_SetJoystickVirtualAxis(_getVirtual(env, id), axis, (Sint16) value)) {
65
+ throw global::sdlError(env, "SDL_SetJoystickVirtualAxis");
66
+ }
67
+
68
+ return env.Undefined();
69
+ }
70
+
71
+ Napi::Value
72
+ testing::setVirtualJoystickButton (const Napi::CallbackInfo &info)
73
+ {
74
+ Napi::Env env = info.Env();
75
+
76
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
77
+ global::assertReady(env);
78
+
79
+ SDL_JoystickID id = info[0].As<Napi::Number>().Uint32Value();
80
+ int button = info[1].As<Napi::Number>().Int32Value();
81
+ bool down = info[2].As<Napi::Boolean>().Value();
82
+
83
+ if (!SDL_SetJoystickVirtualButton(_getVirtual(env, id), button, down)) {
84
+ throw global::sdlError(env, "SDL_SetJoystickVirtualButton");
85
+ }
86
+
87
+ return env.Undefined();
88
+ }
89
+
90
+ Napi::Value
91
+ testing::detachVirtualJoystick (const Napi::CallbackInfo &info)
92
+ {
93
+ Napi::Env env = info.Env();
94
+
95
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
96
+ global::assertReady(env);
97
+
98
+ SDL_JoystickID id = info[0].As<Napi::Number>().Uint32Value();
99
+
100
+ SDL_CloseJoystick(_getVirtual(env, id));
101
+
102
+ // Can't fail once _getVirtual() has confirmed the id is an attached virtual joystick, so closing first is safe.
103
+ if (!SDL_DetachVirtualJoystick(id)) { throw global::sdlError(env, "SDL_DetachVirtualJoystick"); }
104
+
105
+ return env.Undefined();
106
+ }
107
+
108
+ Napi::Value
109
+ testing::pushAudioDeviceEvent (const Napi::CallbackInfo &info)
110
+ {
111
+ Napi::Env env = info.Env();
112
+
113
+ std::lock_guard<std::recursive_mutex> guard(global::lock());
114
+ global::assertReady(env);
115
+
116
+ std::string type = info[0].As<Napi::String>().Utf8Value();
117
+ SDL_AudioDeviceID id = info[1].As<Napi::Number>().Uint32Value();
118
+ bool is_recording = info[2].As<Napi::Boolean>().Value();
119
+
120
+ SDL_Event event;
121
+ SDL_zero(event);
122
+ if (type == "add") { event.type = SDL_EVENT_AUDIO_DEVICE_ADDED; }
123
+ else if (type == "remove") { event.type = SDL_EVENT_AUDIO_DEVICE_REMOVED; }
124
+ else if (type == "format") { event.type = SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED; }
125
+ else { throw Napi::Error::New(env, "invalid audio device event type"); }
126
+ event.adevice.which = id;
127
+ event.adevice.recording = is_recording;
128
+
129
+ if (!SDL_PushEvent(&event)) { throw global::sdlError(env, "SDL_PushEvent"); }
130
+
131
+ return env.Undefined();
132
+ }
133
+
134
+ Napi::Value
135
+ testing::hitTest (const Napi::CallbackInfo &info)
136
+ {
137
+ Napi::Env env = info.Env();
138
+
139
+ SDL_WindowID window_id = info[0].As<Napi::Number>().Uint32Value();
140
+ SDL_Point point = {
141
+ info[1].As<Napi::Number>().Int32Value(),
142
+ info[2].As<Napi::Number>().Int32Value(),
143
+ };
144
+
145
+ SDL_Window *window = global::fromIdOrThrow(env, SDL_GetWindowFromID(window_id), "SDL_GetWindowFromID", "window", window_id);
146
+
147
+ return Napi::Number::New(env, window::hitTest(window, &point, nullptr));
148
+ }
@@ -0,0 +1,17 @@
1
+ #ifndef _TESTING_H_
2
+ #define _TESTING_H_
3
+
4
+ #include <napi.h>
5
+
6
+ namespace testing {
7
+
8
+ Napi::Value attachVirtualJoystick (const Napi::CallbackInfo &info);
9
+ Napi::Value setVirtualJoystickAxis (const Napi::CallbackInfo &info);
10
+ Napi::Value setVirtualJoystickButton (const Napi::CallbackInfo &info);
11
+ Napi::Value detachVirtualJoystick (const Napi::CallbackInfo &info);
12
+ Napi::Value pushAudioDeviceEvent (const Napi::CallbackInfo &info);
13
+ Napi::Value hitTest (const Napi::CallbackInfo &info);
14
+
15
+ }; // namespace testing
16
+
17
+ #endif // _TESTING_H_