@gjsify/gamepad-native-win32-x64 0.52.0
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.
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @gjsify/gamepad-native-win32-x64
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
The **win32-x64** native artifacts of [`@gjsify/gamepad-native`](https://www.npmjs.com/package/@gjsify/gamepad-native) — a shared
|
|
5
|
+
library plus its GObject-Introspection typelib, and nothing else. There is no
|
|
6
|
+
JavaScript in this package and nothing to import from it.
|
|
7
|
+
|
|
8
|
+
You do not install this directly. `@gjsify/gamepad-native` declares it as an
|
|
9
|
+
`optionalDependencies` entry and this package declares `os: ["win32"]`,
|
|
10
|
+
`cpu: ["x64"]`, so your package manager installs the one build that fits your
|
|
11
|
+
machine and silently skips the rest — the same model `esbuild`, `rolldown` and
|
|
12
|
+
`lightningcss` use. Before this split every consumer downloaded every platform's
|
|
13
|
+
binary: 97.3 MB of which a linux-x64 machine could load 31.5 MB.
|
|
14
|
+
|
|
15
|
+
`@gjsify/cli` finds the artifacts at run time by scanning `node_modules` for
|
|
16
|
+
packages declaring `gjsify.prebuilds`, and puts this directory on
|
|
17
|
+
`GI_TYPELIB_PATH` plus the host loader's own search path. If a `gi://Gjsify…`
|
|
18
|
+
import fails with "typelib not found", check that this package is present in
|
|
19
|
+
`node_modules` — an optional dependency that failed to install is skipped without
|
|
20
|
+
an error, by design.
|
|
21
|
+
|
|
22
|
+
Generated by `scripts/generate-platform-packages.mjs`; see
|
|
23
|
+
[ADR 0017](https://github.com/gjsify/gjsify/blob/main/docs/adr/0017-native-package-distribution.md).
|
|
24
|
+
|
|
25
|
+
License: MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gjsify/gamepad-native-win32-x64",
|
|
3
|
+
"version": "0.52.0",
|
|
4
|
+
"description": "win32-x64 prebuilt native library + GObject-Introspection typelib for @gjsify/gamepad-native. Installed automatically on win32/x64 as an optionalDependency of that package (ADR 0017) and skipped everywhere else. Contains no JavaScript.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"os": [
|
|
7
|
+
"win32"
|
|
8
|
+
],
|
|
9
|
+
"cpu": [
|
|
10
|
+
"x64"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
"prebuilds"
|
|
14
|
+
],
|
|
15
|
+
"gjsify": {
|
|
16
|
+
"platforms": [
|
|
17
|
+
"win32-x64"
|
|
18
|
+
],
|
|
19
|
+
"prebuilds": "prebuilds",
|
|
20
|
+
"tier": 1
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"clear": "echo 'nothing to do'",
|
|
24
|
+
"check": "echo 'nothing to do'",
|
|
25
|
+
"build": "echo 'nothing to do'",
|
|
26
|
+
"test": "echo 'nothing to do'"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
31
|
+
"directory": "packages/web/gamepad-native-win32-x64"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/gamepad-native-win32-x64#readme"
|
|
37
|
+
}
|
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<!-- This file was automatically generated from C sources - DO NOT EDIT!
|
|
3
|
+
To affect the contents of this file, edit the original C definitions,
|
|
4
|
+
and/or use gtk-doc annotations. -->
|
|
5
|
+
<repository version="1.2"
|
|
6
|
+
xmlns="http://www.gtk.org/introspection/core/1.0"
|
|
7
|
+
xmlns:c="http://www.gtk.org/introspection/c/1.0"
|
|
8
|
+
xmlns:doc="http://www.gtk.org/introspection/doc/1.0"
|
|
9
|
+
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
|
|
10
|
+
<include name="GObject" version="2.0"/>
|
|
11
|
+
<c:include name="gjsify-gamepad.h"/>
|
|
12
|
+
<doc:format name="unknown"/>
|
|
13
|
+
<namespace name="GjsifyGamepad"
|
|
14
|
+
version="1.0"
|
|
15
|
+
shared-library="libgjsifygamepad.so"
|
|
16
|
+
c:identifier-prefixes="GjsifyGamepad"
|
|
17
|
+
c:symbol-prefixes="gjsify_gamepad">
|
|
18
|
+
<class name="Device"
|
|
19
|
+
c:symbol-prefix="device"
|
|
20
|
+
c:type="GjsifyGamepadDevice"
|
|
21
|
+
parent="GObject.Object"
|
|
22
|
+
final="1"
|
|
23
|
+
glib:type-name="GjsifyGamepadDevice"
|
|
24
|
+
glib:get-type="gjsify_gamepad_device_get_type"
|
|
25
|
+
glib:type-struct="DeviceClass">
|
|
26
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="67"/>
|
|
27
|
+
<method name="get_axes" c:identifier="gjsify_gamepad_device_get_axes">
|
|
28
|
+
<doc xml:space="preserve"
|
|
29
|
+
filename="src/c/gjsify-gamepad.h"
|
|
30
|
+
line="127">The stick axes as of the last gjsify_gamepad_monitor_update(), in W3C
|
|
31
|
+
standard-layout order (left x, left y, right x, right y), -1..1, with -1 = up
|
|
32
|
+
on the y axes. All zeros once the device is disconnected.</doc>
|
|
33
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="138"/>
|
|
34
|
+
<return-value transfer-ownership="full">
|
|
35
|
+
<doc xml:space="preserve"
|
|
36
|
+
filename="src/c/gjsify-gamepad.h"
|
|
37
|
+
line="136">the values.</doc>
|
|
38
|
+
<array length="0" zero-terminated="0" c:type="gdouble*">
|
|
39
|
+
<type name="gdouble" c:type="gdouble"/>
|
|
40
|
+
</array>
|
|
41
|
+
</return-value>
|
|
42
|
+
<parameters>
|
|
43
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
44
|
+
<doc xml:space="preserve"
|
|
45
|
+
filename="src/c/gjsify-gamepad.h"
|
|
46
|
+
line="129">a #GjsifyGamepadDevice</doc>
|
|
47
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
48
|
+
</instance-parameter>
|
|
49
|
+
<parameter name="n_axes"
|
|
50
|
+
direction="out"
|
|
51
|
+
caller-allocates="0"
|
|
52
|
+
transfer-ownership="full">
|
|
53
|
+
<doc xml:space="preserve"
|
|
54
|
+
filename="src/c/gjsify-gamepad.h"
|
|
55
|
+
line="130">the number of values, always 4</doc>
|
|
56
|
+
<type name="gsize" c:type="gsize*"/>
|
|
57
|
+
</parameter>
|
|
58
|
+
</parameters>
|
|
59
|
+
</method>
|
|
60
|
+
<method name="get_buttons"
|
|
61
|
+
c:identifier="gjsify_gamepad_device_get_buttons">
|
|
62
|
+
<doc xml:space="preserve"
|
|
63
|
+
filename="src/c/gjsify-gamepad.h"
|
|
64
|
+
line="114">The button state as of the last gjsify_gamepad_monitor_update(), in W3C
|
|
65
|
+
standard-layout order. Digital buttons are 0 or 1. The triggers (6 and 7) are
|
|
66
|
+
analog, 0..1. All zeros once the device is disconnected.</doc>
|
|
67
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="125"/>
|
|
68
|
+
<return-value transfer-ownership="full">
|
|
69
|
+
<doc xml:space="preserve"
|
|
70
|
+
filename="src/c/gjsify-gamepad.h"
|
|
71
|
+
line="123">the values.</doc>
|
|
72
|
+
<array length="0" zero-terminated="0" c:type="gdouble*">
|
|
73
|
+
<type name="gdouble" c:type="gdouble"/>
|
|
74
|
+
</array>
|
|
75
|
+
</return-value>
|
|
76
|
+
<parameters>
|
|
77
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
78
|
+
<doc xml:space="preserve"
|
|
79
|
+
filename="src/c/gjsify-gamepad.h"
|
|
80
|
+
line="116">a #GjsifyGamepadDevice</doc>
|
|
81
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
82
|
+
</instance-parameter>
|
|
83
|
+
<parameter name="n_buttons"
|
|
84
|
+
direction="out"
|
|
85
|
+
caller-allocates="0"
|
|
86
|
+
transfer-ownership="full">
|
|
87
|
+
<doc xml:space="preserve"
|
|
88
|
+
filename="src/c/gjsify-gamepad.h"
|
|
89
|
+
line="117">the number of values, always 17</doc>
|
|
90
|
+
<type name="gsize" c:type="gsize*"/>
|
|
91
|
+
</parameter>
|
|
92
|
+
</parameters>
|
|
93
|
+
</method>
|
|
94
|
+
<method name="get_guid" c:identifier="gjsify_gamepad_device_get_guid">
|
|
95
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="87"/>
|
|
96
|
+
<return-value transfer-ownership="none">
|
|
97
|
+
<doc xml:space="preserve"
|
|
98
|
+
filename="src/c/gjsify-gamepad.h"
|
|
99
|
+
line="85">SDL's 32-hex-digit GUID for the controller model.</doc>
|
|
100
|
+
<type name="utf8" c:type="const gchar*"/>
|
|
101
|
+
</return-value>
|
|
102
|
+
<parameters>
|
|
103
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
104
|
+
<doc xml:space="preserve"
|
|
105
|
+
filename="src/c/gjsify-gamepad.h"
|
|
106
|
+
line="83">a #GjsifyGamepadDevice</doc>
|
|
107
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
108
|
+
</instance-parameter>
|
|
109
|
+
</parameters>
|
|
110
|
+
</method>
|
|
111
|
+
<method name="get_name" c:identifier="gjsify_gamepad_device_get_name">
|
|
112
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="79"/>
|
|
113
|
+
<return-value transfer-ownership="none">
|
|
114
|
+
<doc xml:space="preserve"
|
|
115
|
+
filename="src/c/gjsify-gamepad.h"
|
|
116
|
+
line="76">the controller's name, as SDL's mapping database
|
|
117
|
+
knows it, or a generic name when it has none.</doc>
|
|
118
|
+
<type name="utf8" c:type="const gchar*"/>
|
|
119
|
+
</return-value>
|
|
120
|
+
<parameters>
|
|
121
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
122
|
+
<doc xml:space="preserve"
|
|
123
|
+
filename="src/c/gjsify-gamepad.h"
|
|
124
|
+
line="74">a #GjsifyGamepadDevice</doc>
|
|
125
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
126
|
+
</instance-parameter>
|
|
127
|
+
</parameters>
|
|
128
|
+
</method>
|
|
129
|
+
<method name="get_product"
|
|
130
|
+
c:identifier="gjsify_gamepad_device_get_product">
|
|
131
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="103"/>
|
|
132
|
+
<return-value transfer-ownership="none">
|
|
133
|
+
<doc xml:space="preserve"
|
|
134
|
+
filename="src/c/gjsify-gamepad.h"
|
|
135
|
+
line="101">the USB product ID, or 0 when SDL does not know it.</doc>
|
|
136
|
+
<type name="guint16" c:type="guint16"/>
|
|
137
|
+
</return-value>
|
|
138
|
+
<parameters>
|
|
139
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
140
|
+
<doc xml:space="preserve"
|
|
141
|
+
filename="src/c/gjsify-gamepad.h"
|
|
142
|
+
line="99">a #GjsifyGamepadDevice</doc>
|
|
143
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
144
|
+
</instance-parameter>
|
|
145
|
+
</parameters>
|
|
146
|
+
</method>
|
|
147
|
+
<method name="get_sensor_data"
|
|
148
|
+
c:identifier="gjsify_gamepad_device_get_sensor_data">
|
|
149
|
+
<doc xml:space="preserve"
|
|
150
|
+
filename="src/c/gjsify-gamepad.h"
|
|
151
|
+
line="210">Reads an enabled sensor as of the last gjsify_gamepad_monitor_update().</doc>
|
|
152
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="223"/>
|
|
153
|
+
<return-value transfer-ownership="none">
|
|
154
|
+
<doc xml:space="preserve"
|
|
155
|
+
filename="src/c/gjsify-gamepad.h"
|
|
156
|
+
line="220">%FALSE when the sensor is absent, not enabled, or the controller is
|
|
157
|
+
disconnected; the out values are then 0.</doc>
|
|
158
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
159
|
+
</return-value>
|
|
160
|
+
<parameters>
|
|
161
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
162
|
+
<doc xml:space="preserve"
|
|
163
|
+
filename="src/c/gjsify-gamepad.h"
|
|
164
|
+
line="212">a #GjsifyGamepadDevice</doc>
|
|
165
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
166
|
+
</instance-parameter>
|
|
167
|
+
<parameter name="sensor" transfer-ownership="none">
|
|
168
|
+
<doc xml:space="preserve"
|
|
169
|
+
filename="src/c/gjsify-gamepad.h"
|
|
170
|
+
line="213">the sensor to read</doc>
|
|
171
|
+
<type name="Sensor" c:type="GjsifyGamepadSensor"/>
|
|
172
|
+
</parameter>
|
|
173
|
+
<parameter name="x"
|
|
174
|
+
direction="out"
|
|
175
|
+
caller-allocates="0"
|
|
176
|
+
transfer-ownership="full">
|
|
177
|
+
<doc xml:space="preserve"
|
|
178
|
+
filename="src/c/gjsify-gamepad.h"
|
|
179
|
+
line="214">the x value</doc>
|
|
180
|
+
<type name="gfloat" c:type="gfloat*"/>
|
|
181
|
+
</parameter>
|
|
182
|
+
<parameter name="y"
|
|
183
|
+
direction="out"
|
|
184
|
+
caller-allocates="0"
|
|
185
|
+
transfer-ownership="full">
|
|
186
|
+
<doc xml:space="preserve"
|
|
187
|
+
filename="src/c/gjsify-gamepad.h"
|
|
188
|
+
line="215">the y value</doc>
|
|
189
|
+
<type name="gfloat" c:type="gfloat*"/>
|
|
190
|
+
</parameter>
|
|
191
|
+
<parameter name="z"
|
|
192
|
+
direction="out"
|
|
193
|
+
caller-allocates="0"
|
|
194
|
+
transfer-ownership="full">
|
|
195
|
+
<doc xml:space="preserve"
|
|
196
|
+
filename="src/c/gjsify-gamepad.h"
|
|
197
|
+
line="216">the z value</doc>
|
|
198
|
+
<type name="gfloat" c:type="gfloat*"/>
|
|
199
|
+
</parameter>
|
|
200
|
+
</parameters>
|
|
201
|
+
</method>
|
|
202
|
+
<method name="get_vendor"
|
|
203
|
+
c:identifier="gjsify_gamepad_device_get_vendor">
|
|
204
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="95"/>
|
|
205
|
+
<return-value transfer-ownership="none">
|
|
206
|
+
<doc xml:space="preserve"
|
|
207
|
+
filename="src/c/gjsify-gamepad.h"
|
|
208
|
+
line="93">the USB vendor ID, or 0 when SDL does not know it.</doc>
|
|
209
|
+
<type name="guint16" c:type="guint16"/>
|
|
210
|
+
</return-value>
|
|
211
|
+
<parameters>
|
|
212
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
213
|
+
<doc xml:space="preserve"
|
|
214
|
+
filename="src/c/gjsify-gamepad.h"
|
|
215
|
+
line="91">a #GjsifyGamepadDevice</doc>
|
|
216
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
217
|
+
</instance-parameter>
|
|
218
|
+
</parameters>
|
|
219
|
+
</method>
|
|
220
|
+
<method name="has_rumble"
|
|
221
|
+
c:identifier="gjsify_gamepad_device_has_rumble">
|
|
222
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="146"/>
|
|
223
|
+
<return-value transfer-ownership="none">
|
|
224
|
+
<doc xml:space="preserve"
|
|
225
|
+
filename="src/c/gjsify-gamepad.h"
|
|
226
|
+
line="144">whether gjsify_gamepad_device_rumble() can drive this controller.</doc>
|
|
227
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
228
|
+
</return-value>
|
|
229
|
+
<parameters>
|
|
230
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
231
|
+
<doc xml:space="preserve"
|
|
232
|
+
filename="src/c/gjsify-gamepad.h"
|
|
233
|
+
line="142">a #GjsifyGamepadDevice</doc>
|
|
234
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
235
|
+
</instance-parameter>
|
|
236
|
+
</parameters>
|
|
237
|
+
</method>
|
|
238
|
+
<method name="has_sensor"
|
|
239
|
+
c:identifier="gjsify_gamepad_device_has_sensor">
|
|
240
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="193"/>
|
|
241
|
+
<return-value transfer-ownership="none">
|
|
242
|
+
<doc xml:space="preserve"
|
|
243
|
+
filename="src/c/gjsify-gamepad.h"
|
|
244
|
+
line="191">whether the controller carries @sensor.</doc>
|
|
245
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
246
|
+
</return-value>
|
|
247
|
+
<parameters>
|
|
248
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
249
|
+
<doc xml:space="preserve"
|
|
250
|
+
filename="src/c/gjsify-gamepad.h"
|
|
251
|
+
line="188">a #GjsifyGamepadDevice</doc>
|
|
252
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
253
|
+
</instance-parameter>
|
|
254
|
+
<parameter name="sensor" transfer-ownership="none">
|
|
255
|
+
<doc xml:space="preserve"
|
|
256
|
+
filename="src/c/gjsify-gamepad.h"
|
|
257
|
+
line="189">the sensor to ask about</doc>
|
|
258
|
+
<type name="Sensor" c:type="GjsifyGamepadSensor"/>
|
|
259
|
+
</parameter>
|
|
260
|
+
</parameters>
|
|
261
|
+
</method>
|
|
262
|
+
<method name="has_trigger_rumble"
|
|
263
|
+
c:identifier="gjsify_gamepad_device_has_trigger_rumble">
|
|
264
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="155"/>
|
|
265
|
+
<return-value transfer-ownership="none">
|
|
266
|
+
<doc xml:space="preserve"
|
|
267
|
+
filename="src/c/gjsify-gamepad.h"
|
|
268
|
+
line="152">whether gjsify_gamepad_device_rumble_triggers() can drive this
|
|
269
|
+
controller.</doc>
|
|
270
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
271
|
+
</return-value>
|
|
272
|
+
<parameters>
|
|
273
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
274
|
+
<doc xml:space="preserve"
|
|
275
|
+
filename="src/c/gjsify-gamepad.h"
|
|
276
|
+
line="150">a #GjsifyGamepadDevice</doc>
|
|
277
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
278
|
+
</instance-parameter>
|
|
279
|
+
</parameters>
|
|
280
|
+
</method>
|
|
281
|
+
<method name="is_connected"
|
|
282
|
+
c:identifier="gjsify_gamepad_device_is_connected">
|
|
283
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="112"/>
|
|
284
|
+
<return-value transfer-ownership="none">
|
|
285
|
+
<doc xml:space="preserve"
|
|
286
|
+
filename="src/c/gjsify-gamepad.h"
|
|
287
|
+
line="109">%FALSE once #GjsifyGamepadMonitor::device-removed has been emitted
|
|
288
|
+
for this device, or its monitor was closed.</doc>
|
|
289
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
290
|
+
</return-value>
|
|
291
|
+
<parameters>
|
|
292
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
293
|
+
<doc xml:space="preserve"
|
|
294
|
+
filename="src/c/gjsify-gamepad.h"
|
|
295
|
+
line="107">a #GjsifyGamepadDevice</doc>
|
|
296
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
297
|
+
</instance-parameter>
|
|
298
|
+
</parameters>
|
|
299
|
+
</method>
|
|
300
|
+
<method name="rumble" c:identifier="gjsify_gamepad_device_rumble">
|
|
301
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="167"/>
|
|
302
|
+
<return-value transfer-ownership="none">
|
|
303
|
+
<doc xml:space="preserve"
|
|
304
|
+
filename="src/c/gjsify-gamepad.h"
|
|
305
|
+
line="165">%FALSE when the controller has no rumble or is disconnected.</doc>
|
|
306
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
307
|
+
</return-value>
|
|
308
|
+
<parameters>
|
|
309
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
310
|
+
<doc xml:space="preserve"
|
|
311
|
+
filename="src/c/gjsify-gamepad.h"
|
|
312
|
+
line="159">a #GjsifyGamepadDevice</doc>
|
|
313
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
314
|
+
</instance-parameter>
|
|
315
|
+
<parameter name="low_frequency" transfer-ownership="none">
|
|
316
|
+
<doc xml:space="preserve"
|
|
317
|
+
filename="src/c/gjsify-gamepad.h"
|
|
318
|
+
line="160">the strong (low-frequency) motor, 0..65535</doc>
|
|
319
|
+
<type name="guint16" c:type="guint16"/>
|
|
320
|
+
</parameter>
|
|
321
|
+
<parameter name="high_frequency" transfer-ownership="none">
|
|
322
|
+
<doc xml:space="preserve"
|
|
323
|
+
filename="src/c/gjsify-gamepad.h"
|
|
324
|
+
line="161">the weak (high-frequency) motor, 0..65535</doc>
|
|
325
|
+
<type name="guint16" c:type="guint16"/>
|
|
326
|
+
</parameter>
|
|
327
|
+
<parameter name="duration_ms" transfer-ownership="none">
|
|
328
|
+
<doc xml:space="preserve"
|
|
329
|
+
filename="src/c/gjsify-gamepad.h"
|
|
330
|
+
line="162">how long, in milliseconds; a new call replaces a running one,
|
|
331
|
+
and 0 intensities stop it</doc>
|
|
332
|
+
<type name="guint32" c:type="guint32"/>
|
|
333
|
+
</parameter>
|
|
334
|
+
</parameters>
|
|
335
|
+
</method>
|
|
336
|
+
<method name="rumble_triggers"
|
|
337
|
+
c:identifier="gjsify_gamepad_device_rumble_triggers">
|
|
338
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="181"/>
|
|
339
|
+
<return-value transfer-ownership="none">
|
|
340
|
+
<doc xml:space="preserve"
|
|
341
|
+
filename="src/c/gjsify-gamepad.h"
|
|
342
|
+
line="179">%FALSE when the controller has no trigger rumble or is disconnected.</doc>
|
|
343
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
344
|
+
</return-value>
|
|
345
|
+
<parameters>
|
|
346
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
347
|
+
<doc xml:space="preserve"
|
|
348
|
+
filename="src/c/gjsify-gamepad.h"
|
|
349
|
+
line="174">a #GjsifyGamepadDevice</doc>
|
|
350
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
351
|
+
</instance-parameter>
|
|
352
|
+
<parameter name="left" transfer-ownership="none">
|
|
353
|
+
<doc xml:space="preserve"
|
|
354
|
+
filename="src/c/gjsify-gamepad.h"
|
|
355
|
+
line="175">the left trigger motor, 0..65535</doc>
|
|
356
|
+
<type name="guint16" c:type="guint16"/>
|
|
357
|
+
</parameter>
|
|
358
|
+
<parameter name="right" transfer-ownership="none">
|
|
359
|
+
<doc xml:space="preserve"
|
|
360
|
+
filename="src/c/gjsify-gamepad.h"
|
|
361
|
+
line="176">the right trigger motor, 0..65535</doc>
|
|
362
|
+
<type name="guint16" c:type="guint16"/>
|
|
363
|
+
</parameter>
|
|
364
|
+
<parameter name="duration_ms" transfer-ownership="none">
|
|
365
|
+
<doc xml:space="preserve"
|
|
366
|
+
filename="src/c/gjsify-gamepad.h"
|
|
367
|
+
line="177">how long, in milliseconds; a new call replaces a running one</doc>
|
|
368
|
+
<type name="guint32" c:type="guint32"/>
|
|
369
|
+
</parameter>
|
|
370
|
+
</parameters>
|
|
371
|
+
</method>
|
|
372
|
+
<method name="set_sensor_enabled"
|
|
373
|
+
c:identifier="gjsify_gamepad_device_set_sensor_enabled">
|
|
374
|
+
<doc xml:space="preserve"
|
|
375
|
+
filename="src/c/gjsify-gamepad.h"
|
|
376
|
+
line="195">Sensors are off until enabled, because a reporting sensor costs the
|
|
377
|
+
controller battery and bandwidth.</doc>
|
|
378
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="206"/>
|
|
379
|
+
<return-value transfer-ownership="none">
|
|
380
|
+
<doc xml:space="preserve"
|
|
381
|
+
filename="src/c/gjsify-gamepad.h"
|
|
382
|
+
line="204">%FALSE when the controller does not carry @sensor or is disconnected.</doc>
|
|
383
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
384
|
+
</return-value>
|
|
385
|
+
<parameters>
|
|
386
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
387
|
+
<doc xml:space="preserve"
|
|
388
|
+
filename="src/c/gjsify-gamepad.h"
|
|
389
|
+
line="197">a #GjsifyGamepadDevice</doc>
|
|
390
|
+
<type name="Device" c:type="GjsifyGamepadDevice*"/>
|
|
391
|
+
</instance-parameter>
|
|
392
|
+
<parameter name="sensor" transfer-ownership="none">
|
|
393
|
+
<doc xml:space="preserve"
|
|
394
|
+
filename="src/c/gjsify-gamepad.h"
|
|
395
|
+
line="198">the sensor to switch</doc>
|
|
396
|
+
<type name="Sensor" c:type="GjsifyGamepadSensor"/>
|
|
397
|
+
</parameter>
|
|
398
|
+
<parameter name="enabled" transfer-ownership="none">
|
|
399
|
+
<doc xml:space="preserve"
|
|
400
|
+
filename="src/c/gjsify-gamepad.h"
|
|
401
|
+
line="199">whether it should report</doc>
|
|
402
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
403
|
+
</parameter>
|
|
404
|
+
</parameters>
|
|
405
|
+
</method>
|
|
406
|
+
</class>
|
|
407
|
+
<record name="DeviceClass"
|
|
408
|
+
c:type="GjsifyGamepadDeviceClass"
|
|
409
|
+
glib:is-gtype-struct-for="Device">
|
|
410
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="67"/>
|
|
411
|
+
<field name="parent_class">
|
|
412
|
+
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
413
|
+
</field>
|
|
414
|
+
</record>
|
|
415
|
+
<class name="Monitor"
|
|
416
|
+
c:symbol-prefix="monitor"
|
|
417
|
+
c:type="GjsifyGamepadMonitor"
|
|
418
|
+
parent="GObject.Object"
|
|
419
|
+
final="1"
|
|
420
|
+
glib:type-name="GjsifyGamepadMonitor"
|
|
421
|
+
glib:get-type="gjsify_gamepad_monitor_get_type"
|
|
422
|
+
glib:type-struct="MonitorClass">
|
|
423
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="70"/>
|
|
424
|
+
<constructor name="new"
|
|
425
|
+
c:identifier="gjsify_gamepad_monitor_new"
|
|
426
|
+
throws="1">
|
|
427
|
+
<doc xml:space="preserve"
|
|
428
|
+
filename="src/c/gjsify-gamepad.h"
|
|
429
|
+
line="246">Starts SDL's gamepad subsystem (reference-counted across monitors) and a
|
|
430
|
+
low-rate GLib timeout on the thread-default main context that calls
|
|
431
|
+
gjsify_gamepad_monitor_update(), so #GjsifyGamepadMonitor::device-added fires
|
|
432
|
+
for a program that never polls. Controllers already connected are reported by
|
|
433
|
+
the first update, not by this call.
|
|
434
|
+
|
|
435
|
+
Call it, and everything else on the monitor, from the thread that runs the
|
|
436
|
+
JS context: SDL and, on macOS, GameController.framework are single-threaded
|
|
437
|
+
here by design.</doc>
|
|
438
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="262"/>
|
|
439
|
+
<return-value transfer-ownership="full">
|
|
440
|
+
<doc xml:space="preserve"
|
|
441
|
+
filename="src/c/gjsify-gamepad.h"
|
|
442
|
+
line="260">a new monitor, or %NULL with @error set.</doc>
|
|
443
|
+
<type name="Monitor" c:type="GjsifyGamepadMonitor*"/>
|
|
444
|
+
</return-value>
|
|
445
|
+
</constructor>
|
|
446
|
+
<function name="error_quark"
|
|
447
|
+
c:identifier="gjsify_gamepad_monitor_error_quark">
|
|
448
|
+
<return-value transfer-ownership="none">
|
|
449
|
+
<type name="GLib.Quark" c:type="GQuark"/>
|
|
450
|
+
</return-value>
|
|
451
|
+
</function>
|
|
452
|
+
<method name="close" c:identifier="gjsify_gamepad_monitor_close">
|
|
453
|
+
<doc xml:space="preserve"
|
|
454
|
+
filename="src/c/gjsify-gamepad.h"
|
|
455
|
+
line="286">Stops the timeout, releases every controller and SDL's subsystem, without
|
|
456
|
+
emitting #GjsifyGamepadMonitor::device-removed. Idempotent, and also run on
|
|
457
|
+
finalize; call it explicitly so SDL is released when the JS side stops, not
|
|
458
|
+
when the garbage collector gets to the wrapper.</doc>
|
|
459
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="295"/>
|
|
460
|
+
<return-value transfer-ownership="none">
|
|
461
|
+
<type name="none" c:type="void"/>
|
|
462
|
+
</return-value>
|
|
463
|
+
<parameters>
|
|
464
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
465
|
+
<doc xml:space="preserve"
|
|
466
|
+
filename="src/c/gjsify-gamepad.h"
|
|
467
|
+
line="288">a #GjsifyGamepadMonitor</doc>
|
|
468
|
+
<type name="Monitor" c:type="GjsifyGamepadMonitor*"/>
|
|
469
|
+
</instance-parameter>
|
|
470
|
+
</parameters>
|
|
471
|
+
</method>
|
|
472
|
+
<method name="get_devices"
|
|
473
|
+
c:identifier="gjsify_gamepad_monitor_get_devices">
|
|
474
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="284"/>
|
|
475
|
+
<return-value transfer-ownership="container">
|
|
476
|
+
<doc xml:space="preserve"
|
|
477
|
+
filename="src/c/gjsify-gamepad.h"
|
|
478
|
+
line="281">the
|
|
479
|
+
connected controllers, in the order they connected.</doc>
|
|
480
|
+
<array name="GLib.PtrArray" c:type="GPtrArray*">
|
|
481
|
+
<type name="Device"/>
|
|
482
|
+
</array>
|
|
483
|
+
</return-value>
|
|
484
|
+
<parameters>
|
|
485
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
486
|
+
<doc xml:space="preserve"
|
|
487
|
+
filename="src/c/gjsify-gamepad.h"
|
|
488
|
+
line="279">a #GjsifyGamepadMonitor</doc>
|
|
489
|
+
<type name="Monitor" c:type="GjsifyGamepadMonitor*"/>
|
|
490
|
+
</instance-parameter>
|
|
491
|
+
</parameters>
|
|
492
|
+
</method>
|
|
493
|
+
<method name="update" c:identifier="gjsify_gamepad_monitor_update">
|
|
494
|
+
<doc xml:space="preserve"
|
|
495
|
+
filename="src/c/gjsify-gamepad.h"
|
|
496
|
+
line="264">The pump: refreshes every controller's state and reports hotplug through
|
|
497
|
+
#GjsifyGamepadMonitor::device-removed and #GjsifyGamepadMonitor::device-added,
|
|
498
|
+
in that order. On macOS it first drains the main run loop, because that is
|
|
499
|
+
where GameController.framework delivers and a GLib main loop never services
|
|
500
|
+
it. Call it at the moment the state is read (W3C's getGamepads()); the
|
|
501
|
+
monitor's own timeout calls it in between. A no-op once closed.</doc>
|
|
502
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="275"/>
|
|
503
|
+
<return-value transfer-ownership="none">
|
|
504
|
+
<type name="none" c:type="void"/>
|
|
505
|
+
</return-value>
|
|
506
|
+
<parameters>
|
|
507
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
508
|
+
<doc xml:space="preserve"
|
|
509
|
+
filename="src/c/gjsify-gamepad.h"
|
|
510
|
+
line="266">a #GjsifyGamepadMonitor</doc>
|
|
511
|
+
<type name="Monitor" c:type="GjsifyGamepadMonitor*"/>
|
|
512
|
+
</instance-parameter>
|
|
513
|
+
</parameters>
|
|
514
|
+
</method>
|
|
515
|
+
<glib:signal name="device-added" when="last">
|
|
516
|
+
<doc xml:space="preserve"
|
|
517
|
+
filename="src/c/gjsify-gamepad.h"
|
|
518
|
+
line="229">A controller with a standard-layout mapping connected, or was already
|
|
519
|
+
connected when the monitor's first update ran.</doc>
|
|
520
|
+
<return-value transfer-ownership="none">
|
|
521
|
+
<type name="none" c:type="void"/>
|
|
522
|
+
</return-value>
|
|
523
|
+
<parameters>
|
|
524
|
+
<parameter name="device" transfer-ownership="none">
|
|
525
|
+
<doc xml:space="preserve"
|
|
526
|
+
filename="src/c/gjsify-gamepad.h"
|
|
527
|
+
line="232">the controller that connected</doc>
|
|
528
|
+
<type name="Device"/>
|
|
529
|
+
</parameter>
|
|
530
|
+
</parameters>
|
|
531
|
+
</glib:signal>
|
|
532
|
+
<glib:signal name="device-removed" when="last">
|
|
533
|
+
<doc xml:space="preserve"
|
|
534
|
+
filename="src/c/gjsify-gamepad.h"
|
|
535
|
+
line="238">A controller disconnected. Not emitted by gjsify_gamepad_monitor_close().</doc>
|
|
536
|
+
<return-value transfer-ownership="none">
|
|
537
|
+
<type name="none" c:type="void"/>
|
|
538
|
+
</return-value>
|
|
539
|
+
<parameters>
|
|
540
|
+
<parameter name="device" transfer-ownership="none">
|
|
541
|
+
<doc xml:space="preserve"
|
|
542
|
+
filename="src/c/gjsify-gamepad.h"
|
|
543
|
+
line="241">the controller that went away; it reports disconnected from now on</doc>
|
|
544
|
+
<type name="Device"/>
|
|
545
|
+
</parameter>
|
|
546
|
+
</parameters>
|
|
547
|
+
</glib:signal>
|
|
548
|
+
</class>
|
|
549
|
+
<record name="MonitorClass"
|
|
550
|
+
c:type="GjsifyGamepadMonitorClass"
|
|
551
|
+
glib:is-gtype-struct-for="Monitor">
|
|
552
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="70"/>
|
|
553
|
+
<field name="parent_class">
|
|
554
|
+
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
555
|
+
</field>
|
|
556
|
+
</record>
|
|
557
|
+
<enumeration name="MonitorError" c:type="GjsifyGamepadMonitorError">
|
|
558
|
+
<doc xml:space="preserve"
|
|
559
|
+
filename="src/c/gjsify-gamepad.h"
|
|
560
|
+
line="43">Error codes for %GJSIFY_GAMEPAD_MONITOR_ERROR.</doc>
|
|
561
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="52"/>
|
|
562
|
+
<member name="monitor_error_init_failed"
|
|
563
|
+
value="0"
|
|
564
|
+
c:identifier="GJSIFY_GAMEPAD_MONITOR_ERROR_INIT_FAILED">
|
|
565
|
+
<doc xml:space="preserve"
|
|
566
|
+
filename="src/c/gjsify-gamepad.h"
|
|
567
|
+
line="45">SDL's gamepad subsystem did not
|
|
568
|
+
start. The message carries SDL's own reason.</doc>
|
|
569
|
+
</member>
|
|
570
|
+
</enumeration>
|
|
571
|
+
<enumeration name="Sensor" c:type="GjsifyGamepadSensor">
|
|
572
|
+
<doc xml:space="preserve"
|
|
573
|
+
filename="src/c/gjsify-gamepad.h"
|
|
574
|
+
line="54">A motion sensor a controller may carry. The values match SDL_SensorType.</doc>
|
|
575
|
+
<source-position filename="src/c/gjsify-gamepad.h" line="64"/>
|
|
576
|
+
<member name="accel"
|
|
577
|
+
value="1"
|
|
578
|
+
c:identifier="GJSIFY_GAMEPAD_SENSOR_ACCEL">
|
|
579
|
+
<doc xml:space="preserve"
|
|
580
|
+
filename="src/c/gjsify-gamepad.h"
|
|
581
|
+
line="56">the accelerometer, in m/s².</doc>
|
|
582
|
+
</member>
|
|
583
|
+
<member name="gyro" value="2" c:identifier="GJSIFY_GAMEPAD_SENSOR_GYRO">
|
|
584
|
+
<doc xml:space="preserve"
|
|
585
|
+
filename="src/c/gjsify-gamepad.h"
|
|
586
|
+
line="57">the gyroscope, in rad/s.</doc>
|
|
587
|
+
</member>
|
|
588
|
+
</enumeration>
|
|
589
|
+
</namespace>
|
|
590
|
+
</repository>
|
|
Binary file
|
|
Binary file
|