@next2d/events 1.14.20
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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/Event.d.ts +424 -0
- package/dist/Event.js +560 -0
- package/dist/EventDispatcher.d.ts +138 -0
- package/dist/EventDispatcher.js +622 -0
- package/dist/EventPhase.d.ts +80 -0
- package/dist/EventPhase.js +94 -0
- package/dist/FocusEvent.d.ts +89 -0
- package/dist/FocusEvent.js +103 -0
- package/dist/HTTPStatusEvent.d.ts +107 -0
- package/dist/HTTPStatusEvent.js +139 -0
- package/dist/IOErrorEvent.d.ts +82 -0
- package/dist/IOErrorEvent.js +101 -0
- package/dist/MouseEvent.d.ts +163 -0
- package/dist/MouseEvent.js +207 -0
- package/dist/ProgressEvent.d.ts +97 -0
- package/dist/ProgressEvent.js +123 -0
- package/dist/VideoEvent.d.ts +145 -0
- package/dist/VideoEvent.js +181 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Next2D
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/Event.d.ts
ADDED
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { EventDispatcherImpl } from "@next2d/interface";
|
|
2
|
+
/**
|
|
3
|
+
* Event クラスのメソッドは、イベントリスナー関数で使用してイベントオブジェクトの動作に影響を与えることができます。
|
|
4
|
+
* 一部のイベントにはデフォルトの動作が関連付けられています。
|
|
5
|
+
* 例えば、doubleClick イベントには、イベント時にマウスポインター位置の単語がハイライト表示されるというデフォルトの動作が関連付けられています。
|
|
6
|
+
* イベントリスナーで preventDefault() メソッドを呼び出してこの動作をキャンセルできます。
|
|
7
|
+
* また、stopPropagation() メソッドまたは stopImmediatePropagation() メソッドを呼び出すと、
|
|
8
|
+
* 現在のイベントリスナーを、イベントを処理する最後のイベントリスナーにすることができます。
|
|
9
|
+
*
|
|
10
|
+
* The methods of the Event class can be used in event listener functions to affect the behavior of the event object.
|
|
11
|
+
* Some events have an associated default behavior. For example,
|
|
12
|
+
* the doubleClick event has an associated default behavior that highlights the word under the mouse pointer at the time of the event.
|
|
13
|
+
* Your event listener can cancel this behavior by calling the preventDefault() method.
|
|
14
|
+
* You can also make the current event listener the last one to process
|
|
15
|
+
* an event by calling the stopPropagation() or stopImmediatePropagation() method.
|
|
16
|
+
*
|
|
17
|
+
* @class
|
|
18
|
+
* @memberOf next2d.events
|
|
19
|
+
*/
|
|
20
|
+
export declare class Event {
|
|
21
|
+
private readonly _$type;
|
|
22
|
+
private readonly _$bubbles;
|
|
23
|
+
private readonly _$cancelable;
|
|
24
|
+
private _$target;
|
|
25
|
+
private _$currentTarget;
|
|
26
|
+
private _$listener;
|
|
27
|
+
private _$eventPhase;
|
|
28
|
+
_$stopImmediatePropagation: boolean;
|
|
29
|
+
_$stopPropagation: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @param {string} type
|
|
32
|
+
* @param {boolean} [bubbles=false]
|
|
33
|
+
* @param {boolean} [cancelable=false]
|
|
34
|
+
*
|
|
35
|
+
* @constructor
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
constructor(type: string, bubbles?: boolean, cancelable?: boolean);
|
|
39
|
+
/**
|
|
40
|
+
* 指定されたクラスのストリングを返します。
|
|
41
|
+
* Returns the string representation of the specified class.
|
|
42
|
+
*
|
|
43
|
+
* @return {string}
|
|
44
|
+
* @default [class Event]
|
|
45
|
+
* @method
|
|
46
|
+
* @static
|
|
47
|
+
*/
|
|
48
|
+
static toString(): string;
|
|
49
|
+
/**
|
|
50
|
+
* @description 指定されたクラスの空間名を返します。
|
|
51
|
+
* Returns the space name of the specified class.
|
|
52
|
+
*
|
|
53
|
+
* @member {string}
|
|
54
|
+
* @default next2d.events.Event
|
|
55
|
+
* @const
|
|
56
|
+
* @static
|
|
57
|
+
*/
|
|
58
|
+
static get namespace(): string;
|
|
59
|
+
/**
|
|
60
|
+
* @description 指定されたオブジェクトのストリングを返します。
|
|
61
|
+
* Returns the string representation of the specified object.
|
|
62
|
+
*
|
|
63
|
+
* @return {string}
|
|
64
|
+
* @method
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
toString(): string;
|
|
68
|
+
/**
|
|
69
|
+
* @description 指定されたオブジェクトの空間名を返します。
|
|
70
|
+
* Returns the space name of the specified object.
|
|
71
|
+
*
|
|
72
|
+
* @member {string}
|
|
73
|
+
* @default next2d.events.Event
|
|
74
|
+
* @const
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
get namespace(): string;
|
|
78
|
+
/**
|
|
79
|
+
* @description ACTIVATE 定数は、type プロパティ(activate イベントオブジェクト)の値を定義します。
|
|
80
|
+
* The ACTIVATE constant defines the value
|
|
81
|
+
* of the type property of an activate event object.
|
|
82
|
+
*
|
|
83
|
+
* @return {string}
|
|
84
|
+
* @default activate
|
|
85
|
+
* @const
|
|
86
|
+
* @static
|
|
87
|
+
*/
|
|
88
|
+
static get ACTIVATE(): string;
|
|
89
|
+
/**
|
|
90
|
+
* @description Event.ADDED 定数は、added イベントオブジェクトの type プロパティの値を定義します。
|
|
91
|
+
* The Event.ADDED constant defines the value
|
|
92
|
+
* of the type property of an added event object.
|
|
93
|
+
*
|
|
94
|
+
* @return {string}
|
|
95
|
+
* @default added
|
|
96
|
+
* @const
|
|
97
|
+
* @static
|
|
98
|
+
*/
|
|
99
|
+
static get ADDED(): string;
|
|
100
|
+
/**
|
|
101
|
+
* @description Event.ADDED_TO_STAGE 定数は、type プロパティ(addedToStage イベントオブジェクト)の値を定義します。
|
|
102
|
+
* The Event.ADDED_TO_STAGE constant defines the value
|
|
103
|
+
* of the type property of an addedToStage event object.
|
|
104
|
+
*
|
|
105
|
+
* @return {string}
|
|
106
|
+
* @default addedToStage
|
|
107
|
+
* @const
|
|
108
|
+
* @static
|
|
109
|
+
*/
|
|
110
|
+
static get ADDED_TO_STAGE(): string;
|
|
111
|
+
/**
|
|
112
|
+
* @description Event.CHANGE 定数は、type プロパティ(change イベントオブジェクト)の値を定義します。
|
|
113
|
+
* The Event.CHANGE constant defines the value
|
|
114
|
+
* of the type property of a change event object.
|
|
115
|
+
*
|
|
116
|
+
* @return {string}
|
|
117
|
+
* @default change
|
|
118
|
+
* @const
|
|
119
|
+
* @static
|
|
120
|
+
*/
|
|
121
|
+
static get CHANGE(): string;
|
|
122
|
+
/**
|
|
123
|
+
* @description Event.COMPLETE 定数は、complete イベントオブジェクトの type プロパティの値を定義します。
|
|
124
|
+
* The Event.COMPLETE constant defines the value
|
|
125
|
+
* of the type property of a complete event object.
|
|
126
|
+
*
|
|
127
|
+
* @return {string}
|
|
128
|
+
* @default complete
|
|
129
|
+
* @const
|
|
130
|
+
* @static
|
|
131
|
+
*/
|
|
132
|
+
static get COMPLETE(): string;
|
|
133
|
+
/**
|
|
134
|
+
* @description Event.DEACTIVATE 定数は、deactivate イベントオブジェクトの type プロパティの値を定義します。
|
|
135
|
+
* The Event.DEACTIVATE constant defines the value
|
|
136
|
+
* of the type property of a deactivate event object.
|
|
137
|
+
*
|
|
138
|
+
* @return {string}
|
|
139
|
+
* @default deactivate
|
|
140
|
+
* @const
|
|
141
|
+
* @static
|
|
142
|
+
*/
|
|
143
|
+
static get DEACTIVATE(): string;
|
|
144
|
+
/**
|
|
145
|
+
* @description Event.ENTER_FRAME 定数は、enterFrame イベントオブジェクトの type プロパティの値を定義します。
|
|
146
|
+
* The Event.ENTER_FRAME constant defines the value
|
|
147
|
+
* of the type property of an enterFrame event object.
|
|
148
|
+
*
|
|
149
|
+
* @return {string}
|
|
150
|
+
* @default enterFrame
|
|
151
|
+
* @const
|
|
152
|
+
* @static
|
|
153
|
+
*/
|
|
154
|
+
static get ENTER_FRAME(): string;
|
|
155
|
+
/**
|
|
156
|
+
* @description Event.EXIT_FRAME 定数は、exitFrame イベントオブジェクトの type プロパティの値を定義します。
|
|
157
|
+
* The Event.EXIT_FRAME constant defines the value
|
|
158
|
+
* of the type property of an exitFrame event object.
|
|
159
|
+
*
|
|
160
|
+
* @return {string}
|
|
161
|
+
* @default exitFrame
|
|
162
|
+
* @const
|
|
163
|
+
* @static
|
|
164
|
+
*/
|
|
165
|
+
static get EXIT_FRAME(): string;
|
|
166
|
+
/**
|
|
167
|
+
* @description Event.FRAME_CONSTRUCTED 定数は、frameConstructed イベントオブジェクトの type プロパティの値を定義します。
|
|
168
|
+
* The Event.FRAME_CONSTRUCTED constant defines the value
|
|
169
|
+
* of the type property of an frameConstructed event object.
|
|
170
|
+
*
|
|
171
|
+
* @return {string}
|
|
172
|
+
* @default frameConstructed
|
|
173
|
+
* @const
|
|
174
|
+
* @static
|
|
175
|
+
*/
|
|
176
|
+
static get FRAME_CONSTRUCTED(): string;
|
|
177
|
+
/**
|
|
178
|
+
* @description Event.FRAME_LABEL 定数は、frameLabel イベントオブジェクトの type プロパティの値を定義します。
|
|
179
|
+
* The Event.FRAME_LABEL constant defines the value
|
|
180
|
+
* of the type property of an frameLabel event object.
|
|
181
|
+
*
|
|
182
|
+
* @return {string}
|
|
183
|
+
* @default frameLabel
|
|
184
|
+
* @const
|
|
185
|
+
* @static
|
|
186
|
+
*/
|
|
187
|
+
static get FRAME_LABEL(): string;
|
|
188
|
+
/**
|
|
189
|
+
* @description Event.INIT 定数は、init イベントオブジェクトの type プロパティの値を定義します。
|
|
190
|
+
* The Event.INIT constant defines the value
|
|
191
|
+
* of the type property of an init event object.
|
|
192
|
+
*
|
|
193
|
+
* @return {string}
|
|
194
|
+
* @default frameConstructed
|
|
195
|
+
* @const
|
|
196
|
+
* @static
|
|
197
|
+
*/
|
|
198
|
+
static get INIT(): string;
|
|
199
|
+
/**
|
|
200
|
+
* @description Event.LOAD 定数は、load イベントオブジェクトの type プロパティの値を定義します。
|
|
201
|
+
* The Event.LOAD constant defines the value
|
|
202
|
+
* of the type property of an load event object.
|
|
203
|
+
*
|
|
204
|
+
* @return {string}
|
|
205
|
+
* @default frameConstructed
|
|
206
|
+
* @const
|
|
207
|
+
* @static
|
|
208
|
+
*/
|
|
209
|
+
static get LOAD(): string;
|
|
210
|
+
/**
|
|
211
|
+
* @description Event.MOUSE_LEAVE 定数は、mouseLeave イベントオブジェクトの type プロパティの値を定義します。
|
|
212
|
+
* The Event.MOUSE_LEAVE constant defines the value
|
|
213
|
+
* of the type property of a mouseLeave event object.
|
|
214
|
+
*
|
|
215
|
+
* @return {string}
|
|
216
|
+
* @default mouseLeave
|
|
217
|
+
* @const
|
|
218
|
+
* @static
|
|
219
|
+
*/
|
|
220
|
+
static get MOUSE_LEAVE(): string;
|
|
221
|
+
/**
|
|
222
|
+
* @description Event.REMOVED 定数は、removed プロパティ(paste イベントオブジェクト)の値を定義します。
|
|
223
|
+
* The Event.REMOVED constant defines the value
|
|
224
|
+
* of the type property of a removed event object.
|
|
225
|
+
*
|
|
226
|
+
* @return {string}
|
|
227
|
+
* @default removed
|
|
228
|
+
* @const
|
|
229
|
+
* @static
|
|
230
|
+
*/
|
|
231
|
+
static get REMOVED(): string;
|
|
232
|
+
/**
|
|
233
|
+
* @description Event.REMOVED_FROM_STAGE 定数は、removedFromStage イベントオブジェクトの type プロパティの値を定義します。
|
|
234
|
+
* The Event.REMOVED_FROM_STAGE constant defines the value
|
|
235
|
+
* of the type property of a removedFromStage event object.
|
|
236
|
+
*
|
|
237
|
+
* @return {string}
|
|
238
|
+
* @default removedFromStage
|
|
239
|
+
* @const
|
|
240
|
+
* @static
|
|
241
|
+
*/
|
|
242
|
+
static get REMOVED_FROM_STAGE(): string;
|
|
243
|
+
/**
|
|
244
|
+
* @description Event.RENDER 定数は、render イベントオブジェクトの
|
|
245
|
+
* type プロパティの値を定義します。
|
|
246
|
+
* The Event.RENDER constant defines the value
|
|
247
|
+
* of the type property of a render event object.
|
|
248
|
+
*
|
|
249
|
+
* @return {string}
|
|
250
|
+
* @default render
|
|
251
|
+
* @const
|
|
252
|
+
* @static
|
|
253
|
+
*/
|
|
254
|
+
static get RENDER(): string;
|
|
255
|
+
/**
|
|
256
|
+
* @description Event.RESIZE 定数は、resize イベントオブジェクトの
|
|
257
|
+
* type プロパティの値を定義します。
|
|
258
|
+
* The Event.RESIZE constant defines the value
|
|
259
|
+
* of the type property of a resize event object.
|
|
260
|
+
*
|
|
261
|
+
* @return {string}
|
|
262
|
+
* @default resize
|
|
263
|
+
* @const
|
|
264
|
+
* @static
|
|
265
|
+
*/
|
|
266
|
+
static get RESIZE(): string;
|
|
267
|
+
/**
|
|
268
|
+
* @description Event.SCROLL 定数は、render イベントオブジェクトの
|
|
269
|
+
* type プロパティの値を定義します。
|
|
270
|
+
* The Event.SCROLL constant defines the value
|
|
271
|
+
* of the type property of a render event object.
|
|
272
|
+
*
|
|
273
|
+
* @return {string}
|
|
274
|
+
* @default scroll
|
|
275
|
+
* @const
|
|
276
|
+
* @static
|
|
277
|
+
*/
|
|
278
|
+
static get SCROLL(): string;
|
|
279
|
+
/**
|
|
280
|
+
* @description Event.OPEN 定数は、render イベントオブジェクトの
|
|
281
|
+
* type プロパティの値を定義します。
|
|
282
|
+
* The Event.OPEN constant defines the value
|
|
283
|
+
* of the type property of a render event object.
|
|
284
|
+
*
|
|
285
|
+
* @return {string}
|
|
286
|
+
* @default open
|
|
287
|
+
* @const
|
|
288
|
+
* @static
|
|
289
|
+
*/
|
|
290
|
+
static get OPEN(): string;
|
|
291
|
+
/**
|
|
292
|
+
* @description Event.STOP 定数は、render イベントオブジェクトの
|
|
293
|
+
* type プロパティの値を定義します。
|
|
294
|
+
* The Event.STOP constant defines the value
|
|
295
|
+
* of the type property of a render event object.
|
|
296
|
+
*
|
|
297
|
+
* @return {string}
|
|
298
|
+
* @default stop
|
|
299
|
+
* @const
|
|
300
|
+
* @static
|
|
301
|
+
*/
|
|
302
|
+
static get STOP(): string;
|
|
303
|
+
/**
|
|
304
|
+
* @description Event.SOUND_COMPLETE 定数は、soundComplete イベントオブジェクトの type プロパティの値を定義します。
|
|
305
|
+
* The Event.SOUND_COMPLETE constant defines the value
|
|
306
|
+
* of the type property of a soundComplete event object.
|
|
307
|
+
*
|
|
308
|
+
* @return {string}
|
|
309
|
+
* @default render
|
|
310
|
+
* @const
|
|
311
|
+
* @static
|
|
312
|
+
*/
|
|
313
|
+
static get SOUND_COMPLETE(): string;
|
|
314
|
+
/**
|
|
315
|
+
* @description Event.UPDATE 定数は、render イベントオブジェクトの
|
|
316
|
+
* type プロパティの値を定義します。
|
|
317
|
+
* The Event.STOP constant defines the value
|
|
318
|
+
* of the type property of a render event object.
|
|
319
|
+
*
|
|
320
|
+
* @return {string}
|
|
321
|
+
* @default update
|
|
322
|
+
* @const
|
|
323
|
+
* @static
|
|
324
|
+
*/
|
|
325
|
+
static get UPDATE(): string;
|
|
326
|
+
/**
|
|
327
|
+
* @description イベントがバブリングイベントかどうかを示します。
|
|
328
|
+
* Indicates whether an event is a bubbling event.
|
|
329
|
+
*
|
|
330
|
+
* @member {boolean}
|
|
331
|
+
* @readonly
|
|
332
|
+
* @public
|
|
333
|
+
*/
|
|
334
|
+
get bubbles(): boolean;
|
|
335
|
+
/**
|
|
336
|
+
* @description イベントに関連付けられた動作を回避できるかどうかを示します。
|
|
337
|
+
* Indicates whether the behavior associated
|
|
338
|
+
* with the event can be prevented.
|
|
339
|
+
*
|
|
340
|
+
* @member {boolean}
|
|
341
|
+
* @readonly
|
|
342
|
+
* @public
|
|
343
|
+
*/
|
|
344
|
+
get cancelable(): boolean;
|
|
345
|
+
/**
|
|
346
|
+
* @description イベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
|
|
347
|
+
* The object that is actively processing the Event object
|
|
348
|
+
* with an event listener.
|
|
349
|
+
*
|
|
350
|
+
* @member {EventDispatcher|null}
|
|
351
|
+
* @public
|
|
352
|
+
*/
|
|
353
|
+
get currentTarget(): EventDispatcherImpl<any>;
|
|
354
|
+
set currentTarget(current_target: EventDispatcherImpl<any>);
|
|
355
|
+
/**
|
|
356
|
+
* @description イベントフローの現在の段階です。
|
|
357
|
+
* The current phase in the event flow.
|
|
358
|
+
*
|
|
359
|
+
* @member {number}
|
|
360
|
+
* @public
|
|
361
|
+
*/
|
|
362
|
+
get eventPhase(): number;
|
|
363
|
+
set eventPhase(event_phase: number);
|
|
364
|
+
/**
|
|
365
|
+
* @description 現在コールされている関数
|
|
366
|
+
* Function currently being called.
|
|
367
|
+
*
|
|
368
|
+
* @member {function}
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
371
|
+
get listener(): Function | null;
|
|
372
|
+
set listener(listener: Function | null);
|
|
373
|
+
/**
|
|
374
|
+
* @description イベントターゲットです。
|
|
375
|
+
* The event target.
|
|
376
|
+
*
|
|
377
|
+
* @member {EventDispatcher|null}
|
|
378
|
+
* @public
|
|
379
|
+
*/
|
|
380
|
+
get target(): EventDispatcherImpl<any>;
|
|
381
|
+
set target(target: EventDispatcherImpl<any>);
|
|
382
|
+
/**
|
|
383
|
+
* @description イベントのタイプです。
|
|
384
|
+
* The type of event.
|
|
385
|
+
*
|
|
386
|
+
* @member {string}
|
|
387
|
+
* @readonly
|
|
388
|
+
* @public
|
|
389
|
+
*/
|
|
390
|
+
get type(): string;
|
|
391
|
+
/**
|
|
392
|
+
* @description カスタム ActionScript 3.0 Event クラスに
|
|
393
|
+
* toString() メソッドを実装するためのユーティリティ関数です。
|
|
394
|
+
* A utility function for implementing the toString() method
|
|
395
|
+
* in custom ActionScript 3.0 Event classes.
|
|
396
|
+
*
|
|
397
|
+
* @return {string}
|
|
398
|
+
* @method
|
|
399
|
+
* @public
|
|
400
|
+
*/
|
|
401
|
+
formatToString(...args: string[]): string;
|
|
402
|
+
/**
|
|
403
|
+
* @description イベントフローの現在のノードおよび後続するノードで、
|
|
404
|
+
* イベントリスナーが処理されないようにします。
|
|
405
|
+
* Prevents processing of any event listeners in the current node
|
|
406
|
+
* and any subsequent nodes in the event flow.
|
|
407
|
+
*
|
|
408
|
+
* @return {void}
|
|
409
|
+
* @method
|
|
410
|
+
* @public
|
|
411
|
+
*/
|
|
412
|
+
stopImmediatePropagation(): void;
|
|
413
|
+
/**
|
|
414
|
+
* @description イベントフローの現在のノードに後続するノードで
|
|
415
|
+
* イベントリスナーが処理されないようにします。
|
|
416
|
+
* Prevents processing of any event listeners in nodes subsequent
|
|
417
|
+
* to the current node in the event flow.
|
|
418
|
+
*
|
|
419
|
+
* @return {void}
|
|
420
|
+
* @method
|
|
421
|
+
* @public
|
|
422
|
+
*/
|
|
423
|
+
stopPropagation(): void;
|
|
424
|
+
}
|