updates to the sip files

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2010-12-07 03:18:21 +00:00
parent fcf745d0ca
commit 044a2f2ed1
26 changed files with 2396 additions and 173 deletions

View File

@@ -7,7 +7,7 @@
%Module(name=wxPhoenix._core, use_argument_names=True, language="C++")
{
%AutoPyName(remove_leading="wx")
}
};
%Copying
Copyright: (c) 2010 by Total Control Software
@@ -51,7 +51,6 @@ from _core import *
%End
%Include defs.sip
%Include wxpy_utils.sip
%Include string.sip
@@ -63,6 +62,7 @@ from _core import *
%Include intl.sip
%Include gdiobj.sip
%Include font.sip
%Include region.sip
%Include gdicmn.sip
%Include geometry.sip
%Include object.sip
@@ -70,10 +70,16 @@ from _core import *
%Include tracker.sip
%Include kbdstate.sip
%Include mousestate.sip
%Include tooltip.sip
%Include layout.sip
%Include event.sip
%Include evtloop.sip
%Include apptrait.sip
%Include app.sip
%Include validate.sip
%Include window.sip
%Include toplevel.sip
%ModuleCode
void wxPyCoreModuleInject(PyObject* moduleDict)
@@ -155,20 +161,18 @@ void wxPyCoreModuleInject(PyObject* moduleDict)
//---------------------------------------------------------------------------
%Extract(id=pycode, order=10)
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This code block was included from src/core_ex.py
# A little trick to make 'wx' be a reference to this module so wx.Names can
# be used in the python code here.
import sys as _sys
wx = _sys.modules[__name__]
%End
%Extract(id=pycode)
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This code block was included from src/core_ex.py
# Load version numbers from __version__... Ensure that major and minor
# versions are the same for both wxPython and wxWidgets.
from __version__ import *
__version__ = VERSION_STRING
import _core
@@ -182,22 +186,36 @@ del _core
def version():
"""Returns a string containing version and port info"""
if wx.Platform == '__WXMSW__':
if wx.Port == '__WXMSW__':
port = 'msw'
elif wx.Platform == '__WXMAC__':
if 'wxOSX-carbon' in wx.PlatformInfo:
elif wx.Port == '__WXMAC__':
if 'wxOSX-carbon' in wx.PortInfo:
port = 'osx-carbon'
else:
port = 'osx-cocoa'
elif wx.Platform == '__WXGTK__':
elif wx.Port == '__WXGTK__':
port = 'gtk'
if 'gtk2' in wx.PlatformInfo:
if 'gtk2' in wx.PortInfo:
port = 'gtk2'
else:
port = '?'
port = '???'
return "%s %s" % (wx.VERSION_STRING, port)
def deprecated(func):
def new_func(*args, **kwargs):
import warnings
warnings.warn("Call to deprecated item %s." % func.__name__,
category=DeprecationWarning)
return func(*args, **kwargs)
new_func.__name__ = func.__name__
new_func.__doc__ = func.__doc__
new_func.__dict__.update(func.__dict__)
return new_func
## #----------------------------------------------------------------------------
## class PyDeadObjectError(AttributeError):

View File

@@ -22,7 +22,6 @@
%End
//---------------------------------------------------------------------------
class wxAppConsole : wxEvtHandler
@@ -527,11 +526,17 @@ public:
%Property(name=TopWindow, get=GetTopWindow, set=SetTopWindow)
%TypeCode
void _wxPyApp_MacHideApp(wxPyApp* self, int& _isErr)
{
#ifdef __WXMAC__
self->MacHideApp();
#endif
}
%End
void MacHideApp();
%MethodCode
#ifdef __WXMAC__
sipCpp->MacHideApp();
#endif
_wxPyApp_MacHideApp(sipCpp, sipIsErr);
%End
wxAppAssertMode GetAssertMode();
@@ -746,11 +751,10 @@ logged in on the main display of your Mac."""
def OnPreInit(self):
"""
Things that must be done after _BootstrapApp has done its
thing, but would be nice if they were already done by the time
that OnInit is called.
Things that must be done after _BootstrapApp has done its thing, but
would be nice if they were already done by the time that OnInit is
called.
"""
print 'OnPreInit'
## wx.StockGDI._initStockObjects()
@@ -792,9 +796,9 @@ logged in on the main display of your Mac."""
def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
"""
Set the title, position and/or size of the output window if
the stdio has been redirected. This should be called before
any output would cause the output window to be created.
Set the title, position and/or size of the output window if the stdio
has been redirected. This should be called before any output would
cause the output window to be created.
"""
if self.stdioWin:
if title is not None:
@@ -804,28 +808,15 @@ logged in on the main display of your Mac."""
if size is not None:
self.stdioWin.size = size
## #----------------------------------------------------------------------------
#----------------------------------------------------------------------------
## # TODO: Move this someplace else?
## def deprecated(func):
## def new_func(*args, **kwargs):
## import warnings
## warnings.warn("Call to deprecated function %s." % func.__name__,
## category=DeprecationWarning)
## return func(*args, **kwargs)
## new_func.__name__ = func.__name__
## new_func.__doc__ = func.__doc__
## new_func.__dict__.update(func.__dict__)
## return new_func
## @deprecated
## class PySimpleApp(App):
## """
## This class is deprecated. Please use wx.App isntead.
## """
## def __init__(self, *args, **kw):
## App.__init__(self, *args, **kw)
@deprecated
class PySimpleApp(App):
"""
This class is deprecated. Please use wx.App instead.
"""
def __init__(self, *args, **kw):
App.__init__(self, *args, **kw)
## #----------------------------------------------------------------------------

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxAppTraits /Abstract/

