Various updates needed to fix builds with sip 4.19.16

This commit is contained in:
Robin Dunn
2019-04-12 22:12:50 -07:00
parent 5c31c7d8cd
commit 4fd3b4e55d
6 changed files with 35 additions and 53 deletions

View File

@@ -887,7 +887,7 @@
"DirProperty":"wx.propgrid.",
"DirSelector":"wx.",
"DirSelectorPromptStr":"wx.",
"Direction":"wx.",
"Direction":"wx.DataObject.",
"DisableAsserts":"wx.",
"Display":"wx.",
"DisplayChangedEvent":"wx.",
@@ -2247,6 +2247,8 @@
"LOCALE_CAT_NUMBER":"wx.",
"LOCALE_DATE_TIME_FMT":"wx.",
"LOCALE_DECIMAL_POINT":"wx.",
"LOCALE_DONT_LOAD_DEFAULT":"wx.",
"LOCALE_LOAD_DEFAULT":"wx.",
"LOCALE_LONG_DATE_FMT":"wx.",
"LOCALE_SHORT_DATE_FMT":"wx.",
"LOCALE_THOUSANDS_SEP":"wx.",
@@ -2292,6 +2294,7 @@
"Locale":"wx.",
"LocaleCategory":"wx.",
"LocaleInfo":"wx.",
"LocaleInitFlags":"wx.",
"Log":"wx.",
"LogBuffer":"wx.",
"LogChain":"wx.",

View File

@@ -178,8 +178,7 @@ def run():
c.addPrivateCopyCtor()
c.find('wxFileConfig').findOverload('wxInputStream').find('conv').ignore()
ctor = c.find('wxFileConfig').findOverload('wxString').find('conv').ignore()
#ctor.items.remove(ctor.find('conv'))
ctor = c.find('Save').find('conv').ignore()
c.find('Save').ignore()
c.find('GetGlobalFile').ignore()
c.find('GetLocalFile').ignore()
@@ -188,7 +187,13 @@ def run():
c.find('GetFirstEntry').ignore()
c.find('GetNextEntry').ignore()
c.addCppMethod('bool', 'Save', '(wxOutputStream& os)', doc=c.find('Save').briefDoc, body="""\
#if wxUSE_STREAMS
return self->Save(*os);
#else
wxPyRaiseNotImplemented();
#endif
""")
#-----------------------------------------------------------------
# In C++ wxConfig is a #define to some other config class. We'll let our

View File

@@ -61,7 +61,6 @@ def run():
c.find('CreateCanvas').isVirtual = True
c.find('CreateControlBar').isVirtual = True
c.find('Initialize').isVirtual = True
c.find('InitializeWithModality').isVirtual = True

View File

@@ -43,24 +43,28 @@ def run():
c.find('GetGeneric').mustHaveApp()
c.find('GetDefault').mustHaveApp()
c.find('Set').mustHaveApp()
#virtual void DrawTitleBarBitmap(wxWindow *win,
# wxDC& dc,
# const wxRect& rect,
# wxTitleBarButton button,
# int flags = 0) = 0;
c.find('DrawTitleBarBitmap').setCppCode("""\
#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
self->DrawTitleBarBitmap(win, *dc, *rect, button, flags);
#endif
""")
c.find('DrawTitleBarBitmap').ignore()
draw_tb_bmp_doc = c.find('DrawTitleBarBitmap').briefDoc
c = module.find('wxDelegateRendererNative')
c.mustHaveApp()
c.addPrivateCopyCtor()
#virtual void DrawTitleBarBitmap(wxWindow *win,
# wxDC& dc,
# const wxRect& rect,
# wxTitleBarButton button,
# int flags = 0);
c.addCppMethod('void', 'DrawTitleBarBitmap',
'(wxWindow* win, wxDC& dc, const wxRect& rect, wxTitleBarButton button, int flags = 0)',
doc=draw_tb_bmp_doc,
body="""\
#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
self->DrawTitleBarBitmap(win, *dc, *rect, button, flags);
#else
wxPyRaiseNotImplemented();
#endif
""")
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
@@ -70,4 +74,3 @@ def run():
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

View File

@@ -41,11 +41,12 @@ def run():
# This is intentionally not documented, but I think it would be handy to
# use from wxPython.
meth = MethodDef(name='GetBordersForSizer', isVirtual=True, type='void', protection='public',
briefDoc="Returns extra space that may be needed for borders within a StaticBox.",
items=[ParamDef(name='borderTop', type='int*', out=True),
ParamDef(name='borderOther', type='int*', out=True),
])
meth = MethodDef(
name='GetBordersForSizer', isConst=True, isVirtual=True, type='void', protection='public',
briefDoc="Returns extra space that may be needed for borders within a StaticBox.",
items=[ParamDef(name='borderTop', type='int*', out=True),
ParamDef(name='borderOther', type='int*', out=True),
])
c.addItem(meth)
module.addGlobalStr('wxStaticBoxNameStr', c)

View File

@@ -13,35 +13,6 @@
//--------------------------------------------------------------------------
// size_t will either be equivalent to an unsigned long, or to an
// unsigned long long. wxWidgets' configure script has already figured out
// which it is, so we can make it conditional on those results.
%MappedType size_t {
%TypeHeaderCode
#include <wxPython/wxpy_api.h>
%End
%ConvertToTypeCode
// Allow conversions from any number type
if (!sipIsErr) {
if (PyNumber_Check(sipPy))
return TRUE;
return FALSE;
}
// Do the conversion
*sipCppPtr = new size_t(wxPyInt_AsSize_t(sipPy));
return sipGetState(sipTransferObj);
%End
%ConvertFromTypeCode
return wxPyInt_FromSize_t(*sipCpp);
%End
};
// This type is a signed integer value that is large enough to hold a
// pointer. Again we'll use the results of wxWidgets configuration.
%MappedType wxIntPtr {