1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#############################################################################
## Name: XS/Animation.xsp
## Purpose: XS+++ for Wx::Animation
## Author: Mattia Barbon
## Modified by:
## Created: 18/08/2007
## RCS-ID: $Id: Animation.xsp 2556 2009-05-11 10:18:47Z mbarbon $
## Copyright: (c) 2007, 2009 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
%module{Wx};
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
#include <wx/animate.h>
%name{Wx::Animation} class wxAnimation
{
wxAnimation();
## wxAnimation( const wxString& name,
## wxAnimationType type = wxANIMATION_TYPE_ANY );
%{
static void
wxAnimation::CLONE()
CODE:
wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
%}
## // thread OK
~wxAnimation()
%code{% wxPli_thread_sv_unregister( aTHX_ "Wx::Bitmap", THIS, ST(0) );
delete THIS;
%};
bool IsOk() const;
int GetDelay( unsigned int frame );
unsigned int GetFrameCount();
wxImage& GetFrame( unsigned int frame );
wxSize GetSize() const;
bool LoadFile( const wxString& name,
wxAnimationType type = wxANIMATION_TYPE_ANY );
bool Load( wxPliInputStream stream,
wxAnimationType type = wxANIMATION_TYPE_ANY );
};
#endif
|