Permalink
Browse files

Generate stubs for glcanvas, mediactrl and webview

  • Loading branch information...
RobinD42 committed Oct 11, 2018
1 parent 0dec6df commit ea5c502498bd30358d8e11bfa2c3cbb837cfde04
Showing with 20 additions and 9 deletions.
  1. +3 −0 docs/sphinx/itemToModuleMap.json
  2. +1 −2 etg/_glcanvas.py
  3. +5 −1 etg/mediactrl.py
  4. +11 −6 etg/webview.py
@@ -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.",
View
@@ -59,15 +59,14 @@ def run():
#-----------------------------------------------------------------
module.addHeaderCode('#include <wx/glcanvas.h>')
tools.generateStubs('wxUSE_GLCANVAS', module)
c = module.find('wxGLContext')
assert isinstance(c, etgtools.ClassDef)
c.mustHaveApp()
c.addPrivateCopyCtor()
c = module.find('wxGLCanvas')
tools.fixWindowClass(c)
View
@@ -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 <wx/mediactrl.h>')
module.addHeaderCode('#include <wx/uri.h>')
tools.generateStubs('wxUSE_MEDIACTRL', module,
typeValMap={'wxMediaState': 'wxMEDIASTATE_STOPPED'})
c = module.find('wxMediaCtrl')
c.addPrivateCopyCtor()
View
@@ -38,19 +38,24 @@ def run():
# customizing the generated code and docstrings.
module.addHeaderCode('#include <wx/webview.h>')
module.addHeaderCode('#include <wx/filesys.h>')
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'

0 comments on commit ea5c502

Please sign in to comment.