// Generated by dts-bundle v0.7.3
// Dependencies for this module:
//   ../lib/cc.d.ts

declare module 'fairygui-cc' {
    export { GGroup } from "fairygui-cc/GGroup";
    export { GObject } from "fairygui-cc/GObject";
    export { GGraph } from "fairygui-cc/GGraph";
    export { GImage } from "fairygui-cc/GImage";
    export { GMovieClip } from "fairygui-cc/GMovieClip";
    export { GRoot } from "fairygui-cc/GRoot";
    export { GTextField } from "fairygui-cc/GTextField";
    export { GRichTextField } from "fairygui-cc/GRichTextField";
    export { GTextInput } from "fairygui-cc/GTextInput";
    export { GLoader } from "fairygui-cc/GLoader";
    export { GLoader3D } from "fairygui-cc/GLoader3D";
    export { GComponent } from "fairygui-cc/GComponent";
    export { GLabel } from "fairygui-cc/GLabel";
    export { GButton } from "fairygui-cc/GButton";
    export { GComboBox } from "fairygui-cc/GComboBox";
    export { GSlider } from "fairygui-cc/GSlider";
    export { GProgressBar } from "fairygui-cc/GProgressBar";
    export { GScrollBar } from "fairygui-cc/GScrollBar";
    export { GList, ListItemRenderer } from "fairygui-cc/GList";
    export { GTree } from "fairygui-cc/GTree";
    export { GTreeNode } from "fairygui-cc/GTreeNode";
    export { Window } from "fairygui-cc/Window";
    export { PopupMenu } from "fairygui-cc/PopupMenu";
    export { Controller } from "fairygui-cc/Controller";
    export { Transition } from "fairygui-cc/Transition";
    export { ScrollPane } from "fairygui-cc/ScrollPane";
    export { RelationType } from "fairygui-cc/FieldTypes";
    export { UIPackage } from "fairygui-cc/UIPackage";
    export { PackageItem } from "fairygui-cc/PackageItem";
    export { GObjectPool } from "fairygui-cc/GObjectPool";
    export { UIObjectFactory } from "fairygui-cc/UIObjectFactory";
    export { UIConfig, registerFont } from "fairygui-cc/UIConfig";
    export { DragDropManager } from "fairygui-cc/DragDropManager";
    export { AsyncOperation } from "fairygui-cc/AsyncOperation";
    export { TranslationHelper } from "fairygui-cc/TranslationHelper";
    export { GearAnimation } from "fairygui-cc/gears/GearAnimation";
    export { GearBase } from "fairygui-cc/gears/GearBase";
    export { GearColor } from "fairygui-cc/gears/GearColor";
    export { GearDisplay } from "fairygui-cc/gears/GearDisplay";
    export { GearDisplay2 } from "fairygui-cc/gears/GearDisplay2";
    export { GearFontSize } from "fairygui-cc/gears/GearFontSize";
    export { GearIcon } from "fairygui-cc/gears/GearIcon";
    export { GearLook } from "fairygui-cc/gears/GearLook";
    export { GearSize } from "fairygui-cc/gears/GearSize";
    export { GearText } from "fairygui-cc/gears/GearText";
    export { GearXY } from "fairygui-cc/gears/GearXY";
    export * from "fairygui-cc/FieldTypes";
    export { BlendMode } from "fairygui-cc/display/BlendMode";
    export { Image } from "fairygui-cc/display/Image";
    export { MovieClip, Frame } from "fairygui-cc/display/MovieClip";
    export { Event } from "fairygui-cc/event/Event";
    export { GTween } from "fairygui-cc/tween/GTween";
    export { GTweener } from "fairygui-cc/tween/GTweener";
    export { EaseType } from "fairygui-cc/tween/EaseType";
    export { UBBParser } from "fairygui-cc/utils/UBBParser";
    export { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
}

declare module 'fairygui-cc/GGroup' {
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GGroup extends GObject {
        _updating: number;
        constructor();
        dispose(): void;
        get layout(): number;
        set layout(value: number);
        get lineGap(): number;
        set lineGap(value: number);
        get columnGap(): number;
        set columnGap(value: number);
        get excludeInvisibles(): boolean;
        set excludeInvisibles(value: boolean);
        get autoSizeDisabled(): boolean;
        set autoSizeDisabled(value: boolean);
        get mainGridMinSize(): number;
        set mainGridMinSize(value: number);
        get mainGridIndex(): number;
        set mainGridIndex(value: number);
        setBoundsChangedFlag(positionChangedOnly?: boolean): void;
        ensureSizeCorrect(): void;
        ensureBoundsCorrect(): void;
        moveChildren(dx: number, dy: number): void;
        resizeChildren(dw: number, dh: number): void;
        handleAlphaChanged(): void;
        handleVisibleChanged(): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GObject' {
    import { Vec2, Rect, Component, Node, UITransform, UIOpacity } from "cc";
    import { Controller } from "fairygui-cc/Controller";
    import { BlendMode } from "fairygui-cc/display/BlendMode";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    import { GearLook } from "fairygui-cc/gears/GearLook";
    import { GearSize } from "fairygui-cc/gears/GearSize";
    import { GearXY } from "fairygui-cc/gears/GearXY";
    import { GGroup } from "fairygui-cc/GGroup";
    import { GTreeNode } from "fairygui-cc/GTreeNode";
    import { PackageItem } from "fairygui-cc/PackageItem";
    import { Relations } from "fairygui-cc/Relations";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GObject {
        data?: any;
        packageItem?: PackageItem;
        static draggingObject: GObject | null;
        protected _x: number;
        protected _y: number;
        protected _alpha: number;
        protected _visible: boolean;
        protected _touchable: boolean;
        protected _grayed?: boolean;
        protected _draggable?: boolean;
        protected _skewX: number;
        protected _skewY: number;
        protected _pivotAsAnchor?: boolean;
        protected _sortingOrder: number;
        protected _internalVisible: boolean;
        protected _handlingController?: boolean;
        protected _tooltips?: string;
        protected _blendMode: BlendMode;
        protected _pixelSnapping?: boolean;
        protected _dragTesting?: boolean;
        protected _dragStartPos?: Vec2;
        protected _relations: Relations;
        protected _group: GGroup | null;
        protected _gears: GearBase[];
        protected _node: Node;
        protected _dragBounds?: Rect;
        sourceWidth: number;
        sourceHeight: number;
        initWidth: number;
        initHeight: number;
        minWidth: number;
        minHeight: number;
        maxWidth: number;
        maxHeight: number;
        _parent: GComponent | null;
        _width: number;
        _height: number;
        _rawWidth: number;
        _rawHeight: number;
        _id: string;
        _name: string;
        _underConstruct: boolean;
        _gearLocked?: boolean;
        _sizePercentInGroup: number;
        _touchDisabled?: boolean;
        _partner: GObjectPartner;
        _treeNode?: GTreeNode;
        _uiTrans: UITransform;
        _uiOpacity: UIOpacity;
        constructor();
        get id(): string;
        get name(): string;
        set name(value: string);
        get x(): number;
        set x(value: number);
        get y(): number;
        set y(value: number);
        setPosition(xv: number, yv: number): void;
        get xMin(): number;
        set xMin(value: number);
        get yMin(): number;
        set yMin(value: number);
        get pixelSnapping(): boolean;
        set pixelSnapping(value: boolean);
        center(restraint?: boolean): void;
        get width(): number;
        set width(value: number);
        get height(): number;
        set height(value: number);
        setSize(wv: number, hv: number, ignorePivot?: boolean): void;
        makeFullScreen(): void;
        ensureSizeCorrect(): void;
        get actualWidth(): number;
        get actualHeight(): number;
        get scaleX(): number;
        set scaleX(value: number);
        get scaleY(): number;
        set scaleY(value: number);
        setScale(sx: number, sy: number): void;
        get skewX(): number;
        get pivotX(): number;
        set pivotX(value: number);
        get pivotY(): number;
        set pivotY(value: number);
        setPivot(xv: number, yv: number, asAnchor?: boolean): void;
        get pivotAsAnchor(): boolean;
        get touchable(): boolean;
        set touchable(value: boolean);
        get grayed(): boolean;
        set grayed(value: boolean);
        get enabled(): boolean;
        set enabled(value: boolean);
        get rotation(): number;
        set rotation(value: number);
        get alpha(): number;
        set alpha(value: number);
        get visible(): boolean;
        set visible(value: boolean);
        get _finalVisible(): boolean;
        get internalVisible3(): boolean;
        get sortingOrder(): number;
        set sortingOrder(value: number);
        requestFocus(): void;
        get tooltips(): string | null;
        set tooltips(value: string | null);
        get blendMode(): BlendMode;
        set blendMode(value: BlendMode);
        get onStage(): boolean;
        get resourceURL(): string | null;
        set group(value: GGroup);
        get group(): GGroup;
        getGear(index: number): GearBase;
        protected updateGear(index: number): void;
        checkGearController(index: number, c: Controller): boolean;
        updateGearFromRelations(index: number, dx: number, dy: number): void;
        addDisplayLock(): number;
        releaseDisplayLock(token: number): void;
        get gearXY(): GearXY;
        get gearSize(): GearSize;
        get gearLook(): GearLook;
        get relations(): Relations;
        addRelation(target: GObject, relationType: number, usePercent?: boolean): void;
        removeRelation(target: GObject, relationType: number): void;
        get node(): Node;
        get parent(): GComponent;
        removeFromParent(): void;
        findParent(): GObject;
        get asCom(): GComponent;
        static cast(obj: Node): GObject;
        get text(): string | null;
        set text(value: string | null);
        get icon(): string | null;
        set icon(value: string | null);
        get treeNode(): GTreeNode;
        get isDisposed(): boolean;
        dispose(): void;
        protected onEnable(): void;
        protected onDisable(): void;
        protected onUpdate(): void;
        protected onDestroy(): void;
        onClick(listener: Function, target?: any): void;
        onceClick(listener: Function, target?: any): void;
        offClick(listener: Function, target?: any): void;
        clearClick(): void;
        hasClickListener(): boolean;
        on(type: string, listener: Function, target?: any): void;
        once(type: string, listener: Function, target?: any): void;
        off(type: string, listener?: Function, target?: any): void;
        get draggable(): boolean;
        set draggable(value: boolean);
        get dragBounds(): Rect;
        set dragBounds(value: Rect);
        startDrag(touchId?: number): void;
        stopDrag(): void;
        get dragging(): boolean;
        localToGlobal(ax?: number, ay?: number, result?: Vec2): Vec2;
        globalToLocal(ax?: number, ay?: number, result?: Vec2): Vec2;
        localToGlobalRect(ax?: number, ay?: number, aw?: number, ah?: number, result?: Rect): Rect;
        globalToLocalRect(ax?: number, ay?: number, aw?: number, ah?: number, result?: Rect): Rect;
        handleControllerChanged(c: Controller): void;
        protected handleAnchorChanged(): void;
        handlePositionChanged(): void;
        protected handleSizeChanged(): void;
        protected handleGrayedChanged(): void;
        handleVisibleChanged(): void;
        hitTest(globalPt: Vec2, forTouch?: boolean): GObject;
        protected _hitTest(pt: Vec2, globalPt: Vec2): GObject;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        constructFromResource(): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
    export class GObjectPartner extends Component {
        _emitDisplayEvents?: boolean;
        callLater(callback: any, delay?: number): void;
        onClickLink(evt: Event, text: string): void;
        protected onEnable(): void;
        protected onDisable(): void;
        protected update(dt: number): void;
        protected onDestroy(): void;
    }
    export interface IGRoot {
        inst: any;
    }
    export var Decls: {
        GRoot?: IGRoot;
    };
    export var constructingDepth: {
        n: number;
    };
}

declare module 'fairygui-cc/GGraph' {
    import { Color, Graphics, Vec2 } from "cc";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GGraph extends GObject {
        _content: Graphics;
        constructor();
        drawRect(lineSize: number, lineColor: Color, fillColor: Color, corner?: Array<number>): void;
        drawEllipse(lineSize: number, lineColor: Color, fillColor: Color): void;
        drawRegularPolygon(lineSize: number, lineColor: Color, fillColor: Color, sides: number, startAngle?: number, distances?: number[]): void;
        drawPolygon(lineSize: number, lineColor: Color, fillColor: Color, points: Array<number>): void;
        get distances(): number[];
        set distances(value: number[]);
        clearGraphics(): void;
        get type(): number;
        get color(): Color;
        set color(value: Color);
        protected handleSizeChanged(): void;
        protected handleAnchorChanged(): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        protected _hitTest(pt: Vec2): GObject;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GImage' {
    import { Color } from "cc";
    import { Image } from "fairygui-cc/display/Image";
    import { FlipType, FillMethod, FillOrigin } from "fairygui-cc/FieldTypes";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GImage extends GObject {
        _content: Image;
        constructor();
        get color(): Color;
        set color(value: Color);
        get flip(): FlipType;
        set flip(value: FlipType);
        get fillMethod(): FillMethod;
        set fillMethod(value: FillMethod);
        get fillOrigin(): FillOrigin;
        set fillOrigin(value: FillOrigin);
        get fillClockwise(): boolean;
        set fillClockwise(value: boolean);
        get fillAmount(): number;
        set fillAmount(value: number);
        constructFromResource(): void;
        protected handleGrayedChanged(): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GMovieClip' {
    import { Color } from "cc";
    import { MovieClip } from "fairygui-cc/display/MovieClip";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GMovieClip extends GObject {
        _content: MovieClip;
        constructor();
        get color(): Color;
        set color(value: Color);
        get playing(): boolean;
        set playing(value: boolean);
        get frame(): number;
        set frame(value: number);
        get timeScale(): number;
        set timeScale(value: number);
        rewind(): void;
        syncStatus(anotherMc: GMovieClip): void;
        advance(timeInSeconds: number): void;
        setPlaySettings(start?: number, end?: number, times?: number, endAt?: number, endCallback?: (() => void) | null): void;
        protected handleGrayedChanged(): void;
        protected handleSizeChanged(): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        constructFromResource(): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GRoot' {
    import { Vec2, AudioClip } from "cc";
    import { InputProcessor } from "fairygui-cc/event/InputProcessor";
    import { PopupDirection } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GGraph } from "fairygui-cc/GGraph";
    import { GObject } from "fairygui-cc/GObject";
    import { Window } from "fairygui-cc/Window";
    export class GRoot extends GComponent {
        static get inst(): GRoot;
        static create(): GRoot;
        constructor();
        protected onDestroy(): void;
        getTouchPosition(touchId?: number): Vec2;
        get touchTarget(): GObject;
        get inputProcessor(): InputProcessor;
        showWindow(win: Window): void;
        hideWindow(win: Window): void;
        hideWindowImmediately(win: Window): void;
        bringToFront(win: Window): void;
        showModalWait(msg?: string): void;
        closeModalWait(): void;
        closeAllExceptModals(): void;
        closeAllWindows(): void;
        getTopWindow(): Window;
        get modalLayer(): GGraph;
        get hasModalWindow(): boolean;
        get modalWaiting(): boolean;
        getPopupPosition(popup: GObject, target?: GObject, dir?: PopupDirection | boolean, result?: Vec2): Vec2;
        showPopup(popup: GObject, target?: GObject | null, dir?: PopupDirection | boolean): void;
        togglePopup(popup: GObject, target?: GObject, dir?: PopupDirection | boolean): void;
        hidePopup(popup?: GObject): void;
        get hasAnyPopup(): boolean;
        showTooltips(msg: string): void;
        showTooltipsWin(tooltipWin: GObject): void;
        hideTooltips(): void;
        get volumeScale(): number;
        set volumeScale(value: number);
        playOneShotSound(clip: AudioClip, volumeScale?: number): void;
        onWinResize(): void;
        handlePositionChanged(): void;
    }
}

declare module 'fairygui-cc/GTextField' {
    import { Color, Font, HorizontalTextAlignment, Label, Vec2, VerticalTextAlignment } from "cc";
    import { AutoSizeType } from "fairygui-cc/FieldTypes";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GTextField extends GObject {
        _label: Label;
        protected _font: string;
        protected _realFont: string | Font;
        protected _fontSize: number;
        protected _color: Color;
        protected _strokeColor?: Color;
        protected _shadowOffset?: Vec2;
        protected _shadowColor?: Color;
        protected _leading: number;
        protected _text: string;
        protected _ubbEnabled: boolean;
        protected _templateVars?: {
            [index: string]: string;
        };
        protected _autoSize: AutoSizeType;
        protected _updatingSize: boolean;
        protected _sizeDirty: boolean;
        constructor();
        protected createRenderer(): void;
        set text(value: string | null);
        get text(): string | null;
        get font(): string | null;
        set font(value: string | null);
        get fontSize(): number;
        set fontSize(value: number);
        get color(): Color;
        set color(value: Color);
        get align(): HorizontalTextAlignment;
        set align(value: HorizontalTextAlignment);
        get verticalAlign(): VerticalTextAlignment;
        set verticalAlign(value: VerticalTextAlignment);
        get leading(): number;
        set leading(value: number);
        get letterSpacing(): number;
        set letterSpacing(value: number);
        get underline(): boolean;
        set underline(value: boolean);
        get bold(): boolean;
        set bold(value: boolean);
        get italic(): boolean;
        set italic(value: boolean);
        get singleLine(): boolean;
        set singleLine(value: boolean);
        get stroke(): number;
        set stroke(value: number);
        get strokeColor(): Color;
        set strokeColor(value: Color);
        get shadowOffset(): Vec2;
        set shadowOffset(value: Vec2);
        get shadowColor(): Color;
        set shadowColor(value: Color);
        set ubbEnabled(value: boolean);
        get ubbEnabled(): boolean;
        set autoSize(value: AutoSizeType);
        get autoSize(): AutoSizeType;
        protected parseTemplate(template: string): string;
        get templateVars(): {
            [index: string]: string;
        };
        set templateVars(value: {
            [index: string]: string;
        });
        setVar(name: string, value: string): GTextField;
        flushVars(): void;
        get textWidth(): number;
        ensureSizeCorrect(): void;
        protected updateText(): void;
        protected assignFont(label: any, value: string | Font): void;
        protected assignFontColor(label: any, value: Color): void;
        protected updateFont(): void;
        protected updateFontColor(): void;
        protected updateStrokeColor(): void;
        protected updateShadowColor(): void;
        protected updateFontSize(): void;
        protected updateOverflow(): void;
        protected markSizeChanged(): void;
        protected onLabelSizeChanged(): void;
        protected handleSizeChanged(): void;
        protected handleGrayedChanged(): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GRichTextField' {
    import { HorizontalTextAlignment, RichText, SpriteAtlas, SpriteFrame } from "cc";
    import { GTextField } from "fairygui-cc/GTextField";
    export class RichTextImageAtlas extends SpriteAtlas {
        getSpriteFrame(key: string): SpriteFrame;
    }
    export class GRichTextField extends GTextField {
        _richText: RichText;
        linkUnderline: boolean;
        linkColor: string;
        constructor();
        protected createRenderer(): void;
        get align(): HorizontalTextAlignment;
        set align(value: HorizontalTextAlignment);
        get underline(): boolean;
        set underline(value: boolean);
        get bold(): boolean;
        set bold(value: boolean);
        get italic(): boolean;
        set italic(value: boolean);
        protected markSizeChanged(): void;
        protected updateText(): void;
        protected updateFont(): void;
        protected updateFontColor(): void;
        protected updateFontSize(): void;
        protected updateOverflow(): void;
        protected handleSizeChanged(): void;
    }
}

declare module 'fairygui-cc/GTextInput' {
    import { EditBox, HorizontalTextAlignment, VerticalTextAlignment } from "cc";
    import { GTextField } from "fairygui-cc/GTextField";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GTextInput extends GTextField {
        _editBox: EditBox;
        constructor();
        protected createRenderer(): void;
        set editable(val: boolean);
        get editable(): boolean;
        set maxLength(val: number);
        get maxLength(): number;
        set promptText(val: string | null);
        get promptText(): string | null;
        set restrict(value: string | null);
        get restrict(): string | null;
        get password(): boolean;
        set password(val: boolean);
        get align(): HorizontalTextAlignment;
        set align(value: HorizontalTextAlignment);
        get verticalAlign(): VerticalTextAlignment;
        set verticalAlign(value: VerticalTextAlignment);
        get singleLine(): boolean;
        set singleLine(value: boolean);
        requestFocus(): void;
        protected markSizeChanged(): void;
        protected updateText(): void;
        protected updateFont(): void;
        protected updateFontColor(): void;
        protected updateFontSize(): void;
        protected updateOverflow(): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GLoader' {
    import { Color, SpriteFrame, Vec2 } from "cc";
    import { MovieClip } from "fairygui-cc/display/MovieClip";
    import { AlignType, VertAlignType, LoaderFillType, FillMethod, FillOrigin } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GLoader extends GObject {
        _content: MovieClip;
        constructor();
        dispose(): void;
        get url(): string | null;
        set url(value: string | null);
        /**
          * 设置图片
          * @param url
          * @param bundleStr 远程包名称
          */
        setUrlWithBundle(url: string, bundleStr?: string): void;
        set bundle(val: string);
        get bundle(): string;
        get icon(): string | null;
        set icon(value: string | null);
        get align(): AlignType;
        set align(value: AlignType);
        get verticalAlign(): VertAlignType;
        set verticalAlign(value: VertAlignType);
        get fill(): LoaderFillType;
        set fill(value: LoaderFillType);
        get shrinkOnly(): boolean;
        set shrinkOnly(value: boolean);
        get autoSize(): boolean;
        set autoSize(value: boolean);
        get playing(): boolean;
        set playing(value: boolean);
        get frame(): number;
        set frame(value: number);
        get color(): Color;
        set color(value: Color);
        get fillMethod(): FillMethod;
        set fillMethod(value: FillMethod);
        get fillOrigin(): FillOrigin;
        set fillOrigin(value: FillOrigin);
        get fillClockwise(): boolean;
        set fillClockwise(value: boolean);
        get fillAmount(): number;
        set fillAmount(value: number);
        get showErrorSign(): boolean;
        set showErrorSign(value: boolean);
        get component(): GComponent;
        get texture(): SpriteFrame;
        set texture(value: SpriteFrame);
        protected loadContent(): void;
        protected loadFromPackage(itemURL: string): void;
        protected loadExternal(): void;
        protected freeExternal(texture: SpriteFrame): void;
        protected onExternalLoadSuccess(texture: SpriteFrame): void;
        protected onExternalLoadFailed(): void;
        protected handleSizeChanged(): void;
        protected handleAnchorChanged(): void;
        protected handleGrayedChanged(): void;
        protected _hitTest(pt: Vec2, globalPt: Vec2): GObject;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GLoader3D' {
    import { sp, dragonBones, Color, Vec2 } from "cc";
    import { AlignType, LoaderFillType, VertAlignType } from "fairygui-cc/FieldTypes";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GLoader3D extends GObject {
        constructor();
        dispose(): void;
        get url(): string | null;
        set url(value: string | null);
        get icon(): string | null;
        set icon(value: string | null);
        get align(): AlignType;
        set align(value: AlignType);
        get verticalAlign(): VertAlignType;
        set verticalAlign(value: VertAlignType);
        get fill(): LoaderFillType;
        set fill(value: LoaderFillType);
        get shrinkOnly(): boolean;
        set shrinkOnly(value: boolean);
        get autoSize(): boolean;
        set autoSize(value: boolean);
        get playing(): boolean;
        set playing(value: boolean);
        get frame(): number;
        set frame(value: number);
        get animationName(): string | null;
        set animationName(value: string | null);
        get skinName(): string | null;
        set skinName(value: string | null);
        get loop(): boolean;
        set loop(value: boolean);
        get color(): Color;
        set color(value: Color);
        get content(): sp.Skeleton | dragonBones.ArmatureDisplay;
        protected loadContent(): void;
        protected loadFromPackage(itemURL: string): void;
        setSpine(asset: sp.SkeletonData, anchor: Vec2, pma?: boolean): void;
        freeSpine(): void;
        setDragonBones(asset: dragonBones.DragonBonesAsset, atlasAsset: dragonBones.DragonBonesAtlasAsset, anchor: Vec2, pma?: boolean): void;
        freeDragonBones(): void;
        protected loadExternal(): void;
        protected handleSizeChanged(): void;
        protected handleAnchorChanged(): void;
        protected handleGrayedChanged(): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GComponent' {
    import { Mask, Vec2, Node, Constructor } from "cc";
    import { Controller } from "fairygui-cc/Controller";
    import { IHitTest } from "fairygui-cc/event/HitTest";
    import { ChildrenRenderOrder, OverflowType } from "fairygui-cc/FieldTypes";
    import { GGroup } from "fairygui-cc/GGroup";
    import { GObject } from "fairygui-cc/GObject";
    import { Margin } from "fairygui-cc/Margin";
    import { ScrollPane } from "fairygui-cc/ScrollPane";
    import { Transition } from "fairygui-cc/Transition";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GComponent extends GObject {
        hitArea?: IHitTest;
        protected _margin: Margin;
        protected _trackBounds: boolean;
        protected _boundsChanged: boolean;
        protected _childrenRenderOrder: ChildrenRenderOrder;
        protected _apexIndex: number;
        _buildingDisplayList: boolean;
        _children: Array<GObject>;
        _controllers: Array<Controller>;
        _transitions: Array<Transition>;
        _container: Node;
        _scrollPane?: ScrollPane;
        _alignOffset: Vec2;
        _customMask?: Mask;
        constructor();
        dispose(): void;
        get displayListContainer(): Node;
        addChild(child: GObject): GObject;
        addChildAt(child: GObject, index: number): GObject;
        removeChild(child: GObject, dispose?: boolean): GObject;
        removeChildAt(index: number, dispose?: boolean): GObject;
        removeChildren(beginIndex?: number, endIndex?: number, dispose?: boolean): void;
        getChildAt<T extends GObject>(index: number, classType?: Constructor<T>): T;
        getChild<T extends GObject>(name: string, classType?: Constructor<T>): T;
        getChildByPath<T extends GObject>(path: String, classType?: Constructor<T>): T;
        getVisibleChild(name: string): GObject;
        getChildInGroup(name: string, group: GGroup): GObject;
        getChildById(id: string): GObject;
        getChildIndex(child: GObject): number;
        setChildIndex(child: GObject, index: number): void;
        setChildIndexBefore(child: GObject, index: number): number;
        swapChildren(child1: GObject, child2: GObject): void;
        swapChildrenAt(index1: number, index2: number): void;
        get numChildren(): number;
        isAncestorOf(child: GObject): boolean;
        addController(controller: Controller): void;
        getControllerAt(index: number): Controller;
        getController(name: string): Controller;
        removeController(c: Controller): void;
        get controllers(): Array<Controller>;
        applyController(c: Controller): void;
        applyAllControllers(): void;
        adjustRadioGroupDepth(obj: GObject, c: Controller): void;
        getTransitionAt(index: number): Transition;
        getTransition(transName: string): Transition;
        isChildInView(child: GObject): boolean;
        getFirstChildInView(): number;
        get scrollPane(): ScrollPane;
        get opaque(): boolean;
        set opaque(value: boolean);
        get margin(): Margin;
        set margin(value: Margin);
        get childrenRenderOrder(): ChildrenRenderOrder;
        set childrenRenderOrder(value: ChildrenRenderOrder);
        get apexIndex(): number;
        set apexIndex(value: number);
        get mask(): GObject;
        set mask(value: GObject);
        setMask(value: GObject, inverted: boolean): void;
        get _pivotCorrectX(): number;
        get _pivotCorrectY(): number;
        get baseUserData(): string;
        protected setupScroll(buffer: ByteBuffer): void;
        protected setupOverflow(overflow: OverflowType): void;
        protected handleAnchorChanged(): void;
        protected handleSizeChanged(): void;
        protected handleGrayedChanged(): void;
        handleControllerChanged(c: Controller): void;
        protected _hitTest(pt: Vec2, globalPt: Vec2): GObject;
        setBoundsChangedFlag(): void;
        ensureBoundsCorrect(): void;
        protected updateBounds(): void;
        setBounds(ax: number, ay: number, aw: number, ah?: number): void;
        get viewWidth(): number;
        set viewWidth(value: number);
        get viewHeight(): number;
        set viewHeight(value: number);
        getSnappingPosition(xValue: number, yValue: number, resultPoint?: Vec2): Vec2;
        childSortingOrderChanged(child: GObject, oldValue: number, newValue?: number): void;
        constructFromResource(): void;
        constructFromResource2(objectPool: Array<GObject>, poolIndex: number): void;
        protected constructExtension(buffer: ByteBuffer): void;
        protected onConstruct(): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
        protected onEnable(): void;
        protected onDisable(): void;
    }
}

declare module 'fairygui-cc/GLabel' {
    import { Color } from "cc";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { GTextField } from "fairygui-cc/GTextField";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GLabel extends GComponent {
        protected _titleObject: GObject;
        protected _iconObject: GObject;
        constructor();
        get icon(): string | null;
        set icon(value: string | null);
        get title(): string | null;
        set title(value: string | null);
        get text(): string | null;
        set text(value: string | null);
        get titleColor(): Color;
        set titleColor(value: Color);
        get titleFontSize(): number;
        set titleFontSize(value: number);
        set editable(val: boolean);
        get editable(): boolean;
        getTextField(): GTextField;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        protected constructExtension(buffer: ByteBuffer): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GButton' {
    import { Color } from "cc";
    import { Controller } from "fairygui-cc/Controller";
    import { ButtonMode } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { GTextField } from "fairygui-cc/GTextField";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GButton extends GComponent {
        protected _titleObject: GObject;
        protected _iconObject: GObject;
        static UP: string;
        static DOWN: string;
        static OVER: string;
        static SELECTED_OVER: string;
        static DISABLED: string;
        static SELECTED_DISABLED: string;
        constructor();
        get icon(): string | null;
        set icon(value: string | null);
        get selectedIcon(): string | null;
        set selectedIcon(value: string | null);
        get title(): string | null;
        set title(value: string | null);
        get text(): string | null;
        set text(value: string | null);
        get selectedTitle(): string | null;
        set selectedTitle(value: string | null);
        get titleColor(): Color;
        set titleColor(value: Color);
        get titleFontSize(): number;
        set titleFontSize(value: number);
        get sound(): string | null;
        set sound(val: string | null);
        get soundVolumeScale(): number;
        set soundVolumeScale(value: number);
        set selected(val: boolean);
        get selected(): boolean;
        get mode(): ButtonMode;
        set mode(value: ButtonMode);
        get relatedController(): Controller;
        set relatedController(val: Controller);
        get relatedPageId(): string | null;
        set relatedPageId(val: string | null);
        get changeStateOnClick(): boolean;
        set changeStateOnClick(value: boolean);
        get linkedPopup(): GObject;
        set linkedPopup(value: GObject);
        getTextField(): GTextField;
        fireClick(): void;
        protected setState(val: string): void;
        protected setCurrentState(): void;
        handleControllerChanged(c: Controller): void;
        protected handleGrayedChanged(): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        protected constructExtension(buffer: ByteBuffer): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GComboBox' {
    import { Color } from "cc";
    import { Controller } from "fairygui-cc/Controller";
    import { PopupDirection } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GList } from "fairygui-cc/GList";
    import { GObject } from "fairygui-cc/GObject";
    import { GTextField } from "fairygui-cc/GTextField";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GComboBox extends GComponent {
        dropdown: GComponent;
        protected _titleObject: GObject;
        protected _iconObject: GObject;
        protected _list: GList;
        constructor();
        get text(): string | null;
        set text(value: string | null);
        get icon(): string | null;
        set icon(value: string | null);
        get titleColor(): Color;
        set titleColor(value: Color);
        get titleFontSize(): number;
        set titleFontSize(value: number);
        get visibleItemCount(): number;
        set visibleItemCount(value: number);
        get popupDirection(): PopupDirection;
        set popupDirection(value: PopupDirection);
        get items(): Array<string>;
        set items(value: Array<string>);
        get icons(): Array<string>;
        set icons(value: Array<string>);
        get values(): Array<string>;
        set values(value: Array<string>);
        get selectedIndex(): number;
        set selectedIndex(val: number);
        get value(): string | null;
        set value(val: string | null);
        get selectionController(): Controller;
        set selectionController(value: Controller);
        getTextField(): GTextField;
        protected setState(val: string): void;
        getProp(index: number): any;
        setProp(index: number, value: any): void;
        protected constructExtension(buffer: ByteBuffer): void;
        handleControllerChanged(c: Controller): void;
        dispose(): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
        protected showDropdown(): void;
    }
}

declare module 'fairygui-cc/GSlider' {
    import { ProgressTitleType } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GSlider extends GComponent {
        changeOnClick: boolean;
        canDrag: boolean;
        constructor();
        get titleType(): ProgressTitleType;
        set titleType(value: ProgressTitleType);
        get wholeNumbers(): boolean;
        set wholeNumbers(value: boolean);
        get min(): number;
        set min(value: number);
        get max(): number;
        set max(value: number);
        get value(): number;
        set value(value: number);
        update(): void;
        protected constructExtension(buffer: ByteBuffer): void;
        protected handleSizeChanged(): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GProgressBar' {
    import { ProgressTitleType } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GTweener } from "fairygui-cc/tween/GTweener";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GProgressBar extends GComponent {
        constructor();
        get titleType(): ProgressTitleType;
        set titleType(value: ProgressTitleType);
        get min(): number;
        set min(value: number);
        get max(): number;
        set max(value: number);
        get value(): number;
        set value(value: number);
        tweenValue(value: number, duration: number): GTweener;
        update(newValue: number): void;
        protected constructExtension(buffer: ByteBuffer): void;
        protected handleSizeChanged(): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GScrollBar' {
    import { GComponent } from "fairygui-cc/GComponent";
    import { ScrollPane } from "fairygui-cc/ScrollPane";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GScrollBar extends GComponent {
        constructor();
        setScrollPane(target: ScrollPane, vertical: boolean): void;
        setDisplayPerc(value: number): void;
        setScrollPerc(val: number): void;
        get minSize(): number;
        get gripDragging(): boolean;
        protected constructExtension(buffer: ByteBuffer): void;
    }
}

declare module 'fairygui-cc/GList' {
    import { Size, Vec2 } from "cc";
    import { Controller } from "fairygui-cc/Controller";
    import { Event as FUIEvent } from "fairygui-cc/event/Event";
    import { ListLayoutType, ListSelectionMode, AlignType, VertAlignType } from "fairygui-cc/FieldTypes";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { GObjectPool } from "fairygui-cc/GObjectPool";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export type ListItemRenderer = (index: number, item: GObject) => void;
    export class GList extends GComponent {
        itemRenderer: ListItemRenderer;
        itemProvider: (index: number) => string;
        scrollItemToViewOnClick: boolean;
        foldInvisibleItems: boolean;
        constructor();
        dispose(): void;
        get layout(): ListLayoutType;
        set layout(value: ListLayoutType);
        get lineCount(): number;
        set lineCount(value: number);
        get columnCount(): number;
        set columnCount(value: number);
        get lineGap(): number;
        set lineGap(value: number);
        get columnGap(): number;
        set columnGap(value: number);
        get align(): AlignType;
        set align(value: AlignType);
        get verticalAlign(): VertAlignType;
        set verticalAlign(value: VertAlignType);
        get virtualItemSize(): Size;
        set virtualItemSize(value: Size);
        get defaultItem(): string | null;
        set defaultItem(val: string | null);
        get autoResizeItem(): boolean;
        set autoResizeItem(value: boolean);
        get selectionMode(): ListSelectionMode;
        set selectionMode(value: ListSelectionMode);
        get selectionController(): Controller;
        set selectionController(value: Controller);
        get itemPool(): GObjectPool;
        getFromPool(url?: string): GObject;
        returnToPool(obj: GObject): void;
        addChildAt(child: GObject, index: number): GObject;
        addItem(url?: string): GObject;
        addItemFromPool(url?: string): GObject;
        removeChildAt(index: number, dispose?: boolean): GObject;
        removeChildToPoolAt(index: number): void;
        removeChildToPool(child: GObject): void;
        removeChildrenToPool(beginIndex?: number, endIndex?: number): void;
        get selectedIndex(): number;
        set selectedIndex(value: number);
        getSelection(result?: number[]): number[];
        addSelection(index: number, scrollItToView?: boolean): void;
        removeSelection(index: number): void;
        clearSelection(): void;
        selectAll(): void;
        selectNone(): void;
        selectReverse(): void;
        handleArrowKey(dir: number): void;
        protected dispatchItemEvent(item: GObject, evt: FUIEvent): void;
        resizeToFit(itemCount?: number, minSize?: number): void;
        getMaxItemWidth(): number;
        protected handleSizeChanged(): void;
        handleControllerChanged(c: Controller): void;
        getSnappingPosition(xValue: number, yValue: number, resultPoint?: Vec2): Vec2;
        scrollToView(index: number, ani?: boolean, setFirst?: boolean): void;
        getFirstChildInView(): number;
        childIndexToItemIndex(index: number): number;
        itemIndexToChildIndex(index: number): number;
        setVirtual(): void;
        setVirtualAndLoop(): void;
        get numItems(): number;
        set numItems(value: number);
        refreshVirtualList(): void;
        protected updateBounds(): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
        protected readItems(buffer: ByteBuffer): void;
        protected setupItem(buffer: ByteBuffer, obj: GObject): void;
        setup_afterAdd(buffer: ByteBuffer, beginPos: number): void;
    }
}

declare module 'fairygui-cc/GTree' {
    import { Event as FUIEvent } from "fairygui-cc/event/Event";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GList } from "fairygui-cc/GList";
    import { GObject } from "fairygui-cc/GObject";
    import { GTreeNode } from "fairygui-cc/GTreeNode";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GTree extends GList {
        treeNodeRender: (node: GTreeNode, obj: GComponent) => void;
        treeNodeWillExpand: (node: GTreeNode, expanded: boolean) => void;
        constructor();
        get rootNode(): GTreeNode;
        get indent(): number;
        set indent(value: number);
        get clickToExpand(): number;
        set clickToExpand(value: number);
        getSelectedNode(): GTreeNode;
        getSelectedNodes(result?: Array<GTreeNode>): Array<GTreeNode>;
        selectNode(node: GTreeNode, scrollItToView?: boolean): void;
        unselectNode(node: GTreeNode): void;
        expandAll(folderNode?: GTreeNode): void;
        collapseAll(folderNode?: GTreeNode): void;
        _afterInserted(node: GTreeNode): void;
        _afterRemoved(node: GTreeNode): void;
        _afterExpanded(node: GTreeNode): void;
        _afterCollapsed(node: GTreeNode): void;
        _afterMoved(node: GTreeNode): void;
        protected dispatchItemEvent(item: GObject, evt: FUIEvent): void;
        setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void;
        protected readItems(buffer: ByteBuffer): void;
    }
}

declare module 'fairygui-cc/GTreeNode' {
    import { GComponent } from "fairygui-cc/GComponent";
    import { GTree } from "fairygui-cc/GTree";
    export class GTreeNode {
        data?: any;
        _cell: GComponent;
        _resURL?: string;
        constructor(hasChild?: boolean, resURL?: string);
        set expanded(value: boolean);
        get expanded(): boolean;
        get isFolder(): boolean;
        get parent(): GTreeNode;
        get text(): string | null;
        set text(value: string | null);
        get icon(): string | null;
        set icon(value: string | null);
        get cell(): GComponent;
        get level(): number;
        _setLevel(value: number): void;
        addChild(child: GTreeNode): GTreeNode;
        addChildAt(child: GTreeNode, index: number): GTreeNode;
        removeChild(child: GTreeNode): GTreeNode;
        removeChildAt(index: number): GTreeNode;
        removeChildren(beginIndex?: number, endIndex?: number): void;
        getChildAt(index: number): GTreeNode;
        getChildIndex(child: GTreeNode): number;
        getPrevSibling(): GTreeNode;
        getNextSibling(): GTreeNode;
        setChildIndex(child: GTreeNode, index: number): void;
        swapChildren(child1: GTreeNode, child2: GTreeNode): void;
        swapChildrenAt(index1: number, index2: number): void;
        get numChildren(): number;
        expandToRoot(): void;
        get tree(): GTree;
        _setTree(value: GTree): void;
    }
}

declare module 'fairygui-cc/Window' {
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { GRoot } from "fairygui-cc/GRoot";
    export interface IUISource {
        fileName: string;
        loaded: boolean;
        load(callback: () => void, target: any): void;
    }
    export class Window extends GComponent {
        protected _requestingCmd: number;
        bringToFontOnClick: boolean;
        constructor();
        addUISource(source: IUISource): void;
        set contentPane(val: GComponent);
        get contentPane(): GComponent;
        get frame(): GComponent;
        get closeButton(): GObject;
        set closeButton(value: GObject);
        get dragArea(): GObject;
        set dragArea(value: GObject);
        get contentArea(): GObject;
        set contentArea(value: GObject);
        show(): void;
        showOn(root: GRoot): void;
        hide(): void;
        hideImmediately(): void;
        centerOn(r: GRoot, restraint?: boolean): void;
        toggleStatus(): void;
        get isShowing(): boolean;
        get isTop(): boolean;
        get modal(): boolean;
        set modal(val: boolean);
        bringToFront(): void;
        showModalWait(requestingCmd?: number): void;
        protected layoutModalWaitPane(): void;
        closeModalWait(requestingCmd?: number): boolean;
        get modalWaiting(): boolean;
        init(): void;
        protected onInit(): void;
        protected onShown(): void;
        protected onHide(): void;
        protected doShowAnimation(): void;
        protected doHideAnimation(): void;
        dispose(): void;
        protected closeEventHandler(evt: Event): void;
        protected onEnable(): void;
        protected onDisable(): void;
    }
}

declare module 'fairygui-cc/PopupMenu' {
    import { PopupDirection } from "fairygui-cc/FieldTypes";
    import { GButton } from "fairygui-cc/GButton";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GList } from "fairygui-cc/GList";
    import { GObject } from "fairygui-cc/GObject";
    export class PopupMenu {
        protected _contentPane: GComponent;
        protected _list: GList;
        constructor(url?: string);
        dispose(): void;
        addItem(caption: string, callback?: (item?: GObject, evt?: Event) => void): GButton;
        addItemAt(caption: string, index: number, callback?: (item?: GObject, evt?: Event) => void): GButton;
        addSeperator(): void;
        getItemName(index: number): string;
        setItemText(name: string, caption: string): void;
        setItemVisible(name: string, visible: boolean): void;
        setItemGrayed(name: string, grayed: boolean): void;
        setItemCheckable(name: string, checkable: boolean): void;
        setItemChecked(name: string, checked: boolean): void;
        isItemChecked(name: string): boolean;
        removeItem(name: string): boolean;
        clearItems(): void;
        get itemCount(): number;
        get contentPane(): GComponent;
        get list(): GList;
        show(target?: GObject | null, dir?: PopupDirection | boolean): void;
    }
}

declare module 'fairygui-cc/Controller' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class Controller extends EventTarget {
        name: string;
        parent: GComponent;
        autoRadioGroupDepth?: boolean;
        changing?: boolean;
        constructor();
        dispose(): void;
        get selectedIndex(): number;
        set selectedIndex(value: number);
        onChanged<TFunction extends (...any: any[]) => void>(callback: TFunction, thisArg?: any): void;
        offChanged<TFunction extends (...any: any[]) => void>(callback: TFunction, thisArg?: any): void;
        setSelectedIndex(value: number): void;
        get previsousIndex(): number;
        get selectedPage(): string;
        set selectedPage(val: string);
        setSelectedPage(value: string): void;
        get previousPage(): string;
        get pageCount(): number;
        getPageName(index: number): string;
        addPage(name?: string): void;
        addPageAt(name?: string, index?: number): void;
        removePage(name: string): void;
        removePageAt(index: number): void;
        clearPages(): void;
        hasPage(aName: string): boolean;
        getPageIndexById(aId: string): number;
        getPageIdByName(aName: string): string | null;
        getPageNameById(aId: string): string | null;
        getPageId(index: number): string | null;
        get selectedPageId(): string | null;
        set selectedPageId(val: string | null);
        set oppositePageId(val: string | null);
        get previousPageId(): string | null;
        runActions(): void;
        setup(buffer: ByteBuffer): void;
    }
    import { EventTarget } from "cc";
    import { GComponent } from "fairygui-cc/GComponent";
}

declare module 'fairygui-cc/Transition' {
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class Transition {
        name: string;
        constructor(owner: GComponent);
        play(onComplete?: (() => void) | null, times?: number, delay?: number, startTime?: number, endTime?: number): void;
        playReverse(onComplete?: (() => void) | null, times?: number, delay?: number): void;
        changePlayTimes(value: number): void;
        setAutoPlay(value: boolean, times?: number, delay?: number): void;
        stop(setToComplete?: boolean, processCallback?: boolean): void;
        setPaused(paused: boolean): void;
        dispose(): void;
        get playing(): boolean;
        setValue(label: string, ...args: any[]): void;
        setHook(label: string, callback: (label?: string) => void): void;
        clearHooks(): void;
        setTarget(label: string, newTarget: GObject): void;
        setDuration(label: string, value: number): void;
        getLabelTime(label: string): number;
        get timeScale(): number;
        set timeScale(value: number);
        updateFromRelations(targetId: string, dx: number, dy: number): void;
        onEnable(): void;
        onDisable(): void;
        setup(buffer: ByteBuffer): void;
    }
}

declare module 'fairygui-cc/ScrollPane' {
    import { Component, Vec2 } from "cc";
    import { Controller } from "fairygui-cc/Controller";
    import { GComponent } from "fairygui-cc/GComponent";
    import { GObject } from "fairygui-cc/GObject";
    import { GScrollBar } from "fairygui-cc/GScrollBar";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class ScrollPane extends Component {
        _displayInDemand: boolean;
        _loop: number;
        static draggingPane: ScrollPane;
        setup(buffer: ByteBuffer): void;
        protected onDestroy(): void;
        hitTest(pt: Vec2, globalPt: Vec2): GObject;
        get owner(): GComponent;
        get hzScrollBar(): GScrollBar;
        get vtScrollBar(): GScrollBar;
        get header(): GComponent;
        get footer(): GComponent;
        get bouncebackEffect(): boolean;
        set bouncebackEffect(sc: boolean);
        get touchEffect(): boolean;
        set touchEffect(sc: boolean);
        set scrollStep(val: number);
        get decelerationRate(): number;
        set decelerationRate(val: number);
        get scrollStep(): number;
        get snapToItem(): boolean;
        set snapToItem(value: boolean);
        get snappingPolicy(): number;
        set snappingPolicy(value: number);
        get mouseWheelEnabled(): boolean;
        set mouseWheelEnabled(value: boolean);
        get isDragged(): boolean;
        get percX(): number;
        set percX(value: number);
        setPercX(value: number, ani?: boolean): void;
        get percY(): number;
        set percY(value: number);
        setPercY(value: number, ani?: boolean): void;
        get posX(): number;
        set posX(value: number);
        setPosX(value: number, ani?: boolean): void;
        get posY(): number;
        set posY(value: number);
        setPosY(value: number, ani?: boolean): void;
        get contentWidth(): number;
        get contentHeight(): number;
        get viewWidth(): number;
        set viewWidth(value: number);
        get viewHeight(): number;
        set viewHeight(value: number);
        get currentPageX(): number;
        set currentPageX(value: number);
        get currentPageY(): number;
        set currentPageY(value: number);
        setCurrentPageX(value: number, ani?: boolean): void;
        setCurrentPageY(value: number, ani?: boolean): void;
        get isBottomMost(): boolean;
        get isRightMost(): boolean;
        get pageController(): Controller;
        set pageController(value: Controller);
        get scrollingPosX(): number;
        get scrollingPosY(): number;
        scrollTop(ani?: boolean): void;
        scrollBottom(ani?: boolean): void;
        scrollUp(ratio?: number, ani?: boolean): void;
        scrollDown(ratio?: number, ani?: boolean): void;
        scrollLeft(ratio?: number, ani?: boolean): void;
        scrollRight(ratio?: number, ani?: boolean): void;
        scrollToView(target: any, ani?: boolean, setFirst?: boolean): void;
        isChildInView(obj: GObject): boolean;
        cancelDragging(): void;
        lockHeader(size: number): void;
        lockFooter(size: number): void;
        onOwnerSizeChanged(): void;
        handleControllerChanged(c: Controller): void;
        adjustMaskContainer(): void;
        setSize(aWidth: number, aHeight: number): void;
        setContentSize(aWidth: number, aHeight: number): void;
        changeContentSizeOnScrolling(deltaWidth: number, deltaHeight: number, deltaPosX: number, deltaPosY: number): void;
        updateScrollBarVisible(): void;
        protected update(dt: number): boolean;
    }
}

declare module 'fairygui-cc/FieldTypes' {
    export enum ButtonMode {
        Common = 0,
        Check = 1,
        Radio = 2
    }
    export enum AutoSizeType {
        None = 0,
        Both = 1,
        Height = 2,
        Shrink = 3
    }
    export enum AlignType {
        Left = 0,
        Center = 1,
        Right = 2
    }
    export enum VertAlignType {
        Top = 0,
        Middle = 1,
        Bottom = 2
    }
    export enum LoaderFillType {
        None = 0,
        Scale = 1,
        ScaleMatchHeight = 2,
        ScaleMatchWidth = 3,
        ScaleFree = 4,
        ScaleNoBorder = 5
    }
    export enum ListLayoutType {
        SingleColumn = 0,
        SingleRow = 1,
        FlowHorizontal = 2,
        FlowVertical = 3,
        Pagination = 4
    }
    export enum ListSelectionMode {
        Single = 0,
        Multiple = 1,
        Multiple_SingleClick = 2,
        None = 3
    }
    export enum OverflowType {
        Visible = 0,
        Hidden = 1,
        Scroll = 2
    }
    export enum PackageItemType {
        Image = 0,
        MovieClip = 1,
        Sound = 2,
        Component = 3,
        Atlas = 4,
        Font = 5,
        Swf = 6,
        Misc = 7,
        Unknown = 8,
        Spine = 9,
        DragonBones = 10
    }
    export enum ObjectType {
        Image = 0,
        MovieClip = 1,
        Swf = 2,
        Graph = 3,
        Loader = 4,
        Group = 5,
        Text = 6,
        RichText = 7,
        InputText = 8,
        Component = 9,
        List = 10,
        Label = 11,
        Button = 12,
        ComboBox = 13,
        ProgressBar = 14,
        Slider = 15,
        ScrollBar = 16,
        Tree = 17,
        Loader3D = 18
    }
    export enum ProgressTitleType {
        Percent = 0,
        ValueAndMax = 1,
        Value = 2,
        Max = 3
    }
    export enum ScrollBarDisplayType {
        Default = 0,
        Visible = 1,
        Auto = 2,
        Hidden = 3
    }
    export enum ScrollType {
        Horizontal = 0,
        Vertical = 1,
        Both = 2
    }
    export enum FlipType {
        None = 0,
        Horizontal = 1,
        Vertical = 2,
        Both = 3
    }
    export enum ChildrenRenderOrder {
        Ascent = 0,
        Descent = 1,
        Arch = 2
    }
    export enum GroupLayoutType {
        None = 0,
        Horizontal = 1,
        Vertical = 2
    }
    export enum PopupDirection {
        Auto = 0,
        Up = 1,
        Down = 2
    }
    export enum RelationType {
        Left_Left = 0,
        Left_Center = 1,
        Left_Right = 2,
        Center_Center = 3,
        Right_Left = 4,
        Right_Center = 5,
        Right_Right = 6,
        Top_Top = 7,
        Top_Middle = 8,
        Top_Bottom = 9,
        Middle_Middle = 10,
        Bottom_Top = 11,
        Bottom_Middle = 12,
        Bottom_Bottom = 13,
        Width = 14,
        Height = 15,
        LeftExt_Left = 16,
        LeftExt_Right = 17,
        RightExt_Left = 18,
        RightExt_Right = 19,
        TopExt_Top = 20,
        TopExt_Bottom = 21,
        BottomExt_Top = 22,
        BottomExt_Bottom = 23,
        Size = 24
    }
    export enum FillMethod {
        None = 0,
        Horizontal = 1,
        Vertical = 2,
        Radial90 = 3,
        Radial180 = 4,
        Radial360 = 5
    }
    export enum FillOrigin {
        Top = 0,
        Bottom = 1,
        Left = 2,
        Right = 3
    }
    export enum ObjectPropID {
        Text = 0,
        Icon = 1,
        Color = 2,
        OutlineColor = 3,
        Playing = 4,
        Frame = 5,
        DeltaTime = 6,
        TimeScale = 7,
        FontSize = 8,
        Selected = 9
    }
}

declare module 'fairygui-cc/UIPackage' {
    import { Asset, AssetManager } from "cc";
    import { GObject } from "fairygui-cc/GObject";
    import { PackageItem } from "fairygui-cc/PackageItem";
    type PackageDependency = {
            id: string;
            name: string;
    };
    export class UIPackage {
            _branchIndex: number;
            constructor();
            static get branch(): string | null;
            static set branch(value: string | null);
            static getVar(key: string): string | null;
            static setVar(key: string, value: string | null): void;
            static getById(id: string): UIPackage;
            static getByName(name: string): UIPackage;
            /**
                * 注册一个包。包的所有资源必须放在resources下，且已经预加载。
                * @param path 相对 resources 的路径。
                */
            static addPackage(path: string): UIPackage;
            /**
                * 载入一个包。包的资源从Asset Bundle加载.
                * @param bundle Asset Bundle 对象.
                * @param path 资源相对 Asset Bundle 目录的路径.
                * @param onComplete 载入成功后的回调.
                */
            static loadPackage(bundle: AssetManager.Bundle, path: string, onComplete?: (error: any, pkg: UIPackage) => void): void;
            /**
                * 载入一个包。包的资源从Asset Bundle加载.
                * @param bundle Asset Bundle 对象.
                * @param path 资源相对 Asset Bundle 目录的路径.
                * @param onProgress 加载进度回调.
                * @param onComplete 载入成功后的回调.
                */
            static loadPackage(bundle: AssetManager.Bundle, path: string, onProgress?: (finish: number, total: number, item: AssetManager.RequestItem) => void, onComplete?: (error: any, pkg: UIPackage) => void): void;
            /**
                * 载入一个包。包的资源从resources加载.
                * @param path 资源相对 resources 的路径.
                * @param onComplete 载入成功后的回调.
                */
            static loadPackage(path: string, onComplete?: (error: any, pkg: UIPackage) => void): void;
            /**
                * 载入一个包。包的资源从resources加载.
                * @param path 资源相对 resources 的路径.
                * @param onProgress 加载进度回调.
                * @param onComplete 载入成功后的回调.
                */
            static loadPackage(path: string, onProgress?: (finish: number, total: number, item: AssetManager.RequestItem) => void, onComplete?: (error: Error, pkg: UIPackage) => void): void;
            static removePackage(packageIdOrName: string): void;
            static createObject(pkgName: string, resName: string, userClass?: new () => GObject): GObject;
            static createObjectFromURL(url: string, userClass?: new () => GObject): GObject;
            static getItemURL(pkgName: string, resName: string): string;
            static getItemByURL(url: string): PackageItem;
            static normalizeURL(url: string): string;
            static setStringsSource(source: string): void;
            dispose(): void;
            get id(): string;
            get name(): string;
            get path(): string;
            get dependencies(): Array<PackageDependency>;
            createObject(resName: string, userClass?: new () => GObject): GObject;
            internalCreateObject(item: PackageItem, userClass?: new () => GObject): GObject;
            getItemById(itemId: string): PackageItem;
            getItemByName(resName: string): PackageItem;
            getItemAssetByName(resName: string): Asset;
            getItemAsset(item: PackageItem): Asset;
            getItemAssetAsync(item: PackageItem, onComplete?: (err: Error, item: PackageItem) => void): void;
            loadAllAssets(): void;
    }
    export interface IObjectFactoryType {
            resolveExtension(pi: PackageItem): void;
            newObject(type: number | PackageItem, userClass?: new () => GObject): GObject;
    }
    export var Decls: {
            UIObjectFactory?: IObjectFactoryType;
    };
    export {};
}

declare module 'fairygui-cc/PackageItem' {
    import { Asset, dragonBones, Rect, Vec2 } from "cc";
    import { Frame } from "fairygui-cc/display/MovieClip";
    import { PixelHitTestData } from "fairygui-cc/event/HitTest";
    import { PackageItemType, ObjectType } from "fairygui-cc/FieldTypes";
    import { UIPackage } from "fairygui-cc/UIPackage";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class PackageItem {
        owner: UIPackage;
        type: PackageItemType;
        objectType?: ObjectType;
        id: string;
        name: string;
        width: number;
        height: number;
        file: string;
        decoded?: boolean;
        loading?: Array<Function>;
        rawData?: ByteBuffer;
        asset?: Asset;
        highResolution?: Array<string>;
        branches?: Array<string>;
        scale9Grid?: Rect;
        scaleByTile?: boolean;
        tileGridIndice?: number;
        smoothing?: boolean;
        hitTestData?: PixelHitTestData;
        interval?: number;
        repeatDelay?: number;
        swing?: boolean;
        frames?: Array<Frame>;
        extensionType?: any;
        skeletonAnchor?: Vec2;
        atlasAsset?: dragonBones.DragonBonesAtlasAsset;
        constructor();
        load(): Asset;
        getBranch(): PackageItem;
        getHighResolution(): PackageItem;
        toString(): string;
    }
}

declare module 'fairygui-cc/GObjectPool' {
    import { GObject } from "fairygui-cc/GObject";
    export class GObjectPool {
        constructor();
        clear(): void;
        get count(): number;
        getObject(url: string): GObject;
        returnObject(obj: GObject): void;
    }
}

declare module 'fairygui-cc/UIObjectFactory' {
    import { GComponent } from "fairygui-cc/GComponent";
    import { GLoader } from "fairygui-cc/GLoader";
    import { GObject } from "fairygui-cc/GObject";
    import { PackageItem } from "fairygui-cc/PackageItem";
    export class UIObjectFactory {
        static counter: number;
        static extensions: {
            [index: string]: new () => GComponent;
        };
        static loaderType: new () => GLoader;
        constructor();
        static setExtension(url: string, type: new () => GComponent): void;
        static setLoaderExtension(type: new () => GLoader): void;
        static resolveExtension(pi: PackageItem): void;
        static newObject(type: number | PackageItem, userClass?: new () => GObject): GObject;
    }
}

declare module 'fairygui-cc/UIConfig' {
    import { AssetManager, Color, Font } from "cc";
    export class UIConfig {
        constructor();
        static defaultFont: string;
        static windowModalWaiting: string;
        static globalModalWaiting: string;
        static modalLayerColor: Color;
        static buttonSound: string;
        static buttonSoundVolumeScale: number;
        static horizontalScrollBar: string;
        static verticalScrollBar: string;
        static defaultScrollStep: number;
        static defaultScrollDecelerationRate: number;
        static defaultScrollBarDisplay: number;
        static defaultScrollTouchEffect: boolean;
        static defaultScrollBounceEffect: boolean;
        static popupMenu: string;
        static popupMenu_seperator: string;
        static loaderErrorSign: string;
        static tooltipsWin: string;
        static defaultComboBoxVisibleItemCount: number;
        static touchScrollSensitivity: number;
        static loaderAssetsBundleName: string;
        static touchDragSensitivity: number;
        static clickDragSensitivity: number;
        static bringWindowToFrontOnClick: boolean;
        static frameTimeForAsyncUIConstruction: number;
        static linkUnderline: boolean;
        static defaultUILayer: number;
    }
    export function registerFont(name: string, font?: Font | string, bundle?: AssetManager.Bundle): void;
    export function getFontByName(name: string): Font;
}

declare module 'fairygui-cc/DragDropManager' {
    import { GObject } from "fairygui-cc/GObject";
    export class DragDropManager {
        static get inst(): DragDropManager;
        constructor();
        get dragAgent(): GObject;
        get dragging(): boolean;
        startDrag(source: GObject, icon: string | null, sourceData?: any, touchId?: number): void;
        cancel(): void;
    }
}

declare module 'fairygui-cc/AsyncOperation' {
    import { GObject } from "fairygui-cc/GObject";
    export class AsyncOperation {
        callback: (obj: GObject) => void;
        createObject(pkgName: string, resName: string): void;
        createObjectFromURL(url: string): void;
        cancel(): void;
    }
}

declare module 'fairygui-cc/TranslationHelper' {
    import { PackageItem } from "fairygui-cc/PackageItem";
    export class TranslationHelper {
        static strings: {
            [index: string]: {
                [index: string]: string;
            };
        };
        static loadFromXML(source: string): void;
        static translateComponent(item: PackageItem): void;
    }
}

declare module 'fairygui-cc/gears/GearAnimation' {
    import { GearBase } from "fairygui-cc/gears/GearBase";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GearAnimation extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
    }
}

declare module 'fairygui-cc/gears/GearBase' {
    import { Controller } from "fairygui-cc/Controller";
    import { GObject } from "fairygui-cc/GObject";
    import { GTweener } from "fairygui-cc/tween/GTweener";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class GearBase {
        static disableAllTweenEffect?: boolean;
        _owner: GObject;
        protected _controller: Controller;
        protected _tweenConfig: GearTweenConfig;
        dispose(): void;
        get controller(): Controller;
        set controller(val: Controller);
        get tweenConfig(): GearTweenConfig;
        protected get allowTween(): boolean;
        setup(buffer: ByteBuffer): void;
        updateFromRelations(dx: number, dy: number): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        protected init(): void;
        apply(): void;
        updateState(): void;
    }
    export class GearTweenConfig {
        tween: boolean;
        easeType: number;
        duration: number;
        delay: number;
        _displayLockToken: number;
        _tweener: GTweener;
        constructor();
    }
    export interface IGearXY {
    }
}

declare module 'fairygui-cc/gears/GearColor' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearColor extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
    }
}

declare module 'fairygui-cc/gears/GearDisplay' {
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearDisplay extends GearBase {
        pages: string[];
        protected init(): void;
        addLock(): number;
        releaseLock(token: number): void;
        get connected(): boolean;
        apply(): void;
    }
}

declare module 'fairygui-cc/gears/GearDisplay2' {
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearDisplay2 extends GearBase {
        pages: string[];
        condition: number;
        protected init(): void;
        apply(): void;
        evaluate(connected: boolean): boolean;
    }
}

declare module 'fairygui-cc/gears/GearFontSize' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearFontSize extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
    }
}

declare module 'fairygui-cc/gears/GearIcon' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearIcon extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
    }
}

declare module 'fairygui-cc/gears/GearLook' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearLook extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
    }
}

