X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6862383251a9f1f103182c04f0d60bb1dac919c6..333e57d578e9e0fb6555452b5a53698ffd85ee69:/include/wx/animdecod.h?ds=sidebyside diff --git a/include/wx/animdecod.h b/include/wx/animdecod.h index bb8946ecee..0af0491816 100644 --- a/include/wx/animdecod.h +++ b/include/wx/animdecod.h @@ -17,8 +17,8 @@ #include "wx/colour.h" #include "wx/gdicmn.h" -class WXDLLIMPEXP_BASE wxInputStream; -class WXDLLIMPEXP_CORE wxImage; +class WXDLLIMPEXP_FWD_BASE wxInputStream; +class WXDLLIMPEXP_FWD_CORE wxImage; /* @@ -86,60 +86,61 @@ enum wxAnimationType class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData { -protected: - wxSize m_szAnimation; - size_t m_nFrames; +public: + wxAnimationDecoder() + { + m_background = wxNullColour; + m_nFrames = 0; + } + virtual ~wxAnimationDecoder() { } + + + virtual bool Load( wxInputStream& stream ) = 0; + virtual bool CanRead( wxInputStream& stream ) const = 0; + + virtual wxAnimationDecoder *Clone() const = 0; + virtual wxAnimationType GetType() const = 0; + + // convert given frame to wxImage + virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0; - // this is the colour to use for the wxANIM_TOBACKGROUND disposal. - // if not specified by the animation, it's set to wxNullColour - wxColour m_background; -public: // frame specific data getters + // frame specific data getters // not all frames may be of the same size; e.g. GIF allows to // specify that between two frames only a smaller portion of the // entire animation has changed. - virtual wxSize GetFrameSize(size_t frame) const = 0; + virtual wxSize GetFrameSize(unsigned int frame) const = 0; // the position of this frame in case it's not as big as m_szAnimation // or wxPoint(0,0) otherwise. - virtual wxPoint GetFramePosition(size_t frame) const = 0; + virtual wxPoint GetFramePosition(unsigned int frame) const = 0; // what should be done after displaying this frame. - virtual wxAnimationDisposal GetDisposalMethod(size_t frame) const = 0; + virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0; // the number of milliseconds this frame should be displayed. // if returns -1 then the frame must be displayed forever. - virtual long GetDelay(size_t frame) const = 0; + virtual long GetDelay(unsigned int frame) const = 0; // the transparent colour for this frame if any or wxNullColour. - virtual wxColour GetTransparentColour(size_t frame) const = 0; + virtual wxColour GetTransparentColour(unsigned int frame) const = 0; // get global data wxSize GetAnimationSize() const { return m_szAnimation; } wxColour GetBackgroundColour() const { return m_background; } - size_t GetFrameCount() const { return m_nFrames; } + unsigned int GetFrameCount() const { return m_nFrames; } -public: - wxAnimationDecoder() - { - m_background = wxNullColour; - m_nFrames = 0; - } - ~wxAnimationDecoder() {} - - - virtual bool Load( wxInputStream& stream ) = 0; - virtual bool CanRead( wxInputStream& stream ) const = 0; - - virtual wxAnimationDecoder *Clone() const = 0; - virtual wxAnimationType GetType() const = 0; +protected: + wxSize m_szAnimation; + unsigned int m_nFrames; - // convert given frame to wxImage - virtual bool ConvertToImage(size_t frame, wxImage *image) const = 0; + // this is the colour to use for the wxANIM_TOBACKGROUND disposal. + // if not specified by the animation, it's set to wxNullColour + wxColour m_background; }; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS #endif // _WX_ANIMDECOD_H