Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / cpp / e_cback.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        cpp/e_cback.h
3 // Purpose:     callback helper class for events
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     29/10/2000
7 // RCS-ID:      $Id: e_cback.h 2454 2008-08-31 11:12:47Z mbarbon $
8 // Copyright:   (c) 2000-2001, 2005, 2008 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 #ifndef _WXPERL_E_CBACK_H
14 #define _WXPERL_E_CBACK_H
15
16 #if WXPERL_W_VERSION_GE( 2, 5, 4 )
17 typedef void (wxObject::* wxPliObjectEventFunction)(wxEvent&);
18
19 #define wxPliCastEvtHandler( e ) \
20     ((wxObjectEventFunction)(wxPliObjectEventFunction) e)
21 #else
22 #define wxPliCastEvtHandler( e ) \
23     ((wxObjectEventFunction) e)
24 #endif
25
26 class wxPliEventCallback : public wxObject
27 {
28 public:
29     wxPliEventCallback( SV* method, SV* self );
30     ~wxPliEventCallback();
31
32     void Handler( wxEvent& event );
33 private:
34     bool m_is_method;
35     SV* m_method;
36     SV* m_self;
37 };
38
39 #endif // _WXPERL_E_CBACK_H
40
41 // Local variables: //
42 // mode: c++ //
43 // End: //