View File

@@ -7,10 +7,9 @@
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
%ModuleCode
#ifdef __WXMAC__
#include <wx/osx/carbon/private.h>
#include <wx/osx/private.h>
#endif
#undef wxTransparentColour
@@ -166,27 +165,39 @@ public:
%Property(name=alpha, get=Alpha)
%TypeCode
wxIntPtr _wxColour_GetPixel(wxColour* self, int& _isErr)
{
return (wxIntPtr)self->GetPixel();
}
%End
wxIntPtr GetPixel();
%MethodCode
sipRes = (wxIntPtr)sipCpp->GetPixel();
sipRes = _wxColour_GetPixel(sipCpp, sipIsErr);
%End
SIP_PYOBJECT Get(bool includeAlpha=true);
%MethodCode
%TypeCode
PyObject* _wxColour_Get(wxColour* self, int& _isErr, bool includeAlpha)
{
int red = -1;
int green = -1;
int blue = -1;
int alpha = wxALPHA_OPAQUE;
if (sipCpp->IsOk()) {
red = sipCpp->Red();
green = sipCpp->Green();
blue = sipCpp->Blue();
alpha = sipCpp->Alpha();
if (self->IsOk()) {
red = self->Red();
green = self->Green();
blue = self->Blue();
alpha = self->Alpha();
}
if (includeAlpha)
sipRes = sipBuildResult(&sipIsErr, "(iiii)", red, green, blue, alpha);
return sipBuildResult(&_isErr, "(iiii)", red, green, blue, alpha);
else
sipRes = sipBuildResult(&sipIsErr, "(iii)", red, green, blue);
return sipBuildResult(&_isErr, "(iii)", red, green, blue);
}
%End
SIP_PYOBJECT Get(bool includeAlpha=true);
%MethodCode
sipRes = _wxColour_Get(sipCpp, sipIsErr, includeAlpha);
%End
%ConvertToTypeCode
@@ -283,7 +294,7 @@ public:
}; // end of class wxColour
%Extract pycode
%Extract(id=pycode)
def _Colour___str__(self):
return str(self.Get())
Colour.__str__ = _Colour___str__
@@ -291,7 +302,7 @@ del _Colour___str__
%End
%Extract pycode
%Extract(id=pycode)
def _Colour___repr__(self):
return "wx.Colour"+str(self.Get())
Colour.__repr__ = _Colour___repr__
@@ -299,7 +310,7 @@ del _Colour___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _Colour___len__(self):
return len(self.Get())
Colour.__len__ = _Colour___len__
@@ -307,7 +318,7 @@ del _Colour___len__
%End
%Extract pycode
%Extract(id=pycode)
def _Colour___nonzero__(self):
return self.IsOk()
Colour.__nonzero__ = _Colour___nonzero__
@@ -315,7 +326,7 @@ del _Colour___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _Colour___reduce__(self):
return (Colour, self.Get())
Colour.__reduce__ = _Colour___reduce__
@@ -323,7 +334,7 @@ del _Colour___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _Colour___getitem__(self, idx):
return self.Get()[idx]
Colour.__getitem__ = _Colour___getitem__
@@ -331,9 +342,9 @@ del _Colour___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _Colour___setitem__(self, idx, val):
if idx == 0: self.red = val
if idx == 0: self.red = val
elif idx == 1: self.green = val
elif idx == 2: self.blue = val
elif idx == 3: self.alpha = val
@@ -343,7 +354,7 @@ del _Colour___setitem__
%End
%Extract pycode
%Extract(id=pycode)
Rect.__safe_for_unpickling__ = True
%End
@@ -363,15 +374,21 @@ const int wxALPHA_TRANSPARENT;
const int wxALPHA_OPAQUE;
wxColour MacThemeColour(int themeBrushID) /Factory/;
%MethodCode
%ModuleCode
wxColour* _MacThemeColour_function(int& _isErr, int themeBrushID)
{
#ifdef __WXMAC__
sipRes = new wxColour(wxMacCreateCGColorFromHITheme(themeBrushID));
return new wxColour(wxMacCreateCGColorFromHITheme(themeBrushID));
#else
wxPyRaiseNotImplemented();
sipIsErr = 1;
sipRes = NULL;
return NULL;
#endif
}
%End
wxColour* MacThemeColour(int themeBrushID) /Factory/;
%MethodCode
sipRes = _MacThemeColour_function(sipIsErr, themeBrushID);
%End
wxColour testColourTypeMap(const wxColour& c);

View File

@@ -7,7 +7,6 @@
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
%ModuleCode
#include <wx/version.h>
@@ -20,23 +19,26 @@
//---------------------------------------------------------------------------
class wxCursor; // forward declaration
// forward declarations
class wxDC;
class wxMenu;
class wxCursor;
class wxBitmap;
class wxWindowList;
class wxSizer;
class wxPalette;
class wxAcceleratorTable;
class wxDropTarget;
class wxCaret;
class wxIcon;
class wxIconBundle;
class wxMenu; // forward declaration
typedef signed char wxInt8 /PyInt/;
typedef unsigned char wxUint8 /PyInt/;
class wxDC; // forward declaration
class wxWindow; // forward declaration
typedef signed char wxInt8;
typedef unsigned char wxUint8;
typedef wxUint8 wxByte;
typedef wxUint8 wxByte /PyInt/;
typedef short wxInt16;
@@ -62,6 +64,8 @@ typedef long wxIntPtr;
typedef unsigned long wxUIntPtr;
typedef unsigned int size_t;
typedef wchar_t wxChar;
typedef wchar_t wxUChar;

