36 Commits

Author SHA1 Message Date
lojack5
fa2d1af340 Squash - cleanup imports 2025-03-13 18:35:14 -06:00
lojack5
bca7d10602 Implement hinting for types that are automatically converted
This handles any type with a defined `.convertFromPyObject` set in its
sip generator.
2025-03-13 18:35:13 -06:00
Christian Clauss
25ba122168 Fix typos discovered by codespell 2021-08-07 18:55:49 +02:00
Robin Dunn
92f8cd2d55 Fix lots of misspelled words 2020-07-14 11:38:32 -07:00
Robin Dunn
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Robin Dunn
229870f9c9 Add a __bool__ for every __nonzero__ that doesn't already have one 2018-10-12 23:58:16 -07:00
Robin Dunn
71a3d90e0b Update to current wxWidgets master 2018-10-12 22:59:46 -07:00
Metallicow
c76384d458 Trim trailing whitespace *.py files 2018-01-16 08:47:07 -06:00
Robin Dunn
bae2b7f046 Acquire the GIL in the value type Get() methods 2017-05-09 19:29:14 -07:00
Robin Dunn
efa81882e3 Also allow numpy arrays for sequence conversions to value types 2017-04-17 17:22:50 -07:00
Robin Dunn
52facb4d7f Add a GetIM() method to Colour, Point, Size, Rect and other ‘value’ types.
GetIM() returns a replicant of the original object that is immutable, so it can be used as a dictionary key, or etc., but still gives access to the properties by name, which using the Get() method to get a tuple of the values does not do.
2017-04-14 19:19:26 -07:00
Robin Dunn
708e2487dc Since we know it is a Tuple or List we can use PySequence_Fast_GET_ITEM 2017-04-12 14:32:50 -07:00
Robin Dunn
b01729f4ef Tighten up allowed types in auto sequence conversions
Instead of allowing generic sequences to be convertible to wxPoint, wxSize, and others, explicitly allow only tuples and lists.  This is needed because these types also have methods that make them look like sequences, which meant that you could pass a wxSize where a wxPoint is expected, and so on.

Even worse is nonsense stuff like:

    wx.Point(10,20) == wx.Size(10,20)

evaluating to True.
2017-04-12 13:57:08 -07:00
Robin Dunn
4e38994944 Update copyright in etg 2017-02-13 16:14:55 -08:00
Robin Dunn
84f1f25de1 The GDI objects need to be able to be created using their default dtors before the wx.App object is created, in order for the global StockGDI objects to be able to work correctly. 2017-01-23 14:59:22 -08:00
Robin Dunn
dc73188688 Set a bunch of mustHaveApp flags 2017-01-21 20:13:46 -08:00
Metallicow
ebc8d0d971 trim trailing space etg directory 2016-11-10 12:08:36 -06:00
Robin Dunn
c96a93f4af typo 2016-07-22 20:26:16 -07:00
Robin Dunn
2078c55af7 Use a MappedType for wxIntPtr and wxUIntPtr too. 2016-03-09 20:29:12 -08:00
Robin Dunn
c65a747f2e fix pyArgsString for wx.Colour.Get 2015-03-12 10:15:58 -07:00
Robin Dunn
59f984375f Check if the colour string is not empty before trying to pull something out of it. See #15210.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-18 21:15:40 +00:00
Robin Dunn
6d4555b60f Just return 0 from GetPixel if on wxGTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-02 01:01:17 +00:00
Robin Dunn
35fd2e16bf Update copyright year
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 02:13:03 +00:00
Robin Dunn
9d79e123fa Tweak the deprecation warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-11 05:02:43 +00:00
Robin Dunn
aebd862d14 Provide hints for deprecated items about what should be used instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 05:15:17 +00:00
Robin Dunn
b41df0b779 Many, many (many!) changes needed to build and run the Phoenix extension modules with Python 3. Where possible changes were made such that the code works with both Python 2.7 and 3.2 without conditionals. In general the following types of changes were made:
* Changed imports to use either absolute or explicit relative imports.  Implicit relative imports are no longer allowed.

 * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely.

 * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues.

 * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.)

 * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc.

 * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:28:02 +00:00
Robin Dunn
f1034a164f Return 0 since we know that an existing instance was moved and so it doesn't need to be deleted when done.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-02 21:53:31 +00:00
Robin Dunn
2cbfe087a8 * Add Scrollbar.
* Reorder modules a bit in _core to try to keep declarations before the place where they are used.
* Reorder classes within some etg scripts for same reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-31 02:37:22 +00:00
Robin Dunn
a87c196def Instead of passing sipIsErr into custom functions made for CppMethodDefs and etc. just check PyErr_Occurred after the function returns and then set sipIsErr there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-13 04:58:46 +00:00
Robin Dunn
0c5495a47d Add a deprecated NamedColour, fix a typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 05:30:51 +00:00
Robin Dunn
70467f7621 Add wxStockGDI, use it to delay the initialization of the global stock GDI objects (wx.BLUE_BRUSH, wx.RED, wx.BLACK_PEN, etc.) until the wx.App object is created.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-20 04:33:19 +00:00
Robin Dunn
04f10c5868 Update Phoenix copyright statements to 2011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 01:52:23 +00:00
Robin Dunn
212f1ff9f0 Gobs and gobs of changes, and tons of progress made. Can now create a wx.App, show a wx.Frame, run the MainLoop, bind event handlers and dispatch the events to the handler! YeeHa!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 08:08:24 +00:00
Robin Dunn
9a7f1269c1 Generate CppMethods as a separate function that is called from the wrapper, instead of embedding it in the wrapper itself. This helps us be less SIP-specific and also be able to do things like 'return' the value and use 'self->' instead of having to use variable names that make less sense.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-07 02:58:21 +00:00
Robin Dunn
833fa43787 A bit of refactoring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-28 03:43:30 +00:00
Robin Dunn
96717983ad A boatload of changes and additions, all my Phoenix work for the past few days. Lots of lower level classes are wrapped, wxApp is working up through OnInit, plus there's a good start on some unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-27 08:53:17 +00:00