diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index 8698f4b4..f80f148d 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -6108,6 +6108,9 @@ "USER_ATTENTION_ERROR":"wx.", "USER_ATTENTION_INFO":"wx.", "USE_ACCESSIBILITY":"wx.", +"USE_GLCANVAS":"wx.glcanvas.", +"USE_MEDIACTRL":"wx.media.", +"USE_WEBVIEW":"wx.html2.", "Uint16":"wx.", "Uint32":"wx.", "Uint64":"wx.", diff --git a/etg/_glcanvas.py b/etg/_glcanvas.py index 5a3d0230..cad8142d 100644 --- a/etg/_glcanvas.py +++ b/etg/_glcanvas.py @@ -59,7 +59,7 @@ def run(): #----------------------------------------------------------------- module.addHeaderCode('#include ') - + tools.generateStubs('wxUSE_GLCANVAS', module) c = module.find('wxGLContext') assert isinstance(c, etgtools.ClassDef) @@ -67,7 +67,6 @@ def run(): c.addPrivateCopyCtor() - c = module.find('wxGLCanvas') tools.fixWindowClass(c) diff --git a/etg/mediactrl.py b/etg/mediactrl.py index 59b94c8e..b5653dfe 100644 --- a/etg/mediactrl.py +++ b/etg/mediactrl.py @@ -29,12 +29,16 @@ def run(): # Parse the XML file(s) building a collection of Extractor objects module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING) etgtools.parseDoxyXML(module, ITEMS) - module.addHeaderCode('#include "wx/mediactrl.h"') #----------------------------------------------------------------- # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. + module.addHeaderCode('#include ') + module.addHeaderCode('#include ') + tools.generateStubs('wxUSE_MEDIACTRL', module, + typeValMap={'wxMediaState': 'wxMEDIASTATE_STOPPED'}) + c = module.find('wxMediaCtrl') c.addPrivateCopyCtor() diff --git a/etg/webview.py b/etg/webview.py index 124995db..12c09735 100644 --- a/etg/webview.py +++ b/etg/webview.py @@ -38,19 +38,24 @@ def run(): # customizing the generated code and docstrings. module.addHeaderCode('#include ') + module.addHeaderCode('#include ') - module.addGlobalStr('wxWebViewBackendDefault') - module.addGlobalStr('wxWebViewBackendIE') - module.addGlobalStr('wxWebViewBackendWebKit') + module.addGlobalStr('wxWebViewBackendDefault', 0) + module.addGlobalStr('wxWebViewBackendIE', 0) + module.addGlobalStr('wxWebViewBackendWebKit', 0) + module.addGlobalStr('wxWebViewNameStr', 0) + module.addGlobalStr('wxWebViewDefaultURLStr', 0) + + # This tweak is needed only for the stub code + module.find('wxWebViewHandler.wxWebViewHandler').argsString = '(const wxString& scheme="")' + + tools.generateStubs('wxUSE_WEBVIEW', module) c = module.find('wxWebView') assert isinstance(c, etgtools.ClassDef) tools.fixWindowClass(c) c.abstract = True - module.addGlobalStr('wxWebViewNameStr', c) - module.addGlobalStr('wxWebViewDefaultURLStr', c) - for m in c.find('New').all(): m.factory = True c.find('New.id').default = 'wxID_ANY'