dragonbones-runtime
Version:
the tools to build dragonbones file for diffrent framework
103 lines (99 loc) • 4.58 kB
text/typescript
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
namespace egret {
// export interface TextField{
// addEventListener<Z>(type: "focusIn" |
// "focusOut"
// , listener: (this: Z, e: FocusEvent) => void, thisObject: Z, useCapture?: boolean, priority?: number);
// addEventListener(type: string, listener: Function, thisObject: any, useCapture?: boolean, priority?: number);
// }
/**
* When the user changes the focus from one object in the display list to another object, the object dispatches a FocusEvent object. Currently only supports input text.
* Focus events: FocusEvent.FOCUS_IN FocusEvent.FOCUS_OUT
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
/**
* 用户将焦点从显示列表中的一个对象更改到另一个对象时,对象将调度 FocusEvent 对象。目前只支持输入文本。
* 焦点事件:FocusEvent.FOCUS_IN FocusEvent.FOCUS_OUT
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
*/
export class FocusEvent extends egret.Event {
/**
* Gets focus
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
/**
* 获得焦点
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
*/
public static FOCUS_IN:"focusIn" = "focusIn";
/**
* Loses focus
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
/**
* 失去焦点
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
*/
public static FOCUS_OUT:"focusOut" = "focusOut";
/**
* Create a egret.FocusEvent objects
* @param type The type of the event, accessible as Event.type.
* @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false.
* @param cancelable Determines whether the Event object can be canceled. The default values is false.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
/**
* 创建一个 egret.FocusEvent 对象
* @param type 事件的类型,可以作为 Event.type 访问。
* @param bubbles 确定 Event 对象是否参与事件流的冒泡阶段。默认值为 false。
* @param cancelable 确定是否可以取消 Event 对象。默认值为 false。
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
*/
public constructor(type:string, bubbles:boolean = false, cancelable:boolean = false) {
super(type, bubbles, cancelable);
}
}
}