Skip to content

Commit 2fb9f3a

Browse files
chore: Format TouchEvent.as
1 parent 5b0bd20 commit 2fb9f3a

File tree

1 file changed

+177
-178
lines changed

1 file changed

+177
-178
lines changed

core/src/avm2/globals/flash/events/TouchEvent.as

Lines changed: 177 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -3,183 +3,182 @@
33
// by https://github.com/golfinq/ActionScript_Event_Builder
44
// It won't be regenerated in the future, so feel free to edit and/or fix
55
package flash.events {
6-
7-
import flash.utils.ByteArray;
8-
import flash.display.InteractiveObject;
9-
import __ruffle__.stub_method;
10-
11-
[API("667")]
12-
public class TouchEvent extends Event {
13-
public static const PROXIMITY_BEGIN: String = "proximityBegin"; // [static] Defines the value of the type property of a PROXIMITY_BEGIN touch event object.
14-
public static const PROXIMITY_END: String = "proximityEnd"; // [static] Defines the value of the type property of a PROXIMITY_END touch event object.
15-
public static const PROXIMITY_MOVE: String = "proximityMove"; // [static] Defines the value of the type property of a PROXIMITY_MOVE touch event object.
16-
public static const PROXIMITY_OUT: String = "proximityOut"; // [static] Defines the value of the type property of a PROXIMITY_OUT touch event object.
17-
public static const PROXIMITY_OVER: String = "proximityOver"; // [static] Defines the value of the type property of a PROXIMITY_OVER touch event object.
18-
public static const PROXIMITY_ROLL_OUT: String = "proximityRollOut"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OUT touch event object.
19-
public static const PROXIMITY_ROLL_OVER: String = "proximityRollOver"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OVER touch event object.
20-
public static const TOUCH_BEGIN: String = "touchBegin"; // [static] Defines the value of the type property of a TOUCH_BEGIN touch event object.
21-
public static const TOUCH_END: String = "touchEnd"; // [static] Defines the value of the type property of a TOUCH_END touch event object.
22-
public static const TOUCH_MOVE: String = "touchMove"; // [static] Defines the value of the type property of a TOUCH_MOVE touch event object.
23-
public static const TOUCH_OUT: String = "touchOut"; // [static] Defines the value of the type property of a TOUCH_OUT touch event object.
24-
public static const TOUCH_OVER: String = "touchOver"; // [static] Defines the value of the type property of a TOUCH_OVER touch event object.
25-
public static const TOUCH_ROLL_OUT: String = "touchRollOut"; // [static] Defines the value of the type property of a TOUCH_ROLL_OUT touch event object.
26-
public static const TOUCH_ROLL_OVER: String = "touchRollOver"; // [static] Defines the value of the type property of a TOUCH_ROLL_OVER touch event object.
27-
public static const TOUCH_TAP: String = "touchTap"; // [static] Defines the value of the type property of a TOUCH_TAP touch event object.
28-
29-
private var _touchPointID: int; // A unique identification number (as an int) assigned to the touch point.
30-
private var _isPrimaryTouchPoint: Boolean; // Indicates whether the first point of contact is mapped to mouse events.
31-
private var _localX: Number; // The horizontal coordinate at which the event occurred relative to the containing sprite.
32-
private var _localY: Number; // The vertical coordinate at which the event occurred relative to the containing sprite.
33-
private var _sizeX: Number; // Width of the contact area.
34-
private var _sizeY: Number; // Height of the contact area.
35-
private var _pressure: Number; // A value between 0.0 and 1.0 indicating force of the contact with the device.
36-
private var _relatedObject: InteractiveObject; // A reference to a display list object that is related to the event.
37-
private var _ctrlKey: Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false).
38-
private var _altKey: Boolean; // Indicates whether the Alt key is active (true) or inactive (false).
39-
private var _shiftKey: Boolean; // Indicates whether the Shift key is active (true) or inactive (false).
40-
private var _isRelatedObjectInaccessible: Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes.
41-
private var _stageX: Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates.
42-
private var _stageY: Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates.
43-
44-
public function TouchEvent(type: String, bubbles: Boolean = true, cancelable: Boolean = false, touchPointID: int = 0,
45-
isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN,
46-
sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN,
47-
relatedObject: InteractiveObject = null, ctrlKey: Boolean = false,
48-
altKey: Boolean = false, shiftKey: Boolean = false) {
49-
super(type, bubbles, cancelable);
50-
this.touchPointID = touchPointID;
51-
this.isPrimaryTouchPoint = isPrimaryTouchPoint;
52-
this.localX = localX;
53-
this.localY = localY;
54-
this.sizeX = sizeX;
55-
this.sizeY = sizeY;
56-
this.pressure = pressure;
57-
this.relatedObject = relatedObject;
58-
this.ctrlKey = ctrlKey;
59-
this.altKey = altKey;
60-
this.shiftKey = shiftKey;
61-
}
62-
63-
// [override] Creates a copy of the TouchEvent object and sets the value of each property to match that of the original.
64-
override public function clone(): Event {
65-
return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint,
66-
this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey,
67-
this.altKey, this.shiftKey);
68-
}
69-
70-
// Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event.
71-
[API("675")]
72-
public function getSamples(buffer: ByteArray, append: Boolean = false): uint {
73-
stub_method("flash.events.TouchEvent", "getSamples");
74-
return 0;
75-
}
76-
77-
// Reports that the hardware button at the specified index is pressed.
78-
[API("675")]
79-
public function isToolButtonDown(index: int): Boolean {
80-
stub_method("flash.events.TouchEvent", "isToolButtonDown");
81-
return false;
82-
}
83-
84-
// [override] Returns a string that contains all the properties of the TouchEvent object.
85-
override public function toString(): String {
86-
return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID",
87-
"isPrimaryTouchPoint", "localX", "localY", "stageX", "stageY", "sizeX", "sizeY", "pressure", "relatedObject",
88-
"ctrlKey", "altKey", "shiftKey");
89-
}
90-
91-
// Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified.
92-
public native function updateAfterEvent(): void;
93-
94-
public function get touchPointID():int {
95-
return this._touchPointID;
96-
}
97-
public function set touchPointID(value:int):void {
98-
this._touchPointID = value;
99-
}
100-
101-
public function get isPrimaryTouchPoint():Boolean {
102-
return this._isPrimaryTouchPoint;
103-
}
104-
public function set isPrimaryTouchPoint(value:Boolean):void {
105-
this._isPrimaryTouchPoint = value;
106-
}
107-
108-
public function get localX():Number {
109-
return this._localX;
110-
}
111-
public function set localX(value:Number):void {
112-
this._localX = value;
113-
}
114-
115-
public function get localY():Number {
116-
return this._localY;
117-
}
118-
public function set localY(value:Number):void {
119-
this._localY = value;
120-
}
121-
122-
public function get sizeX():Number {
123-
return this._sizeX;
124-
}
125-
public function set sizeX(value:Number):void {
126-
this._sizeX = value;
6+
import flash.utils.ByteArray;
7+
import flash.display.InteractiveObject;
8+
import __ruffle__.stub_method;
9+
10+
[API("667")]
11+
public class TouchEvent extends Event {
12+
public static const PROXIMITY_BEGIN: String = "proximityBegin"; // [static] Defines the value of the type property of a PROXIMITY_BEGIN touch event object.
13+
public static const PROXIMITY_END: String = "proximityEnd"; // [static] Defines the value of the type property of a PROXIMITY_END touch event object.
14+
public static const PROXIMITY_MOVE: String = "proximityMove"; // [static] Defines the value of the type property of a PROXIMITY_MOVE touch event object.
15+
public static const PROXIMITY_OUT: String = "proximityOut"; // [static] Defines the value of the type property of a PROXIMITY_OUT touch event object.
16+
public static const PROXIMITY_OVER: String = "proximityOver"; // [static] Defines the value of the type property of a PROXIMITY_OVER touch event object.
17+
public static const PROXIMITY_ROLL_OUT: String = "proximityRollOut"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OUT touch event object.
18+
public static const PROXIMITY_ROLL_OVER: String = "proximityRollOver"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OVER touch event object.
19+
public static const TOUCH_BEGIN: String = "touchBegin"; // [static] Defines the value of the type property of a TOUCH_BEGIN touch event object.
20+
public static const TOUCH_END: String = "touchEnd"; // [static] Defines the value of the type property of a TOUCH_END touch event object.
21+
public static const TOUCH_MOVE: String = "touchMove"; // [static] Defines the value of the type property of a TOUCH_MOVE touch event object.
22+
public static const TOUCH_OUT: String = "touchOut"; // [static] Defines the value of the type property of a TOUCH_OUT touch event object.
23+
public static const TOUCH_OVER: String = "touchOver"; // [static] Defines the value of the type property of a TOUCH_OVER touch event object.
24+
public static const TOUCH_ROLL_OUT: String = "touchRollOut"; // [static] Defines the value of the type property of a TOUCH_ROLL_OUT touch event object.
25+
public static const TOUCH_ROLL_OVER: String = "touchRollOver"; // [static] Defines the value of the type property of a TOUCH_ROLL_OVER touch event object.
26+
public static const TOUCH_TAP: String = "touchTap"; // [static] Defines the value of the type property of a TOUCH_TAP touch event object.
27+
28+
private var _touchPointID: int; // A unique identification number (as an int) assigned to the touch point.
29+
private var _isPrimaryTouchPoint: Boolean; // Indicates whether the first point of contact is mapped to mouse events.
30+
private var _localX: Number; // The horizontal coordinate at which the event occurred relative to the containing sprite.
31+
private var _localY: Number; // The vertical coordinate at which the event occurred relative to the containing sprite.
32+
private var _sizeX: Number; // Width of the contact area.
33+
private var _sizeY: Number; // Height of the contact area.
34+
private var _pressure: Number; // A value between 0.0 and 1.0 indicating force of the contact with the device.
35+
private var _relatedObject: InteractiveObject; // A reference to a display list object that is related to the event.
36+
private var _ctrlKey: Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false).
37+
private var _altKey: Boolean; // Indicates whether the Alt key is active (true) or inactive (false).
38+
private var _shiftKey: Boolean; // Indicates whether the Shift key is active (true) or inactive (false).
39+
private var _isRelatedObjectInaccessible: Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes.
40+
private var _stageX: Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates.
41+
private var _stageY: Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates.
42+
43+
public function TouchEvent(type: String, bubbles: Boolean = true, cancelable: Boolean = false, touchPointID: int = 0,
44+
isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN,
45+
sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN,
46+
relatedObject: InteractiveObject = null, ctrlKey: Boolean = false,
47+
altKey: Boolean = false, shiftKey: Boolean = false) {
48+
super(type, bubbles, cancelable);
49+
this.touchPointID = touchPointID;
50+
this.isPrimaryTouchPoint = isPrimaryTouchPoint;
51+
this.localX = localX;
52+
this.localY = localY;
53+
this.sizeX = sizeX;
54+
this.sizeY = sizeY;
55+
this.pressure = pressure;
56+
this.relatedObject = relatedObject;
57+
this.ctrlKey = ctrlKey;
58+
this.altKey = altKey;
59+
this.shiftKey = shiftKey;
60+
}
61+
62+
// [override] Creates a copy of the TouchEvent object and sets the value of each property to match that of the original.
63+
override public function clone(): Event {
64+
return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint,
65+
this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey,
66+
this.altKey, this.shiftKey);
67+
}
68+
69+
// Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event.
70+
[API("675")]
71+
public function getSamples(buffer: ByteArray, append: Boolean = false): uint {
72+
stub_method("flash.events.TouchEvent", "getSamples");
73+
return 0;
74+
}
75+
76+
// Reports that the hardware button at the specified index is pressed.
77+
[API("675")]
78+
public function isToolButtonDown(index: int): Boolean {
79+
stub_method("flash.events.TouchEvent", "isToolButtonDown");
80+
return false;
81+
}
82+
83+
// [override] Returns a string that contains all the properties of the TouchEvent object.
84+
override public function toString(): String {
85+
return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID",
86+
"isPrimaryTouchPoint", "localX", "localY", "stageX", "stageY", "sizeX", "sizeY", "pressure", "relatedObject",
87+
"ctrlKey", "altKey", "shiftKey");
88+
}
89+
90+
// Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified.
91+
public native function updateAfterEvent(): void;
92+
93+
public function get touchPointID():int {
94+
return this._touchPointID;
95+
}
96+
public function set touchPointID(value:int):void {
97+
this._touchPointID = value;
98+
}
99+
100+
public function get isPrimaryTouchPoint():Boolean {
101+
return this._isPrimaryTouchPoint;
102+
}
103+
public function set isPrimaryTouchPoint(value:Boolean):void {
104+
this._isPrimaryTouchPoint = value;
105+
}
106+
107+
public function get localX():Number {
108+
return this._localX;
109+
}
110+
public function set localX(value:Number):void {
111+
this._localX = value;
112+
}
113+
114+
public function get localY():Number {
115+
return this._localY;
116+
}
117+
public function set localY(value:Number):void {
118+
this._localY = value;
119+
}
120+
121+
public function get sizeX():Number {
122+
return this._sizeX;
123+
}
124+
public function set sizeX(value:Number):void {
125+
this._sizeX = value;
126+
}
127+
128+
public function get sizeY():Number {
129+
return this._sizeY;
130+
}
131+
public function set sizeY(value:Number):void {
132+
this._sizeY = value;
133+
}
134+
135+
public function get pressure():Number {
136+
return this._pressure;
137+
}
138+
public function set pressure(value:Number):void {
139+
this._pressure = value;
140+
}
141+
142+
public function get relatedObject():InteractiveObject {
143+
return this._relatedObject;
144+
}
145+
public function set relatedObject(value:InteractiveObject):void {
146+
this._relatedObject = value;
147+
}
148+
149+
public function get ctrlKey():Boolean {
150+
return this._ctrlKey;
151+
}
152+
public function set ctrlKey(value:Boolean):void {
153+
this._ctrlKey = value;
154+
}
155+
156+
public function get altKey():Boolean {
157+
return this._altKey;
158+
}
159+
public function set altKey(value:Boolean):void {
160+
this._altKey = value;
161+
}
162+
163+
public function get shiftKey():Boolean {
164+
return this._shiftKey;
165+
}
166+
public function set shiftKey(value:Boolean):void {
167+
this._shiftKey = value;
168+
}
169+
170+
public function get isRelatedObjectInaccessible():Boolean {
171+
return this._isRelatedObjectInaccessible;
172+
}
173+
public function set isRelatedObjectInaccessible(value:Boolean):void {
174+
this._isRelatedObjectInaccessible = value;
175+
}
176+
177+
public function get stageX(): Number {
178+
return this._stageX;
179+
}
180+
public function get stageY(): Number {
181+
return this._stageY;
182+
}
127183
}
128-
129-
public function get sizeY():Number {
130-
return this._sizeY;
131-
}
132-
public function set sizeY(value:Number):void {
133-
this._sizeY = value;
134-
}
135-
136-
public function get pressure():Number {
137-
return this._pressure;
138-
}
139-
public function set pressure(value:Number):void {
140-
this._pressure = value;
141-
}
142-
143-
public function get relatedObject():InteractiveObject {
144-
return this._relatedObject;
145-
}
146-
public function set relatedObject(value:InteractiveObject):void {
147-
this._relatedObject = value;
148-
}
149-
150-
public function get ctrlKey():Boolean {
151-
return this._ctrlKey;
152-
}
153-
public function set ctrlKey(value:Boolean):void {
154-
this._ctrlKey = value;
155-
}
156-
157-
public function get altKey():Boolean {
158-
return this._altKey;
159-
}
160-
public function set altKey(value:Boolean):void {
161-
this._altKey = value;
162-
}
163-
164-
public function get shiftKey():Boolean {
165-
return this._shiftKey;
166-
}
167-
public function set shiftKey(value:Boolean):void {
168-
this._shiftKey = value;
169-
}
170-
171-
public function get isRelatedObjectInaccessible():Boolean {
172-
return this._isRelatedObjectInaccessible;
173-
}
174-
public function set isRelatedObjectInaccessible(value:Boolean):void {
175-
this._isRelatedObjectInaccessible = value;
176-
}
177-
178-
public function get stageX(): Number {
179-
return this._stageX;
180-
}
181-
public function get stageY(): Number {
182-
return this._stageY;
183-
}
184-
}
185184
}

0 commit comments

Comments
 (0)