X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4638d697a3cf0b71597b1cedbbd8f62d2a4d3797..822e690b221486b63895b5f14a7fbee2bc966fe5:/contrib/include/wx/animate/animate.h?ds=sidebyside diff --git a/contrib/include/wx/animate/animate.h b/contrib/include/wx/animate/animate.h index 991beeb81d..e58a5d3896 100644 --- a/contrib/include/wx/animate/animate.h +++ b/contrib/include/wx/animate/animate.h @@ -12,7 +12,7 @@ #ifndef _WX_ANIMATEH__ #define _WX_ANIMATEH__ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "animate.h" #endif @@ -21,12 +21,20 @@ #include #include #include +#include +#include +#include + +#ifdef WXMAKINGDLL_ANIMATE + #define WXDLLIMPEXP_ANIMATE WXEXPORT +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_ANIMATE WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_ANIMATE +#endif -//#define ANIMDLLEXPORT WXDLLEXPORT -#define ANIMDLLEXPORT - -class ANIMDLLEXPORT wxAnimationBase; -class ANIMDLLEXPORT wxAnimationPlayer; +class WXDLLIMPEXP_ANIMATE wxAnimationBase; +class WXDLLIMPEXP_ANIMATE wxAnimationPlayer; class WXDLLEXPORT wxImage; enum wxAnimationDisposal @@ -37,7 +45,7 @@ enum wxAnimationDisposal wxANIM_TOPREVIOUS = 2 } ; -class ANIMDLLEXPORT wxAnimationTimer: public wxTimer +class WXDLLIMPEXP_ANIMATE wxAnimationTimer: public wxTimer { public: wxAnimationTimer() { m_player = (wxAnimationPlayer*) NULL; } @@ -50,13 +58,13 @@ protected: }; /* wxAnimationPlayer - * Create an object of this class, and either pass an wxXXXAnimation object in the constructor, - * or call SetAnimation. Then call Play(). - * The wxAnimation object is only destroyed in the destructor if destroyAnimation is TRUE - * in the constructor. + * Create an object of this class, and either pass an wxXXXAnimation object in + * the constructor, or call SetAnimation. Then call Play(). The wxAnimation + * object is only destroyed in the destructor if destroyAnimation is TRUE in + * the constructor. */ -class ANIMDLLEXPORT wxAnimationPlayer : public wxObject +class WXDLLIMPEXP_ANIMATE wxAnimationPlayer : public wxObject { DECLARE_CLASS(wxAnimationPlayer) @@ -138,7 +146,7 @@ public: //// Implementation // Play the frame - virtual bool PlayFrame(int frame, wxWindow& window, wxPoint& pos); + virtual bool PlayFrame(int frame, wxWindow& window, const wxPoint& pos); virtual bool PlayFrame(); virtual void DrawFrame(int frame, wxDC& dc, const wxPoint& pos); virtual void DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour); @@ -173,14 +181,15 @@ protected: /* wxAnimationBase * Base class for animations. - * A wxXXXAnimation only stores the animation, providing accessors to wxAnimationPlayer. - * Currently an animation is read-only, but we could extend the API for adding frames - * programmatically, and perhaps have a wxMemoryAnimation class that stores its frames - * in memory, and is able to save all files with suitable filenames. You could then use - * e.g. Ulead GIF Animator to load the image files into a GIF animation. + * A wxXXXAnimation only stores the animation, providing accessors to + * wxAnimationPlayer. Currently an animation is read-only, but we could + * extend the API for adding frames programmatically, and perhaps have a + * wxMemoryAnimation class that stores its frames in memory, and is able to + * save all files with suitable filenames. You could then use e.g. Ulead GIF + * Animator to load the image files into a GIF animation. */ -class ANIMDLLEXPORT wxAnimationBase : public wxObject +class WXDLLIMPEXP_ANIMATE wxAnimationBase : public wxObject { DECLARE_ABSTRACT_CLASS(wxAnimationBase) @@ -205,16 +214,16 @@ public: //// Operations - virtual bool LoadFile(const wxString& filename) { return FALSE; } + virtual bool LoadFile(const wxString& WXUNUSED(filename)) { return FALSE; } }; /* wxGIFAnimation * This will be moved to a separate file in due course. */ -class ANIMDLLEXPORT wxGIFDecoder; +class WXDLLIMPEXP_ANIMATE wxGIFDecoder; -class ANIMDLLEXPORT wxGIFAnimation : public wxAnimationBase +class WXDLLIMPEXP_ANIMATE wxGIFAnimation : public wxAnimationBase { DECLARE_CLASS(wxGIFAnimation) @@ -255,7 +264,7 @@ protected: // Resize to animation size if this is set #define wxAN_FIT_ANIMATION 0x0010 -class ANIMDLLEXPORT wxAnimationCtrlBase: public wxControl +class WXDLLIMPEXP_ANIMATE wxAnimationCtrlBase: public wxControl { public: wxAnimationCtrlBase() { } @@ -312,7 +321,7 @@ private: * Provides a GIF animation class when required. */ -class ANIMDLLEXPORT wxGIFAnimationCtrl: public wxAnimationCtrlBase +class WXDLLIMPEXP_ANIMATE wxGIFAnimationCtrl: public wxAnimationCtrlBase { public: wxGIFAnimationCtrl() { }