declare module 'fairygui-cc/gears/GearSize' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearSize extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
        updateFromRelations(dx: number, dy: number): void;
    }
}

declare module 'fairygui-cc/gears/GearText' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearText extends GearBase {
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
    }
}

declare module 'fairygui-cc/gears/GearXY' {
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    import { GearBase } from "fairygui-cc/gears/GearBase";
    export class GearXY extends GearBase {
        positionsInPercent: boolean;
        protected init(): void;
        protected addStatus(pageId: string, buffer: ByteBuffer): void;
        addExtStatus(pageId: string, buffer: ByteBuffer): void;
        apply(): void;
        updateState(): void;
        updateFromRelations(dx: number, dy: number): void;
    }
}

declare module 'fairygui-cc/display/BlendMode' {
    import { Node } from "cc";
    export enum BlendMode {
        Normal = 0,
        None = 1,
        Add = 2,
        Multiply = 3,
        Screen = 4,
        Erase = 5,
        Mask = 6,
        Below = 7,
        Off = 8,
        Custom1 = 9,
        Custom2 = 10,
        Custom3 = 11
    }
    export class BlendModeUtils {
        static apply(node: Node, blendMode: BlendMode): void;
        static override(blendMode: BlendMode, srcFactor: number, dstFactor: number): void;
    }
}

