dolphin/Externals/wxWidgets3/include/wx/anidecod.h
Soren Jorvang d14efe561b Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the
last 2.9 release before the 3.0 stable release.

Since the full wxWidgets distribution is rather large, I have
imported only the parts that we use, on a subdirectory basis:

art
include/wx/*.*
include/wx/aui
include/wx/cocoa
include/wx/generic
include/wx/gtk
include/wx/meta
include/wx/msw
include/wx/osx
include/wx/persist
include/wx/private
include/wx/protocol
include/wx/unix
src/aui
src/common
src/generic
src/gtk
src/msw
src/osx
src/unix


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-20 18:05:19 +00:00

82 lines
2.6 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/anidecod.h
// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
// Author: Francesco Montorsi
// CVS-ID: $Id: anidecod.h 66716 2011-01-19 12:28:31Z DS $
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANIDECOD_H
#define _WX_ANIDECOD_H
#include "wx/defs.h"
#if wxUSE_STREAMS && (wxUSE_ICO_CUR || wxUSE_GIF)
#include "wx/stream.h"
#include "wx/image.h"
#include "wx/animdecod.h"
#include "wx/dynarray.h"
class /*WXDLLIMPEXP_CORE*/ wxANIFrameInfo; // private implementation detail
WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
// --------------------------------------------------------------------------
// wxANIDecoder class
// --------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxANIDecoder : public wxAnimationDecoder
{
public:
// constructor, destructor, etc.
wxANIDecoder();
~wxANIDecoder();
virtual wxSize GetFrameSize(unsigned int frame) const;
virtual wxPoint GetFramePosition(unsigned int frame) const;
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
virtual long GetDelay(unsigned int frame) const;
virtual wxColour GetTransparentColour(unsigned int frame) const;
// implementation of wxAnimationDecoder's pure virtuals
virtual bool Load( wxInputStream& stream );
bool ConvertToImage(unsigned int frame, wxImage *image) const;
wxAnimationDecoder *Clone() const
{ return new wxANIDecoder; }
wxAnimationType GetType() const
{ return wxANIMATION_TYPE_ANI; }
private:
// wxAnimationDecoder pure virtual:
virtual bool DoCanRead( wxInputStream& stream ) const;
// modifies current stream position (see wxAnimationDecoder::CanRead)
// frames stored as wxImage(s): ANI files are meant to be used mostly for animated
// cursors and thus they do not use any optimization to encode differences between
// two frames: they are just a list of images to display sequentially.
wxImageArray m_images;
// the info about each image stored in m_images.
// NB: m_info.GetCount() may differ from m_images.GetCount()!
wxANIFrameInfoArray m_info;
// this is the wxCURHandler used to load the ICON chunk of the ANI files
static wxCURHandler sm_handler;
wxDECLARE_NO_COPY_CLASS(wxANIDecoder);
};
#endif // wxUSE_STREAMS && (wxUSE_ICO_CUR || wxUSE_GIF)
#endif // _WX_ANIDECOD_H