Skip to content

Commit a90f70f

Browse files
authored
Fix incorrect doc references to "long" in html5 (#22929)
Fix incorrect doc references to `long`s - as per the [latest version of these structs](https://github.com/emscripten-core/emscripten/blob/main/system/include/emscripten/html5.h#L88), these should all be `int`s or `unsigned int`s.
1 parent 82a8f2d commit a90f70f

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

site/source/docs/api_reference/html5.h.rst

+28-28
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Struct
244244

245245
Maximum size 32 ``char`` (i.e. ``EM_UTF8 code[32]``).
246246

247-
.. c:member:: unsigned long location
247+
.. c:member:: unsigned int location
248248
249249
Indicates the location of the key on the keyboard. One of the :c:data:`DOM_KEY_LOCATION <DOM_KEY_LOCATION_STANDARD>` values.
250250

@@ -273,20 +273,20 @@ Struct
273273

274274
.. warning:: This attribute has been dropped from DOM Level 3 events.
275275

276-
.. c:member:: unsigned long charCode
276+
.. c:member:: unsigned int charCode
277277
278278
The Unicode reference number of the key; this attribute is used only by the keypress event. For keys whose ``char`` attribute contains multiple characters, this is the Unicode value of the first character in that attribute.
279279

280280
.. warning:: This attribute is deprecated, you should use the field ``key`` instead, if available.
281281

282-
.. c:member:: unsigned long keyCode
282+
.. c:member:: unsigned int keyCode
283283
284284
A system and implementation dependent numerical code identifying the unmodified value of the pressed key.
285285

286286
.. warning:: This attribute is deprecated, you should use the field ``key`` instead, if available.
287287

288288

289-
.. c:member:: unsigned long which
289+
.. c:member:: unsigned int which
290290
291291
A system and implementation dependent numeric code identifying the unmodified value of the pressed key; this is usually the same as ``keyCode``.
292292

@@ -364,13 +364,13 @@ Struct
364364
365365
Absolute wallclock time when the data was recorded (milliseconds).
366366
367-
.. c:member:: long screenX
368-
long screenY
367+
.. c:member:: int screenX
368+
int screenY
369369
370370
The coordinates relative to the browser screen coordinate system.
371371
372-
.. c:member:: long clientX
373-
long clientY
372+
.. c:member:: int clientX
373+
int clientY
374374
375375
The coordinates relative to the viewport associated with the event.
376376
@@ -396,24 +396,24 @@ Struct
396396
397397
A bitmask that indicates which combinations of mouse buttons were being held down at the time of the event.
398398
399-
.. c:member:: long movementX
400-
long movementY;
399+
.. c:member:: int movementX
400+
int movementY;
401401
402402
If pointer lock is active, these two extra fields give relative mouse movement since the last event.
403403

404-
.. c:member:: long targetX
405-
long targetY
404+
.. c:member:: int targetX
405+
int targetY
406406

407407
These fields give the mouse coordinates mapped relative to the coordinate space of the target DOM element receiving the input events (Emscripten-specific extension; coordinates are rounded down to the nearest integer).
408408

409409

410-
.. c:member:: long canvasX
411-
long canvasY
410+
.. c:member:: int canvasX
411+
int canvasY
412412

413413
These fields give the mouse coordinates mapped to the Emscripten canvas client area (Emscripten-specific extension; coordinates are rounded down the nearest integer).
414414

415415

416-
.. c:member:: long padding
416+
.. c:member:: int padding
417417
418418
Internal, and can be ignored.
419419

@@ -517,7 +517,7 @@ Struct
517517
in scroll values of 0. The positive Y scroll direction is when scrolling the page downwards (page CSS pixel +Y direction), which corresponds to scrolling
518518
the mouse wheel downwards (away from the screen) on Windows, Linux, and also on macOS when the 'natural scroll' option is disabled.
519519
520-
.. c:member:: unsigned long deltaMode
520+
.. c:member:: unsigned int deltaMode
521521
522522
One of the :c:data:`DOM_DELTA_<DOM_DELTA_PIXEL>` values that indicates the units of measurement for the delta values.
523523
@@ -1487,22 +1487,22 @@ Struct
14871487
14881488
Specifies the status of a single `touch point <http://www.w3.org/TR/touch-events/#touch-interface>`_ on the page.
14891489
1490-
.. c:member:: long identifier
1490+
.. c:member:: int identifier
14911491
14921492
An identification number for each touch point.
14931493
1494-
.. c:member:: long screenX
1495-
long screenY
1494+
.. c:member:: int screenX
1495+
int screenY
14961496
14971497
The touch coordinate relative to the whole screen origin, in pixels.
14981498
1499-
.. c:member:: long clientX
1500-
long clientY
1499+
.. c:member:: int clientX
1500+
int clientY
15011501
15021502
The touch coordinate relative to the viewport, in pixels.
15031503
1504-
.. c:member:: long pageX
1505-
long pageY
1504+
.. c:member:: int pageX
1505+
int pageY
15061506
15071507
The touch coordinate relative to the viewport, in pixels, and including any scroll offset.
15081508
@@ -1514,13 +1514,13 @@ Struct
15141514
15151515
Specifies whether this touch point is still above the original target on which it was initially pressed.
15161516
1517-
.. c:member:: long targetX
1518-
long targetY
1517+
.. c:member:: int targetX
1518+
int targetY
15191519
15201520
These fields give the touch coordinates mapped relative to the coordinate space of the target DOM element receiving the input events (Emscripten-specific extension).
15211521
1522-
.. c:member:: long canvasX
1523-
long canvasY
1522+
.. c:member:: int canvasX
1523+
int canvasY
15241524
15251525
The touch coordinates mapped to the Emscripten canvas client area, in pixels (Emscripten-specific extension).
15261526
@@ -1643,7 +1643,7 @@ Struct
16431643
16441644
Specifies whether this gamepad is connected to the browser page.
16451645
1646-
.. c:member:: long index
1646+
.. c:member:: int index
16471647
16481648
An ordinal associated with this gamepad, zero-based.
16491649

0 commit comments

Comments
 (0)