Doubi wrote:
Steffen Mueller wrote:
I'm a terrible writer, but I'll try to answer any questions you come up with.
I'll take you up on that :-)

- Why does every example of an XS file everywhere begin with

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

but all the .xs files in the Wx package begin with something different, usually including

#define PERL_NO_GET_CONTEXT

  This one is just a slight performance boost, see perlguts

#include "cpp/wxapi.h"

  This includes the three headers above, plus:
- disables some warnings that are caused by XS-generated code
- #undefines some symbols defined by Perl headers that cause
  compilation errors in wxWidgets' headers
- in general, maked wxWidgets and Perl API coexist, and adds some
  hacks required for some versions of wxWidgets and/or Perl

- I'm writing wxPerl wrappers for a new wx component. How do I make use of the installed Wx typemaps and the wxapi.h? The latter I assume is

I saw you figured it out; for the archives: see Wx::ActiveX for an example of an XS module using wxWidgets/wxPerl API.

- If I want to #include "wx/wx.h" in my .xs file, does A::wx somehow find that for me automatically?

  Yes, that's its purpose in life :-)

Mattia

Reply via email to