declare module 'fairygui-cc/display/Image' {
    import { Sprite } from "cc";
    import { FillMethod, FillOrigin, FlipType } from "fairygui-cc/FieldTypes";
    export class Image extends Sprite {
        constructor();
        get flip(): FlipType;
        set flip(value: FlipType);
        get fillMethod(): FillMethod;
        set fillMethod(value: FillMethod);
        get fillOrigin(): FillOrigin;
        set fillOrigin(value: FillOrigin);
        get fillClockwise(): boolean;
        set fillClockwise(value: boolean);
        get fillAmount(): number;
        set fillAmount(value: number);
    }
}

declare module 'fairygui-cc/display/MovieClip' {
    import { Rect, SpriteFrame } from "cc";
    import { Image } from "fairygui-cc/display/Image";
    export interface Frame {
        rect: Rect;
        addDelay: number;
        texture: SpriteFrame | null;
    }
    export class MovieClip extends Image {
        interval: number;
        swing: boolean;
        repeatDelay: number;
        timeScale: number;
        constructor();
        get frames(): Array<Frame>;
        set frames(value: Array<Frame>);
        get frameCount(): number;
        get frame(): number;
        set frame(value: number);
        get playing(): boolean;
        set playing(value: boolean);
        get smoothing(): boolean;
        set smoothing(value: boolean);
        rewind(): void;
        syncStatus(anotherMc: MovieClip): void;
        advance(timeInSeconds: number): void;
        setPlaySettings(start?: number, end?: number, times?: number, endAt?: number, endCallback?: (() => void) | null): void;
        protected update(dt: number): void;
    }
}

