wxPython 4.3.2__cp315-cp315-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. wx/WebView2Loader.dll +0 -0
  2. wx/__init__.py +22 -0
  3. wx/__init__.pyi +10 -0
  4. wx/__version__.py +9 -0
  5. wx/__version__.pyi +15 -0
  6. wx/_adv.cp315-win_amd64.pyd +0 -0
  7. wx/_aui.cp315-win_amd64.pyd +0 -0
  8. wx/_core.cp315-win_amd64.pyd +0 -0
  9. wx/_dataview.cp315-win_amd64.pyd +0 -0
  10. wx/_glcanvas.cp315-win_amd64.pyd +0 -0
  11. wx/_grid.cp315-win_amd64.pyd +0 -0
  12. wx/_html.cp315-win_amd64.pyd +0 -0
  13. wx/_html2.cp315-win_amd64.pyd +0 -0
  14. wx/_media.cp315-win_amd64.pyd +0 -0
  15. wx/_msw.cp315-win_amd64.pyd +0 -0
  16. wx/_propgrid.cp315-win_amd64.pyd +0 -0
  17. wx/_ribbon.cp315-win_amd64.pyd +0 -0
  18. wx/_richtext.cp315-win_amd64.pyd +0 -0
  19. wx/_stc.cp315-win_amd64.pyd +0 -0
  20. wx/_xml.cp315-win_amd64.pyd +0 -0
  21. wx/_xrc.cp315-win_amd64.pyd +0 -0
  22. wx/adv.py +127 -0
  23. wx/adv.pyi +5931 -0
  24. wx/aui.py +70 -0
  25. wx/aui.pyi +4805 -0
  26. wx/core.py +3417 -0
  27. wx/core.pyi +62949 -0
  28. wx/dataview.py +176 -0
  29. wx/dataview.pyi +3828 -0
  30. wx/gizmos.py +18 -0
  31. wx/glcanvas.py +13 -0
  32. wx/glcanvas.pyi +544 -0
  33. wx/grid.py +237 -0
  34. wx/grid.pyi +5678 -0
  35. wx/html.py +38 -0
  36. wx/html.pyi +3283 -0
  37. wx/html2.py +46 -0
  38. wx/html2.pyi +1301 -0
  39. wx/include/wxPython/sip.h +1938 -0
  40. wx/include/wxPython/wxpy_api.h +418 -0
  41. wx/lib/CDate.py +201 -0
  42. wx/lib/ClickableHtmlWindow.py +57 -0
  43. wx/lib/__init__.py +0 -0
  44. wx/lib/activex.py +178 -0
  45. wx/lib/activexwrapper.py +153 -0
  46. wx/lib/agw/__init__.py +128 -0
  47. wx/lib/agw/advancedsplash.py +563 -0
  48. wx/lib/agw/aquabutton.py +1127 -0
  49. wx/lib/agw/artmanager.py +2110 -0
  50. wx/lib/agw/aui/__init__.py +295 -0
  51. wx/lib/agw/aui/aui_constants.py +2616 -0
  52. wx/lib/agw/aui/aui_switcherdialog.py +1232 -0
  53. wx/lib/agw/aui/aui_utilities.py +648 -0
  54. wx/lib/agw/aui/auibar.py +4045 -0
  55. wx/lib/agw/aui/auibook.py +6288 -0
  56. wx/lib/agw/aui/dockart.py +1198 -0
  57. wx/lib/agw/aui/framemanager.py +10485 -0
  58. wx/lib/agw/aui/tabart.py +2749 -0
  59. wx/lib/agw/aui/tabmdi.py +679 -0
  60. wx/lib/agw/balloontip.py +1157 -0
  61. wx/lib/agw/buttonpanel.py +2787 -0
  62. wx/lib/agw/cubecolourdialog.py +3529 -0
  63. wx/lib/agw/customtreectrl.py +9908 -0
  64. wx/lib/agw/data/ShortcutEditor_1.png +0 -0
  65. wx/lib/agw/data/ShortcutEditor_1_thumb.png +0 -0
  66. wx/lib/agw/data/ShortcutEditor_2.png +0 -0
  67. wx/lib/agw/data/ShortcutEditor_2_thumb.png +0 -0
  68. wx/lib/agw/data/ShortcutEditor_3.png +0 -0
  69. wx/lib/agw/data/ShortcutEditor_3_thumb.png +0 -0
  70. wx/lib/agw/data/ShortcutEditor_4.png +0 -0
  71. wx/lib/agw/data/ShortcutEditor_4_thumb.png +0 -0
  72. wx/lib/agw/data/default_help_text.html +105 -0
  73. wx/lib/agw/flatmenu.py +7392 -0
  74. wx/lib/agw/flatnotebook.py +6669 -0
  75. wx/lib/agw/floatspin.py +1820 -0
  76. wx/lib/agw/fmcustomizedlg.py +535 -0
  77. wx/lib/agw/fmresources.py +407 -0
  78. wx/lib/agw/foldpanelbar.py +2282 -0
  79. wx/lib/agw/fourwaysplitter.py +1130 -0
  80. wx/lib/agw/genericmessagedialog.py +1549 -0
  81. wx/lib/agw/gradientbutton.py +731 -0
  82. wx/lib/agw/hyperlink.py +664 -0
  83. wx/lib/agw/hypertreelist.py +5756 -0
  84. wx/lib/agw/infobar.py +885 -0
  85. wx/lib/agw/knobctrl.py +944 -0
  86. wx/lib/agw/labelbook.py +3028 -0
  87. wx/lib/agw/multidirdialog.py +581 -0
  88. wx/lib/agw/peakmeter.py +1028 -0
  89. wx/lib/agw/persist/__init__.py +188 -0
  90. wx/lib/agw/persist/persist_constants.py +283 -0
  91. wx/lib/agw/persist/persist_handlers.py +2614 -0
  92. wx/lib/agw/persist/persistencemanager.py +863 -0
  93. wx/lib/agw/piectrl.py +1082 -0
  94. wx/lib/agw/pybusyinfo.py +399 -0
  95. wx/lib/agw/pycollapsiblepane.py +940 -0
  96. wx/lib/agw/pygauge.py +570 -0
  97. wx/lib/agw/pyprogress.py +916 -0
  98. wx/lib/agw/ribbon/__init__.py +198 -0
  99. wx/lib/agw/ribbon/art.py +219 -0
  100. wx/lib/agw/ribbon/art_aui.py +1283 -0
  101. wx/lib/agw/ribbon/art_default.py +81 -0
  102. wx/lib/agw/ribbon/art_internal.py +248 -0
  103. wx/lib/agw/ribbon/art_msw.py +2735 -0
  104. wx/lib/agw/ribbon/art_osx.py +52 -0
  105. wx/lib/agw/ribbon/bar.py +1259 -0
  106. wx/lib/agw/ribbon/buttonbar.py +1317 -0
  107. wx/lib/agw/ribbon/control.py +205 -0
  108. wx/lib/agw/ribbon/gallery.py +973 -0
  109. wx/lib/agw/ribbon/page.py +946 -0
  110. wx/lib/agw/ribbon/panel.py +1170 -0
  111. wx/lib/agw/ribbon/toolbar.py +1441 -0
  112. wx/lib/agw/rulerctrl.py +1885 -0
  113. wx/lib/agw/scrolledthumbnail.py +2116 -0
  114. wx/lib/agw/shapedbutton.py +1809 -0
  115. wx/lib/agw/shortcuteditor.py +2642 -0
  116. wx/lib/agw/speedmeter.py +1800 -0
  117. wx/lib/agw/supertooltip.py +1443 -0
  118. wx/lib/agw/thumbnailctrl.py +529 -0
  119. wx/lib/agw/toasterbox.py +1327 -0
  120. wx/lib/agw/ultimatelistctrl.py +13671 -0
  121. wx/lib/agw/xlsgrid.py +2111 -0
  122. wx/lib/agw/zoombar.py +1336 -0
  123. wx/lib/analogclock/__init__.py +140 -0
  124. wx/lib/analogclock/analogclock.py +630 -0
  125. wx/lib/analogclock/helpers.py +986 -0
  126. wx/lib/analogclock/lib_setup/__init__.py +0 -0
  127. wx/lib/analogclock/lib_setup/buttontreectrlpanel.py +297 -0
  128. wx/lib/analogclock/lib_setup/fontselect.py +57 -0
  129. wx/lib/analogclock/setup.py +490 -0
  130. wx/lib/analogclock/styles.py +47 -0
  131. wx/lib/anchors.py +103 -0
  132. wx/lib/art/__init__.py +4 -0
  133. wx/lib/art/flagart.py +1583 -0
  134. wx/lib/art/img2pyartprov.py +56 -0
  135. wx/lib/busy.py +152 -0
  136. wx/lib/buttons.py +1140 -0
  137. wx/lib/calendar.py +1596 -0
  138. wx/lib/checkbox.py +837 -0
  139. wx/lib/colourchooser/__init__.py +36 -0
  140. wx/lib/colourchooser/canvas.py +145 -0
  141. wx/lib/colourchooser/intl.py +24 -0
  142. wx/lib/colourchooser/pycolourbox.py +89 -0
  143. wx/lib/colourchooser/pycolourchooser.py +626 -0
  144. wx/lib/colourchooser/pycolourslider.py +98 -0
  145. wx/lib/colourchooser/pypalette.py +208 -0
  146. wx/lib/colourdb.py +740 -0
  147. wx/lib/colourselect.py +385 -0
  148. wx/lib/colourutils.py +118 -0
  149. wx/lib/combotreebox.py +944 -0
  150. wx/lib/delayedresult.py +420 -0
  151. wx/lib/dialogs.py +510 -0
  152. wx/lib/docview.py +3210 -0
  153. wx/lib/dragscroller.py +79 -0
  154. wx/lib/editor/README.txt +77 -0
  155. wx/lib/editor/__init__.py +24 -0
  156. wx/lib/editor/editor.py +974 -0
  157. wx/lib/editor/images.py +15 -0
  158. wx/lib/editor/selection.py +44 -0
  159. wx/lib/embeddedimage.py +76 -0
  160. wx/lib/eventStack.py +136 -0
  161. wx/lib/eventwatcher.py +440 -0
  162. wx/lib/evtmgr.py +521 -0
  163. wx/lib/expando.py +393 -0
  164. wx/lib/fancytext.py +494 -0
  165. wx/lib/filebrowsebutton.py +461 -0
  166. wx/lib/flashwin.py +262 -0
  167. wx/lib/flashwin_old.py +651 -0
  168. wx/lib/floatcanvas/FCEvents.py +53 -0
  169. wx/lib/floatcanvas/FCObjects.py +2910 -0
  170. wx/lib/floatcanvas/FloatCanvas.py +1025 -0
  171. wx/lib/floatcanvas/GUIMode.py +396 -0
  172. wx/lib/floatcanvas/NavCanvas.py +162 -0
  173. wx/lib/floatcanvas/Resources.py +319 -0
  174. wx/lib/floatcanvas/ScreenShot.py +1788 -0
  175. wx/lib/floatcanvas/Utilities/BBox.py +313 -0
  176. wx/lib/floatcanvas/Utilities/Colors.py +137 -0
  177. wx/lib/floatcanvas/Utilities/GUI.py +91 -0
  178. wx/lib/floatcanvas/Utilities/__init__.py +7 -0
  179. wx/lib/floatcanvas/__init__.py +124 -0
  180. wx/lib/foldmenu.py +89 -0
  181. wx/lib/gestures.py +310 -0
  182. wx/lib/gizmos/__init__.py +18 -0
  183. wx/lib/gizmos/dynamicsash.py +1202 -0
  184. wx/lib/gizmos/ledctrl.py +299 -0
  185. wx/lib/gizmos/treelistctrl.py +87 -0
  186. wx/lib/graphics.py +1942 -0
  187. wx/lib/gridmovers.py +516 -0
  188. wx/lib/iewin.py +249 -0
  189. wx/lib/iewin_old.py +894 -0
  190. wx/lib/imagebrowser.py +853 -0
  191. wx/lib/imageutils.py +163 -0
  192. wx/lib/infoframe.py +490 -0
  193. wx/lib/inspection.py +1254 -0
  194. wx/lib/intctrl.py +990 -0
  195. wx/lib/itemspicker.py +256 -0
  196. wx/lib/langlistctrl.py +480 -0
  197. wx/lib/layoutf.py +271 -0
  198. wx/lib/masked/__init__.py +27 -0
  199. wx/lib/masked/combobox.py +839 -0
  200. wx/lib/masked/ctrl.py +108 -0
  201. wx/lib/masked/ipaddrctrl.py +241 -0
  202. wx/lib/masked/maskededit.py +7262 -0
  203. wx/lib/masked/numctrl.py +2000 -0
  204. wx/lib/masked/textctrl.py +465 -0
  205. wx/lib/masked/timectrl.py +1465 -0
  206. wx/lib/mixins/__init__.py +17 -0
  207. wx/lib/mixins/grid.py +47 -0
  208. wx/lib/mixins/gridlabelrenderer.py +277 -0
  209. wx/lib/mixins/imagelist.py +77 -0
  210. wx/lib/mixins/inspection.py +184 -0
  211. wx/lib/mixins/listctrl.py +893 -0
  212. wx/lib/mixins/rubberband.py +403 -0
  213. wx/lib/mixins/treemixin.py +678 -0
  214. wx/lib/msgpanel.py +95 -0
  215. wx/lib/multisash.py +746 -0
  216. wx/lib/myole4ax.idl +178 -0
  217. wx/lib/myole4ax.tlb +0 -0
  218. wx/lib/newevent.py +229 -0
  219. wx/lib/newevent.pyi +25 -0
  220. wx/lib/nvdlg.py +156 -0
  221. wx/lib/ogl/__init__.py +13 -0
  222. wx/lib/ogl/basic.py +3989 -0
  223. wx/lib/ogl/bmpshape.py +86 -0
  224. wx/lib/ogl/canvas.py +467 -0
  225. wx/lib/ogl/composit.py +1576 -0
  226. wx/lib/ogl/diagram.py +230 -0
  227. wx/lib/ogl/divided.py +482 -0
  228. wx/lib/ogl/drawn.py +898 -0
  229. wx/lib/ogl/lines.py +1809 -0
  230. wx/lib/ogl/oglmisc.py +607 -0
  231. wx/lib/pdfviewer/__init__.py +113 -0
  232. wx/lib/pdfviewer/bitmaps/ArrowLeft.png +0 -0
  233. wx/lib/pdfviewer/bitmaps/ArrowRight.png +0 -0
  234. wx/lib/pdfviewer/bitmaps/DirectionH.png +0 -0
  235. wx/lib/pdfviewer/bitmaps/DirectionV.png +0 -0
  236. wx/lib/pdfviewer/bitmaps/PlayerFirst.png +0 -0
  237. wx/lib/pdfviewer/bitmaps/PlayerLast.png +0 -0
  238. wx/lib/pdfviewer/bitmaps/PlayerNext.png +0 -0
  239. wx/lib/pdfviewer/bitmaps/PlayerPrev.png +0 -0
  240. wx/lib/pdfviewer/bitmaps/Printer.png +0 -0
  241. wx/lib/pdfviewer/bitmaps/ReadMe.txt +28 -0
  242. wx/lib/pdfviewer/bitmaps/Save.png +0 -0
  243. wx/lib/pdfviewer/bitmaps/ZoomIn.png +0 -0
  244. wx/lib/pdfviewer/bitmaps/ZoomOut.png +0 -0
  245. wx/lib/pdfviewer/bitmaps/encode_bitmaps.py +37 -0
  246. wx/lib/pdfviewer/buttonpanel.py +285 -0
  247. wx/lib/pdfviewer/images.py +240 -0
  248. wx/lib/pdfviewer/viewer.py +1118 -0
  249. wx/lib/pdfwin.py +295 -0
  250. wx/lib/pdfwin_old.py +789 -0
  251. wx/lib/platebtn.py +789 -0
  252. wx/lib/plot/CHANGELOG.md +150 -0
  253. wx/lib/plot/README.md +16 -0
  254. wx/lib/plot/__init__.py +46 -0
  255. wx/lib/plot/__main__.py +5 -0
  256. wx/lib/plot/examples/__init__.py +0 -0
  257. wx/lib/plot/examples/demo.py +1010 -0
  258. wx/lib/plot/examples/simple_example.py +56 -0
  259. wx/lib/plot/plotcanvas.py +2985 -0
  260. wx/lib/plot/polyobjects.py +1524 -0
  261. wx/lib/plot/utils.py +334 -0
  262. wx/lib/popupctl.py +251 -0
  263. wx/lib/printout.py +1155 -0
  264. wx/lib/progressindicator.py +151 -0
  265. wx/lib/pubsub/LICENSE_BSD_Simple.txt +23 -0
  266. wx/lib/pubsub/README_WxPython.txt +22 -0
  267. wx/lib/pubsub/RELEASE_NOTES.txt +71 -0
  268. wx/lib/pubsub/__init__.py +25 -0
  269. wx/lib/pubsub/core/__init__.py +92 -0
  270. wx/lib/pubsub/core/arg1/__init__.py +16 -0
  271. wx/lib/pubsub/core/arg1/listenerimpl.py +97 -0
  272. wx/lib/pubsub/core/arg1/publisher.py +40 -0
  273. wx/lib/pubsub/core/arg1/publishermixin.py +34 -0
  274. wx/lib/pubsub/core/arg1/topicargspecimpl.py +66 -0
  275. wx/lib/pubsub/core/arg1/topicmgrimpl.py +19 -0
  276. wx/lib/pubsub/core/callables.py +198 -0
  277. wx/lib/pubsub/core/imp2.py +62 -0
  278. wx/lib/pubsub/core/itopicdefnprovider.py +0 -0
  279. wx/lib/pubsub/core/kwargs/__init__.py +16 -0
  280. wx/lib/pubsub/core/kwargs/datamsg.py +27 -0
  281. wx/lib/pubsub/core/kwargs/listenerimpl.py +93 -0
  282. wx/lib/pubsub/core/kwargs/publisher.py +77 -0
  283. wx/lib/pubsub/core/kwargs/publishermixin.py +65 -0
  284. wx/lib/pubsub/core/kwargs/topicargspecimpl.py +216 -0
  285. wx/lib/pubsub/core/kwargs/topicmgrimpl.py +13 -0
  286. wx/lib/pubsub/core/listener.py +40 -0
  287. wx/lib/pubsub/core/listenerbase.py +185 -0
  288. wx/lib/pubsub/core/notificationmgr.py +185 -0
  289. wx/lib/pubsub/core/publisherbase.py +189 -0
  290. wx/lib/pubsub/core/topicargspec.py +77 -0
  291. wx/lib/pubsub/core/topicdefnprovider.py +631 -0
  292. wx/lib/pubsub/core/topicexc.py +72 -0
  293. wx/lib/pubsub/core/topicmgr.py +454 -0
  294. wx/lib/pubsub/core/topicobj.py +472 -0
  295. wx/lib/pubsub/core/topictreetraverser.py +143 -0
  296. wx/lib/pubsub/core/topicutils.py +119 -0
  297. wx/lib/pubsub/core/treeconfig.py +21 -0
  298. wx/lib/pubsub/core/validatedefnargs.py +29 -0
  299. wx/lib/pubsub/core/weakmethod.py +102 -0
  300. wx/lib/pubsub/policies.py +24 -0
  301. wx/lib/pubsub/pub.py +199 -0
  302. wx/lib/pubsub/setuparg1.py +47 -0
  303. wx/lib/pubsub/setupkwargs.py +29 -0
  304. wx/lib/pubsub/utils/__init__.py +27 -0
  305. wx/lib/pubsub/utils/exchandling.py +100 -0
  306. wx/lib/pubsub/utils/misc.py +99 -0
  307. wx/lib/pubsub/utils/notification.py +331 -0
  308. wx/lib/pubsub/utils/topictreeprinter.py +195 -0
  309. wx/lib/pubsub/utils/xmltopicdefnprovider.py +286 -0
  310. wx/lib/pydocview.py +3300 -0
  311. wx/lib/rcsizer.py +227 -0
  312. wx/lib/resizewidget.py +357 -0
  313. wx/lib/scrolledpanel.py +243 -0
  314. wx/lib/sheet.py +350 -0
  315. wx/lib/sized_controls.py +691 -0
  316. wx/lib/softwareupdate.py +355 -0
  317. wx/lib/splitter.py +925 -0
  318. wx/lib/statbmp.py +199 -0
  319. wx/lib/stattext.py +321 -0
  320. wx/lib/throbber.py +424 -0
  321. wx/lib/ticker.py +306 -0
  322. wx/lib/ticker_xrc.py +48 -0
  323. wx/lib/utils.py +89 -0
  324. wx/lib/wordwrap.py +97 -0
  325. wx/lib/wxcairo/__init__.py +139 -0
  326. wx/lib/wxcairo/wx_cairocffi.py +200 -0
  327. wx/lib/wxcairo/wx_pycairo.py +455 -0
  328. wx/lib/wxpTag.py +274 -0
  329. wx/libcairo-2.dll +0 -0
  330. wx/locale/af/LC_MESSAGES/wxstd.mo +0 -0
  331. wx/locale/an/LC_MESSAGES/wxstd.mo +0 -0
  332. wx/locale/ar/LC_MESSAGES/wxstd.mo +0 -0
  333. wx/locale/ca/LC_MESSAGES/wxstd.mo +0 -0
  334. wx/locale/ca@valencia/LC_MESSAGES/wxstd.mo +0 -0
  335. wx/locale/co/LC_MESSAGES/wxstd.mo +0 -0
  336. wx/locale/cs/LC_MESSAGES/wxstd.mo +0 -0
  337. wx/locale/da/LC_MESSAGES/wxstd.mo +0 -0
  338. wx/locale/de/LC_MESSAGES/wxstd.mo +0 -0
  339. wx/locale/el/LC_MESSAGES/wxstd.mo +0 -0
  340. wx/locale/es/LC_MESSAGES/wxstd.mo +0 -0
  341. wx/locale/eu/LC_MESSAGES/wxstd.mo +0 -0
  342. wx/locale/fa_IR/LC_MESSAGES/wxstd.mo +0 -0
  343. wx/locale/fi/LC_MESSAGES/wxstd.mo +0 -0
  344. wx/locale/fr/LC_MESSAGES/wxstd.mo +0 -0
  345. wx/locale/gl_ES/LC_MESSAGES/wxstd.mo +0 -0
  346. wx/locale/hi/LC_MESSAGES/wxstd.mo +0 -0
  347. wx/locale/hr/LC_MESSAGES/wxstd.mo +0 -0
  348. wx/locale/hu/LC_MESSAGES/wxstd.mo +0 -0
  349. wx/locale/id/LC_MESSAGES/wxstd.mo +0 -0
  350. wx/locale/it/LC_MESSAGES/wxstd.mo +0 -0
  351. wx/locale/ja/LC_MESSAGES/wxstd.mo +0 -0
  352. wx/locale/ka/LC_MESSAGES/wxstd.mo +0 -0
  353. wx/locale/ko_KR/LC_MESSAGES/wxstd.mo +0 -0
  354. wx/locale/lt/LC_MESSAGES/wxstd.mo +0 -0
  355. wx/locale/lv/LC_MESSAGES/wxstd.mo +0 -0
  356. wx/locale/ms/LC_MESSAGES/wxstd.mo +0 -0
  357. wx/locale/nb/LC_MESSAGES/wxstd.mo +0 -0
  358. wx/locale/ne/LC_MESSAGES/wxstd.mo +0 -0
  359. wx/locale/nl/LC_MESSAGES/wxstd.mo +0 -0
  360. wx/locale/pl/LC_MESSAGES/wxstd.mo +0 -0
  361. wx/locale/pt/LC_MESSAGES/wxstd.mo +0 -0
  362. wx/locale/pt_BR/LC_MESSAGES/wxstd.mo +0 -0
  363. wx/locale/ro/LC_MESSAGES/wxstd.mo +0 -0
  364. wx/locale/ru/LC_MESSAGES/wxstd.mo +0 -0
  365. wx/locale/sk/LC_MESSAGES/wxstd.mo +0 -0
  366. wx/locale/sl/LC_MESSAGES/wxstd.mo +0 -0
  367. wx/locale/sq/LC_MESSAGES/wxstd.mo +0 -0
  368. wx/locale/sr/LC_MESSAGES/wxstd.mo +0 -0
  369. wx/locale/sv/LC_MESSAGES/wxstd.mo +0 -0
  370. wx/locale/ta/LC_MESSAGES/wxstd.mo +0 -0
  371. wx/locale/tr/LC_MESSAGES/wxstd.mo +0 -0
  372. wx/locale/uk/LC_MESSAGES/wxstd.mo +0 -0
  373. wx/locale/vi/LC_MESSAGES/wxstd.mo +0 -0
  374. wx/locale/zh_CN/LC_MESSAGES/wxstd.mo +0 -0
  375. wx/locale/zh_TW/LC_MESSAGES/wxstd.mo +0 -0
  376. wx/media.py +30 -0
  377. wx/media.pyi +272 -0
  378. wx/msw.py +16 -0
  379. wx/msw.pyi +91 -0
  380. wx/propgrid.py +498 -0
  381. wx/propgrid.pyi +7427 -0
  382. wx/py/CHANGES.txt +796 -0
  383. wx/py/Py.ico +0 -0
  384. wx/py/PyAlaCarte.py +34 -0
  385. wx/py/PyAlaMode.py +34 -0
  386. wx/py/PyAlaModeTest.py +33 -0
  387. wx/py/PyCrust.ico +0 -0
  388. wx/py/PyCrust.py +78 -0
  389. wx/py/PyCrust_16.png +0 -0
  390. wx/py/PyCrust_32.png +0 -0
  391. wx/py/PyFilling.py +35 -0
  392. wx/py/PyShell.py +78 -0
  393. wx/py/PySlices.ico +0 -0
  394. wx/py/PySlices.py +98 -0
  395. wx/py/PySlicesShell.py +94 -0
  396. wx/py/PySlices_16.png +0 -0
  397. wx/py/PySlices_32.png +0 -0
  398. wx/py/PyWrap.py +52 -0
  399. wx/py/README.txt +77 -0
  400. wx/py/__init__.py +20 -0
  401. wx/py/buffer.py +136 -0
  402. wx/py/crust.py +403 -0
  403. wx/py/crustslices.py +403 -0
  404. wx/py/dispatcher.py +259 -0
  405. wx/py/document.py +37 -0
  406. wx/py/editor.py +844 -0
  407. wx/py/editwindow.py +316 -0
  408. wx/py/filling.py +358 -0
  409. wx/py/frame.py +976 -0
  410. wx/py/images.py +212 -0
  411. wx/py/interpreter.py +161 -0
  412. wx/py/introspect.py +402 -0
  413. wx/py/magic.py +98 -0
  414. wx/py/parse.py +134 -0
  415. wx/py/path.py +36 -0
  416. wx/py/pseudo.py +99 -0
  417. wx/py/shell.py +1579 -0
  418. wx/py/sliceshell.py +3805 -0
  419. wx/py/tests/test_interpreter.py +71 -0
  420. wx/py/tests/test_introspect.py +810 -0
  421. wx/py/tests/test_pseudo.py +70 -0
  422. wx/py/tests/test_version.py +36 -0
  423. wx/py/tests/testall.py +22 -0
  424. wx/py/version.py +7 -0
  425. wx/py.typed +0 -0
  426. wx/ribbon.py +48 -0
  427. wx/ribbon.pyi +3099 -0
  428. wx/richtext.py +141 -0
  429. wx/richtext.pyi +13581 -0
  430. wx/siplib.cp315-win_amd64.pyd +0 -0
  431. wx/siplib.pyi +19 -0
  432. wx/stc.py +59 -0
  433. wx/stc.pyi +9918 -0
  434. wx/svg/__init__.py +363 -0
  435. wx/svg/_nanosvg.cp315-win_amd64.pyd +0 -0
  436. wx/tools/__init__.py +18 -0
  437. wx/tools/dbg.py +268 -0
  438. wx/tools/genaxmodule.py +50 -0
  439. wx/tools/helpviewer.py +92 -0
  440. wx/tools/img2img.py +85 -0
  441. wx/tools/img2png.py +54 -0
  442. wx/tools/img2py.py +306 -0
  443. wx/tools/img2xpm.py +54 -0
  444. wx/tools/pywxrc.py +951 -0
  445. wx/tools/wxget.py +254 -0
  446. wx/tools/wxget_docs_demo.py +183 -0
  447. wx/wxbase334u_net_vc140_x64.dll +0 -0
  448. wx/wxbase334u_vc140_x64.dll +0 -0
  449. wx/wxbase334u_xml_vc140_x64.dll +0 -0
  450. wx/wxmsw334u_adv_vc140_x64.dll +0 -0
  451. wx/wxmsw334u_aui_vc140_x64.dll +0 -0
  452. wx/wxmsw334u_core_vc140_x64.dll +0 -0
  453. wx/wxmsw334u_gl_vc140_x64.dll +0 -0
  454. wx/wxmsw334u_html_vc140_x64.dll +0 -0
  455. wx/wxmsw334u_media_vc140_x64.dll +0 -0
  456. wx/wxmsw334u_propgrid_vc140_x64.dll +0 -0
  457. wx/wxmsw334u_qa_vc140_x64.dll +0 -0
  458. wx/wxmsw334u_ribbon_vc140_x64.dll +0 -0
  459. wx/wxmsw334u_richtext_vc140_x64.dll +0 -0
  460. wx/wxmsw334u_stc_vc140_x64.dll +0 -0
  461. wx/wxmsw334u_webview_vc140_x64.dll +0 -0
  462. wx/wxmsw334u_xrc_vc140_x64.dll +0 -0
  463. wx/xml.py +18 -0
  464. wx/xml.pyi +728 -0
  465. wx/xrc.py +68 -0
  466. wx/xrc.pyi +896 -0
  467. wxpython-4.3.2.dist-info/METADATA +71 -0
  468. wxpython-4.3.2.dist-info/RECORD +472 -0
  469. wxpython-4.3.2.dist-info/WHEEL +5 -0
  470. wxpython-4.3.2.dist-info/entry_points.txt +13 -0
  471. wxpython-4.3.2.dist-info/licenses/LICENSE.txt +610 -0
  472. wxpython-4.3.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1938 @@
