Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / aui / AUI.xs
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/aui/AUI.xs
3 // Purpose:     XS for Wx::AUI
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     11/11/2006
7 // RCS-ID:      $Id: AUI.xs 2700 2009-12-13 11:25:50Z mbarbon $
8 // Copyright:   (c) 2006, 2008-2009 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 #define PERL_NO_GET_CONTEXT
14
15 #include "cpp/wxapi.h"
16 #include "cpp/constants.h"
17 #include "cpp/overload.h"
18
19 #define wxNullBitmapPtr (wxBitmap*)&wxNullBitmap
20
21 #undef THIS
22
23 #include <wx/aui/framemanager.h>
24 #include <wx/aui/auibook.h>
25
26 // event macros
27 #define SEVT( NAME, ARGS )    wxPli_StdEvent( NAME, ARGS )
28 #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID )
29
30 // !package: Wx::Event
31 // !tag:
32 // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> }
33
34 #if WXPERL_W_VERSION_LT( 2, 8, 0 )
35 #define wxEVT_AUI_PANE_BUTTON   wxEVT_AUI_PANEBUTTON
36 #define wxEVT_AUI_PANE_CLOSE    wxEVT_AUI_PANECLOSE
37 #define wxEVT_AUI_PANE_MAXIMIZE wxEVT_AUI_PANEMAXIMIZE
38 #define wxEVT_AUI_PANE_RESTORE  wxEVT_AUI_PANERESTORE
39 #endif
40
41 static wxPliEventDescription evts[] =
42 {
43     SEVT( EVT_AUI_PANE_BUTTON, 2 )
44     SEVT( EVT_AUI_PANE_CLOSE, 2 )
45     SEVT( EVT_AUI_PANE_MAXIMIZE, 2 )
46     SEVT( EVT_AUI_PANE_RESTORE, 2 )
47     SEVT( EVT_AUI_RENDER, 2 )
48     EVT( EVT_AUINOTEBOOK_PAGE_CLOSE, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE )
49     EVT( EVT_AUINOTEBOOK_PAGE_CHANGED, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED )
50     EVT( EVT_AUINOTEBOOK_PAGE_CHANGING, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING )
51     EVT( EVT_AUINOTEBOOK_BUTTON, 3, wxEVT_COMMAND_AUINOTEBOOK_BUTTON )
52     EVT( EVT_AUINOTEBOOK_BEGIN_DRAG, 3, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG )
53     EVT( EVT_AUINOTEBOOK_END_DRAG, 3, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG )
54     EVT( EVT_AUINOTEBOOK_DRAG_MOTION, 3, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION )
55     EVT( EVT_AUINOTEBOOK_ALLOW_DND, 3, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND )
56     { 0, 0, 0 }
57 };
58
59 MODULE=Wx__AUI
60
61 BOOT:
62   INIT_PLI_HELPERS( wx_pli_helpers );
63
64 INCLUDE: perl -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/AuiManager.xsp |
65
66 INCLUDE: perl -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/AuiPaneInfo.xsp |
67
68 INCLUDE: perl -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/AuiNotebook.xsp |
69
70 MODULE=Wx__AUI PACKAGE=Wx::AUI
71
72 void
73 SetEvents()
74   CODE:
75     wxPli_set_events( evts );
76
77 #include "cpp/ovl_const.cpp"
78
79 #  //FIXME//tricky
80 #if defined(__WXMSW__)
81 #undef XS
82 #define XS( name ) WXXS( name )
83 #endif
84
85 MODULE=Wx__AUI