View File

@@ -13,7 +13,6 @@
%End
//---------------------------------------------------------------------------
class wxDisplay

View File

@@ -7,7 +7,6 @@
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
%ModuleCode
#if !wxUSE_HOTKEY
@@ -225,22 +224,34 @@ public:
const wxString & string
);
SIP_PYOBJECT GetClientData();
%MethodCode
wxPyClientData* data = (wxPyClientData*)sipCpp->GetClientObject();
%TypeCode
PyObject* _wxCommandEvent_GetClientData(wxCommandEvent* self, int& _isErr)
{
wxPyClientData* data = (wxPyClientData*)self->GetClientObject();
if (data) {
Py_INCREF(data->m_obj);
sipRes = data->m_obj;
return data->m_obj;
} else {
Py_INCREF(Py_None);
sipRes = Py_None;
return Py_None;
}
}
%End
SIP_PYOBJECT GetClientData();
%MethodCode
sipRes = _wxCommandEvent_GetClientData(sipCpp, sipIsErr);
%End
%TypeCode
void _wxCommandEvent_SetClientData(wxCommandEvent* self, int& _isErr, PyObject* clientData)
{
wxPyClientData* data = new wxPyClientData(clientData);
self->SetClientObject(data);
}
%End
void SetClientData(SIP_PYOBJECT clientData);
%MethodCode
wxPyClientData* data = new wxPyClientData(clientData);
sipCpp->SetClientObject(data);
_wxCommandEvent_SetClientData(sipCpp, sipIsErr, clientData);
%End
%Property(name=ClientData, get=GetClientData, set=SetClientData)

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxEventLoopBase /Abstract/

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxFont : wxGDIObject
@@ -55,11 +54,9 @@ public:
int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString & faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT
) /NoDerived/;
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) /NoDerived/;
%MethodCode
// YUCK!
wxFont* font = wxFont::New(pointSize, family, flags, *faceName, encoding);
sipCpp = new sipwxFont(*font);
delete font;
@@ -379,6 +376,23 @@ enum wxFontEncoding
wxFont wxNullFont;
%ModuleCode
wxFont* _FFont_function(int& _isErr, int pointSize, wxFontFamily family, int flags, const wxString* faceName, wxFontEncoding encoding)
{
wxFont* font = wxFont::New(pointSize, family, flags, *faceName, encoding);
return font;
}
%End
wxFont* FFont(
int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) /Factory/;
%MethodCode
sipRes = _FFont_function(sipIsErr, pointSize, family, flags, faceName, encoding);
%End
//---------------------------------------------------------------------------

View File

