//================================================================================
// GFxUIScript.
//================================================================================

class GFxUIScript extends UIScript
	native
	dynamicrecompile;

enum EDelegateHandlerType {
	EDHandler_Default,
	EDHandler_OlympiadArenaList,
	EDHandler_UseSkill,
	EDHandler_Container,
	EDHandler_DamageText,
	EDHandler_Statistic,
	EDHandler_NotifyUSMEnd,
	EDHandler_ClanUnionAction,
	EDHandler_EventKalieWnd,
	EDHandler_Option,
	EDHandler_ShortcutAPI,
	EDHandler_InputAPI,
	EDHandler_BeautyshopWnd,
	EDHandler_ChatWnd,
	EDHandler_PledgeRecruit,
	EDHandler_EventChristmasWnd,
	EDHandler_EventCardWnd,
	EDHandler_AdenaDistributionWnd,
	EDHandler_GFxDebug,
	EDHandler_LuckyGameWnd,
	EDHandler_TrainingRoomWnd,
	EDHandler_Event10thAnniversary,
	EDHandler_RadarMap,
	EDHandler_AlchemyAPI,
	EDHandler_FishWnd,
	EDHandler_VipSystem,
	EDHandler_Arena,
	EDHandler_FactionWnd,
	EDHandler_Minimap,
	EDHandler_UpgradeSystemWnd,
	EDHandler_GameData,
	EDHandler_OBS,
	EDHandler_CardUpdownGame,
	EDHandler_PledgeWnd,
	EDHandler_ElementalSpirit,
	EDHandler_Costume,
	EDHandler_ClassChange,
	EDHandler_TeleportList,
	EDHandler_HuntingZone
};

enum EExternalFunctionType {
	EFunc_None,
	EFunc_SysStringTranslator
};

enum EFlashImageLoaderType {
	EImgLoader_None,
	EImgLoader_Pledge,
	EImgLoader_PackageTexture
};

var Object m_pTargetWnd;

native function RegisterEvent (int ev);

native function RegisterGFxEventForLoaded (int ev);

native function RegisterGFxEvent (int ev);

native function RegisterState (string WindowName, string State);

native final function bool ShowFlashFromFilePath (string filePath, optional bool bDuplicated);

native final function CreateObject (out GFxValue val);

native final function CreateArray (out GFxValue val);

native final function bool Invoke (string funcName, out array<GFxValue> args, out GFxValue Result);

native final function AllocGFxValues (out array<GFxValue> args, int Num);

native final function DeallocGFxValues (out array<GFxValue> args);

native final function AllocGFxValue (out GFxValue val);

native final function DeallocGFxValue (out GFxValue val);

native final function RegisterDelegateHandler (EDelegateHandlerType Type);

native final function bool GetVariable (out GFxValue val, string PathToVar);

native final function GetFunction (out GFxValue val, EExternalFunctionType funcType);

native function SetMsgPassThrough (bool bPass);

native function SetAlwaysFullAlpha (bool bFull);

native function SetRenderOnTop (bool bSet);

native function SetDefaultShow (bool bSet);

native final function ShowWindow (optional string WindowName);

native final function HideWindow (optional string WindowName);

native final function bool IsShowWindow (optional string WindowName);

native final function SetFocus (optional string WindowName);

native final function BringToFrontOf (string TargetName);

native final function BringToFront ();

native final function MakeRenderToTexture (bool bScreenSizeRenderTarget);

native final function IgnoreUIEvent (bool bIgnore);

native final function SetHavingFocus (bool bFocus);

native final function FlashMoviePlayStart (int iReserved);

native final function FlashMoviePlayEnd (int iReserved);

native final function SetAnchor (string targetWindowName, EAnchorPointType targetPointType, EAnchorPointType anchorPointType, int OffsetX, int OffsetY);

native final function SetFixedPositionRate (float fVerticalPositionRate, float fHorizontalPositionRate);

native final function ApplyFixedPositionRate ();

native final function SetSaveWnd (bool bSavePosition, bool bSaveSize);

native final function SetRestartableFlash ();

native final function SetContainer (string containerName);

native final function SetStateChangeNotification ();

native final function HasTextField (bool enableIME);

native final function SetHasGFxTextField (bool HasTextField);

native final function SetNextFocus ();

native final function SetModal (bool a_Modal);

native final function SetAlwaysOnTop (bool bAlwaysOnTop);

native final function SetRotateCursor ();

native final function UnsetRotateCursor ();

native final function bool IsSavedInfo ();

native final function bool SetGFxFromSavedInfo ();

native final function GetAnchorPointFromWindow (out float X, out float Y, EAnchorPointType anchorType);

native function SetClosingOnESC ();

native final function SetHUD ();

native final function ForceToMoveMousePos (float X, float Y);

native final function SendCommandToServer (string Command);

event OnCallUCLogic (int logicID, string param);

event OnFlashLoaded ();

event OnFocus (bool bFocused, bool bTransparencyMode);

native final function SetEulaText (out GFxValue val, string Name);

native final function int GetUserPremiumLevel ();

native final function SetTimer (int a_TimerID, int a_DelayMiliseconds);

native final function KillTimer (int a_TimerID);

native final function SetCanBeShownDuringScene (bool bCanBeShownDuringScene);