1
+ /* SPDX-License-Identifier: BSD-2-Clause */
2
+
3
+ /*
4
+ * The SIP module interface.
5
+ *
6
+ * Copyright (c) 2024 Phil Thompson <phil@riverbankcomputing.com>
7
+ */
8
+
9
+
10
+ #ifndef _SIP_H
11
+ #define _SIP_H
12
+
13
+
14
+ #include <Python.h>
15
+
16
+ /* Sanity check on the Python version. */
17
+ #if PY_VERSION_HEX < 0x03080000
18
+ #error "This version of wx.siplib requires Python v3.8 or later"
19
+ #endif
20
+
21
+
22
+ #ifdef __cplusplus
23
+ #include <exception>
24
+
25
+ typedef bool (*sipExceptionHandler)(std::exception_ptr);
26
+ #else
27
+ typedef void *sipExceptionHandler;
28
+ #endif
29
+
30
+
31
+ #ifdef __cplusplus
32
+ extern "C" {
33
+ #endif
34
+
35
+
36
+ /* The version of the ABI. */
37
+ #define SIP_ABI_MAJOR_VERSION 12
38
+ #define SIP_ABI_MINOR_VERSION 14
39
+ #define SIP_MODULE_PATCH_VERSION 0
40
+
41
+
42
+ /*
43
+ * The change history of the ABI.
44
+ *
45
+ * v12.14
46
+ * - Added support for Python v3.13.
47
+ * - Python v3.8 or later is required.
48
+ * - C99 support is assumed.
49
+ *
50
+ * v12.13
51
+ * - Added support for Python v3.12.
52
+ * - Added sipPyTypeDictRef().
53
+ * - Deprecated sipPyTypeDict().
54
+ *
55
+ * v12.12
56
+ * - Added the '#' conversion character to the argument parsers.
57
+ *
58
+ * v12.11
59
+ * - Published the 'array' type.
60
+ * - Added the ctd_sizeof, ctd_array_delete members to sipClassTypeDef.
61
+ * - Added the '>' conversion character to the argument parsers.
62
+ *
63
+ * v12.10
64
+ * - Python v3.7 or later is required.
65
+ * - Added support for Python v3.11.
66
+ *
67
+ * v12.9
68
+ * - Added sipNextExceptionHandler().
69
+ *
70
+ * v12.8
71
+ * - Added a new thread-safe implementation of sipIsPyMethod().
72
+ */
73
+
74
+
75
+ /* The version of the code generator. */
76
+ #define SIP_VERSION 0x61101
77
+ #define SIP_VERSION_STR "6.17.1"
78
+
79
+ /* These are all dependent on the user-specified name of the sip module. */
80
+ #define _SIP_MODULE_FQ_NAME "wx.siplib"
81
+ #define _SIP_MODULE_NAME "siplib"
82
+ #define _SIP_MODULE_SHARED 1
83
+ #define _SIP_MODULE_ENTRY PyInit_siplib
84
+ #define _SIP_MODULE_LEGACY 0
85
+
86
+ /* Support the historical names. */
87
+ #define SIP_API_MAJOR_NR SIP_ABI_MAJOR_VERSION
88
+ #define SIP_API_MINOR_NR SIP_ABI_MINOR_VERSION
89
+
90
+
91
+ /*
92
+ * Qt includes this typedef and its meta-object system explicitly converts
93
+ * types to uint. If these correspond to signal arguments then that conversion
94
+ * is exposed. Therefore SIP generates code that uses it. This definition is
95
+ * for the cases that SIP is generating non-Qt related bindings with compilers
96
+ * that don't include it themselves (i.e. MSVC).
97
+ */
98
+ typedef unsigned int uint;
99
+
100
+
101
+ /* Some C++ compatibility stuff. */
102
+ #if defined(__cplusplus)
103
+
104
+ /*
105
+ * Cast a PyCFunctionWithKeywords to a PyCFunction in such a way that it
106
+ * suppresses the GCC -Wcast-function-type warning.
107
+ */
108
+ #define SIP_MLMETH_CAST(m) reinterpret_cast<PyCFunction>(reinterpret_cast<void (*)(void)>(m))
109
+
110
+ #if __cplusplus >= 201103L || defined(_MSVC_LANG)
111
+
112
+ /* C++11 and later. */
113
+ #define SIP_NULLPTR nullptr
114
+ #define SIP_OVERRIDE override
115
+
116
+ #else
117
+
118
+ /* Earlier versions of C++. */
119
+ #define SIP_NULLPTR NULL
120
+ #define SIP_OVERRIDE
121
+
122
+ #endif
123
+
124
+ #else
125
+
126
+ /* Cast a PyCFunctionWithKeywords to a PyCFunction. */
127
+ #define SIP_MLMETH_CAST(m) ((PyCFunction)(m))
128
+
129
+ /* C. */
130
+ #define SIP_NULLPTR NULL
131
+ #define SIP_OVERRIDE
132
+
133
+ #endif
134
+
135
+
136
+ #define SIP_SSIZE_T Py_ssize_t
137
+ #define SIP_SSIZE_T_FORMAT "%zd"
138
+ #define SIP_USE_PYCAPSULE
139
+ #define SIP_MODULE_RETURN(v) return (v)
140
+
141
+ #define SIPLong_Check PyLong_Check
142
+ #define SIPLong_FromLong PyLong_FromLong
143
+ #define SIPLong_AsLong PyLong_AsLong
144
+
145
+ #define SIPBytes_Check PyBytes_Check
146
+ #define SIPBytes_FromString PyBytes_FromString
147
+ #define SIPBytes_FromStringAndSize PyBytes_FromStringAndSize
148
+ #define SIPBytes_AsString PyBytes_AsString
149
+ #define SIPBytes_Size PyBytes_Size
150
+ #define SIPBytes_AS_STRING PyBytes_AS_STRING
151
+ #define SIPBytes_GET_SIZE PyBytes_GET_SIZE
152
+
153
+
154
+ /*
155
+ * The mask that can be passed to sipTrace().
156
+ */
157
+ #define SIP_TRACE_CATCHERS 0x0001
158
+ #define SIP_TRACE_CTORS 0x0002
159
+ #define SIP_TRACE_DTORS 0x0004
160
+ #define SIP_TRACE_INITS 0x0008
161
+ #define SIP_TRACE_DEALLOCS 0x0010
162
+ #define SIP_TRACE_METHODS 0x0020
163
+
164
+
165
+ /*
166
+ * Hide some thread dependent stuff.
167
+ */
168
+ #ifdef WITH_THREAD
169
+ typedef PyGILState_STATE sip_gilstate_t;
170
+ #define SIP_RELEASE_GIL(gs) PyGILState_Release(gs);
171
+ #define SIP_BLOCK_THREADS {PyGILState_STATE sipGIL = PyGILState_Ensure();
172
+ #define SIP_UNBLOCK_THREADS PyGILState_Release(sipGIL);}
173
+ #else
174
+ typedef int sip_gilstate_t;
175
+ #define SIP_RELEASE_GIL(gs)
176
+ #define SIP_BLOCK_THREADS
177
+ #define SIP_UNBLOCK_THREADS
178
+ #endif
179
+
180
+
181
+ /*
182
+ * Forward declarations of types.
183
+ */
184
+ struct _sipBufferDef;
185
+ typedef struct _sipBufferDef sipBufferDef;
186
+
187
+ struct _sipBufferInfoDef;
188
+ typedef struct _sipBufferInfoDef sipBufferInfoDef;
189
+
190
+ struct _sipCFunctionDef;
191
+ typedef struct _sipCFunctionDef sipCFunctionDef;
192
+
193
+ struct _sipDateDef;
194
+ typedef struct _sipDateDef sipDateDef;
195
+
196
+ struct _sipEnumTypeObject;
197
+ typedef struct _sipEnumTypeObject sipEnumTypeObject;
198
+
199
+ struct _sipMethodDef;
200
+ typedef struct _sipMethodDef sipMethodDef;
201
+
202
+ struct _sipSimpleWrapper;
203
+ typedef struct _sipSimpleWrapper sipSimpleWrapper;
204
+
205
+ struct _sipTimeDef;
206
+ typedef struct _sipTimeDef sipTimeDef;
207
+
208
+ struct _sipTypeDef;
209
+ typedef struct _sipTypeDef sipTypeDef;
210
+
211
+ struct _sipWrapperType;
212
+ typedef struct _sipWrapperType sipWrapperType;
213
+
214
+ struct _sipWrapper;
215
+ typedef struct _sipWrapper sipWrapper;
216
+
217
+
218
+ /*
219
+ * The different events a handler can be registered for.
220
+ */
221
+ typedef enum
222
+ {
223
+ sipEventWrappedInstance, /* After wrapping a C/C++ instance. */
224
+ sipEventCollectingWrapper, /* When garbage collecting a wrapper object. */
225
+ sipEventNrEvents
226
+ } sipEventType;
227
+
228
+ /*
229
+ * The event handlers.
230
+ */
231
+ typedef void (*sipWrappedInstanceEventHandler)(void *sipCpp);
232
+ typedef void (*sipCollectingWrapperEventHandler)(sipSimpleWrapper *sipSelf);
233
+
234
+
235
+ /*
236
+ * The operation an access function is being asked to perform.
237
+ */
238
+ typedef enum
239
+ {
240
+ UnguardedPointer, /* Return the unguarded pointer. */
241
+ GuardedPointer, /* Return the guarded pointer, ie. 0 if it has gone. */
242
+ ReleaseGuard /* Release the guard, if any. */
243
+ } AccessFuncOp;
244
+
245
+
246
+ /*
247
+ * Some convenient function pointers.
248
+ */
249
+ typedef void *(*sipInitFunc)(sipSimpleWrapper *, PyObject *, PyObject *,
250
+ PyObject **, PyObject **, PyObject **);
251
+ typedef int (*sipFinalFunc)(PyObject *, void *, PyObject *, PyObject **);
252
+ typedef void *(*sipAccessFunc)(sipSimpleWrapper *, AccessFuncOp);
253
+ typedef int (*sipTraverseFunc)(void *, visitproc, void *);
254
+ typedef int (*sipClearFunc)(void *);
255
+ typedef int (*sipGetBufferFuncLimited)(PyObject *, void *, sipBufferDef *);
256
+ typedef void (*sipReleaseBufferFuncLimited)(PyObject *, void *);
257
+ #if !defined(Py_LIMITED_API)
258
+ typedef int (*sipGetBufferFunc)(PyObject *, void *, Py_buffer *, int);
259
+ typedef void (*sipReleaseBufferFunc)(PyObject *, void *, Py_buffer *);
260
+ #endif
261
+ typedef void (*sipDeallocFunc)(sipSimpleWrapper *);
262
+ typedef void *(*sipCastFunc)(void *, const sipTypeDef *);
263
+ typedef const sipTypeDef *(*sipSubClassConvertFunc)(void **);
264
+ typedef int (*sipConvertToFunc)(PyObject *, void **, int *, PyObject *);
265
+ typedef PyObject *(*sipConvertFromFunc)(void *, PyObject *);
266
+ typedef void (*sipVirtErrorHandlerFunc)(sipSimpleWrapper *, sip_gilstate_t);
267
+ typedef int (*sipVirtHandlerFunc)(sip_gilstate_t, sipVirtErrorHandlerFunc,
268
+ sipSimpleWrapper *, PyObject *, ...);
269
+ typedef void (*sipAssignFunc)(void *, Py_ssize_t, void *);
270
+ typedef void *(*sipArrayFunc)(Py_ssize_t);
271
+ typedef void (*sipArrayDeleteFunc)(void *);
272
+ typedef void *(*sipCopyFunc)(const void *, Py_ssize_t);
273
+ typedef void (*sipReleaseFunc)(void *, int);
274
+ typedef PyObject *(*sipPickleFunc)(void *);
275
+ typedef int (*sipAttrGetterFunc)(const sipTypeDef *, PyObject *);
276
+ typedef PyObject *(*sipVariableGetterFunc)(void *, PyObject *, PyObject *);
277
+ typedef int (*sipVariableSetterFunc)(void *, PyObject *, PyObject *);
278
+ typedef void *(*sipProxyResolverFunc)(void *);
279
+ typedef int (*sipNewUserTypeFunc)(sipWrapperType *);
280
+ typedef void (*sipWrapperVisitorFunc)(sipSimpleWrapper *, void *);
281
+
282
+
283
+ #if !defined(Py_LIMITED_API)
284
+ /*
285
+ * The meta-type of a wrapper type.
286
+ */
287
+ struct _sipWrapperType {
288
+ /*
289
+ * The super-metatype. This must be first in the structure so that it can
290
+ * be cast to a PyTypeObject *.
291
+ */
292
+ PyHeapTypeObject super;
293
+
294
+ /* Set if the type is a user implemented Python sub-class. */
295
+ unsigned wt_user_type : 1;
296
+
297
+ /* Set if the type's dictionary contains all lazy attributes. */
298
+ unsigned wt_dict_complete : 1;
299
+
300
+ /* Unused and available for future use. */
301
+ unsigned wt_unused : 30;
302
+
303
+ /* The generated type structure. */
304
+ sipTypeDef *wt_td;
305
+
306
+ /* The list of init extenders. */
307
+ struct _sipInitExtenderDef *wt_iextend;
308
+
309
+ /* The handler called whenever a new user type has been created. */
310
+ sipNewUserTypeFunc wt_new_user_type_handler;
311
+
312
+ /*
313
+ * For the user to use. Note that any data structure will leak if the
314
+ * type is garbage collected.
315
+ */
316
+ void *wt_user_data;
317
+ };
318
+
319
+
320
+ /*
321
+ * The type of a simple C/C++ wrapper object.
322
+ */
323
+ struct _sipSimpleWrapper {
324
+ PyObject_HEAD
325
+
326
+ /*
327
+ * The data, initially a pointer to the C/C++ object, as interpreted by the
328
+ * access function.
329
+ */
330
+ void *data;
331
+
332
+ /* The optional access function. */
333
+ sipAccessFunc access_func;
334
+
335
+ /* Object flags. */
336
+ unsigned sw_flags;
337
+
338
+ /* The optional dictionary of extra references keyed by argument number. */
339
+ PyObject *extra_refs;
340
+
341
+ /* For the user to use. */
342
+ PyObject *user;
343
+
344
+ /* The instance dictionary. */
345
+ PyObject *dict;
346
+
347
+ /* The main instance if this is a mixin. */
348
+ PyObject *mixin_main;
349
+
350
+ /* Next object at this address. */
351
+ struct _sipSimpleWrapper *next;
352
+ };
353
+
354
+
355
+ /*
356
+ * The type of a C/C++ wrapper object that supports parent/child relationships.
357
+ */
358
+ struct _sipWrapper {
359
+ /* The super-type. */
360
+ sipSimpleWrapper super;
361
+
362
+ /* First child object. */
363
+ struct _sipWrapper *first_child;
364
+
365
+ /* Next sibling. */
366
+ struct _sipWrapper *sibling_next;
367
+
368
+ /* Previous sibling. */
369
+ struct _sipWrapper *sibling_prev;
370
+
371
+ /* Owning object. */
372
+ struct _sipWrapper *parent;
373
+ };
374
+
375
+
376
+ /*
377
+ * The meta-type of an enum type. (This is exposed only to support the
378
+ * deprecated sipConvertFromNamedEnum() macro.)
379
+ */
380
+ struct _sipEnumTypeObject {
381
+ /*
382
+ * The super-metatype. This must be first in the structure so that it can
383
+ * be cast to a PyTypeObject *.
384
+ */
385
+ PyHeapTypeObject super;
386
+
387
+ /* The generated type structure. */
388
+ struct _sipTypeDef *type;
389
+ };
390
+ #endif
391
+
392
+
393
+ /*
394
+ * The information describing an encoded type ID.
395
+ */
396
+ typedef struct _sipEncodedTypeDef {
397
+ /* The type number. */
398
+ unsigned sc_type : 16;
399
+
400
+ /* The module number (255 for this one). */
401
+ unsigned sc_module : 8;
402
+
403
+ /* A context specific flag. */
404
+ unsigned sc_flag : 1;
405
+ } sipEncodedTypeDef;
406
+
407
+
408
+ /*
409
+ * The information describing an enum member.
410
+ */
411
+ typedef struct _sipEnumMemberDef {
412
+ /* The member name. */
413
+ const char *em_name;
414
+
415
+ /* The member value. */
416
+ int em_val;
417
+
418
+ /* The member enum, -ve if anonymous. */
419
+ int em_enum;
420
+ } sipEnumMemberDef;
421
+
422
+
423
+ /*
424
+ * The information describing static instances.
425
+ */
426
+ typedef struct _sipInstancesDef {
427
+ /* The types. */
428
+ struct _sipTypeInstanceDef *id_type;
429
+
430
+ /* The void *. */
431
+ struct _sipVoidPtrInstanceDef *id_voidp;
432
+
433
+ /* The chars. */
434
+ struct _sipCharInstanceDef *id_char;
435
+
436
+ /* The strings. */
437
+ struct _sipStringInstanceDef *id_string;
438
+
439
+ /* The ints. */
440
+ struct _sipIntInstanceDef *id_int;
441
+
442
+ /* The longs. */
443
+ struct _sipLongInstanceDef *id_long;
444
+
445
+ /* The unsigned longs. */
446
+ struct _sipUnsignedLongInstanceDef *id_ulong;
447
+
448
+ /* The long longs. */
449
+ struct _sipLongLongInstanceDef *id_llong;
450
+
451
+ /* The unsigned long longs. */
452
+ struct _sipUnsignedLongLongInstanceDef *id_ullong;
453
+
454
+ /* The doubles. */
455
+ struct _sipDoubleInstanceDef *id_double;
456
+ } sipInstancesDef;
457
+
458
+
459
+ /*
460
+ * The information describing a type initialiser extender.
461
+ */
462
+ typedef struct _sipInitExtenderDef {
463
+ /* The API version range index. */
464
+ int ie_api_range;
465
+
466
+ /* The extender function. */
467
+ sipInitFunc ie_extender;
468
+
469
+ /* The class being extended. */
470
+ sipEncodedTypeDef ie_class;
471
+
472
+ /* The next extender for this class. */
473
+ struct _sipInitExtenderDef *ie_next;
474
+ } sipInitExtenderDef;
475
+
476
+
477
+ /*
478
+ * The information describing a sub-class convertor.
479
+ */
480
+ typedef struct _sipSubClassConvertorDef {
481
+ /* The convertor. */
482
+ sipSubClassConvertFunc scc_convertor;
483
+
484
+ /* The encoded base type. */
485
+ sipEncodedTypeDef scc_base;
486
+
487
+ /* The base type. */
488
+ struct _sipTypeDef *scc_basetype;
489
+ } sipSubClassConvertorDef;
490
+
491
+
492
+ /*
493
+ * The structure populated by %BIGetBufferCode when the limited API is enabled.
494
+ */
495
+ struct _sipBufferDef {
496
+ /* The address of the buffer. */
497
+ void *bd_buffer;
498
+
499
+ /* The length of the buffer. */
500
+ Py_ssize_t bd_length;
501
+
502
+ /* Set if the buffer is read-only. */
503
+ int bd_readonly;
504
+ };
505
+
506
+
507
+ /*
508
+ * The structure describing a Python buffer.
509
+ */
510
+ struct _sipBufferInfoDef {
511
+ /* This is internal to sip. */
512
+ void *bi_internal;
513
+
514
+ /* The address of the buffer. */
515
+ void *bi_buf;
516
+
517
+ /* A reference to the object implementing the buffer interface. */
518
+ PyObject *bi_obj;
519
+
520
+ /* The length of the buffer in bytes. */
521
+ Py_ssize_t bi_len;
522
+
523
+ /* The number of dimensions. */
524
+ int bi_ndim;
525
+
526
+ /* The format of each element of the buffer. */
527
+ char *bi_format;
528
+ };
529
+
530
+
531
+ /*
532
+ * The structure describing a Python C function.
533
+ */
534
+ struct _sipCFunctionDef {
535
+ /* The C function. */
536
+ PyMethodDef *cf_function;
537
+
538
+ /* The optional bound object. */
539
+ PyObject *cf_self;
540
+ };
541
+
542
+
543
+ /*
544
+ * The structure describing a Python method.
545
+ */
546
+ struct _sipMethodDef {
547
+ /* The function that implements the method. */
548
+ PyObject *pm_function;
549
+
550
+ /* The bound object. */
551
+ PyObject *pm_self;
552
+ };
553
+
554
+
555
+ /*
556
+ * The structure describing a Python date.
557
+ */
558
+ struct _sipDateDef {
559
+ /* The year. */
560
+ int pd_year;
561
+
562
+ /* The month (1-12). */
563
+ int pd_month;
564
+
565
+ /* The day (1-31). */
566
+ int pd_day;
567
+ };
568
+
569
+
570
+ /*
571
+ * The structure describing a Python time.
572
+ */
573
+ struct _sipTimeDef {
574
+ /* The hour (0-23). */
575
+ int pt_hour;
576
+
577
+ /* The minute (0-59). */
578
+ int pt_minute;
579
+
580
+ /* The second (0-59). */
581
+ int pt_second;
582
+
583
+ /* The microsecond (0-999999). */
584
+ int pt_microsecond;
585
+ };
586
+
587
+
588
+ /*
589
+ * The different error states of handwritten code.
590
+ */
591
+ typedef enum {
592
+ sipErrorNone, /* There is no error. */
593
+ sipErrorFail, /* The error is a failure. */
594
+ sipErrorContinue /* It may not apply if a later operation succeeds. */
595
+ } sipErrorState;
596
+
597
+
598
+ /*
599
+ * The different Python slot types. New slots must be added to the end,
600
+ * otherwise the major version of the internal ABI must be changed.
601
+ */
602
+ typedef enum {
603
+ str_slot, /* __str__ */
604
+ int_slot, /* __int__ */
605
+ float_slot, /* __float__ */
606
+ len_slot, /* __len__ */
607
+ contains_slot, /* __contains__ */
608
+ add_slot, /* __add__ for number */
609
+ concat_slot, /* __add__ for sequence types */
610
+ sub_slot, /* __sub__ */
611
+ mul_slot, /* __mul__ for number types */
612
+ repeat_slot, /* __mul__ for sequence types */
613
+ div_slot, /* __div__ */
614
+ mod_slot, /* __mod__ */
615
+ floordiv_slot, /* __floordiv__ */
616
+ truediv_slot, /* __truediv__ */
617
+ and_slot, /* __and__ */
618
+ or_slot, /* __or__ */
619
+ xor_slot, /* __xor__ */
620
+ lshift_slot, /* __lshift__ */
621
+ rshift_slot, /* __rshift__ */
622
+ iadd_slot, /* __iadd__ for number types */
623
+ iconcat_slot, /* __iadd__ for sequence types */
624
+ isub_slot, /* __isub__ */
625
+ imul_slot, /* __imul__ for number types */
626
+ irepeat_slot, /* __imul__ for sequence types */
627
+ idiv_slot, /* __idiv__ */
628
+ imod_slot, /* __imod__ */
629
+ ifloordiv_slot, /* __ifloordiv__ */
630
+ itruediv_slot, /* __itruediv__ */
631
+ iand_slot, /* __iand__ */
632
+ ior_slot, /* __ior__ */
633
+ ixor_slot, /* __ixor__ */
634
+ ilshift_slot, /* __ilshift__ */
635
+ irshift_slot, /* __irshift__ */
636
+ invert_slot, /* __invert__ */
637
+ call_slot, /* __call__ */
638
+ getitem_slot, /* __getitem__ */
639
+ setitem_slot, /* __setitem__ */
640
+ delitem_slot, /* __delitem__ */
641
+ lt_slot, /* __lt__ */
642
+ le_slot, /* __le__ */
643
+ eq_slot, /* __eq__ */
644
+ ne_slot, /* __ne__ */
645
+ gt_slot, /* __gt__ */
646
+ ge_slot, /* __ge__ */
647
+ bool_slot, /* __bool__, __nonzero__ */
648
+ neg_slot, /* __neg__ */
649
+ repr_slot, /* __repr__ */
650
+ hash_slot, /* __hash__ */
651
+ pos_slot, /* __pos__ */
652
+ abs_slot, /* __abs__ */
653
+ index_slot, /* __index__ */
654
+ iter_slot, /* __iter__ */
655
+ next_slot, /* __next__ */
656
+ setattr_slot, /* __setattr__, __delattr__ */
657
+ matmul_slot, /* __matmul__ (for Python v3.5 and later) */
658
+ imatmul_slot, /* __imatmul__ (for Python v3.5 and later) */
659
+ await_slot, /* __await__ (for Python v3.5 and later) */
660
+ aiter_slot, /* __aiter__ (for Python v3.5 and later) */
661
+ anext_slot, /* __anext__ (for Python v3.5 and later) */
662
+ } sipPySlotType;
663
+
664
+
665
+ /*
666
+ * The information describing a Python slot function.
667
+ */
668
+ typedef struct _sipPySlotDef {
669
+ /* The function. */
670
+ void *psd_func;
671
+
672
+ /* The type. */
673
+ sipPySlotType psd_type;
674
+ } sipPySlotDef;
675
+
676
+
677
+ /*
678
+ * The information describing a Python slot extender.
679
+ */
680
+ typedef struct _sipPySlotExtenderDef {
681
+ /* The function. */
682
+ void *pse_func;
683
+
684
+ /* The type. */
685
+ sipPySlotType pse_type;
686
+
687
+ /* The encoded class. */
688
+ sipEncodedTypeDef pse_class;
689
+ } sipPySlotExtenderDef;
690
+
691
+
692
+ /*
693
+ * The information describing a typedef.
694
+ */
695
+ typedef struct _sipTypedefDef {
696
+ /* The typedef name. */
697
+ const char *tdd_name;
698
+
699
+ /* The typedef value. */
700
+ const char *tdd_type_name;
701
+ } sipTypedefDef;
702
+
703
+
704
+ /*
705
+ * The information describing a variable or property.
706
+ */
707
+
708
+ typedef enum
709
+ {
710
+ PropertyVariable, /* A property. */
711
+ InstanceVariable, /* An instance variable. */
712
+ ClassVariable /* A class (i.e. static) variable. */
713
+ } sipVariableType;
714
+
715
+ typedef struct _sipVariableDef {
716
+ /* The type of variable. */
717
+ sipVariableType vd_type;
718
+
719
+ /* The name. */
720
+ const char *vd_name;
721
+
722
+ /*
723
+ * The getter. If this is a variable (rather than a property) then the
724
+ * actual type is sipVariableGetterFunc.
725
+ */
726
+ PyMethodDef *vd_getter;
727
+
728
+ /*
729
+ * The setter. If this is a variable (rather than a property) then the
730
+ * actual type is sipVariableSetterFunc. It is NULL if the property cannot
731
+ * be set or the variable is const.
732
+ */
733
+ PyMethodDef *vd_setter;
734
+
735
+ /* The property deleter. */
736
+ PyMethodDef *vd_deleter;
737
+
738
+ /* The docstring. */
739
+ const char *vd_docstring;
740
+ } sipVariableDef;
741
+
742
+
743
+ /*
744
+ * The information describing a type, either a C++ class (or C struct), a C++
745
+ * namespace, a mapped type or a named enum.
746
+ */
747
+ struct _sipTypeDef {
748
+ /* The version range index, -1 if the type isn't versioned. */
749
+ int td_version;
750
+
751
+ /* The next version of this type. */
752
+ struct _sipTypeDef *td_next_version;
753
+
754
+ /*
755
+ * The module, 0 if the type hasn't been initialised.
756
+ */
757
+ struct _sipExportedModuleDef *td_module;
758
+
759
+ /* Type flags, see the sipType*() macros. */
760
+ int td_flags;
761
+
762
+ /* The C/C++ name of the type. */
763
+ int td_cname;
764
+
765
+ /* The Python type object. */
766
+ PyTypeObject *td_py_type;
767
+
768
+ /* Any additional fixed data generated by a plugin. */
769
+ void *td_plugin_data;
770
+ };
771
+
772
+
773
+ /*
774
+ * The information describing a container (ie. a class, namespace or a mapped
775
+ * type).
776
+ */
777
+ typedef struct _sipContainerDef {
778
+ /*
779
+ * The Python name of the type, -1 if this is a namespace extender (in the
780
+ * context of a class) or doesn't require a namespace (in the context of a
781
+ * mapped type). */
782
+ int cod_name;
783
+
784
+ /*
785
+ * The scoping type or the namespace this is extending if it is a namespace
786
+ * extender.
787
+ */
788
+ sipEncodedTypeDef cod_scope;
789
+
790
+ /* The number of lazy methods. */
791
+ int cod_nrmethods;
792
+
793
+ /* The table of lazy methods. */
794
+ PyMethodDef *cod_methods;
795
+
796
+ /* The number of lazy enum members. */
797
+ int cod_nrenummembers;
798
+
799
+ /* The table of lazy enum members. */
800
+ sipEnumMemberDef *cod_enummembers;
801
+
802
+ /* The number of variables. */
803
+ int cod_nrvariables;
804
+
805
+ /* The table of variables. */
806
+ sipVariableDef *cod_variables;
807
+
808
+ /* The static instances. */
809
+ sipInstancesDef cod_instances;
810
+ } sipContainerDef;
811
+
812
+
813
+ /*
814
+ * The information describing a C++ class (or C struct) or a C++ namespace.
815
+ */
816
+ typedef struct _sipClassTypeDef {
817
+ /* The base type information. */
818
+ sipTypeDef ctd_base;
819
+
820
+ /* The container information. */
821
+ sipContainerDef ctd_container;
822
+
823
+ /* The docstring. */
824
+ const char *ctd_docstring;
825
+
826
+ /*
827
+ * The meta-type name, -1 to use the meta-type of the first super-type
828
+ * (normally sipWrapperType).
829
+ */
830
+ int ctd_metatype;
831
+
832
+ /* The super-type name, -1 to use sipWrapper. */
833
+ int ctd_supertype;
834
+
835
+ /* The super-types. */
836
+ sipEncodedTypeDef *ctd_supers;
837
+
838
+ /* The table of Python slots. */
839
+ sipPySlotDef *ctd_pyslots;
840
+
841
+ /* The initialisation function. */
842
+ sipInitFunc ctd_init;
843
+
844
+ /* The traverse function. */
845
+ sipTraverseFunc ctd_traverse;
846
+
847
+ /* The clear function. */
848
+ sipClearFunc ctd_clear;
849
+
850
+ /* The get buffer function. */
851
+ #if defined(Py_LIMITED_API)
852
+ sipGetBufferFuncLimited ctd_getbuffer;
853
+ #else
854
+ sipGetBufferFunc ctd_getbuffer;
855
+ #endif
856
+
857
+ /* The release buffer function. */
858
+ #if defined(Py_LIMITED_API)
859
+ sipReleaseBufferFuncLimited ctd_releasebuffer;
860
+ #else
861
+ sipReleaseBufferFunc ctd_releasebuffer;
862
+ #endif
863
+
864
+ /* The deallocation function. */
865
+ sipDeallocFunc ctd_dealloc;
866
+
867
+ /* The optional assignment function. */
868
+ sipAssignFunc ctd_assign;
869
+
870
+ /* The optional array allocation function. */
871
+ sipArrayFunc ctd_array;
872
+
873
+ /* The optional copy function. */
874
+ sipCopyFunc ctd_copy;
875
+
876
+ /* The release function, 0 if a C struct. */
877
+ sipReleaseFunc ctd_release;
878
+
879
+ /* The cast function, 0 if a C struct. */
880
+ sipCastFunc ctd_cast;
881
+
882
+ /* The optional convert to function. */
883
+ sipConvertToFunc ctd_cto;
884
+
885
+ /* The optional convert from function. */
886
+ sipConvertFromFunc ctd_cfrom;
887
+
888
+ /* The next namespace extender. */
889
+ struct _sipClassTypeDef *ctd_nsextender;
890
+
891
+ /* The pickle function. */
892
+ sipPickleFunc ctd_pickle;
893
+
894
+ /* The finalisation function. */
895
+ sipFinalFunc ctd_final;
896
+
897
+ /* The mixin initialisation function. */
898
+ initproc ctd_init_mixin;
899
+
900
+ /* The optional array delete function. */
901
+ sipArrayDeleteFunc ctd_array_delete;
902
+
903
+ /* The sizeof the class. */
904
+ size_t ctd_sizeof;
905
+ } sipClassTypeDef;
906
+
907
+
908
+ /*
909
+ * The information describing a mapped type.
910
+ */
911
+ typedef struct _sipMappedTypeDef {
912
+ /* The base type information. */
913
+ sipTypeDef mtd_base;
914
+
915
+ /* The container information. */
916
+ sipContainerDef mtd_container;
917
+
918
+ /* The optional assignment function. */
919
+ sipAssignFunc mtd_assign;
920
+
921
+ /* The optional array allocation function. */
922
+ sipArrayFunc mtd_array;
923
+
924
+ /* The optional copy function. */
925
+ sipCopyFunc mtd_copy;
926
+
927
+ /* The optional release function. */
928
+ sipReleaseFunc mtd_release;
929
+
930
+ /* The convert to function. */
931
+ sipConvertToFunc mtd_cto;
932
+
933
+ /* The convert from function. */
934
+ sipConvertFromFunc mtd_cfrom;
935
+ } sipMappedTypeDef;
936
+
937
+
938
+ /*
939
+ * The information describing a named enum.
940
+ */
941
+ typedef struct _sipEnumTypeDef {
942
+ /* The base type information. */
943
+ sipTypeDef etd_base;
944
+
945
+ /* The Python name of the enum. */
946
+ int etd_name;
947
+
948
+ /* The scoping type, -1 if it is defined at the module level. */
949
+ int etd_scope;
950
+
951
+ /* The Python slots. */
952
+ struct _sipPySlotDef *etd_pyslots;
953
+ } sipEnumTypeDef;
954
+
955
+
956
+ /*
957
+ * The information describing an external type.
958
+ */
959
+ typedef struct _sipExternalTypeDef {
960
+ /* The index into the type table. */
961
+ int et_nr;
962
+
963
+ /* The name of the type. */
964
+ const char *et_name;
965
+ } sipExternalTypeDef;
966
+
967
+
968
+ /*
969
+ * The information describing a mapped class. This (and anything that uses it)
970
+ * is deprecated.
971
+ */
972
+ typedef sipTypeDef sipMappedType;
973
+
974
+
975
+ /*
976
+ * Defines an entry in the module specific list of delayed dtor calls.
977
+ */
978
+ typedef struct _sipDelayedDtor {
979
+ /* The C/C++ instance. */
980
+ void *dd_ptr;
981
+
982
+ /* The class name. */
983
+ const char *dd_name;
984
+
985
+ /* Non-zero if dd_ptr is a derived class instance. */
986
+ int dd_isderived;
987
+
988
+ /* Next in the list. */
989
+ struct _sipDelayedDtor *dd_next;
990
+ } sipDelayedDtor;
991
+
992
+
993
+ /*
994
+ * Defines an entry in the table of global functions all of whose overloads
995
+ * are versioned (so their names can't be automatically added to the module
996
+ * dictionary).
997
+ */
998
+ typedef struct _sipVersionedFunctionDef {
999
+ /* The name, -1 marks the end of the table. */
1000
+ int vf_name;
1001
+
1002
+ /* The function itself. */
1003
+ PyCFunction vf_function;
1004
+
1005
+ /* The METH_* flags. */
1006
+ int vf_flags;
1007
+
1008
+ /* The docstring. */
1009
+ const char *vf_docstring;
1010
+
1011
+ /* The API version range index. */
1012
+ int vf_api_range;
1013
+ } sipVersionedFunctionDef;
1014
+
1015
+
1016
+ /*
1017
+ * Defines a virtual error handler.
1018
+ */
1019
+ typedef struct _sipVirtErrorHandlerDef {
1020
+ /* The name of the handler. */
1021
+ const char *veh_name;
1022
+
1023
+ /* The handler function. */
1024
+ sipVirtErrorHandlerFunc veh_handler;
1025
+ } sipVirtErrorHandlerDef;
1026
+
1027
+
1028
+ /*
1029
+ * Defines a type imported from another module.
1030
+ */
1031
+ typedef union _sipImportedTypeDef {
1032
+ /* The type name before the module is imported. */
1033
+ const char *it_name;
1034
+
1035
+ /* The type after the module is imported. */
1036
+ sipTypeDef *it_td;
1037
+ } sipImportedTypeDef;
1038
+
1039
+
1040
+ /*
1041
+ * Defines a virtual error handler imported from another module.
1042
+ */
1043
+ typedef union _sipImportedVirtErrorHandlerDef {
1044
+ /* The handler name before the module is imported. */
1045
+ const char *iveh_name;
1046
+
1047
+ /* The handler after the module is imported. */
1048
+ sipVirtErrorHandlerFunc iveh_handler;
1049
+ } sipImportedVirtErrorHandlerDef;
1050
+
1051
+
1052
+ /*
1053
+ * Defines an exception imported from another module.
1054
+ */
1055
+ typedef union _sipImportedExceptionDef {
1056
+ /* The exception name before the module is imported. */
1057
+ const char *iexc_name;
1058
+
1059
+ /* The exception object after the module is imported. */
1060
+ PyObject *iexc_object;
1061
+ } sipImportedExceptionDef;
1062
+
1063
+
1064
+ /*
1065
+ * The information describing an imported module.
1066
+ */
1067
+ typedef struct _sipImportedModuleDef {
1068
+ /* The module name. */
1069
+ const char *im_name;
1070
+
1071
+ /* The types imported from the module. */
1072
+ sipImportedTypeDef *im_imported_types;
1073
+
1074
+ /* The virtual error handlers imported from the module. */
1075
+ sipImportedVirtErrorHandlerDef *im_imported_veh;
1076
+
1077
+ /* The exceptions imported from the module. */
1078
+ sipImportedExceptionDef *im_imported_exceptions;
1079
+ } sipImportedModuleDef;
1080
+
1081
+
1082
+ /*
1083
+ * The main client module structure.
1084
+ */
1085
+ typedef struct _sipExportedModuleDef {
1086
+ /* The next in the list. */
1087
+ struct _sipExportedModuleDef *em_next;
1088
+
1089
+ /* The SIP API minor version number. */
1090
+ unsigned em_api_minor;
1091
+
1092
+ /* The module name. */
1093
+ int em_name;
1094
+
1095
+ /* The module name as an object. */
1096
+ PyObject *em_nameobj;
1097
+
1098
+ /* The string pool. */
1099
+ const char *em_strings;
1100
+
1101
+ /* The imported modules. */
1102
+ sipImportedModuleDef *em_imports;
1103
+
1104
+ /* The optional Qt support API. */
1105
+ struct _sipQtAPI *em_qt_api;
1106
+
1107
+ /* The number of types. */
1108
+ int em_nrtypes;
1109
+
1110
+ /* The table of types. */
1111
+ sipTypeDef **em_types;
1112
+
1113
+ /* The table of external types. */
1114
+ sipExternalTypeDef *em_external;
1115
+
1116
+ /* The number of members in global enums. */
1117
+ int em_nrenummembers;
1118
+
1119
+ /* The table of members in global enums. */
1120
+ sipEnumMemberDef *em_enummembers;
1121
+
1122
+ /* The number of typedefs. */
1123
+ int em_nrtypedefs;
1124
+
1125
+ /* The table of typedefs. */
1126
+ sipTypedefDef *em_typedefs;
1127
+
1128
+ /* The table of virtual error handlers. */
1129
+ sipVirtErrorHandlerDef *em_virterrorhandlers;
1130
+
1131
+ /* The sub-class convertors. */
1132
+ sipSubClassConvertorDef *em_convertors;
1133
+
1134
+ /* The static instances. */
1135
+ sipInstancesDef em_instances;
1136
+
1137
+ /* The license. */
1138
+ struct _sipLicenseDef *em_license;
1139
+
1140
+ /* The table of exception types. */
1141
+ PyObject **em_exceptions;
1142
+
1143
+ /* The table of Python slot extenders. */
1144
+ sipPySlotExtenderDef *em_slotextend;
1145
+
1146
+ /* The table of initialiser extenders. */
1147
+ sipInitExtenderDef *em_initextend;
1148
+
1149
+ /* The delayed dtor handler. */
1150
+ void (*em_delayeddtors)(const sipDelayedDtor *);
1151
+
1152
+ /* The list of delayed dtors. */
1153
+ sipDelayedDtor *em_ddlist;
1154
+
1155
+ /*
1156
+ * The array of API version definitions. Each definition takes up 3
1157
+ * elements. If the third element of a 3-tuple is negative then the first
1158
+ * two elements define an API and its default version. All such
1159
+ * definitions will appear at the end of the array. If the first element
1160
+ * of a 3-tuple is negative then that is the last element of the array.
1161
+ */
1162
+ int *em_versions;
1163
+
1164
+ /* The optional table of versioned functions. */
1165
+ sipVersionedFunctionDef *em_versioned_functions;
1166
+
1167
+ /* The exception handler. */
1168
+ sipExceptionHandler em_exception_handler;
1169
+ } sipExportedModuleDef;
1170
+
1171
+
1172
+ /*
1173
+ * The information describing a license to be added to a dictionary.
1174
+ */
1175
+ typedef struct _sipLicenseDef {
1176
+ /* The type of license. */
1177
+ const char *lc_type;
1178
+
1179
+ /* The licensee. */
1180
+ const char *lc_licensee;
1181
+
1182
+ /* The timestamp. */
1183
+ const char *lc_timestamp;
1184
+
1185
+ /* The signature. */
1186
+ const char *lc_signature;
1187
+ } sipLicenseDef;
1188
+
1189
+
1190
+ /*
1191
+ * The information describing a void pointer instance to be added to a
1192
+ * dictionary.
1193
+ */
1194
+ typedef struct _sipVoidPtrInstanceDef {
1195
+ /* The void pointer name. */
1196
+ const char *vi_name;
1197
+
1198
+ /* The void pointer value. */
1199
+ void *vi_val;
1200
+ } sipVoidPtrInstanceDef;
1201
+
1202
+
1203
+ /*
1204
+ * The information describing a char instance to be added to a dictionary.
1205
+ */
1206
+ typedef struct _sipCharInstanceDef {
1207
+ /* The char name. */
1208
+ const char *ci_name;
1209
+
1210
+ /* The char value. */
1211
+ char ci_val;
1212
+
1213
+ /* The encoding used, either 'A', 'L', '8' or 'N'. */
1214
+ char ci_encoding;
1215
+ } sipCharInstanceDef;
1216
+
1217
+
1218
+ /*
1219
+ * The information describing a string instance to be added to a dictionary.
1220
+ * This is also used as a hack to add (or fix) other types rather than add a
1221
+ * new table type and so requiring a new major version of the API.
1222
+ */
1223
+ typedef struct _sipStringInstanceDef {
1224
+ /* The string name. */
1225
+ const char *si_name;
1226
+
1227
+ /* The string value. */
1228
+ const char *si_val;
1229
+
1230
+ /*
1231
+ * The encoding used, either 'A', 'L', '8' or 'N'. 'w' and 'W' are also
1232
+ * used to support the fix for wchar_t.
1233
+ */
1234
+ char si_encoding;
1235
+ } sipStringInstanceDef;
1236
+
1237
+
1238
+ /*
1239
+ * The information describing an int instance to be added to a dictionary.
1240
+ */
1241
+ typedef struct _sipIntInstanceDef {
1242
+ /* The int name. */
1243
+ const char *ii_name;
1244
+
1245
+ /* The int value. */
1246
+ int ii_val;
1247
+ } sipIntInstanceDef;
1248
+
1249
+
1250
+ /*
1251
+ * The information describing a long instance to be added to a dictionary.
1252
+ */
1253
+ typedef struct _sipLongInstanceDef {
1254
+ /* The long name. */
1255
+ const char *li_name;
1256
+
1257
+ /* The long value. */
1258
+ long li_val;
1259
+ } sipLongInstanceDef;
1260
+
1261
+
1262
+ /*
1263
+ * The information describing an unsigned long instance to be added to a
1264
+ * dictionary.
1265
+ */
1266
+ typedef struct _sipUnsignedLongInstanceDef {
1267
+ /* The unsigned long name. */
1268
+ const char *uli_name;
1269
+
1270
+ /* The unsigned long value. */
1271
+ unsigned long uli_val;
1272
+ } sipUnsignedLongInstanceDef;
1273
+
1274
+
1275
+ /*
1276
+ * The information describing a long long instance to be added to a dictionary.
1277
+ */
1278
+ typedef struct _sipLongLongInstanceDef {
1279
+ /* The long long name. */
1280
+ const char *lli_name;
1281
+
1282
+ /* The long long value. */
1283
+ #if defined(HAVE_LONG_LONG)
1284
+ PY_LONG_LONG lli_val;
1285
+ #else
1286
+ long lli_val;
1287
+ #endif
1288
+ } sipLongLongInstanceDef;
1289
+
1290
+
1291
+ /*
1292
+ * The information describing an unsigned long long instance to be added to a
1293
+ * dictionary.
1294
+ */
1295
+ typedef struct _sipUnsignedLongLongInstanceDef {
1296
+ /* The unsigned long long name. */
1297
+ const char *ulli_name;
1298
+
1299
+ /* The unsigned long long value. */
1300
+ #if defined(HAVE_LONG_LONG)
1301
+ unsigned PY_LONG_LONG ulli_val;
1302
+ #else
1303
+ unsigned long ulli_val;
1304
+ #endif
1305
+ } sipUnsignedLongLongInstanceDef;
1306
+
1307
+
1308
+ /*
1309
+ * The information describing a double instance to be added to a dictionary.
1310
+ */
1311
+ typedef struct _sipDoubleInstanceDef {
1312
+ /* The double name. */
1313
+ const char *di_name;
1314
+
1315
+ /* The double value. */
1316
+ double di_val;
1317
+ } sipDoubleInstanceDef;
1318
+
1319
+
1320
+ /*
1321
+ * The information describing a class or enum instance to be added to a
1322
+ * dictionary.
1323
+ */
1324
+ typedef struct _sipTypeInstanceDef {
1325
+ /* The type instance name. */
1326
+ const char *ti_name;
1327
+
1328
+ /* The actual instance. */
1329
+ void *ti_ptr;
1330
+
1331
+ /* A pointer to the generated type. */
1332
+ struct _sipTypeDef **ti_type;
1333
+
1334
+ /* The wrapping flags. */
1335
+ int ti_flags;
1336
+ } sipTypeInstanceDef;
1337
+
1338
+
1339
+ /*
1340
+ * Define a mapping between a wrapped type identified by a string and the
1341
+ * corresponding Python type.
1342
+ */
1343
+ typedef struct _sipStringTypeClassMap {
1344
+ /* The type as a string. */
1345
+ const char *typeString;
1346
+
1347
+ /* A pointer to the Python type. */
1348
+ struct _sipWrapperType **pyType;
1349
+ } sipStringTypeClassMap;
1350
+
1351
+
1352
+ /*
1353
+ * Define a mapping between a wrapped type identified by an integer and the
1354
+ * corresponding Python type.
1355
+ */
1356
+ typedef struct _sipIntTypeClassMap {
1357
+ /* The type as an integer. */
1358
+ int typeInt;
1359
+
1360
+ /* A pointer to the Python type. */
1361
+ struct _sipWrapperType **pyType;
1362
+ } sipIntTypeClassMap;
1363
+
1364
+
1365
+ /*
1366
+ * A Python method's component parts. This allows us to re-create the method
1367
+ * without changing the reference counts of the components.
1368
+ */
1369
+ typedef struct _sipPyMethod {
1370
+ /* The function. */
1371
+ PyObject *mfunc;
1372
+
1373
+ /* Self if it is a bound method. */
1374
+ PyObject *mself;
1375
+ } sipPyMethod;
1376
+
1377
+
1378
+ /*
1379
+ * A slot (in the Qt, rather than Python, sense).
1380
+ */
1381
+ typedef struct _sipSlot {
1382
+ /* Name if a Qt or Python signal. */
1383
+ char *name;
1384
+
1385
+ /* Signal or Qt slot object. */
1386
+ PyObject *pyobj;
1387
+
1388
+ /* Python slot method, pyobj is NULL. */
1389
+ sipPyMethod meth;
1390
+
1391
+ /* A weak reference to the slot, Py_True if pyobj has an extra reference. */
1392
+ PyObject *weakSlot;
1393
+ } sipSlot;
1394
+
1395
+
1396
+ /*
1397
+ * The API exported by the SIP module, ie. pointers to all the data and
1398
+ * functions that can be used by generated code.
1399
+ */
1400
+ typedef struct _sipAPIDef {
1401
+ /*
1402
+ * This must be the first entry and it's signature must not change so that
1403
+ * version number mismatches can be detected and reported.
1404
+ */
1405
+ int (*api_export_module)(sipExportedModuleDef *client, unsigned api_major,
1406
+ unsigned api_minor, void *unused);
1407
+
1408
+ /*
1409
+ * The following are part of the public API.
1410
+ */
1411
+ PyTypeObject *api_simplewrapper_type;
1412
+ PyTypeObject *api_wrapper_type;
1413
+ PyTypeObject *api_wrappertype_type;
1414
+ PyTypeObject *api_voidptr_type;
1415
+
1416
+ void (*api_bad_catcher_result)(PyObject *method);
1417
+ void (*api_bad_length_for_slice)(Py_ssize_t seqlen, Py_ssize_t slicelen);
1418
+ PyObject *(*api_build_result)(int *isErr, const char *fmt, ...);
1419
+ PyObject *(*api_call_method)(int *isErr, PyObject *method, const char *fmt,
1420
+ ...);
1421
+ void (*api_call_procedure_method)(sip_gilstate_t, sipVirtErrorHandlerFunc,
1422
+ sipSimpleWrapper *, PyObject *, const char *, ...);
1423
+ PyObject *(*api_connect_rx)(PyObject *txObj, const char *sig,
1424
+ PyObject *rxObj, const char *slot, int type);
1425
+ Py_ssize_t (*api_convert_from_sequence_index)(Py_ssize_t idx,
1426
+ Py_ssize_t len);
1427
+ int (*api_can_convert_to_type)(PyObject *pyObj, const sipTypeDef *td,
1428
+ int flags);
1429
+ void *(*api_convert_to_type)(PyObject *pyObj, const sipTypeDef *td,
1430
+ PyObject *transferObj, int flags, int *statep, int *iserrp);
1431
+ void *(*api_force_convert_to_type)(PyObject *pyObj, const sipTypeDef *td,
1432
+ PyObject *transferObj, int flags, int *statep, int *iserrp);
1433
+
1434
+ /*
1435
+ * The following are deprecated parts of the public API.
1436
+ */
1437
+ int (*api_can_convert_to_enum)(PyObject *pyObj, const sipTypeDef *td);
1438
+
1439
+ /*
1440
+ * The following are part of the public API.
1441
+ */
1442
+ void (*api_release_type)(void *cpp, const sipTypeDef *td, int state);
1443
+ PyObject *(*api_convert_from_type)(void *cpp, const sipTypeDef *td,
1444
+ PyObject *transferObj);
1445
+ PyObject *(*api_convert_from_new_type)(void *cpp, const sipTypeDef *td,
1446
+ PyObject *transferObj);
1447
+ PyObject *(*api_convert_from_enum)(int eval, const sipTypeDef *td);
1448
+ int (*api_get_state)(PyObject *transferObj);
1449
+ PyObject *(*api_disconnect_rx)(PyObject *txObj, const char *sig,
1450
+ PyObject *rxObj, const char *slot);
1451
+ void (*api_free)(void *mem);
1452
+ PyObject *(*api_get_pyobject)(void *cppPtr, const sipTypeDef *td);
1453
+ void *(*api_malloc)(size_t nbytes);
1454
+ int (*api_parse_result)(int *isErr, PyObject *method, PyObject *res,
1455
+ const char *fmt, ...);
1456
+ void (*api_trace)(unsigned mask, const char *fmt, ...);
1457
+ void (*api_transfer_back)(PyObject *self);
1458
+ void (*api_transfer_to)(PyObject *self, PyObject *owner);
1459
+ void (*api_transfer_break)(PyObject *self);
1460
+ unsigned long (*api_long_as_unsigned_long)(PyObject *o);
1461
+ PyObject *(*api_convert_from_void_ptr)(void *val);
1462
+ PyObject *(*api_convert_from_const_void_ptr)(const void *val);
1463
+ PyObject *(*api_convert_from_void_ptr_and_size)(void *val,
1464
+ Py_ssize_t size);
1465
+ PyObject *(*api_convert_from_const_void_ptr_and_size)(const void *val,
1466
+ Py_ssize_t size);
1467
+ void *(*api_convert_to_void_ptr)(PyObject *obj);
1468
+ int (*api_export_symbol)(const char *name, void *sym);
1469
+ void *(*api_import_symbol)(const char *name);
1470
+ const sipTypeDef *(*api_find_type)(const char *type);
1471
+ int (*api_register_py_type)(PyTypeObject *type);
1472
+ const sipTypeDef *(*api_type_from_py_type_object)(PyTypeObject *py_type);
1473
+ const sipTypeDef *(*api_type_scope)(const sipTypeDef *td);
1474
+ const char *(*api_resolve_typedef)(const char *name);
1475
+ int (*api_register_attribute_getter)(const sipTypeDef *td,
1476
+ sipAttrGetterFunc getter);
1477
+ int (*api_is_api_enabled)(const char *name, int from, int to);
1478
+ sipErrorState (*api_bad_callable_arg)(int arg_nr, PyObject *arg);
1479
+ void *(*api_get_address)(struct _sipSimpleWrapper *w);
1480
+ void (*api_set_destroy_on_exit)(int);
1481
+ int (*api_enable_autoconversion)(const sipTypeDef *td, int enable);
1482
+ void *(*api_get_mixin_address)(struct _sipSimpleWrapper *w,
1483
+ const sipTypeDef *td);
1484
+ PyObject *(*api_convert_from_new_pytype)(void *cpp, PyTypeObject *py_type,
1485
+ sipWrapper *owner, sipSimpleWrapper **selfp, const char *fmt, ...);
1486
+ PyObject *(*api_convert_to_typed_array)(void *data, const sipTypeDef *td,
1487
+ const char *format, size_t stride, Py_ssize_t len, int flags);
1488
+ PyObject *(*api_convert_to_array)(void *data, const char *format,
1489
+ Py_ssize_t len, int flags);
1490
+ int (*api_register_proxy_resolver)(const sipTypeDef *td,
1491
+ sipProxyResolverFunc resolver);
1492
+ PyInterpreterState *(*api_get_interpreter)(void);
1493
+ sipNewUserTypeFunc (*api_set_new_user_type_handler)(const sipTypeDef *,
1494
+ sipNewUserTypeFunc);
1495
+ void (*api_set_type_user_data)(sipWrapperType *, void *);
1496
+ void *(*api_get_type_user_data)(const sipWrapperType *);
1497
+ PyObject *(*api_py_type_dict)(const PyTypeObject *);
1498
+ const char *(*api_py_type_name)(const PyTypeObject *);
1499
+ int (*api_get_method)(PyObject *, sipMethodDef *);
1500
+ PyObject *(*api_from_method)(const sipMethodDef *);
1501
+ int (*api_get_c_function)(PyObject *, sipCFunctionDef *);
1502
+ int (*api_get_date)(PyObject *, sipDateDef *);
1503
+ PyObject *(*api_from_date)(const sipDateDef *);
1504
+ int (*api_get_datetime)(PyObject *, sipDateDef *, sipTimeDef *);
1505
+ PyObject *(*api_from_datetime)(const sipDateDef *, const sipTimeDef *);
1506
+ int (*api_get_time)(PyObject *, sipTimeDef *);
1507
+ PyObject *(*api_from_time)(const sipTimeDef *);
1508
+ int (*api_is_user_type)(const sipWrapperType *);
1509
+ struct _frame *(*api_get_frame)(int);
1510
+ int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
1511
+ PyObject *(*api_unicode_new)(Py_ssize_t, unsigned, int *, void **);
1512
+ void (*api_unicode_write)(int, void *, int, unsigned);
1513
+ void *(*api_unicode_data)(PyObject *, int *, Py_ssize_t *);
1514
+ int (*api_get_buffer_info)(PyObject *, sipBufferInfoDef *);
1515
+ void (*api_release_buffer_info)(sipBufferInfoDef *);
1516
+ PyObject *(*api_get_user_object)(const sipSimpleWrapper *);
1517
+ void (*api_set_user_object)(sipSimpleWrapper *, PyObject *);
1518
+
1519
+ /*
1520
+ * The following are not part of the public API.
1521
+ */
1522
+ int (*api_init_module)(sipExportedModuleDef *client, PyObject *mod_dict);
1523
+ int (*api_parse_args)(PyObject **parseErrp, PyObject *sipArgs,
1524
+ const char *fmt, ...);
1525
+ int (*api_parse_pair)(PyObject **parseErrp, PyObject *arg0, PyObject *arg1,
1526
+ const char *fmt, ...);
1527
+
1528
+ /*
1529
+ * The following are part of the public API.
1530
+ */
1531
+ void (*api_instance_destroyed)(sipSimpleWrapper *sipSelf);
1532
+
1533
+ /*
1534
+ * The following are not part of the public API.
1535
+ */
1536
+ void (*api_no_function)(PyObject *parseErr, const char *func,
1537
+ const char *doc);
1538
+ void (*api_no_method)(PyObject *parseErr, const char *scope,
1539
+ const char *method, const char *doc);
1540
+ void (*api_abstract_method)(const char *classname, const char *method);
1541
+ void (*api_bad_class)(const char *classname);
1542
+ void *(*api_get_cpp_ptr)(sipSimpleWrapper *w, const sipTypeDef *td);
1543
+ void *(*api_get_complex_cpp_ptr)(sipSimpleWrapper *w);
1544
+ PyObject *(*api_is_py_method)(sip_gilstate_t *gil, char *pymc,
1545
+ sipSimpleWrapper *sipSelf, const char *cname, const char *mname);
1546
+ void (*api_call_hook)(const char *hookname);
1547
+ void (*api_end_thread)(void);
1548
+ void (*api_raise_unknown_exception)(void);
1549
+ void (*api_raise_type_exception)(const sipTypeDef *td, void *ptr);
1550
+ int (*api_add_type_instance)(PyObject *dict, const char *name,
1551
+ void *cppPtr, const sipTypeDef *td);
1552
+ void (*api_bad_operator_arg)(PyObject *self, PyObject *arg,
1553
+ sipPySlotType st);
1554
+ PyObject *(*api_pyslot_extend)(sipExportedModuleDef *mod, sipPySlotType st,
1555
+ const sipTypeDef *type, PyObject *arg0, PyObject *arg1);
1556
+ void (*api_add_delayed_dtor)(sipSimpleWrapper *w);
1557
+ char (*api_bytes_as_char)(PyObject *obj);
1558
+ const char *(*api_bytes_as_string)(PyObject *obj);
1559
+ char (*api_string_as_ascii_char)(PyObject *obj);
1560
+ const char *(*api_string_as_ascii_string)(PyObject **obj);
1561
+ char (*api_string_as_latin1_char)(PyObject *obj);
1562
+ const char *(*api_string_as_latin1_string)(PyObject **obj);
1563
+ char (*api_string_as_utf8_char)(PyObject *obj);
1564
+ const char *(*api_string_as_utf8_string)(PyObject **obj);
1565
+ #if defined(HAVE_WCHAR_H)
1566
+ wchar_t (*api_unicode_as_wchar)(PyObject *obj);
1567
+ wchar_t *(*api_unicode_as_wstring)(PyObject *obj);
1568
+ #else
1569
+ int (*api_unicode_as_wchar)(PyObject *obj);
1570
+ int *(*api_unicode_as_wstring)(PyObject *obj);
1571
+ #endif
1572
+ int (*api_deprecated)(const char *classname, const char *method);
1573
+ void (*api_keep_reference)(PyObject *self, int key, PyObject *obj);
1574
+ int (*api_parse_kwd_args)(PyObject **parseErrp, PyObject *sipArgs,
1575
+ PyObject *sipKwdArgs, const char **kwdlist, PyObject **unused,
1576
+ const char *fmt, ...);
1577
+ void (*api_add_exception)(sipErrorState es, PyObject **parseErrp);
1578
+ int (*api_parse_result_ex)(sip_gilstate_t, sipVirtErrorHandlerFunc,
1579
+ sipSimpleWrapper *, PyObject *method, PyObject *res,
1580
+ const char *fmt, ...);
1581
+ void (*api_call_error_handler)(sipVirtErrorHandlerFunc,
1582
+ sipSimpleWrapper *, sip_gilstate_t);
1583
+ int (*api_init_mixin)(PyObject *self, PyObject *args, PyObject *kwds,
1584
+ const sipClassTypeDef *ctd);
1585
+ PyObject *(*api_get_reference)(PyObject *self, int key);
1586
+
1587
+ /*
1588
+ * The following are part of the public API.
1589
+ */
1590
+ int (*api_is_owned_by_python)(sipSimpleWrapper *);
1591
+
1592
+ /*
1593
+ * The following are not part of the public API.
1594
+ */
1595
+ int (*api_is_derived_class)(sipSimpleWrapper *);
1596
+
1597
+ /*
1598
+ * The following may be used by Qt support code but no other handwritten
1599
+ * code.
1600
+ */
1601
+ void (*api_free_sipslot)(sipSlot *slot);
1602
+ int (*api_same_slot)(const sipSlot *sp, PyObject *rxObj, const char *slot);
1603
+ void *(*api_convert_rx)(sipWrapper *txSelf, const char *sigargs,
1604
+ PyObject *rxObj, const char *slot, const char **memberp,
1605
+ int flags);
1606
+ PyObject *(*api_invoke_slot)(const sipSlot *slot, PyObject *sigargs);
1607
+ PyObject *(*api_invoke_slot_ex)(const sipSlot *slot, PyObject *sigargs,
1608
+ int check_receiver);
1609
+ int (*api_save_slot)(sipSlot *sp, PyObject *rxObj, const char *slot);
1610
+ void (*api_clear_any_slot_reference)(sipSlot *slot);
1611
+ int (*api_visit_slot)(sipSlot *slot, visitproc visit, void *arg);
1612
+
1613
+ /*
1614
+ * The following are deprecated parts of the public API.
1615
+ */
1616
+ PyTypeObject *(*api_find_named_enum)(const char *type);
1617
+ const sipMappedType *(*api_find_mapped_type)(const char *type);
1618
+ sipWrapperType *(*api_find_class)(const char *type);
1619
+ sipWrapperType *(*api_map_int_to_class)(int typeInt,
1620
+ const sipIntTypeClassMap *map, int maplen);
1621
+ sipWrapperType *(*api_map_string_to_class)(const char *typeString,
1622
+ const sipStringTypeClassMap *map, int maplen);
1623
+
1624
+ /*
1625
+ * The following are part of the public API.
1626
+ */
1627
+ int (*api_enable_gc)(int enable);
1628
+ void (*api_print_object)(PyObject *o);
1629
+ int (*api_register_event_handler)(sipEventType type, const sipTypeDef *td,
1630
+ void *handler);
1631
+ int (*api_convert_to_enum)(PyObject *obj, const sipTypeDef *td);
1632
+ int (*api_convert_to_bool)(PyObject *obj);
1633
+ int (*api_enable_overflow_checking)(int enable);
1634
+ char (*api_long_as_char)(PyObject *o);
1635
+ signed char (*api_long_as_signed_char)(PyObject *o);
1636
+ unsigned char (*api_long_as_unsigned_char)(PyObject *o);
1637
+ short (*api_long_as_short)(PyObject *o);
1638
+ unsigned short (*api_long_as_unsigned_short)(PyObject *o);
1639
+ int (*api_long_as_int)(PyObject *o);
1640
+ unsigned int (*api_long_as_unsigned_int)(PyObject *o);
1641
+ long (*api_long_as_long)(PyObject *o);
1642
+ #if defined(HAVE_LONG_LONG)
1643
+ PY_LONG_LONG (*api_long_as_long_long)(PyObject *o);
1644
+ unsigned PY_LONG_LONG (*api_long_as_unsigned_long_long)(PyObject *o);
1645
+ #else
1646
+ void *api_long_as_long_long;
1647
+ void *api_long_as_unsigned_long_long;
1648
+ #endif
1649
+
1650
+ /*
1651
+ * The following are not part of the public API.
1652
+ */
1653
+ void (*api_instance_destroyed_ex)(sipSimpleWrapper **sipSelfp);
1654
+
1655
+ /*
1656
+ * The following are part of the public API.
1657
+ */
1658
+ int (*api_convert_from_slice_object)(PyObject *slice, Py_ssize_t length,
1659
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
1660
+ Py_ssize_t *slicelength);
1661
+ size_t (*api_long_as_size_t)(PyObject *o);
1662
+ void (*api_visit_wrappers)(sipWrapperVisitorFunc visitor, void *closure);
1663
+ int (*api_register_exit_notifier)(PyMethodDef *md);
1664
+
1665
+ /*
1666
+ * The following are not part of the public API.
1667
+ */
1668
+ PyObject *(*api_is_py_method_12_8)(sip_gilstate_t *gil, char *pymc,
1669
+ sipSimpleWrapper **sipSelfp, const char *cname, const char *mname);
1670
+ sipExceptionHandler (*api_next_exception_handler)(void **statep);
1671
+
1672
+ /*
1673
+ * The following are part of the public API.
1674
+ */
1675
+ PyObject *(*api_py_type_dict_ref)(PyTypeObject *);
1676
+ } sipAPIDef;
1677
+
1678
+ const sipAPIDef *sip_init_library(PyObject *mod_dict);
1679
+
1680
+
1681
+ /*
1682
+ * The API implementing the optional Qt support.
1683
+ */
1684
+ typedef struct _sipQtAPI {
1685
+ sipTypeDef **qt_qobject;
1686
+ void *(*qt_create_universal_signal)(void *, const char **);
1687
+ void *(*qt_find_universal_signal)(void *, const char **);
1688
+ void *(*qt_create_universal_slot)(struct _sipWrapper *, const char *,
1689
+ PyObject *, const char *, const char **, int);
1690
+ void (*qt_destroy_universal_slot)(void *);
1691
+ void *(*qt_find_slot)(void *, const char *, PyObject *, const char *,
1692
+ const char **);
1693
+ int (*qt_connect)(void *, const char *, void *, const char *, int);
1694
+ int (*qt_disconnect)(void *, const char *, void *, const char *);
1695
+ int (*qt_same_name)(const char *, const char *);
1696
+ sipSlot *(*qt_find_sipslot)(void *, void **);
1697
+ int (*qt_emit_signal)(PyObject *, const char *, PyObject *);
1698
+ int (*qt_connect_py_signal)(PyObject *, const char *, PyObject *,
1699
+ const char *);
1700
+ void (*qt_disconnect_py_signal)(PyObject *, const char *, PyObject *,
1701
+ const char *);
1702
+ } sipQtAPI;
1703
+
1704
+
1705
+ /*
1706
+ * These are flags that can be passed to sipCanConvertToType(),
1707
+ * sipConvertToType() and sipForceConvertToType().
1708
+ */
1709
+ #define SIP_NOT_NONE 0x01 /* Disallow None. */
1710
+ #define SIP_NO_CONVERTORS 0x02 /* Disable any type convertors. */
1711
+
1712
+
1713
+ /*
1714
+ * These are flags that can be passed to sipConvertToArray(). These are held
1715
+ * in sw_flags.
1716
+ */
1717
+ #define SIP_READ_ONLY 0x01 /* The array is read-only. */
1718
+ #define SIP_OWNS_MEMORY 0x02 /* The array owns its memory. */
1719
+
1720
+
1721
+ /*
1722
+ * These are the state flags returned by %ConvertToTypeCode. Note that the
1723
+ * values share the same "flagspace" as the contents of sw_flags.
1724
+ */
1725
+ #define SIP_TEMPORARY 0x01 /* A temporary instance. */
1726
+ #define SIP_DERIVED_CLASS 0x02 /* The instance is derived. */
1727
+
1728
+
1729
+ /*
1730
+ * These flags are specific to the Qt support API.
1731
+ */
1732
+ #define SIP_SINGLE_SHOT 0x01 /* The connection is single shot. */
1733
+
1734
+
1735
+ /*
1736
+ * Useful macros, not part of the public API.
1737
+ */
1738
+
1739
+ /* These are held in sw_flags. */
1740
+ #define SIP_INDIRECT 0x0004 /* If there is a level of indirection. */
1741
+ #define SIP_ACCFUNC 0x0008 /* If there is an access function. */
1742
+ #define SIP_NOT_IN_MAP 0x0010 /* If Python object is not in the map. */
1743
+
1744
+ #if !defined(Py_LIMITED_API)
1745
+ #define SIP_PY_OWNED 0x0020 /* If owned by Python. */
1746
+ #define SIP_SHARE_MAP 0x0040 /* If the map slot might be occupied. */
1747
+ #define SIP_CPP_HAS_REF 0x0080 /* If C/C++ has a reference. */
1748
+ #define SIP_POSSIBLE_PROXY 0x0100 /* If there might be a proxy slot. */
1749
+ #define SIP_ALIAS 0x0200 /* If it is an alias. */
1750
+ #define SIP_CREATED 0x0400 /* If the C/C++ object has been created. */
1751
+
1752
+ #define sipIsDerived(sw) ((sw)->sw_flags & SIP_DERIVED_CLASS)
1753
+ #define sipIsIndirect(sw) ((sw)->sw_flags & SIP_INDIRECT)
1754
+ #define sipIsAccessFunc(sw) ((sw)->sw_flags & SIP_ACCFUNC)
1755
+ #define sipNotInMap(sw) ((sw)->sw_flags & SIP_NOT_IN_MAP)
1756
+ #define sipSetNotInMap(sw) ((sw)->sw_flags |= SIP_NOT_IN_MAP)
1757
+ #define sipIsPyOwned(sw) ((sw)->sw_flags & SIP_PY_OWNED)
1758
+ #define sipSetPyOwned(sw) ((sw)->sw_flags |= SIP_PY_OWNED)
1759
+ #define sipResetPyOwned(sw) ((sw)->sw_flags &= ~SIP_PY_OWNED)
1760
+ #define sipCppHasRef(sw) ((sw)->sw_flags & SIP_CPP_HAS_REF)
1761
+ #define sipSetCppHasRef(sw) ((sw)->sw_flags |= SIP_CPP_HAS_REF)
1762
+ #define sipResetCppHasRef(sw) ((sw)->sw_flags &= ~SIP_CPP_HAS_REF)
1763
+ #define sipPossibleProxy(sw) ((sw)->sw_flags & SIP_POSSIBLE_PROXY)
1764
+ #define sipSetPossibleProxy(sw) ((sw)->sw_flags |= SIP_POSSIBLE_PROXY)
1765
+ #define sipIsAlias(sw) ((sw)->sw_flags & SIP_ALIAS)
1766
+ #define sipWasCreated(sw) ((sw)->sw_flags & SIP_CREATED)
1767
+ #endif
1768
+
1769
+ #define SIP_TYPE_TYPE_MASK 0x0007 /* The type type mask. */
1770
+ #define SIP_TYPE_CLASS 0x0000 /* If the type is a C++ class. */
1771
+ #define SIP_TYPE_NAMESPACE 0x0001 /* If the type is a C++ namespace. */
1772
+ #define SIP_TYPE_MAPPED 0x0002 /* If the type is a mapped type. */
1773
+ #define SIP_TYPE_ENUM 0x0003 /* If the type is a named enum. */
1774
+ #define SIP_TYPE_SCOPED_ENUM 0x0004 /* If the type is a scoped enum. */
1775
+ #define SIP_TYPE_ABSTRACT 0x0008 /* If the type is abstract. */
1776
+ #define SIP_TYPE_SCC 0x0010 /* If the type is subject to sub-class convertors. */
1777
+ #define SIP_TYPE_ALLOW_NONE 0x0020 /* If the type can handle None. */
1778
+ #define SIP_TYPE_STUB 0x0040 /* If the type is a stub. */
1779
+ #define SIP_TYPE_NONLAZY 0x0080 /* If the type has a non-lazy method. */
1780
+ #define SIP_TYPE_SUPER_INIT 0x0100 /* If the instance's super init should be called. */
1781
+ #define SIP_TYPE_LIMITED_API 0x0200 /* Use the limited API. If this is more generally required it may need to be moved to the module definition. */
1782
+
1783
+
1784
+ /*
1785
+ * The following are part of the public API.
1786
+ */
1787
+ #define sipTypeIsClass(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_CLASS)
1788
+ #define sipTypeIsNamespace(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_NAMESPACE)
1789
+ #define sipTypeIsMapped(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_MAPPED)
1790
+ #define sipTypeIsEnum(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_ENUM)
1791
+ #define sipTypeIsScopedEnum(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_SCOPED_ENUM)
1792
+ #define sipTypeAsPyTypeObject(td) ((td)->td_py_type)
1793
+ #define sipTypeName(td) sipNameFromPool((td)->td_module, (td)->td_cname)
1794
+ #define sipTypePluginData(td) ((td)->td_plugin_data)
1795
+
1796
+ /*
1797
+ * These are deprecated.
1798
+ */
1799
+ #define sipClassName(w) PyString_FromString(Py_TYPE(w)->tp_name)
1800
+ #define sipIsExactWrappedType(wt) (sipTypeAsPyTypeObject((wt)->wt_td) == (PyTypeObject *)(wt))
1801
+
1802
+
1803
+ /*
1804
+ * The following are not part of the public API.
1805
+ */
1806
+ #define sipTypeIsAbstract(td) ((td)->td_flags & SIP_TYPE_ABSTRACT)
1807
+ #define sipTypeHasSCC(td) ((td)->td_flags & SIP_TYPE_SCC)
1808
+ #define sipTypeAllowNone(td) ((td)->td_flags & SIP_TYPE_ALLOW_NONE)
1809
+ #define sipTypeIsStub(td) ((td)->td_flags & SIP_TYPE_STUB)
1810
+ #define sipTypeSetStub(td) ((td)->td_flags |= SIP_TYPE_STUB)
1811
+ #define sipTypeHasNonlazyMethod(td) ((td)->td_flags & SIP_TYPE_NONLAZY)
1812
+ #define sipTypeCallSuperInit(td) ((td)->td_flags & SIP_TYPE_SUPER_INIT)
1813
+ #define sipTypeUseLimitedAPI(td) ((td)->td_flags & SIP_TYPE_LIMITED_API)
1814
+
1815
+ /*
1816
+ * Get various names from the string pool for various data types.
1817
+ */
1818
+ #define sipNameFromPool(em, mr) (&((em)->em_strings)[(mr)])
1819
+ #define sipNameOfModule(em) sipNameFromPool((em), (em)->em_name)
1820
+ #define sipPyNameOfContainer(cod, td) sipNameFromPool((td)->td_module, (cod)->cod_name)
1821
+ #define sipPyNameOfEnum(etd) sipNameFromPool((etd)->etd_base.td_module, (etd)->etd_name)
1822
+
1823
+
1824
+ /*
1825
+ * The following are PyQt4-specific extensions. In SIP v5 they will be pushed
1826
+ * out to a plugin supplied by PyQt4.
1827
+ */
1828
+
1829
+ /*
1830
+ * The description of a Qt signal for PyQt4.
1831
+ */
1832
+ typedef struct _pyqt4QtSignal {
1833
+ /* The C++ name and signature of the signal. */
1834
+ const char *signature;
1835
+
1836
+ /* The optional docstring. */
1837
+ const char *docstring;
1838
+
1839
+ /*
1840
+ * If the signal is an overload of regular methods then this points to the
1841
+ * code that implements those methods.
1842
+ */
1843
+ PyMethodDef *non_signals;
1844
+
1845
+ /*
1846
+ * The hack to apply when built against Qt5:
1847
+ *
1848
+ * 0 - no hack
1849
+ * 1 - add an optional None
1850
+ * 2 - add an optional []
1851
+ * 3 - add an optional False
1852
+ */
1853
+ int hack;
1854
+ } pyqt4QtSignal;
1855
+
1856
+
1857
+ /*
1858
+ * This is the PyQt4-specific extension to the generated class type structure.
1859
+ */
1860
+ typedef struct _pyqt4ClassPluginDef {
1861
+ /* A pointer to the QObject sub-class's staticMetaObject class variable. */
1862
+ const void *static_metaobject;
1863
+
1864
+ /*
1865
+ * A set of flags. At the moment only bit 0 is used to say if the type is
1866
+ * derived from QFlags.
1867
+ */
1868
+ unsigned flags;
1869
+
1870
+ /*
1871
+ * The table of signals emitted by the type. These are grouped by signal
1872
+ * name.
1873
+ */
1874
+ const pyqt4QtSignal *qt_signals;
1875
+ } pyqt4ClassPluginDef;
1876
+
1877
+
1878
+ /*
1879
+ * The following are PyQt5-specific extensions. In SIP v5 they will be pushed
1880
+ * out to a plugin supplied by PyQt5.
1881
+ */
1882
+
1883
+ /*
1884
+ * The description of a Qt signal for PyQt5.
1885
+ */
1886
+ typedef int (*pyqt5EmitFunc)(void *, PyObject *);
1887
+
1888
+ typedef struct _pyqt5QtSignal {
1889
+ /* The normalised C++ name and signature of the signal. */
1890
+ const char *signature;
1891
+
1892
+ /* The optional docstring. */
1893
+ const char *docstring;
1894
+
1895
+ /*
1896
+ * If the signal is an overload of regular methods then this points to the
1897
+ * code that implements those methods.
1898
+ */
1899
+ PyMethodDef *non_signals;
1900
+
1901
+ /*
1902
+ * If the signal has optional arguments then this function will implement
1903
+ * emit() for the signal.
1904
+ */
1905
+ pyqt5EmitFunc emitter;
1906
+ } pyqt5QtSignal;
1907
+
1908
+
1909
+ /*
1910
+ * This is the PyQt5-specific extension to the generated class type structure.
1911
+ */
1912
+ typedef struct _pyqt5ClassPluginDef {
1913
+ /* A pointer to the QObject sub-class's staticMetaObject class variable. */
1914
+ const void *static_metaobject;
1915
+
1916
+ /*
1917
+ * A set of flags. At the moment only bit 0 is used to say if the type is
1918
+ * derived from QFlags.
1919
+ */
1920
+ unsigned flags;
1921
+
1922
+ /*
1923
+ * The table of signals emitted by the type. These are grouped by signal
1924
+ * name.
1925
+ */
1926
+ const pyqt5QtSignal *qt_signals;
1927
+
1928
+ /* The name of the interface that the class defines. */
1929
+ const char *qt_interface;
1930
+ } pyqt5ClassPluginDef;
1931
+
1932
+
1933
+ #ifdef __cplusplus
1934
+ }
1935
+ #endif
1936
+
1937
+
1938
+ #endif