mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Generate stubs for glcanvas, mediactrl and webview
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -59,7 +59,7 @@ def run():
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
module.addHeaderCode('#include <wx/glcanvas.h>')
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user