Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / AnimationCtrl.xsp
1 #############################################################################
2 ## Name:        XS/AnimationCtrl.xsp
3 ## Purpose:     XS+++ for Wx::AnimationCtrl
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     18/08/2007
7 ## RCS-ID:      $Id: AnimationCtrl.xsp 2179 2007-08-18 20:26:47Z mbarbon $
8 ## Copyright:   (c) 2007 Mattia Barbon
9 ## Licence:     This program is free software; you can redistribute it and/or
10 ##              modify it under the same terms as Perl itself
11 #############################################################################
12
13 %module{Wx};
14
15 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
16
17 %typemap{wxAnimationCtrl*}{simple};
18
19 #include <wx/animate.h>
20
21 %name{Wx::AnimationCtrl} class wxAnimationCtrl
22 {
23     %name{newDefault} wxAnimationCtrl()
24         %code{% RETVAL = new wxAnimationCtrl();
25                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
26                 %};
27
28     wxAnimationCtrl( wxWindow *parent,
29                      wxWindowID id,
30                      const wxAnimation& anim = wxNullAnimationPtr,
31                      const wxPoint& pos = wxDefaultPosition,
32                      const wxSize& size = wxDefaultSize,
33                      long style = wxAC_DEFAULT_STYLE,
34                      const wxString& name = wxAnimationCtrlNameStr )
35         %code{% RETVAL = new wxAnimationCtrl( parent, id, *anim, pos, size,
36                                               style, name );
37                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
38                 %};
39
40     bool Create( wxWindow *parent, wxWindowID id,
41                  const wxAnimation& anim = wxNullAnimationPtr,
42                  const wxPoint& pos = wxDefaultPosition,
43                  const wxSize& size = wxDefaultSize,
44                  long style = wxAC_DEFAULT_STYLE,
45                  const wxString& name = wxAnimationCtrlNameStr );
46
47     bool LoadFile( const wxString& filename,
48                    wxAnimationType type = wxANIMATION_TYPE_ANY );
49
50     void SetAnimation( const wxAnimation &anim );
51     wxAnimation& GetAnimation() const;
52
53     bool Play();
54     void Stop();
55
56     bool IsPlaying() const;
57
58     void SetInactiveBitmap( const wxBitmap &bmp );
59     const wxBitmap& GetInactiveBitmap() const;
60 };
61
62 #endif