@@ -7,7 +7,6 @@
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
%ModuleCode
#if !defined(__WXMAC__)
#define wxCURSOR_COPY_ARROW wxCURSOR_ARROW
@@ -62,9 +61,15 @@ public:
int y;
%TypeCode
PyObject* _wxPoint_Get(wxPoint* self, int& _isErr)
{
return sipBuildResult(&_isErr, "(ii)", self->x, self->y);
}
%End
SIP_PYOBJECT Get();
%MethodCode
sipRes = sipBuildResult(&sipIsErr, "(ii)", sipCpp->x, sipCpp->y);
sipRes = _wxPoint_Get(sipCpp, sipIsErr);
%End
%ConvertToTypeCode
@@ -102,7 +107,7 @@ public:
}; // end of class wxPoint
%Extract pycode
%Extract(id=pycode)
def _Point___str__(self):
return str(self.Get())
Point.__str__ = _Point___str__
@@ -110,7 +115,7 @@ del _Point___str__
%End
%Extract pycode
%Extract(id=pycode)
def _Point___repr__(self):
return "wx.Point"+str(self.Get())
Point.__repr__ = _Point___repr__
@@ -118,7 +123,7 @@ del _Point___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _Point___len__(self):
return len(self.Get())
Point.__len__ = _Point___len__
@@ -126,7 +131,7 @@ del _Point___len__
%End
%Extract pycode
%Extract(id=pycode)
def _Point___nonzero__(self):
return self.Get() != (0,0)
Point.__nonzero__ = _Point___nonzero__
@@ -134,7 +139,7 @@ del _Point___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _Point___reduce__(self):
return (Point, self.Get())
Point.__reduce__ = _Point___reduce__
@@ -142,7 +147,7 @@ del _Point___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _Point___getitem__(self, idx):
return self.Get()[idx]
Point.__getitem__ = _Point___getitem__
@@ -150,7 +155,7 @@ del _Point___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _Point___setitem__(self, idx, val):
if idx == 0: self.x = val
elif idx == 1: self.y = val
@@ -160,7 +165,7 @@ del _Point___setitem__
%End
%Extract pycode
%Extract(id=pycode)
Point.__safe_for_unpickling__ = True
%End
@@ -284,9 +289,15 @@ public:
%Property(name=height, get=GetHeight, set=SetHeight)
%TypeCode
PyObject* _wxSize_Get(wxSize* self, int& _isErr)
{
return sipBuildResult(&_isErr, "(ii)", self->GetWidth(), self->GetHeight());
}
%End
SIP_PYOBJECT Get();
%MethodCode
sipRes = sipBuildResult(&sipIsErr, "(ii)", sipCpp->GetWidth(), sipCpp->GetHeight());
sipRes = _wxSize_Get(sipCpp, sipIsErr);
%End
%ConvertToTypeCode
@@ -324,7 +335,7 @@ public:
}; // end of class wxSize
%Extract pycode
%Extract(id=pycode)
def _Size___str__(self):
return str(self.Get())
Size.__str__ = _Size___str__
@@ -332,7 +343,7 @@ del _Size___str__
%End
%Extract pycode
%Extract(id=pycode)
def _Size___repr__(self):
return "wx.Size"+str(self.Get())
Size.__repr__ = _Size___repr__
@@ -340,7 +351,7 @@ del _Size___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _Size___len__(self):
return len(self.Get())
Size.__len__ = _Size___len__
@@ -348,7 +359,7 @@ del _Size___len__
%End
%Extract pycode
%Extract(id=pycode)
def _Size___nonzero__(self):
return self.Get() != (0,0)
Size.__nonzero__ = _Size___nonzero__
@@ -356,7 +367,7 @@ del _Size___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _Size___reduce__(self):
return (Size, self.Get())
Size.__reduce__ = _Size___reduce__
@@ -364,7 +375,7 @@ del _Size___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _Size___getitem__(self, idx):
return self.Get()[idx]
Size.__getitem__ = _Size___getitem__
@@ -372,7 +383,7 @@ del _Size___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _Size___setitem__(self, idx, val):
if idx == 0: self.width = val
elif idx == 1: self.height = val
@@ -382,7 +393,7 @@ del _Size___setitem__
%End
%Extract pycode
%Extract(id=pycode)
Size.__safe_for_unpickling__ = True
%End
@@ -579,10 +590,16 @@ public:
%Property(name=topRight, get=GetTopRight)
%TypeCode
PyObject* _wxRect_Get(wxRect* self, int& _isErr)
{
return sipBuildResult(&_isErr, "(iiii)",
self->x, self->y, self->width, self->height);
}
%End
SIP_PYOBJECT Get();
%MethodCode
sipRes = sipBuildResult(&sipIsErr, "(iiii)",
sipCpp->x, sipCpp->y, sipCpp->width, sipCpp->height);
sipRes = _wxRect_Get(sipCpp, sipIsErr);
%End
%ConvertToTypeCode
@@ -627,7 +644,7 @@ public:
}; // end of class wxRect
%Extract pycode
%Extract(id=pycode)
def _Rect___str__(self):
return str(self.Get())
Rect.__str__ = _Rect___str__
@@ -635,7 +652,7 @@ del _Rect___str__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect___repr__(self):
return "wx.Rect"+str(self.Get())
Rect.__repr__ = _Rect___repr__
@@ -643,7 +660,7 @@ del _Rect___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect___len__(self):
return len(self.Get())
Rect.__len__ = _Rect___len__
@@ -651,7 +668,7 @@ del _Rect___len__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect___nonzero__(self):
return self.Get() != (0,0,0,0)
Rect.__nonzero__ = _Rect___nonzero__
@@ -659,7 +676,7 @@ del _Rect___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect___reduce__(self):
return (Rect, self.Get())
Rect.__reduce__ = _Rect___reduce__
@@ -667,7 +684,7 @@ del _Rect___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect___getitem__(self, idx):
return self.Get()[idx]
Rect.__getitem__ = _Rect___getitem__
@@ -675,7 +692,7 @@ del _Rect___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect___setitem__(self, idx, val):
if idx == 0: self.x = val
elif idx == 1: self.y = val
@@ -687,7 +704,7 @@ del _Rect___setitem__
%End
%Extract pycode
%Extract(id=pycode)
Rect.__safe_for_unpickling__ = True
%End
@@ -737,10 +754,15 @@ public:
double y;
%TypeCode
PyObject* _wxRealPoint_Get(wxRealPoint* self, int& _isErr)
{
return sipBuildResult(&_isErr, "(dd)", self->x, self->y);
}
%End
SIP_PYOBJECT Get();
%MethodCode
sipRes = sipBuildResult(&sipIsErr, "(dd)",
sipCpp->x, sipCpp->y);
sipRes = _wxRealPoint_Get(sipCpp, sipIsErr);
%End
%ConvertToTypeCode
@@ -778,7 +800,7 @@ public:
}; // end of class wxRealPoint
%Extract pycode
%Extract(id=pycode)
def _RealPoint___str__(self):
return str(self.Get())
RealPoint.__str__ = _RealPoint___str__
@@ -786,7 +808,7 @@ del _RealPoint___str__
%End
%Extract pycode
%Extract(id=pycode)
def _RealPoint___repr__(self):
return "wx.RealPoint"+str(self.Get())
RealPoint.__repr__ = _RealPoint___repr__
@@ -794,7 +816,7 @@ del _RealPoint___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _RealPoint___len__(self):
return len(self.Get())
RealPoint.__len__ = _RealPoint___len__
@@ -802,7 +824,7 @@ del _RealPoint___len__
%End
%Extract pycode
%Extract(id=pycode)
def _RealPoint___nonzero__(self):
return self.Get() != (0,0)
RealPoint.__nonzero__ = _RealPoint___nonzero__
@@ -810,7 +832,7 @@ del _RealPoint___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _RealPoint___reduce__(self):
return (Rect, self.Get())
RealPoint.__reduce__ = _RealPoint___reduce__
@@ -818,7 +840,7 @@ del _RealPoint___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _RealPoint___getitem__(self, idx):
return self.Get()[idx]
RealPoint.__getitem__ = _RealPoint___getitem__
@@ -826,7 +848,7 @@ del _RealPoint___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _RealPoint___setitem__(self, idx, val):
if idx == 0: self.x = val
elif idx == 1: self.y = val
@@ -836,7 +858,7 @@ del _RealPoint___setitem__
%End
%Extract pycode
%Extract(id=pycode)
RealPoint.__safe_for_unpickling__ = True
%End

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxGDIObject : wxObject /Abstract/

