struct IFlashPlayer { enum EOptions { RENDER_EDGE_AA = 0x04, INIT_FIRST_FRAME = 0x08, ENABLE_MOUSE_SUPPORT = 0x10, DEFAULT = RENDER_EDGE_AA|INIT_FIRST_FRAME|ENABLE_MOUSE_SUPPORT, DEFAULT_NO_MOUSE = RENDER_EDGE_AA|INIT_FIRST_FRAME }; enum ECategory { eCat_RequestMeshCacheResetBit = 0x80000000, eCat_Default = 0, eCat_Temp = 1, eCat_Temp_TessHeavy = 1|eCat_RequestMeshCacheResetBit, eCat_User = 3 }; enum EScaleModeType { eSM_NoScale, eSM_ShowAll, eSM_ExactFit, eSM_NoBorder }; enum EAlignType { eAT_Center, eAT_TopCenter, eAT_BottomCenter, eAT_CenterLeft, eAT_CenterRight, eAT_TopLeft, eAT_TopRight, eAT_BottomLeft, eAT_BottomRight }; };
IFlashPlayer.h
enum EAlignType { eAT_Center, eAT_TopCenter, eAT_BottomCenter, eAT_CenterLeft, eAT_CenterRight, eAT_TopLeft, eAT_TopRight, eAT_BottomLeft, eAT_BottomRight };
IFlashPlayer.h
enum ECategory { eCat_RequestMeshCacheResetBit = 0x80000000, eCat_Default = 0, eCat_Temp = 1, eCat_Temp_TessHeavy = 1|eCat_RequestMeshCacheResetBit, eCat_User = 3 };
IFlashPlayer.h
enum EOptions { RENDER_EDGE_AA = 0x04, INIT_FIRST_FRAME = 0x08, ENABLE_MOUSE_SUPPORT = 0x10, DEFAULT = RENDER_EDGE_AA|INIT_FIRST_FRAME|ENABLE_MOUSE_SUPPORT, DEFAULT_NO_MOUSE = RENDER_EDGE_AA|INIT_FIRST_FRAME };
IFlashPlayer.h
Members |
Description |
RENDER_EDGE_AA = 0x04 |
Enables edge anti-aliased flash rendering. |
INIT_FIRST_FRAME = 0x08 |
Init objects of first frame when creating instance of flash file. |
ENABLE_MOUSE_SUPPORT = 0x10 |
Enable mouse input support. |
enum EScaleModeType { eSM_NoScale, eSM_ShowAll, eSM_ExactFit, eSM_NoBorder };
IFlashPlayer.h
virtual ~IFlashPlayer();
virtual void AddRef() = 0;
virtual void Advance(float deltaTime) = 0;
virtual void AvoidStencilClear(bool avoid) = 0;
Translates the client coordinates to the screen coordinates
virtual void ClientToScreen(int& x, int& y) const = 0;
virtual bool CreateArray(IFlashVariableObject*& pVarObj) = 0;
virtual bool CreateFunction(IFlashVariableObject*& pFuncVarObj, IActionScriptFunction* pFunc, void* pUserData = 0) = 0;
virtual bool CreateObject(const char* pClassName, const SFlashVarValue* pArgs, unsigned int numArgs, IFlashVariableObject*& pVarObj) = 0;
virtual bool CreateString(const char* pString, IFlashVariableObject*& pVarObj) = 0;
virtual bool CreateStringW(const wchar_t* pString, IFlashVariableObject*& pVarObj) = 0;
virtual void EnableMaskedRendering(bool enable) = 0;
special render mode for Crysis 2 HUD markers (in stereo)
virtual void ExtendCanvasToViewport(bool extend) = 0;
virtual float GetBackgroundAlpha() const = 0;
virtual unsigned int GetCurrentFrame() const = 0;
virtual const char* GetFilePath() const = 0;
General property queries
virtual unsigned int GetFrameCount() const = 0;
virtual float GetFrameRate() const = 0;
virtual int GetHeight() const = 0;
virtual size_t GetMetadata(char* pBuff, unsigned int buffSize) const = 0;
virtual void GetScissorRect(int& x0, int& y0, int& width, int& height) const = 0;
virtual bool GetVariable(const char* pPathToVar, IFlashVariableObject*& pVarObj) const = 0;
virtual bool GetVariable(const char* pPathToVar, SFlashVarValue& value) const = 0;
virtual bool GetVariableArray(EFlashVariableArrayType type, const char* pPathToVar, unsigned int index, void* pData, unsigned int count) const = 0;
virtual unsigned int GetVariableArraySize(const char* pPathToVar) const = 0;
virtual EAlignType GetViewAlignment() const = 0;
virtual void GetViewport(int& x0, int& y0, int& width, int& height, float& aspectRatio) const = 0;
virtual EScaleModeType GetViewScaleMode() const = 0;
virtual bool GetVisible() const = 0;
virtual int GetWidth() const = 0;
virtual void GotoFrame(unsigned int frameNumber) = 0;
virtual bool GotoLabeledFrame(const char* pLabel, int offset = 0) = 0;
virtual bool HasLooped() const = 0;
IFlashPlayer();
virtual bool Invoke(const char* pMethodName, const SFlashVarValue* pArgs, unsigned int numArgs, SFlashVarValue* pResult = 0) = 0;
bool Invoke0(const char* pMethodName, SFlashVarValue* pResult = 0);
more to come...
bool Invoke1(const char* pMethodName, const SFlashVarValue& arg, SFlashVarValue* pResult = 0);
virtual bool IsAvailable(const char* pPathToVar) const = 0;
virtual bool IsPaused() const = 0;
virtual bool Load(const char* pFilePath, unsigned int options = DEFAULT, unsigned int cat = eCat_Default) = 0;
Initialization
virtual void Pause(bool pause) = 0;
virtual void Release() = 0;
virtual void Render(bool stereo = false) = 0;
virtual void RenderPlaybackLockless(bool stereo = false, bool finalPlayback = true) = 0;
virtual size_t RenderRecordLockless() = 0;
virtual void ResetDirtyFlags() = 0;
Coordinate Translation
virtual void Restart() = 0;
Execution State
Translates the screen coordinates to the client coordinates
virtual void ScreenToClient(int& x, int& y) const = 0;
virtual void SendCharEvent(const SFlashCharEvent& charEvent) = 0;
virtual void SendCursorEvent(const SFlashCursorEvent& cursorEvent) = 0;
virtual void SendKeyEvent(const SFlashKeyEvent& keyEvent) = 0;
virtual void SetBackgroundAlpha(float alpha) = 0;
virtual void SetBackgroundColor(const ColorB& color) = 0;
Rendering
virtual void SetCompositingDepth(float depth) = 0;
virtual void SetExternalInterfaceHandler(IExternalInterfaceHandler* pHandler, void* pUserData = 0) = 0;
Callbacks & Events
virtual void SetFSCommandHandler(IFSCommandHandler* pHandler, void* pUserData = 0) = 0;
virtual void SetScissorRect(int x0, int y0, int width, int height) = 0;
virtual bool SetVariable(const char* pPathToVar, const IFlashVariableObject* pVarObj) = 0;
virtual bool SetVariable(const char* pPathToVar, const SFlashVarValue& value) = 0;
Action Script
virtual bool SetVariableArray(EFlashVariableArrayType type, const char* pPathToVar, unsigned int index, const void* pData, unsigned int count) = 0;
virtual void SetViewAlignment(EAlignType viewAlignment) = 0;
virtual void SetViewport(int x0, int y0, int width, int height, float aspectRatio = 1.0f) = 0;
virtual void SetViewScaleMode(EScaleModeType scaleMode) = 0;
virtual void SetVisible(bool visible) = 0;
virtual void StereoEnforceFixedProjectionDepth(bool enforce) = 0;
virtual void StereoSetCustomMaxParallax(float maxParallax = -1.0f) = 0;