declare module 'fairygui-cc/event/Event' {
    import { Event as CCEvent, Vec2 } from 'cc';
    import { GObject } from 'fairygui-cc/GObject';
    import { InputProcessor } from 'fairygui-cc/event/InputProcessor';
    export class Event extends CCEvent {
        static TOUCH_BEGIN: string;
        static TOUCH_MOVE: string;
        static TOUCH_END: string;
        static CLICK: string;
        static ROLL_OVER: string;
        static ROLL_OUT: string;
        static MOUSE_WHEEL: string;
        static DISPLAY: string;
        static UNDISPLAY: string;
        static GEAR_STOP: string;
        static LINK: string;
        static Submit: string;
        static TEXT_CHANGE: string;
        static STATUS_CHANGED: string;
        static XY_CHANGED: string;
        static SIZE_CHANGED: string;
        static SIZE_DELAY_CHANGE: string;
        static DRAG_START: string;
        static DRAG_MOVE: string;
        static DRAG_END: string;
        static DROP: string;
        static SCROLL: string;
        static SCROLL_END: string;
        static PULL_DOWN_RELEASE: string;
        static PULL_UP_RELEASE: string;
        static CLICK_ITEM: string;
        initiator: GObject;
        pos: Vec2;
        touchId: number;
        clickCount: number;
        button: number;
        keyModifiers: number;
        mouseWheelDelta: number;
        _processor: InputProcessor;
        constructor(type: string, bubbles: boolean);
        get sender(): GObject | null;
        get isShiftDown(): boolean;
        get isCtrlDown(): boolean;
        captureTouch(): void;
    }
    export function borrowEvent(type: string, bubbles?: boolean): Event;
    export function returnEvent(evt: Event): void;
}