View File

@@ -13,7 +13,6 @@
%End
//---------------------------------------------------------------------------
class wxPoint2DDouble /PyName=Point2D/
@@ -109,9 +108,15 @@ public:
const wxPoint2DDouble & pt
);
%TypeCode
PyObject* _wxPoint2DDouble_Get(wxPoint2DDouble* self, int& _isErr)
{
return sipBuildResult(&_isErr, "(dd)", self->m_x, self->m_y);
}
%End
SIP_PYOBJECT Get();
%MethodCode
sipRes = sipBuildResult(&sipIsErr, "(dd)", sipCpp->m_x, sipCpp->m_y);
sipRes = _wxPoint2DDouble_Get(sipCpp, sipIsErr);
%End
%ConvertToTypeCode
@@ -149,7 +154,7 @@ public:
}; // end of class wxPoint2DDouble
%Extract pycode
%Extract(id=pycode)
def _Point2D___str__(self):
return str(self.Get())
Point2D.__str__ = _Point2D___str__
@@ -157,7 +162,7 @@ del _Point2D___str__
%End
%Extract pycode
%Extract(id=pycode)
def _Point2D___repr__(self):
return "wx.Point2D"+str(self.Get())
Point2D.__repr__ = _Point2D___repr__
@@ -165,7 +170,7 @@ del _Point2D___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _Point2D___len__(self):
return len(self.Get())
Point2D.__len__ = _Point2D___len__
@@ -173,7 +178,7 @@ del _Point2D___len__
%End
%Extract pycode
%Extract(id=pycode)
def _Point2D___nonzero__(self):
return self.Get() != (0,0)
Point2D.__nonzero__ = _Point2D___nonzero__
@@ -181,7 +186,7 @@ del _Point2D___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _Point2D___reduce__(self):
return (Point2D, self.Get())
Point2D.__reduce__ = _Point2D___reduce__
@@ -189,7 +194,7 @@ del _Point2D___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _Point2D___getitem__(self, idx):
return self.Get()[idx]
Point2D.__getitem__ = _Point2D___getitem__
@@ -197,7 +202,7 @@ del _Point2D___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _Point2D___setitem__(self, idx, val):
if idx == 0: self.x = val
elif idx == 1: self.y = val
@@ -207,7 +212,7 @@ del _Point2D___setitem__
%End
%Extract pycode
%Extract(id=pycode)
Point2D.__safe_for_unpickling__ = True
%End
@@ -433,10 +438,16 @@ public:
const wxRect2DDouble & rect
);
%TypeCode
PyObject* _wxRect2DDouble_Get(wxRect2DDouble* self, int& _isErr)
{
return sipBuildResult(&_isErr, "(dddd)",
self->m_x, self->m_y, self->m_width, self->m_height);
}
%End
SIP_PYOBJECT Get();
%MethodCode
sipRes = sipBuildResult(&sipIsErr, "(dddd)",
sipCpp->m_x, sipCpp->m_y, sipCpp->m_width, sipCpp->m_height);
sipRes = _wxRect2DDouble_Get(sipCpp, sipIsErr);
%End
%ConvertToTypeCode
@@ -481,7 +492,7 @@ public:
}; // end of class wxRect2DDouble
%Extract pycode
%Extract(id=pycode)
def _Rect2D___str__(self):
return str(self.Get())
Rect2D.__str__ = _Rect2D___str__
@@ -489,7 +500,7 @@ del _Rect2D___str__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect2D___repr__(self):
return "wx.Rect2D"+str(self.Get())
Rect2D.__repr__ = _Rect2D___repr__
@@ -497,7 +508,7 @@ del _Rect2D___repr__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect2D___len__(self):
return len(self.Get())
Rect2D.__len__ = _Rect2D___len__
@@ -505,7 +516,7 @@ del _Rect2D___len__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect2D___nonzero__(self):
return self.Get() != (0,0,0,0)
Rect2D.__nonzero__ = _Rect2D___nonzero__
@@ -513,7 +524,7 @@ del _Rect2D___nonzero__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect2D___reduce__(self):
return (Rect2D, self.Get())
Rect2D.__reduce__ = _Rect2D___reduce__
@@ -521,7 +532,7 @@ del _Rect2D___reduce__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect2D___getitem__(self, idx):
return self.Get()[idx]
Rect2D.__getitem__ = _Rect2D___getitem__
@@ -529,7 +540,7 @@ del _Rect2D___getitem__
%End
%Extract pycode
%Extract(id=pycode)
def _Rect2D___setitem__(self, idx, val):
if idx == 0: self.x = val
elif idx == 1: self.y = val
@@ -541,7 +552,7 @@ del _Rect2D___setitem__
%End
%Extract pycode
%Extract(id=pycode)
Rect2D.__safe_for_unpickling__ = True
%End

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct wxLanguageInfo

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxKeyboardState

