wxWebViewChromium icon indicating copy to clipboard operation
wxWebViewChromium copied to clipboard

wxPython Support

Open artlogic opened this issue 12 years ago • 3 comments

I'd like to add support to allow wxWebViewChromium to work with wxPython 2.9.5. My initial thought is that:

  1. A SWIG interface file will need to be written against webview_chromium.h (one for v1, one for v3).
  2. The wxPython modified version of SWIG is then used to generate the appropriate source.
  3. The generated c source is compiled during the build process.

One problem is that wxPython does not expose RegisterFactory. In this case, I feel as though the easiest way to deal with this is to add the following code to the SWIG initialization block - which in turn should be added to the python module init, registering wxWebViewBackendChromium on module init:

wxWebView::RegisterFactory(wxWebViewBackendChromium,
                           wxSharedPtr<wxWebViewFactory>
                           (new wxWebViewFactoryChromium));

I should be able to attempt this within the next week or so, however, I am concerned about how the multiprocess nature of Chrome is going to interact with Python.

artlogic avatar Sep 06 '13 06:09 artlogic

That all sounds reasonable to me, I guess it will be slightly easier when wxWidgets bug #15459 has been resolved.

sjlamerton avatar Sep 12 '13 18:09 sjlamerton

Sadly, it doesn't look like I'll have time to do this anytime soon. Hopefully my schedule will clear soon.

artlogic avatar Sep 16 '13 16:09 artlogic

You can embed CEF browser in wxPython using CEF Python, see wxpython.py example. Disclaimer: I am the author of CEF Python bindings.

cztomczak avatar Apr 19 '17 15:04 cztomczak