declare module 'fairygui-cc/tween/GTween' {
    import { GTweener } from "fairygui-cc/tween/GTweener";
    export class GTween {
        static catchCallbackExceptions: boolean;
        static to(start: number, end: number, duration: number): GTweener;
        static to2(start: number, start2: number, end: number, end2: number, duration: number): GTweener;
        static to3(start: number, start2: number, start3: number, end: number, end2: number, end3: number, duration: number): GTweener;
        static to4(start: number, start2: number, start3: number, start4: number, end: number, end2: number, end3: number, end4: number, duration: number): GTweener;
        static toColor(start: number, end: number, duration: number): GTweener;
        static delayedCall(delay: number): GTweener;
        static shake(startX: number, startY: number, amplitude: number, duration: number): GTweener;
        static isTweening(target: any, propType?: any): Boolean;
        static kill(target: any, complete?: boolean, propType?: any): void;
        static getTween(target: any, propType?: any): GTweener;
    }
}

declare module 'fairygui-cc/tween/GTweener' {
    import { GPath } from "fairygui-cc/tween/GPath";
    import { TweenValue } from "fairygui-cc/tween/TweenValue";
    export class GTweener {
        _target: any;
        _propType: any;
        _killed: boolean;
        _paused: boolean;
        constructor();
        setDelay(value: number): GTweener;
        get delay(): number;
        setDuration(value: number): GTweener;
        get duration(): number;
        setBreakpoint(value: number): GTweener;
        setEase(value: number): GTweener;
        setEasePeriod(value: number): GTweener;
        setEaseOvershootOrAmplitude(value: number): GTweener;
        setRepeat(repeat: number, yoyo?: boolean): GTweener;
        get repeat(): number;
        setTimeScale(value: number): GTweener;
        setSnapping(value: boolean): GTweener;
        setTarget(value: any, propType?: any): GTweener;
        get target(): any;
        setPath(value: GPath): GTweener;
        setUserData(value: any): GTweener;
        get userData(): any;
        onUpdate(callback: Function, target?: any): GTweener;
        onStart(callback: Function, target?: any): GTweener;
        onComplete(callback: Function, target?: any): GTweener;
        get startValue(): TweenValue;
        get endValue(): TweenValue;
        get value(): TweenValue;
        get deltaValue(): TweenValue;
        get normalizedTime(): number;
        get completed(): boolean;
        get allCompleted(): boolean;
        setPaused(paused: boolean): GTweener;
        /**
          * seek position of the tween, in seconds.
          */
        seek(time: number): void;
        kill(complete?: boolean): void;
        _to(start: number, end: number, duration: number): GTweener;
        _to2(start: number, start2: number, end: number, end2: number, duration: number): GTweener;
        _to3(start: number, start2: number, start3: number, end: number, end2: number, end3: number, duration: number): GTweener;
        _to4(start: number, start2: number, start3: number, start4: number, end: number, end2: number, end3: number, end4: number, duration: number): GTweener;
        _toColor(start: number, end: number, duration: number): GTweener;
        _shake(startX: number, startY: number, amplitude: number, duration: number): GTweener;
        _init(): void;
        _reset(): void;
        _update(dt: number): void;
    }
}