217
sip/gen/layout.sip Normal file
View File

@@ -0,0 +1,217 @@
//---------------------------------------------------------------------------
// This file is generated by wxPython's SIP generator. Do not edit by hand.
//
// Copyright: (c) 2010 by Total Control Software
// License: wxWindows License
//
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxIndividualLayoutConstraint : wxObject
{
%TypeHeaderCode
#include <wx/layout.h>
%End
public:
wxIndividualLayoutConstraint();
virtual
~wxIndividualLayoutConstraint();
void Set(
wxRelationship rel,
wxWindow * otherW,
wxEdge otherE,
int val = 0,
int margin = wxLAYOUT_DEFAULT_MARGIN
);
void LeftOf(
wxWindow * sibling,
int margin = wxLAYOUT_DEFAULT_MARGIN
);
void RightOf(
wxWindow * sibling,
int margin = wxLAYOUT_DEFAULT_MARGIN
);
void Above(
wxWindow * sibling,
int margin = wxLAYOUT_DEFAULT_MARGIN
);
void Below(
wxWindow * sibling,
int margin = wxLAYOUT_DEFAULT_MARGIN
);
void SameAs(
wxWindow * otherW,
wxEdge edge,
int margin = wxLAYOUT_DEFAULT_MARGIN
);
void PercentOf(
wxWindow * otherW,
wxEdge wh,
int per
);
void Absolute(
int val
);
void Unconstrained();
void AsIs();
wxWindow * GetOtherWindow();
%MethodCode
sipRes = (wxWindow*)sipCpp->GetOtherWindow();
%End
wxEdge GetMyEdge();
void SetEdge(
wxEdge which
);
void SetValue(
int v
);
int GetMargin();
void SetMargin(
int m
);
int GetValue();
int GetPercent();
int GetOtherEdge();
bool GetDone();
void SetDone(
bool d
);
wxRelationship GetRelationship();
void SetRelationship(
wxRelationship r
);
bool ResetIfWin(
wxWindow * otherW
);
bool SatisfyConstraint(
wxLayoutConstraints * constraints,
wxWindow * win
);
int GetEdge(
wxEdge which,
wxWindow * thisWin,
wxWindow * other
);
%Property(name=Done, get=GetDone, set=SetDone)
%Property(name=Margin, get=GetMargin, set=SetMargin)
%Property(name=MyEdge, get=GetMyEdge)
%Property(name=OtherEdge, get=GetOtherEdge)
%Property(name=OtherWindow, get=GetOtherWindow)
%Property(name=Percent, get=GetPercent)
%Property(name=Relationship, get=GetRelationship, set=SetRelationship)
%Property(name=Value, get=GetValue, set=SetValue)
}; // end of class wxIndividualLayoutConstraint
class wxLayoutConstraints : wxObject
{
%TypeHeaderCode
#include <wx/layout.h>
%End
public:
wxLayoutConstraints();
virtual
~wxLayoutConstraints();
wxIndividualLayoutConstraint left;
wxIndividualLayoutConstraint top;
wxIndividualLayoutConstraint right;
wxIndividualLayoutConstraint bottom;
wxIndividualLayoutConstraint width;
wxIndividualLayoutConstraint height;
wxIndividualLayoutConstraint centreX;
wxIndividualLayoutConstraint centreY;
bool SatisfyConstraints(
wxWindow * win,
int * noChanges
);
bool AreSatisfied();
}; // end of class wxLayoutConstraints
enum wxEdge
{
wxLeft,
wxTop,
wxRight,
wxBottom,
wxWidth,
wxHeight,
wxCentre,
wxCenter,
wxCentreX,
wxCentreY
};
enum wxRelationship
{
wxUnconstrained,
wxAsIs,
wxPercentOf,
wxAbove,
wxBelow,
wxLeftOf,
wxRightOf,
wxSameAs,
wxAbsolute
};
const int wxLAYOUT_DEFAULT_MARGIN;
//---------------------------------------------------------------------------

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxMouseState : wxKeyboardState

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxRefCounter
@@ -70,14 +69,26 @@ public:
void UnShare();
%TypeCode
const wxChar* _wxObject_GetClassName(wxObject* self, int& _isErr)
{
return self->GetClassInfo()->GetClassName();
}
%End
const wxChar* GetClassName();
%MethodCode
sipRes = sipCpp->GetClassInfo()->GetClassName();
sipRes = _wxObject_GetClassName(sipCpp, sipIsErr);
%End
%TypeCode
void _wxObject_Destroy(wxObject* self, int& _isErr)
{
delete self;
}
%End
void Destroy() /TranserThis/;
%MethodCode
delete sipCpp;
_wxObject_Destroy(sipCpp, sipIsErr);
%End
}; // end of class wxObject

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxPlatformInfo

256
sip/gen/region.sip Normal file
View File

