Skip to content

Commit cd97a38

Browse files
committed
Update CDDL to updated pointer spec
1 parent bf2dac3 commit cd97a38

File tree

1 file changed

+112
-35
lines changed

1 file changed

+112
-35
lines changed

index.bs

+112-35
Original file line numberDiff line numberDiff line change
@@ -10270,24 +10270,64 @@ specified sequence of user input actions.
1027010270
input.KeyUpAction
1027110271
)
1027210272

10273-
input.PointerSourceActions = {
10274-
type: "pointer",
10275-
id: text,
10276-
? parameters: input.PointerParameters,
10277-
actions: [*input.PointerSourceAction]
10273+
input.PointerSourceActions = (
10274+
input.MouseSourceActions /
10275+
input.TouchSourceActions /
10276+
input.PenSourceActions
10277+
)
10278+
10279+
input.MouseSourceActions = {
10280+
type: "pointer",
10281+
id: text,
10282+
? parameters: input.MouseSourceParameters,
10283+
actions: [*input.MouseSourceAction]
10284+
}
10285+
10286+
input.MouseSourceParameters = {
10287+
? pointerType: "mouse"
10288+
}
10289+
10290+
input.MouseSourceAction = (
10291+
input.PauseAction /
10292+
input.MouseDownAction /
10293+
input.MouseUpAction /
10294+
input.MouseMoveAction
10295+
)
10296+
10297+
input.TouchSourceActions = {
10298+
type: "pointer",
10299+
id: text,
10300+
parameters: input.TouchSourceParameters,
10301+
actions: [*input.TouchSourceAction]
10302+
}
10303+
10304+
input.TouchSourceParameters = {
10305+
pointerType: "touch"
1027810306
}
1027910307

10280-
input.PointerType = "mouse" / "pen" / "touch"
10308+
input.TouchSourceAction = (
10309+
input.PauseAction /
10310+
input.TouchDownAction /
10311+
input.TouchUpAction /
10312+
input.TouchMoveAction
10313+
)
10314+
10315+
input.PenSourceActions = {
10316+
type: "pointer",
10317+
id: text,
10318+
parameters: input.PenSourceParameters,
10319+
actions: [*input.PenSourceAction]
10320+
}
1028110321

10282-
input.PointerParameters = {
10283-
? pointerType: input.PointerType .default "mouse"
10322+
input.PenSourceParameters = {
10323+
pointerType: "pen"
1028410324
}
1028510325

10286-
input.PointerSourceAction = (
10326+
input.PenSourceAction = (
1028710327
input.PauseAction /
10288-
input.PointerDownAction /
10289-
input.PointerUpAction /
10290-
input.PointerMoveAction
10328+
input.PenDownAction /
10329+
input.PenUpAction /
10330+
input.PenMoveAction
1029110331
)
1029210332

1029310333
input.WheelSourceActions = {
@@ -10316,46 +10356,83 @@ specified sequence of user input actions.
1031610356
value: text
1031710357
}
1031810358

10319-
input.PointerUpAction = {
10359+
input.MouseDownAction = {
10360+
type: "pointerDown",
10361+
button: js-uint
10362+
}
10363+
10364+
input.MouseUpAction = {
1032010365
type: "pointerUp",
10321-
button: js-uint,
10366+
button: js-uint
1032210367
}
1032310368

10324-
input.PointerDownAction = {
10369+
input.MouseMoveAction = {
10370+
type: "pointerMove",
10371+
input.PointerMoveProperties
10372+
}
10373+
10374+
input.TouchDownAction = {
1032510375
type: "pointerDown",
10326-
button: js-uint,
10327-
input.PointerCommonProperties
10376+
input.TouchProperties
1032810377
}
1032910378

10330-
input.PointerMoveAction = {
10331-
type: "pointerMove",
10332-
x: js-int,
10333-
y: js-int,
10334-
? duration: js-uint,
10335-
? origin: input.Origin,
10336-
input.PointerCommonProperties
10379+
input.TouchUpAction = {
10380+
type: "pointerUp",
10381+
input.TouchProperties
1033710382
}
1033810383

10339-
input.WheelScrollAction = {
10340-
type: "scroll",
10341-
x: js-int,
10342-
y: js-int,
10343-
deltaX: js-int,
10344-
deltaY: js-int,
10345-
? duration: js-uint,
10346-
? origin: input.Origin .default "viewport",
10384+
input.TouchMoveAction = {
10385+
type: "pointerMove",
10386+
input.PointerMoveProperties,
10387+
input.TouchProperties
1034710388
}
1034810389

10349-
input.PointerCommonProperties = (
10390+
input.TouchProperties = (
1035010391
? width: js-uint .default 1,
1035110392
? height: js-uint .default 1,
10352-
? pressure: float .default 0.0,
10393+
? pressure: float .default 0.5
10394+
)
10395+
10396+
input.PenDownAction = {
10397+
type: "pointerDown",
10398+
button: js-uint,
10399+
input.PenProperties
10400+
}
10401+
10402+
input.PenUpAction = {
10403+
type: "pointerUp",
10404+
button: js-uint,
10405+
input.PenProperties
10406+
}
10407+
10408+
input.PenMoveAction = {
10409+
type: "pointerMove",
10410+
input.PointerMoveProperties,
10411+
input.PenProperties
10412+
}
10413+
10414+
input.PenProperties = (
1035310415
? tangentialPressure: float .default 0.0,
1035410416
? twist: (0..359) .default 0,
1035510417
; 0 .. Math.PI / 2
10356-
? altitudeAngle: (0.0..1.5707963267948966) .default 0.0,
10418+
? altitudeAngle: (0.0..1.5707963267948966) .default 1.5707963267948966,
1035710419
; 0 .. 2 * Math.PI
1035810420
? azimuthAngle: (0.0..6.283185307179586) .default 0.0,
10421+
input.TouchProperties,
10422+
)
10423+
10424+
input.WheelScrollAction = {
10425+
type: "scroll",
10426+
deltaX: js-int,
10427+
deltaY: js-int,
10428+
input.PointerMoveProperties,
10429+
}
10430+
10431+
input.PointerMoveProperties = (
10432+
x: js-int,
10433+
y: js-int,
10434+
? duration: js-uint,
10435+
? origin: input.Origin .default "viewport",
1035910436
)
1036010437

1036110438
input.Origin = "viewport" / "pointer" / input.ElementOrigin

0 commit comments

Comments
 (0)