declare module 'fairygui-cc/tween/EaseType' {
    export enum EaseType {
        Linear = 0,
        SineIn = 1,
        SineOut = 2,
        SineInOut = 3,
        QuadIn = 4,
        QuadOut = 5,
        QuadInOut = 6,
        CubicIn = 7,
        CubicOut = 8,
        CubicInOut = 9,
        QuartIn = 10,
        QuartOut = 11,
        QuartInOut = 12,
        QuintIn = 13,
        QuintOut = 14,
        QuintInOut = 15,
        ExpoIn = 16,
        ExpoOut = 17,
        ExpoInOut = 18,
        CircIn = 19,
        CircOut = 20,
        CircInOut = 21,
        ElasticIn = 22,
        ElasticOut = 23,
        ElasticInOut = 24,
        BackIn = 25,
        BackOut = 26,
        BackInOut = 27,
        BounceIn = 28,
        BounceOut = 29,
        BounceInOut = 30,
        Custom = 31
    }
}

declare module 'fairygui-cc/utils/UBBParser' {
    export class UBBParser {
        protected _handlers: {
            [index: string]: (tagName: string, end: boolean, attr: string) => string;
        };
        lastColor: string;
        lastSize: string;
        linkUnderline: boolean;
        linkColor: string;
        constructor();
        protected onTag_URL(tagName: string, end: boolean, attr: string): string;
        protected onTag_IMG(tagName: string, end: boolean, attr: string): string;
        protected onTag_Simple(tagName: string, end: boolean, attr: string): string;
        protected onTag_COLOR(tagName: string, end: boolean, attr: string): string;
        protected onTag_FONT(tagName: string, end: boolean, attr: string): string;
        protected onTag_SIZE(tagName: string, end: boolean, attr: string): string;
        protected getTagText(remove?: boolean): string;
        parse(text: string, remove?: boolean): string;
    }
    export var defaultParser: UBBParser;
}