@@ -0,0 +1,256 @@
//---------------------------------------------------------------------------
// This file is generated by wxPython's SIP generator. Do not edit by hand.
//
// Copyright: (c) 2010 by Total Control Software
// License: wxWindows License
//
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxRegionIterator : wxObject
{
%TypeHeaderCode
#include <wx/region.h>
%End
public:
wxRegionIterator();
wxRegionIterator(
const wxRegion & region
);
wxCoord GetH();
wxCoord GetHeight();
wxRect GetRect();
wxCoord GetW();
wxCoord GetWidth();
wxCoord GetX();
wxCoord GetY();
bool HaveRects();
void Reset();
void Reset(
const wxRegion & region
);
operator bool();
%TypeCode
void _wxRegionIterator_Next(wxRegionIterator* self, int& _isErr)
{
self->operator++();
}
%End
void Next();
%MethodCode
_wxRegionIterator_Next(sipCpp, sipIsErr);
%End
%TypeCode
int _wxRegionIterator___nonzero__(wxRegionIterator* self, int& _isErr)
{
return (int)self->operator bool();
}
%End
int __nonzero__();
%MethodCode
sipRes = _wxRegionIterator___nonzero__(sipCpp, sipIsErr);
%End
%Property(name=H, get=GetH)
%Property(name=Height, get=GetHeight)
%Property(name=Rect, get=GetRect)
%Property(name=W, get=GetW)
%Property(name=Width, get=GetWidth)
%Property(name=X, get=GetX)
%Property(name=Y, get=GetY)
}; // end of class wxRegionIterator
class wxRegion : wxGDIObject
{
%TypeHeaderCode
#include <wx/region.h>
%End
public:
wxRegion();
wxRegion(
wxCoord x,
wxCoord y,
wxCoord width,
wxCoord height
);
wxRegion(
const wxPoint & topLeft,
const wxPoint & bottomRight
);
wxRegion(
const wxRect & rect
);
wxRegion(
const wxRegion & region
);
wxRegion(
size_t n,
const wxPoint * points,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE
);
wxRegion(
const wxBitmap & bmp
);
wxRegion(
const wxBitmap & bmp,
const wxColour & transColour,
int tolerance = 0
);
~wxRegion();
wxRect GetBox();
bool Offset(
wxCoord x,
wxCoord y
);
bool Offset(
const wxPoint & pt
);
void Clear();
wxRegionContain Contains(
wxCoord x,
wxCoord y
);
wxRegionContain Contains(
const wxPoint & pt
);
wxRegionContain Contains(
wxCoord x,
wxCoord y,
wxCoord width,
wxCoord height
);
wxRegionContain Contains(
const wxRect & rect
);
wxBitmap ConvertToBitmap();
bool Intersect(
wxCoord x,
wxCoord y,
wxCoord width,
wxCoord height
);
bool Intersect(
const wxRect & rect
);
bool Intersect(
const wxRegion & region
);
bool IsEmpty();
bool IsEqual(
const wxRegion & region
);
bool Subtract(
const wxRect & rect
);
bool Subtract(
const wxRegion & region
);
bool Union(
wxCoord x,
wxCoord y,
wxCoord width,
wxCoord height
);
bool Union(
const wxRect & rect
);
bool Union(
const wxRegion & region
);
bool Union(
const wxBitmap & bmp
);
bool Union(
const wxBitmap & bmp,
const wxColour & transColour,
int tolerance = 0
);
bool Xor(
wxCoord x,
wxCoord y,
wxCoord width,
wxCoord height
);
bool Xor(
const wxRect & rect
);
bool Xor(
const wxRegion & region
);
%Property(name=Box, get=GetBox)
}; // end of class wxRegion
enum wxRegionContain
{
wxOutRegion,
wxPartRegion,
wxInRegion
};
//---------------------------------------------------------------------------

62
sip/gen/tooltip.sip Normal file
View File

@@ -0,0 +1,62 @@
//---------------------------------------------------------------------------
// This file is generated by wxPython's SIP generator. Do not edit by hand.
//
// Copyright: (c) 2010 by Total Control Software
// License: wxWindows License
//
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxToolTip : wxObject
{
%TypeHeaderCode
#include <wx/tooltip.h>
%End
public:
wxToolTip(
const wxString & tip
);
wxString GetTip();
wxWindow * GetWindow();
void SetTip(
const wxString & tip
);
static
void Enable(
bool flag
);
static
void SetAutoPop(
long msecs
);
static
void SetDelay(
long msecs
);
static
void SetReshow(
long msecs
);
%Property(name=Tip, get=GetTip, set=SetTip)
%Property(name=Window, get=GetWindow)
}; // end of class wxToolTip
//---------------------------------------------------------------------------

269
sip/gen/toplevel.sip Normal file
View File

