diff --git a/CHANGES.rst b/CHANGES.rst index f2c43d01..e41f6936 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -18,7 +18,7 @@ Pip: ``pip install wxPython==4.1.0`` Starting with this release wxPython has switched to tracking the wxWidgets master branch (version 3.1.x) for the wxWidgets source code, which wxPython is -built upon, and which is included in the wxPython source archives. +built upon, and which is included in the wxPython source archives. New and improved in this release: @@ -37,8 +37,8 @@ New and improved in this release: with warnings enabled so you can see which class, method or function calls you need to change. -* Bug fixes in wx.lib.calendar: key navigation across month boundaries is now - possible; key navigation now sets the date and fires the EVT_CALENDAR event; +* Bug fixes in wx.lib.calendar: key navigation across month boundaries is now + possible; key navigation now sets the date and fires the EVT_CALENDAR event; setter APIs now set the date correctly (#1230). * Switch to using a wx.Overlay in the Widget Inspection Tool to highlight @@ -49,7 +49,7 @@ New and improved in this release: * Grafted on a EnableSystemTheme method to the classes which support it. This can be used to disable the default system theme on Windows for native widgets - like wx.ListCtrl, wx.TreeCtrl and wx.dataview.DataViewCtrl. It has no effect + like wx.ListCtrl, wx.TreeCtrl and wx.dataview.DataViewCtrl. It has no effect on the other platforms. * The wx.WS_EX_VALIDATE_RECURSIVELY extended style flag is obsolete, as it is @@ -60,13 +60,13 @@ New and improved in this release: * Fix a sometimes crash when using a wx.Overlay by letting the wx.DCOverlay hold a reference to the DC, to ensure that the DCOverlay is destroyed first. (PR#1301) - + * Replaced the Vagrant VMs used for building wxPython for various Linux distros with Docker images. * Add some missing methods in wx.adv.BitmapComboBox (#1307) -* Added the wx.svg package which contains code for parsing SVG (Scalable Vector +* Added the wx.svg package which contains code for parsing SVG (Scalable Vector Graphics) files, and also code for integrating with wxPython. It can rasterize the SVG to a wx.Bitmap of any size with no loss of quality, and it can also render the SVG directly to a wx.GraphicsContext using the GC's drawing @@ -75,10 +75,10 @@ New and improved in this release: * Ported the embedding sample from Classic, which shows how to use wxPython from a C++ wxWidgets application that embeds Python. (PR #1353) -* Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of +* Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of maintaining its own pointer. This way, if the wxApp is created by C++ code wxPython will still be able to get access to it. (#1126) - + * Added wrappers for the wx.ActivityIndicator class. * Added wrappers for the wx.CollapsibleHeaderCtrl class. @@ -88,6 +88,12 @@ New and improved in this release: * Added wx.msw.CHMHelpController, and also a wx.HelpController factory function that creates an instance of the best Help Controller for the platform. (#1536) +* Added wx.adv.GenericAnimationCtrl so the generic version of the animation classes + can be used even on the platforms that have a native version. Note that due to + internal changes to support both types of animations, some API changes in how + the Animation objects are created. See the AnimationCtrl.py sample in the demo + for the various usage patterns (#1579) + @@ -130,13 +136,13 @@ Pip: ``pip install wxPython==4.0.7`` This release is comprised mostly of fixes and minor features which have been back-ported from the master branch. This release is likely the last release of the 4.0.x release series, and is certainly the last 4.0.x release that will -support Python 2.7. It may still continue to build for Python 2.7 for some time, +support Python 2.7. It may still continue to build for Python 2.7 for some time, but no extra effort will be expended to keep it compatible. This release provides the following changes: -* Bug fixes in wx.lib.calendar: key navigation across month boundaries is now - possible; key navigation now sets the date and fires the EVT_CALENDAR event; +* Bug fixes in wx.lib.calendar: key navigation across month boundaries is now + possible; key navigation now sets the date and fires the EVT_CALENDAR event; setter APIs now set the date correctly (#1230). * Switch to using a wx.Overlay in the Widget Inspection Tool to highlight @@ -148,16 +154,16 @@ This release provides the following changes: * Fix a sometimes crash when using a wx.Overlay by letting the wx.DCOverlay hold a reference to the DC, to ensure that the DCOverlay is destroyed first. (PR#1301) - + * Ported the embedding sample from Classic, which shows how to use wxPython from a C++ wxWidgets application that embeds Python. (PR #1353) -* Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of +* Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of maintaining its own pointer. This way, if the wxApp is created by C++ code wxPython will still be able to get access to it. (#1126) - -* Several other PRs have been backported from the master branch (which will - become wxPython 4.1.0), the full list can be seen here: + +* Several other PRs have been backported from the master branch (which will + become wxPython 4.1.0), the full list can be seen here: https://github.com/wxWidgets/Phoenix/pull/1357 @@ -181,8 +187,8 @@ This release provides the following fixes: * Reverted the change that loads up install_requires from the contents of requirements.txt. Split the requirements.txt file into one for install and one for development. - - + + 4.0.5 "St. Helens Day" @@ -195,21 +201,21 @@ Pip: ``pip install wxPython==4.0.5`` Changes in this release include the following: -* Added missing HtmlWindow.ScrollToAnchor method, and also a couple methods +* Added missing HtmlWindow.ScrollToAnchor method, and also a couple methods in HtmlCell too. (#1141) -* Added missing setters for the wheel-related properties in wx.MouseEvent. +* Added missing setters for the wheel-related properties in wx.MouseEvent. (#1140) -* Updated wxWidgets commit reference, bringing fixes for #1140, #1086 and +* Updated wxWidgets commit reference, bringing fixes for #1140, #1086 and #1147. -* Fix the use of the output parameter in HtmlWindow.OnOpeningURL the same way +* Fix the use of the output parameter in HtmlWindow.OnOpeningURL the same way it was fixed in HtmlWindowInterface.OnHTMLOpeningURL. (#1068) * Fixed a crashing bug when using a member of a transient wx.VisualAttributes object. Also set the attributes to be read-only to simplify the fix. (#1198). - + * Updated the sip being used in wxPython builds to version 4.19.16. * Added helper functions to check results of wxWidgets configure during the diff --git a/demo/AnimateCtrl.py b/demo/AnimateCtrl.py deleted file mode 100644 index c2a3cd63..00000000 --- a/demo/AnimateCtrl.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python - -import wx -from wx.adv import Animation, AnimationCtrl -from Main import opj - -GIFNames = [ - 'bitmaps/AG00178_.gif', - 'bitmaps/BD13656_.gif', - 'bitmaps/AG00185_.gif', - 'bitmaps/AG00039_.gif', - 'bitmaps/AG00183_.gif', - 'bitmaps/AG00028_.gif', - ] - -#---------------------------------------------------------------------- - -class TestPanel(wx.Panel): - def __init__(self, parent, log): - self.log = log - wx.Panel.__init__(self, parent, -1) - - sizer = wx.FlexGridSizer(cols=3, hgap=5, vgap=5) - for name in GIFNames: - ani = Animation(opj(name)) - ctrl = AnimationCtrl(self, -1, ani) - ctrl.SetBackgroundColour(self.GetBackgroundColour()) - ctrl.Play() - sizer.Add(ctrl, 0, wx.ALL, 10) - - border = wx.BoxSizer() - border.Add(sizer, 1, wx.EXPAND | wx.ALL, 20) - self.SetSizer(border) - - -#---------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = TestPanel(nb, log) - return win - -#---------------------------------------------------------------------- - - - -overview = """ -

wx.adv.AnimationCtrl

- -wx.adv.AnimationCtrl is like a wx.StaticBitmap but is able to -display an animation by extracting frames from a multi-image GIF file. - - -""" - - - -if __name__ == '__main__': - import sys,os - import run - run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) - diff --git a/demo/AnimationCtrl.py b/demo/AnimationCtrl.py new file mode 100644 index 00000000..72b4c017 --- /dev/null +++ b/demo/AnimationCtrl.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python + +import wx +from wx.adv import Animation + +UseNative = True +if UseNative: + # Use the native classes, if the platform has a native widget. It will fall + # back to the generic version if there isn't a native one available. + from wx.adv import AnimationCtrl +else: + # Or we can force use of the generic widget on all platforms + from wx.adv import GenericAnimationCtrl as AnimationCtrl + +from Main import opj + +GIFNames = [ + 'bitmaps/AG00178_.gif', + 'bitmaps/BD13656_.gif', + 'bitmaps/AG00185_.gif', + 'bitmaps/AG00039_.gif', + 'bitmaps/AG00183_.gif', + 'bitmaps/AG00028_.gif', + ] + +#---------------------------------------------------------------------- + +class TestPanel(wx.Panel): + def __init__(self, parent, log): + self.log = log + wx.Panel.__init__(self, parent, -1) + sizer = wx.FlexGridSizer(cols=3, hgap=5, vgap=5) + + for name in GIFNames: + # There are a few usage pattens for creating the control and the + # animation object. They're more-or-less equivalent, but if you have + # non-standard needs in your application then one pattern may make + # more sense for you to use. + if False: + # If you need a separate animation object then you can have the + # control create one for you. + ctrl = AnimationCtrl(self) + ani = ctrl.CreateAnimation() + ani.LoadFile(opj(name)) + ctrl.SetAnimation(ani) + elif False: + # if you need to have the animation object before the control is + # created, then you can do it like this: + ani = AnimationCtrl.CreateCompatibleAnimation() + ani.LoadFile(opj(name)) + ctrl = AnimationCtrl(self, -1, ani) + else: + # Or you can keep it simple and just have the control make and + # use its own animation object internally. + ctrl = AnimationCtrl(self) + ctrl.LoadFile(opj(name)) + + ctrl.SetBackgroundColour(self.GetBackgroundColour()) + ctrl.Play() + sizer.Add(ctrl, 0, wx.ALL, 10) + + if UseNative and 'wxGTK' in wx.PlatformInfo: + # See comment in updateBestSizes below + wx.CallAfter(self.updateBestSizes) + + border = wx.BoxSizer() + border.Add(sizer, 1, wx.EXPAND | wx.ALL, 20) + self.SetSizer(border) + + def updateBestSizes(self): + # The native control on GTK is not able to set the BestSize of the + # animation widget until after it has finished loading the animation + # images. So here we will invalidate the initial best size, so it will + # be recalculated on the next layout of the sizer. + for child in self.GetChildren(): + if isinstance(child, AnimationCtrl): + child.InvalidateBestSize() + self.Layout() + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, log) + return win + +#---------------------------------------------------------------------- + + + +overview = """ +

wx.adv.AnimationCtrl

+ +wx.adv.AnimationCtrl is like a wx.StaticBitmap but is able to +display an animation by extracting frames from a multi-image GIF file. + + +""" + + +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) + diff --git a/demo/demodata.py b/demo/demodata.py index 468b3779..e9172620 100644 --- a/demo/demodata.py +++ b/demo/demodata.py @@ -247,7 +247,7 @@ _treeList = [ ('Using Images', [ 'AdjustChannels', 'AlphaDrawing', - 'AnimateCtrl', + 'AnimationCtrl', 'ArtProvider', 'BitmapFromBuffer', 'Cursor', diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index fe64cddf..fbfdbdcb 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -110,10 +110,17 @@ "AND":"wx.", "AND_INVERT":"wx.", "AND_REVERSE":"wx.", +"ANIDecoder":"wx.adv.", +"ANIMATION_IMPL_TYPE_GENERIC":"wx.adv.", +"ANIMATION_IMPL_TYPE_NATIVE":"wx.adv.", "ANIMATION_TYPE_ANI":"wx.adv.", "ANIMATION_TYPE_ANY":"wx.adv.", "ANIMATION_TYPE_GIF":"wx.adv.", "ANIMATION_TYPE_INVALID":"wx.adv.", +"ANIM_DONOTREMOVE":"wx.adv.", +"ANIM_TOBACKGROUND":"wx.adv.", +"ANIM_TOPREVIOUS":"wx.adv.", +"ANIM_UNSPECIFIED":"wx.adv.", "ANTIALIAS_DEFAULT":"wx.", "ANTIALIAS_NONE":"wx.", "APPLY":"wx.", @@ -300,8 +307,15 @@ "AlphaPixelData":"wx.", "AlphaPixelData_Accessor":"wx.", "Animation":"wx.adv.", +"AnimationBase":"wx.adv.", "AnimationCtrl":"wx.adv.", +"AnimationCtrlGeneric":"wx.adv.", "AnimationCtrlNameStr":"wx.adv.", +"AnimationDecoder":"wx.adv.", +"AnimationDisposal":"wx.adv.", +"AnimationGenericImpl":"wx.adv.", +"AnimationImpl":"wx.adv.", +"AnimationImplType":"wx.adv.", "AnimationType":"wx.adv.", "AntialiasMode":"wx.", "AnyButton":"wx.", @@ -1306,6 +1320,7 @@ "GBSpan":"wx.", "GCDC":"wx.", "GDIObject":"wx.", +"GIFDecoder":"wx.adv.", "GIFHandler":"wx.", "GLAttribsBase":"wx.glcanvas.", "GLAttributes":"wx.glcanvas.", @@ -1347,6 +1362,8 @@ "Gauge":"wx.", "GaugeNameStr":"wx.", "GenericAboutBox":"wx.adv.", +"GenericAnimation":"wx.adv.", +"GenericAnimationCtrl":"wx.adv.", "GenericCalendarCtrl":"wx.adv.", "GenericDatePickerCtrl":"wx.adv.", "GenericDirCtrl":"wx.", @@ -2520,6 +2537,7 @@ "NullColour":"wx.", "NullCursor":"wx.", "NullFont":"wx.", +"NullGenericAnimation":"wx.adv.", "NullGraphicsBitmap":"wx.", "NullGraphicsBrush":"wx.", "NullGraphicsFont":"wx.", diff --git a/etg/animate.py b/etg/animate.py index 7bbcd2b1..bbd32ac3 100644 --- a/etg/animate.py +++ b/etg/animate.py @@ -19,6 +19,10 @@ DOCSTRING = "" # this script. ITEMS = [ "wxAnimation", "wxAnimationCtrl", + "wxGenericAnimationCtrl", + "wxAnimationDecoder", + "wxANIDecoder", + "wxGIFDecoder", ] #--------------------------------------------------------------------------- @@ -32,21 +36,72 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - c = module.find('wxAnimation') - assert isinstance(c, etgtools.ClassDef) - c = module.find('wxAnimationCtrl') tools.fixWindowClass(c) + + # Grab some MethodDefs that need to be copied to wxGenericAnimationCtrl + play = c.find('Play') + play.isVirtual = True + others = [ + c.find('Stop'), + c.find('IsPlaying'), + c.find('Load'), + c.find('LoadFile'), + c.find('GetAnimation'), + c.find('SetAnimation'), + c.find('SetInactiveBitmap'), + c.find('GetInactiveBitmap'), + c.find('CreateAnimation'), + c.find('CreateCompatibleAnimation'), + ] + nonvirtual = [ 'GetAnimation', 'GetInactiveBitmap', 'CreateAnimation', + 'CreateCompatibleAnimation', + ] + + + c = module.find('wxGenericAnimationCtrl') + c.bases = ['wxControl'] + c.addHeaderCode('#include ') + tools.fixWindowClass(c) + + # Insert a copy of the base class Play into this class. It's not in the + # inteface docs, but sip needs to see it there, since the one that is there + # has a different signature. + c.find('Play').overloads.append(play) + + # Since we pretend that the base class is wxControl (because there are + # different parents in different builds) then we need to copy in some + # methods it will be inheriting from the real base class, which is not + # public. + for m in others: + if m.name not in nonvirtual: + m.isVirtual = True + c.addItem(m) + + + module.addGlobalStr('wxAnimationCtrlNameStr', c) + # move this before wxAnimationCtrl so it can be used for default arg values item = module.find('wxNullAnimation') module.items.remove(item) module.insertItemBefore(c, item) - # TODO: It would be nice to be able to use the generic verison on all - # platforms since the native GTK version has some limitations... + #----------------------------------------------------------------- + module.addItem(tools.wxListWrapperTemplate('wxAnimationDecoderList', 'wxAnimationDecoder', module, + header_extra='#include ')) + + c = module.find('wxAnimationDecoder') + c.find('DoCanRead').ignore(False) + + c = module.find('wxANIDecoder') + c.find('DoCanRead').ignore(False) + + c = module.find('wxGIFDecoder') + c.find('DoCanRead').ignore(False) + #----------------------------------------------------------------- tools.doCommonTweaks(module) diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py index 0235438b..3025b64c 100644 --- a/etgtools/tweaker_tools.py +++ b/etgtools/tweaker_tools.py @@ -865,7 +865,8 @@ def convertFourDoublesTemplate(CLASS): def wxListWrapperTemplate(ListClass, ItemClass, module, RealItemClass=None, - includeConvertToType=False, fakeListClassName=None): + includeConvertToType=False, fakeListClassName=None, + header_extra=''): if RealItemClass is None: RealItemClass = ItemClass @@ -887,6 +888,7 @@ class {ListClass}_iterator /Abstract/ {{ // the C++ implementation of this class %TypeHeaderCode + {header_extra} {TypeDef} class {ListClass}_iterator {{ public: @@ -920,6 +922,7 @@ public: class {ListClass} {{ %TypeHeaderCode + {header_extra} {TypeDef} %End public: @@ -1331,6 +1334,8 @@ def generateStubs(cppFlag, module, excludes=[], typeValMap={}, typeValMap = copy.copy(typeValMap) typeValMap.update({ 'int': '0', + 'long': '0', + 'unsigned int': '0', 'bool': 'false', 'double': '0.0', 'wxString': 'wxEmptyString', @@ -1339,6 +1344,11 @@ def generateStubs(cppFlag, module, excludes=[], typeValMap={}, 'wxSize': 'wxDefaultSize', 'wxPoint': 'wxDefaultPosition', 'wxFileOffset': '0', + 'wxColour': 'wxNullColour', + 'wxBitmap': 'wxNullBitmap', + 'wxBitmap &': 'wxNullBitmap', + 'wxImage': 'wxNullImage', + 'wxVisualAttributes': 'wxVisualAttributes()', }) code = _StubCodeHolder(cppFlag) @@ -1440,6 +1450,7 @@ def _generateClassStub(code, klass, typeValMap): for item in klass: dispatchMap = { extractors.MethodDef : _generateMethodStub, + extractors.WigCode : lambda c, i, t: None, # ignore this type } func = dispatchMap.get(type(item), None) if func is None: @@ -1453,6 +1464,8 @@ def _generateClassStub(code, klass, typeValMap): def _generateMethodStub(code, method, typeValMap): assert isinstance(method, extractors.MethodDef) + if method.ignored: + return decl = ' ' if method.isVirtual: decl += 'virtual ' diff --git a/ext/wxWidgets b/ext/wxWidgets index 501e55f9..f2ed3a53 160000 --- a/ext/wxWidgets +++ b/ext/wxWidgets @@ -1 +1 @@ -Subproject commit 501e55f949725fd47bc14ddd7e7e059d376d387c +Subproject commit f2ed3a5376d435d4e6cadd20b78b3685b997555a diff --git a/wx/svg/_nanosvg.c b/wx/svg/_nanosvg.c index 5139fbe4..cdba2718 100644 --- a/wx/svg/_nanosvg.c +++ b/wx/svg/_nanosvg.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.13 */ +/* Generated by Cython 0.29.15 */ /* BEGIN: Cython Metadata { @@ -40,8 +40,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_13" -#define CYTHON_HEX_VERSION 0x001D0DF0 +#define CYTHON_ABI "0_29_15" +#define CYTHON_HEX_VERSION 0x001D0FF0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -12186,7 +12186,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGimageBase = { sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGimageBase, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -12239,6 +12244,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGimageBase = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGshape __pyx_vtable_2wx_3svg_8_nanosvg_SVGshape; @@ -12376,7 +12384,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGshape = { sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGshape, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -12429,6 +12442,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGshape = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGpath __pyx_vtable_2wx_3svg_8_nanosvg_SVGpath; @@ -12521,7 +12537,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGpath = { sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGpath, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -12574,6 +12595,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGpath = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGpaint __pyx_vtable_2wx_3svg_8_nanosvg_SVGpaint; @@ -12641,7 +12665,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGpaint = { sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGpaint, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -12694,6 +12723,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGpaint = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGgradient __pyx_vtable_2wx_3svg_8_nanosvg_SVGgradient; @@ -12766,7 +12798,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGgradient = { sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGgradient, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -12819,6 +12856,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGgradient = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGgradientStop __pyx_vtable_2wx_3svg_8_nanosvg_SVGgradientStop; @@ -12881,7 +12921,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop = { sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGgradientStop, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -12934,6 +12979,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ *__pyx_freelist_2wx_3svg_8_nanosvg___pyx_scope_struct____get__[8]; @@ -12979,7 +13027,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ = sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg___pyx_scope_struct____get__, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -13032,6 +13085,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ = #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ *__pyx_freelist_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__[8]; @@ -13077,7 +13133,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ = sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -13130,6 +13191,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ = #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ *__pyx_freelist_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__[8]; @@ -13175,7 +13239,12 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ = sizeof(struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -13228,6 +13297,9 @@ static PyTypeObject __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ = #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyObject *__pyx_tp_new___Pyx_EnumMeta(PyTypeObject *t, PyObject *a, PyObject *k) { @@ -13296,7 +13368,12 @@ static PyTypeObject __Pyx_EnumMeta = { sizeof(struct __pyx_obj___Pyx_EnumMeta), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc___Pyx_EnumMeta, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -13349,6 +13426,9 @@ static PyTypeObject __Pyx_EnumMeta = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -17773,43 +17853,43 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto __PYX_BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto __PYX_BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -18599,6 +18679,9 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x030800b1 0, #endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); @@ -21104,6 +21187,9 @@ static PyTypeObject __pyx_GeneratorType_type = { #if PY_VERSION_HEX >= 0x030800b1 0, #endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;