declare module 'fairygui-cc/utils/ByteBuffer' {
    import { Color } from "cc";
    export class ByteBuffer {
        stringTable: Array<string>;
        version: number;
        littleEndian: boolean;
        protected _view: DataView;
        protected _bytes: Uint8Array;
        protected _pos: number;
        protected _length: number;
        constructor(buffer: ArrayBuffer, offset?: number, length?: number);
        get data(): Uint8Array;
        get position(): number;
        set position(value: number);
        skip(count: number): void;
        readByte(): number;
        readBool(): boolean;
        readShort(): number;
        readUshort(): number;
        readInt(): number;
        readUint(): number;
        readFloat(): number;
        readString(len?: number): string;
        readS(): string;
        readSArray(cnt: number): Array<string>;
        writeS(value: string): void;
        readColor(hasAlpha?: boolean): Color;
        readChar(): string;
        readBuffer(): ByteBuffer;
        seek(indexTablePos: number, blockIndex: number): boolean;
    }
}

declare module 'fairygui-cc/Relations' {
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export class Relations {
        handling: GObject | null;
        sizeDirty: boolean;
        constructor(owner: GObject);
        add(target: GObject, relationType: number, usePercent?: boolean): void;
        remove(target: GObject, relationType?: number): void;
        contains(target: GObject): boolean;
        clearFor(target: GObject): void;
        clearAll(): void;
        copyFrom(source: Relations): void;
        dispose(): void;
        onOwnerSizeChanged(dWidth: number, dHeight: number, applyPivot: boolean): void;
        ensureRelationsSizeCorrect(): void;
        get empty(): boolean;
        setup(buffer: ByteBuffer, parentToChild: boolean): void;
    }
}

