|
21 | 21 | 'wxWebViewHandler', |
22 | 22 | 'wxWebViewArchiveHandler', |
23 | 23 | 'wxWebViewFSHandler', |
| 24 | + 'wxWebViewConfiguration', |
| 25 | + 'wxWebViewFactory', |
24 | 26 | 'wxWebView', |
25 | 27 | 'wxWebViewEvent', |
26 | | - 'wxWebViewFactory', |
27 | 28 | 'wxWebViewIE', |
28 | 29 | 'wxWebViewHandlerRequest', |
29 | | - 'wxWebViewConfiguration', |
| 30 | + 'wxWebViewHandlerResponse', |
| 31 | + 'wxWebViewHandlerResponseData', |
30 | 32 | 'wxWebViewWindowFeatures', |
31 | 33 | ] |
32 | 34 |
|
@@ -99,20 +101,24 @@ def run(): |
99 | 101 | c.find('GetVersionInfo').ignore() |
100 | 102 | c.find('CreateConfiguration').isPureVirtual = True |
101 | 103 | c.find('CreateConfiguration').setCppCode_sip("""\ |
102 | | - PyErr_Clear(); |
103 | | - Py_BEGIN_ALLOW_THREADS |
104 | | - wxWebViewConfiguration cfg = sipCpp->CreateConfiguration(); |
105 | | - sipRes = new wxWebViewConfiguration(cfg.GetBackend(), cfg.GetImpl()); |
106 | | - Py_END_ALLOW_THREADS |
107 | | - if (PyErr_Occurred()) sipIsErr = 1; |
| 104 | + #if wxUSE_WEBVIEW |
| 105 | + PyErr_Clear(); |
| 106 | + Py_BEGIN_ALLOW_THREADS |
| 107 | + wxWebViewConfiguration cfg = sipCpp->CreateConfiguration(); |
| 108 | + sipRes = new wxWebViewConfiguration(cfg.GetBackend(), cfg.GetImpl()); |
| 109 | + Py_END_ALLOW_THREADS |
| 110 | + if (PyErr_Occurred()) sipIsErr = 1; |
| 111 | + #else |
| 112 | + wxPyRaiseNotImplemented(); |
| 113 | + #endif |
108 | 114 | """) |
109 | 115 |
|
110 | 116 | tools.generateStubs('wxUSE_WEBVIEW', module, |
111 | 117 | typeValMap={ |
112 | 118 | 'wxWebViewNavigationActionFlags': 'wxWEBVIEW_NAV_ACTION_NONE', |
113 | 119 | 'wxWebViewZoom': 'wxWEBVIEW_ZOOM_MEDIUM', |
114 | 120 | 'wxVersionInfo': 'wxVersionInfo()', |
115 | | - 'wxWebViewConfiguration': 'wxWebViewConfiguration("", NULL)', |
| 121 | + 'wxWebViewConfiguration': 'wxWebView::NewConfiguration()', |
116 | 122 | }) |
117 | 123 |
|
118 | 124 | c = module.find('wxWebView') |
@@ -292,9 +298,18 @@ def run(): |
292 | 298 | c = module.find('wxWebViewHandlerRequest') |
293 | 299 | c.find('GetDataString').ignore() |
294 | 300 |
|
| 301 | + c = module.find('wxWebViewHandlerResponse') |
| 302 | + c.abstract = True |
| 303 | + for m in c.find('Finish').all(): |
| 304 | + m.ignore() |
| 305 | + |
295 | 306 | c = module.find('wxWebViewConfiguration') |
296 | 307 | c.abstract = True |
297 | | - c.instanceCode = 'sipCpp = new wxWebViewConfiguration("", NULL);' |
| 308 | + c.instanceCode = """\ |
| 309 | + #if wxUSE_WEBVIEW |
| 310 | + sipCpp = new wxWebViewConfiguration("", NULL); |
| 311 | + #endif |
| 312 | + """ |
298 | 313 |
|
299 | 314 | c = module.find('wxWebViewWindowFeatures') |
300 | 315 | c.abstract = True |
|
0 commit comments