@@ -44,8 +44,8 @@ public record SourceActions<T> : SourceActions, IEnumerable<ISourceAction> where
4444
4545[ JsonPolymorphic ( TypeDiscriminatorPropertyName = "type" ) ]
4646[ JsonDerivedType ( typeof ( Pause ) , "pause" ) ]
47- [ JsonDerivedType ( typeof ( Key . Down ) , "keyDown" ) ]
48- [ JsonDerivedType ( typeof ( Key . Up ) , "keyUp" ) ]
47+ [ JsonDerivedType ( typeof ( DownKey ) , "keyDown" ) ]
48+ [ JsonDerivedType ( typeof ( UpKey ) , "keyUp" ) ]
4949public interface IKeySourceAction : ISourceAction ;
5050
5151public record KeyActions : SourceActions < IKeySourceAction >
@@ -54,8 +54,8 @@ public KeyActions Type(string text)
5454 {
5555 foreach ( var character in text )
5656 {
57- Add ( new Key . Down ( character ) ) ;
58- Add ( new Key . Up ( character ) ) ;
57+ Add ( new DownKey ( character ) ) ;
58+ Add ( new UpKey ( character ) ) ;
5959 }
6060
6161 return this ;
@@ -64,9 +64,9 @@ public KeyActions Type(string text)
6464
6565[ JsonPolymorphic ( TypeDiscriminatorPropertyName = "type" ) ]
6666[ JsonDerivedType ( typeof ( Pause ) , "pause" ) ]
67- [ JsonDerivedType ( typeof ( Pointer . Down ) , "pointerDown" ) ]
68- [ JsonDerivedType ( typeof ( Pointer . Up ) , "pointerUp" ) ]
69- [ JsonDerivedType ( typeof ( Pointer . Move ) , "pointerMove" ) ]
67+ [ JsonDerivedType ( typeof ( DownPointer ) , "pointerDown" ) ]
68+ [ JsonDerivedType ( typeof ( UpPointer ) , "pointerUp" ) ]
69+ [ JsonDerivedType ( typeof ( MovePointer ) , "pointerMove" ) ]
7070public interface IPointerSourceAction : ISourceAction ;
7171
7272public record PointerActions : SourceActions < IPointerSourceAction >
@@ -76,7 +76,7 @@ public record PointerActions : SourceActions<IPointerSourceAction>
7676
7777[ JsonPolymorphic ( TypeDiscriminatorPropertyName = "type" ) ]
7878[ JsonDerivedType ( typeof ( Pause ) , "pause" ) ]
79- [ JsonDerivedType ( typeof ( Wheel . Scroll ) , "scroll" ) ]
79+ [ JsonDerivedType ( typeof ( ScrollWheel ) , "scroll" ) ]
8080public interface IWheelSourceAction : ISourceAction ;
8181
8282public record WheelActions : SourceActions < IWheelSourceAction > ;
@@ -87,52 +87,49 @@ public interface INoneSourceAction : ISourceAction;
8787
8888public record NoneActions : SourceActions < None > ;
8989
90- public abstract partial record Key : IKeySourceAction
91- {
92- public record Down ( char Value ) : Key ;
90+ public abstract record Key : IKeySourceAction ;
9391
94- public record Up ( char Value ) : Key ;
95- }
92+ public record DownKey( char Value ) : Key ;
93+
94+ public record UpKey( char Value ) : Key ;
95+
96+ public abstract record Pointer : IPointerSourceAction ;
9697
97- public abstract record Pointer : IPointerSourceAction
98+ public record DownPointer ( int Button ) : Pointer , IPointerCommonProperties
9899{
99- public record Down ( int Button ) : Pointer , IPointerCommonProperties
100- {
101- public int ? Width { get ; set ; }
102- public int ? Height { get ; set ; }
103- public double ? Pressure { get ; set ; }
104- public double ? TangentialPressure { get ; set ; }
105- public int ? Twist { get ; set ; }
106- public double ? AltitudeAngle { get ; set ; }
107- public double ? AzimuthAngle { get ; set ; }
108- }
100+ public int ? Width { get ; set ; }
101+ public int ? Height { get ; set ; }
102+ public double ? Pressure { get ; set ; }
103+ public double ? TangentialPressure { get ; set ; }
104+ public int ? Twist { get ; set ; }
105+ public double ? AltitudeAngle { get ; set ; }
106+ public double ? AzimuthAngle { get ; set ; }
107+ }
109108
110- public record Up ( int Button ) : Pointer ;
109+ public record UpPointer ( int Button ) : Pointer ;
111110
112- public record Move ( int X , int Y ) : Pointer , IPointerCommonProperties
113- {
114- public int ? Duration { get ; set ; }
111+ public record MovePointer ( int X , int Y ) : Pointer , IPointerCommonProperties
112+ {
113+ public int ? Duration { get ; set ; }
115114
116- public Origin ? Origin { get ; set ; }
115+ public Origin ? Origin { get ; set ; }
117116
118- public int ? Width { get ; set ; }
119- public int ? Height { get ; set ; }
120- public double ? Pressure { get ; set ; }
121- public double ? TangentialPressure { get ; set ; }
122- public int ? Twist { get ; set ; }
123- public double ? AltitudeAngle { get ; set ; }
124- public double ? AzimuthAngle { get ; set ; }
125- }
117+ public int ? Width { get ; set ; }
118+ public int ? Height { get ; set ; }
119+ public double ? Pressure { get ; set ; }
120+ public double ? TangentialPressure { get ; set ; }
121+ public int ? Twist { get ; set ; }
122+ public double ? AltitudeAngle { get ; set ; }
123+ public double ? AzimuthAngle { get ; set ; }
126124}
127125
128- public abstract record Wheel : IWheelSourceAction
126+ public abstract record Wheel : IWheelSourceAction ;
127+
128+ public record ScrollWheel ( int X , int Y , int DeltaX , int DeltaY ) : Wheel
129129{
130- public record Scroll ( int X , int Y , int DeltaX , int DeltaY ) : Wheel
131- {
132- public int ? Duration { get ; set ; }
130+ public int ? Duration { get ; set ; }
133131
134- public Origin ? Origin { get ; set ; }
135- }
132+ public Origin ? Origin { get ; set ; }
136133}
137134
138135public abstract record None : INoneSourceAction ;
0 commit comments