I am using SIP to make a python wrapper for a C++ lib than extends wxWidgets. As an example I have a C++ function that takes a wxWindow* as an argument:
void foo(wxWindow* w);
On the python side the wxWindow type needs to recognized as a wx.Window (asside: in the spydor variable explorer I actually see _core.Window as the python type for a wx.Window). This is proving to be difficult. If in my .sip file I try
class wxWindow /PyName=Window/;
then on the python side it expects a Window, not a wx.Window as the argument type. i.e. I need to get the module name prefix wx. in there somehow.
If I try class wxWindow /PyName=wx.Window/;
I get ‘Annotation has a value of the wrong type’ from sip-build.
Possibly the correct solution is in my .sip file to include a .sip file from the wxPyhon source tree, but which one? I tried
then sip-build tells me ‘No %Module has been specified for module defined in …/…/…/Phoenix-master/src/wxpy_api.sip’
Any guidance on how to reconcile these types would be much appreciated.
Also if there is more approriate list for this question, I am all ears.