declare module 'fairygui-cc/event/InputProcessor' {
    import { Component, Vec2 } from "cc";
    import { GObject } from "fairygui-cc/GObject";
    import { Event as FUIEvent } from "fairygui-cc/event/Event";
    export class InputProcessor extends Component {
        _captureCallback: (evt: FUIEvent) => void;
        constructor();
        onLoad(): void;
        onEnable(): void;
        onDisable(): void;
        getAllTouches(touchIds?: Array<number>): Array<number>;
        getTouchPosition(touchId?: number): Vec2;
        getTouchTarget(): GObject;
        addTouchMonitor(touchId: number, target: GObject): void;
        removeTouchMonitor(target: GObject): void;
        cancelClick(touchId: number): void;
        simulateClick(target: GObject): void;
    }
}

declare module 'fairygui-cc/event/HitTest' {
    import { Vec2 } from "cc";
    import { GObject } from "fairygui-cc/GObject";
    import { ByteBuffer } from "fairygui-cc/utils/ByteBuffer";
    export interface IHitTest {
        hitTest(pt: Vec2, globalPt: Vec2): boolean;
    }
    export class PixelHitTest implements IHitTest {
        offsetX: number;
        offsetY: number;
        scaleX: number;
        scaleY: number;
        constructor(data: PixelHitTestData, offsetX?: number, offsetY?: number);
        hitTest(pt: Vec2): boolean;
    }
    export class PixelHitTestData {
        pixelWidth: number;
        scale: number;
        pixels: Uint8Array;
        constructor(ba: ByteBuffer);
    }
    export class ChildHitArea implements IHitTest {
        constructor(child: GObject);
        hitTest(pt: Vec2, globalPt: Vec2): boolean;
    }
}

declare module 'fairygui-cc/Margin' {
    export class Margin {
        left: number;
        right: number;
        top: number;
        bottom: number;
        constructor();
        copy(source: Margin): void;
        isNone(): boolean;
    }
}

declare module 'fairygui-cc/tween/GPath' {
    import { Vec2 } from "cc";
    import { GPathPoint } from "fairygui-cc/tween/GPathPoint";
    export class GPath {
        constructor();
        get length(): number;
        create2(pt1: GPathPoint, pt2: GPathPoint, pt3?: GPathPoint, pt4?: GPathPoint): void;
        create(points: Array<GPathPoint>): void;
        clear(): void;
        getPointAt(t: number, result?: Vec2): Vec2;
        get segmentCount(): number;
        getAnchorsInSegment(segmentIndex: number, points?: Array<Vec2>): Array<Vec2>;
        getPointsInSegment(segmentIndex: number, t0: number, t1: number, points?: Array<Vec2>, ts?: Array<number>, pointDensity?: number): Array<Vec2>;
        getAllPoints(points?: Array<Vec2>, ts?: Array<number>, pointDensity?: number): Array<Vec2>;
    }
}

declare module 'fairygui-cc/tween/TweenValue' {
    export class TweenValue {
        x: number;
        y: number;
        z: number;
        w: number;
        constructor();
        get color(): number;
        set color(value: number);
        getField(index: number): number;
        setField(index: number, value: number): void;
        setZero(): void;
    }
}

declare module 'fairygui-cc/tween/GPathPoint' {
    export enum CurveType {
        CRSpline = 0,
        Bezier = 1,
        CubicBezier = 2,
        Straight = 3
    }
    export class GPathPoint {
        x: number;
        y: number;
        control1_x: number;
        control1_y: number;
        control2_x: number;
        control2_y: number;
        curveType: number;
        constructor();
        static newPoint(x: number, y: number, curveType: number): GPathPoint;
        static newBezierPoint(x: number, y: number, control1_x: number, control1_y: number): GPathPoint;
        static newCubicBezierPoint(x: number, y: number, control1_x: number, control1_y: number, control2_x: number, control2_y: number): GPathPoint;
        clone(): GPathPoint;
    }
}