@@ -0,0 +1,269 @@
//---------------------------------------------------------------------------
// This file is generated by wxPython's SIP generator. Do not edit by hand.
//
// Copyright: (c) 2010 by Total Control Software
// License: wxWindows License
//
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxTopLevelWindow : wxWindow
{
%TypeHeaderCode
#include <wx/toplevel.h>
%End
public:
wxTopLevelWindow();
wxTopLevelWindow(
wxWindow * parent /TranserThis/,
wxWindowID id = wxID_ANY,
const wxString & title = wxEmptyString,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString & name = wxFrameNameStr
);
virtual
~wxTopLevelWindow();
bool Create(
wxWindow * parent /TranserThis/,
wxWindowID id = wxID_ANY,
const wxString & title = wxEmptyString,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString & name = wxFrameNameStr
);
virtual
bool CanSetTransparent();
void CenterOnScreen(
int direction
);
void CentreOnScreen(
int direction = wxBOTH
);
virtual
bool EnableCloseButton(
bool enable = true
);
wxWindow * GetDefaultItem();
wxIcon GetIcon();
const wxIconBundle & GetIcons();
virtual
wxString GetTitle();
virtual
void Iconize(
bool iconize = true
);
virtual
bool IsActive();
virtual
bool IsAlwaysMaximized();
virtual
bool IsFullScreen();
virtual
bool IsIconized();
virtual
bool IsMaximized();
virtual
bool Layout();
virtual
void Maximize(
bool maximize = true
);
virtual
void RequestUserAttention(
int flags = wxUSER_ATTENTION_INFO
);
wxWindow * SetDefaultItem(
wxWindow * win
);
wxWindow * SetTmpDefaultItem(
wxWindow * win
);
wxWindow * GetTmpDefaultItem();
void SetIcon(
const wxIcon & icon
);
virtual
void SetIcons(
const wxIconBundle & icons
);
virtual
void SetMaxSize(
const wxSize & size
);
virtual
void SetMinSize(
const wxSize & size
);
virtual
bool SetShape(
const wxRegion & region
);
virtual
void SetSizeHints(
int minW,
int minH,
int maxW = -1,
int maxH = -1,
int incW = -1,
int incH = -1
);
virtual
void SetSizeHints(
const wxSize & minSize,
const wxSize & maxSize = wxDefaultSize,
const wxSize & incSize = wxDefaultSize
);
virtual
void SetTitle(
const wxString & title
);
virtual
bool SetTransparent(
wxByte alpha
);
virtual
bool ShouldPreventAppExit();
virtual
void OSXSetModified(
bool modified
);
virtual
bool OSXIsModified();
virtual
bool ShowFullScreen(
bool show,
long style = wxFULLSCREEN_ALL
);
static
wxSize GetDefaultSize();
%TypeCode
void _wxTopLevelWindow_MacSetMetalAppearance(wxTopLevelWindow* self, int& _isErr, bool on)
{
int style = self->GetExtraStyle();
if ( on )
style |= wxFRAME_EX_METAL;
else
style &= ~wxFRAME_EX_METAL;
self->SetExtraStyle(style);
}
%End
void MacSetMetalAppearance(bool on);
%MethodCode
_wxTopLevelWindow_MacSetMetalAppearance(sipCpp, sipIsErr, on);
%End
%TypeCode
bool _wxTopLevelWindow_MacGetMetalAppearance(wxTopLevelWindow* self, int& _isErr)
{
return self->GetExtraStyle() & wxFRAME_EX_METAL;
}
%End
bool MacGetMetalAppearance();
%MethodCode
sipRes = _wxTopLevelWindow_MacGetMetalAppearance(sipCpp, sipIsErr);
%End
%TypeCode
bool _wxTopLevelWindow_MacGetUnifiedAppearance(wxTopLevelWindow* self, int& _isErr)
{
return true;
}
%End
bool MacGetUnifiedAppearance();
%MethodCode
sipRes = _wxTopLevelWindow_MacGetUnifiedAppearance(sipCpp, sipIsErr);
%End
%TypeCode
void* _wxTopLevelWindow_MacGetTopLevelWindowRef(wxTopLevelWindow* self, int& _isErr)
{
#ifdef __WXMAC__
return (void*)(self->MacGetTopLevelWindowRef());
#else
return 0;
#endif
}
%End
void* MacGetTopLevelWindowRef();
%MethodCode
sipRes = _wxTopLevelWindow_MacGetTopLevelWindowRef(sipCpp, sipIsErr);
%End
%Property(name=DefaultItem, get=GetDefaultItem, set=SetDefaultItem)
%Property(name=Icon, get=GetIcon, set=SetIcon)
%Property(name=Title, get=GetTitle, set=SetTitle)
%Property(name=TmpDefaultItem, get=GetTmpDefaultItem, set=SetTmpDefaultItem)
%Property(name=OSXModified, get=OSXIsModified, set=OSXSetModified)
}; // end of class wxTopLevelWindow
enum
{
wxUSER_ATTENTION_INFO,
wxUSER_ATTENTION_ERROR
};
enum
{
wxFULLSCREEN_NOMENUBAR,
wxFULLSCREEN_NOTOOLBAR,
wxFULLSCREEN_NOSTATUSBAR,
wxFULLSCREEN_NOBORDER,
wxFULLSCREEN_NOCAPTION,
wxFULLSCREEN_ALL
};
//---------------------------------------------------------------------------

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxTrackable /Abstract/

58
sip/gen/validate.sip Normal file
View File

@@ -0,0 +1,58 @@
//---------------------------------------------------------------------------
// This file is generated by wxPython's SIP generator. Do not edit by hand.
//
// Copyright: (c) 2010 by Total Control Software
// License: wxWindows License
//
// This file will be included by _core.sip
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxValidator : wxEvtHandler
{
%TypeHeaderCode
#include <wx/validate.h>
%End
public:
wxValidator();
virtual
~wxValidator();
virtual
wxObject * Clone();
wxWindow * GetWindow();
void SetWindow(
wxWindow * window
);
virtual
bool TransferFromWindow();
virtual
bool TransferToWindow();
virtual
bool Validate(
wxWindow * parent
);
static
void SuppressBellOnError(
bool suppress = true
);
}; // end of class wxValidator
const wxValidator wxDefaultValidator;
//---------------------------------------------------------------------------

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct wxVideoMode

1273
sip/gen/window.sip Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,6 @@
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxIdManager