1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Magic to be included to get access to wxPerl API
4 // Author: Mattia Barbon
7 // RCS-ID: $Id: wxapi.h 2714 2009-12-23 23:46:16Z mbarbon $
8 // Copyright: (c) 2002-2003, 2005-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 /////////////////////////////////////////////////////////////////////////////
14 #error cpp/wxapi.h must be included only once!
21 #if defined( __WXMSW__ )
27 #include "cpp/compat.h"
29 #if WXPERL_W_VERSION_LT( 2, 5, 3 ) || WXPERL_W_VERSION_EQ( 2, 7, 0 ) || \
30 WXPERL_W_VERSION_EQ( 2, 7, 1 )
31 #error wxWidgets 2.4.x, 2.5.0, 2.5.1, 2.5.2, 2.7.0, 2.7.1 are no longer supported by wxPerl
34 #if WXPERL_W_VERSION_LE( 2, 5, 1 )
35 #define compatibility_iterator Node*
38 #include "cpp/chkconfig.h"
40 #if defined(__WXWINCE__)
44 #if defined(__VISUALC__) || defined(__DIGITALMARS__)
45 #define mode_t mode_avoid_redefinition_t
54 #if WXPERL_P_VERSION_LT( 5, 10, 0 )
56 // fix newXS type for perl 5.8
57 inline CV* wxPli_newXS(pTHX_ const char* name, XSUBADDR_t addr,
60 return newXS( (char*)name, addr, (char*)file );
64 #define newXS( a, b, c ) wxPli_newXS( aTHX_ a, b, c )
68 #if defined(__VISUALC__) || defined(__DIGITALMARS__)
72 #if WXPERL_P_VERSION_GE( 5, 9, 0 ) || WXPERL_P_VERSION_GE( 5, 8, 1 )
74 // XXX this is an hack
76 #define assert_not_ROK(sv)
92 #if defined( PERL_IMPLICIT_SYS )
133 #pragma warning ( disable: 4800 )
134 #pragma warning ( disable: 4100 ) // unreferenced formal parameter
135 #pragma warning ( disable: 4101 ) // unreferenced local variable
136 #pragma warning ( disable: 4706 ) // assignment within conditional expression
140 #include <wx/msw/winundef.h>
143 // some helper functions/classes/macros
144 #include "cpp/helpers.h"
146 // 0.01 -> 0010; 1.01 -> 1010, etc
147 #define WXPL_API_VERSION 0150