(WXPLAT, None),
('WXUSINGDLL', '1'),
- ('SWIG_GLOBAL', None),
+ ('SWIG_TYPE_TABLE', 'wxPython_type_table'),
('WXP_USE_THREAD', '1'),
]
elif os.name == 'posix':
WXDIR = '..'
includes = ['include', 'src']
- defines = [('SWIG_GLOBAL', None),
+ defines = [('SWIG_TYPE_TABLE', 'wxPython_type_table'),
('HAVE_CONFIG_H', None),
('WXP_USE_THREAD', '1'),
]
'-I' + opj(WXPY_SRC, 'src'),
'-D'+WXPLAT,
- '-noruntime'
]
if UNICODE:
swig_args.append('-DwxUSE_UNICODE')
swig_deps = [ opj(WXPY_SRC, 'src/my_typemaps.i'),
- opj(WXPY_SRC, 'src/my_fragments.i'),
- opj(WXPY_SRC, 'src/common.swg'),
- opj(WXPY_SRC, 'src/pyrun.swg'),
- opj(WXPY_SRC, 'src/python.swg'),
+ opj(WXPY_SRC, 'src/pyfragments.swg'),
]
depends = [ #'include/wx/wxPython/wxPython.h',
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
const wxString& name = wxPyDynamicSashNameStr);
- %name(PreDynamicSashWindow)wxDynamicSashWindow();
+ %RenameCtor(PreDynamicSashWindow, wxDynamicSashWindow());
bool Create(wxWindow *parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
MustHaveApp(wxPyTreeCompanionWindow);
-%name(TreeCompanionWindow) class wxPyTreeCompanionWindow: public wxWindow
+%rename(TreeCompanionWindow) wxPyTreeCompanionWindow;
+class wxPyTreeCompanionWindow: public wxWindow
{
public:
%pythonAppend wxPyTreeCompanionWindow "self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow)"
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
- %name(PreLEDNumberCtrl) wxLEDNumberCtrl();
+ %RenameCtor(PreLEDNumberCtrl, wxLEDNumberCtrl());
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
MustHaveApp(wxPyTreeListCtrl);
-%name(TreeListCtrl) class wxPyTreeListCtrl : public wxControl
+%rename(TreeListCtrl) wxPyTreeListCtrl;
+class wxPyTreeListCtrl : public wxControl
{
public:
%pythonAppend wxPyTreeListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl)"
long style = wxTR_DEFAULT_STYLE,
const wxValidator &validator = wxDefaultValidator,
const wxString& name = wxPyTreeListCtrlNameStr );
- %name(PreTreeListCtrl)wxPyTreeListCtrl();
+ %RenameCtor(PreTreeListCtrl, wxPyTreeListCtrl());
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
// void AddColumn(const wxString& text,
// size_t width,
// wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT);
- %name(AddColumnInfo) void AddColumn(const wxTreeListColumnInfo& col);
+ %Rename(AddColumnInfo, void, AddColumn(const wxTreeListColumnInfo& col));
// inserts a column before the given one
void InsertColumn(size_t before, const wxString& text);
- %name(InsertColumnInfo) void InsertColumn(size_t before, const wxTreeListColumnInfo& col);
+ %Rename(InsertColumnInfo, void, InsertColumn(size_t before, const wxTreeListColumnInfo& col));
// deletes the given column - does not delete the corresponding column
// of each item
wxPyTreeItemData *data = NULL);
// insert a new item before the one with the given index
- %name(InsertItemBefore)
- wxTreeItemId InsertItem(const wxTreeItemId& parent,
+ %Rename(InsertItemBefore,
+ wxTreeItemId, InsertItem(const wxTreeItemId& parent,
size_t index,
const wxString& text,
int image = -1, int selectedImage = -1,
- wxPyTreeItemData *data = NULL);
+ wxPyTreeItemData *data = NULL));
// insert a new item in as the last child of the parent
wxTreeItemId AppendItem(const wxTreeItemId& parent,
const wxPalette& palette = wxNullPalette);
%pythonAppend wxGLCanvas "val._setOORInfo(val)"
- %name(GLCanvasWithContext)
+ %RenameCtor(GLCanvasWithContext,
wxGLCanvas( wxWindow *parent,
const wxGLContext *shared = NULL,
wxWindowID id = -1,
long style = 0,
const wxString& name = wxPyGLCanvasNameStr,
int *attribList = NULL,
- const wxPalette& palette = wxNullPalette );
+ const wxPalette& palette = wxNullPalette ));
void SetCurrent();
bool GoForward();
bool GoHome();
bool GoSearch();
- %name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
+ %Rename(RefreshPage, bool, Refresh(wxIEHtmlRefreshLevel level));
bool Stop();
};
}
}
- %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
+ %Rename(AddSimpleConstraint, wxOGLConstraint*, AddConstraint(int type,
wxPyShape *constraining,
- wxPyShape *constrained);
+ wxPyShape *constrained));
void CalculateSize();
bool ContainsDivision(wxPyDivisionShape *division);
bool ClearArrow(const wxString& name);
void ClearArrowsAtPosition(int position = -1);
void DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset);
- %name(DeleteArrowHeadId)bool DeleteArrowHead(long arrowId);
+ %Rename(DeleteArrowHeadId, bool, DeleteArrowHead(long arrowId));
bool DeleteArrowHead(int position, const wxString& name);
bool DeleteLineControlPoint();
void DrawArrows(wxDC& dc);
void DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
void EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
- %name(FindArrowHeadId)wxArrowHead * FindArrowHead(long arrowId);
+ %Rename(FindArrowHeadId, wxArrowHead *, FindArrowHead(long arrowId));
wxArrowHead * FindArrowHead(int position, const wxString& name);
void FindLineEndPoints(double *OUTPUT, double *OUTPUT,
double *OUTPUT, double *OUTPUT);
inline wxPyCoreAPI* wxPyGetCoreAPIPtr()
{
if (wxPyCoreAPIPtr == NULL) wxPyCoreAPI_IMPORT();
- // wxASSERT_MSW(wxPyCoreAPIPtr != NULL, wxT("wxPyCoreAPIPtr is NULL!!!")); // uncomment when needed for debugging
+ // wxASSERT_MSG(wxPyCoreAPIPtr != NULL, wxT("wxPyCoreAPIPtr is NULL!!!")); // uncomment when needed for debugging
return wxPyCoreAPIPtr;
}
// via the API pointer retrieved above. TODO: Should these be made into
// inline fucntions?
-#define SWIG_Python_TypeRegister(a) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeRegister(a))
-#define SWIG_Python_TypeCheck(a,b) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeCheck(a,b))
-#define SWIG_Python_TypeCast(a,b) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeCast(a,b))
-#define SWIG_Python_TypeDynamicCast(a,b) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeDynamicCast(a,b))
-#define SWIG_Python_TypeName(a) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeName(a))
-#define SWIG_Python_TypeQuery(a) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeQuery(a))
-#define SWIG_Python_TypeClientData(a,b) (wxPyGetCoreAPIPtr()->p_SWIG_Python_TypeClientData(a,b))
-#define SWIG_Python_newvarlink() (wxPyGetCoreAPIPtr()->p_SWIG_Python_newvarlink())
-#define SWIG_Python_addvarlink(a,b,c,d) (wxPyGetCoreAPIPtr()->p_SWIG_Python_addvarlink(a,b,c,d))
-#define SWIG_Python_ConvertPtr(a,b,c,d) (wxPyGetCoreAPIPtr()->p_SWIG_Python_ConvertPtr(a,b,c,d))
-#define SWIG_Python_ConvertPacked(a,b,c,d,e) (wxPyGetCoreAPIPtr()->p_SWIG_Python_ConvertPacked(a,b,c,d,e))
-#define SWIG_Python_PackData(a,b,c) (wxPyGetCoreAPIPtr()->p_SWIG_Python_PackData(a,b,c))
-#define SWIG_Python_UnpackData(a,b,c) (wxPyGetCoreAPIPtr()->p_SWIG_Python_UnpackData(a,b,c))
-#define SWIG_Python_NewPointerObj(a,b,c) (wxPyGetCoreAPIPtr()->p_SWIG_Python_NewPointerObj(a,b,c))
-#define SWIG_Python_NewPackedObj(a,b,c) (wxPyGetCoreAPIPtr()->p_SWIG_Python_NewPackedObj(a,b,c))
-#define SWIG_Python_InstallConstants(a,b) (wxPyGetCoreAPIPtr()->p_SWIG_Python_InstallConstants(a,b))
-#define SWIG_Python_MustGetPtr(a,b,c,d) (wxPyGetCoreAPIPtr()->p_SWIG_Python_MustGetPtr(a,b,c,d))
-
#define wxPyCheckSwigType(a) (wxPyGetCoreAPIPtr()->p_wxPyCheckSwigType(a))
#define wxPyConstructObject(a,b,c) (wxPyGetCoreAPIPtr()->p_wxPyConstructObject(a,b,c))
#define wxPyConvertSwigPtr(a,b,c) (wxPyGetCoreAPIPtr()->p_wxPyConvertSwigPtr(a,b,c))
// in another shared library.
class wxPyCallbackHelper;
-struct swig_type_info;
-struct swig_const_info;
-
-// Make SunCC happy and make typedef's for these that are extern "C"
-typedef swig_type_info* (*p_SWIG_Python_TypeRegister_t)(swig_type_info *);
-typedef swig_type_info* (*p_SWIG_Python_TypeCheck_t)(char *c, swig_type_info *);
-typedef void* (*p_SWIG_Python_TypeCast_t)(swig_type_info *, void *);
-typedef swig_type_info* (*p_SWIG_Python_TypeDynamicCast_t)(swig_type_info *, void **);
-typedef const char* (*p_SWIG_Python_TypeName_t)(const swig_type_info *);
-typedef const char * (*p_SWIG_Python_TypePrettyName_t)(const swig_type_info *);
-typedef swig_type_info* (*p_SWIG_Python_TypeQuery_t)(const char *);
-typedef void (*p_SWIG_Python_TypeClientData_t)(swig_type_info *, void *);
-typedef PyObject* (*p_SWIG_Python_newvarlink_t)(void);
-typedef void (*p_SWIG_Python_addvarlink_t)(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-typedef int (*p_SWIG_Python_ConvertPtr_t)(PyObject *, void **, swig_type_info *, int);
-typedef int (*p_SWIG_Python_ConvertPacked_t)(PyObject *, void *, int sz, swig_type_info *, int);
-typedef char* (*p_SWIG_Python_PackData_t)(char *c, void *, int);
-typedef char* (*p_SWIG_Python_UnpackData_t)(char *c, void *, int);
-typedef PyObject* (*p_SWIG_Python_NewPointerObj_t)(void *, swig_type_info *,int own);
-typedef PyObject* (*p_SWIG_Python_NewPackedObj_t)(void *, int sz, swig_type_info *);
-typedef void (*p_SWIG_Python_InstallConstants_t)(PyObject *d, swig_const_info constants[]);
-typedef void* (*p_SWIG_Python_MustGetPtr_t)(PyObject *, swig_type_info *, int, int);
-
struct wxPyCoreAPI {
- p_SWIG_Python_TypeRegister_t p_SWIG_Python_TypeRegister;
- p_SWIG_Python_TypeCheck_t p_SWIG_Python_TypeCheck;
- p_SWIG_Python_TypeCast_t p_SWIG_Python_TypeCast;
- p_SWIG_Python_TypeDynamicCast_t p_SWIG_Python_TypeDynamicCast;
- p_SWIG_Python_TypeName_t p_SWIG_Python_TypeName;
- p_SWIG_Python_TypePrettyName_t p_SWIG_Python_TypePrettyName;
- p_SWIG_Python_TypeQuery_t p_SWIG_Python_TypeQuery;
- p_SWIG_Python_TypeClientData_t p_SWIG_Python_TypeClientData;
- p_SWIG_Python_newvarlink_t p_SWIG_Python_newvarlink;
- p_SWIG_Python_addvarlink_t p_SWIG_Python_addvarlink;
- p_SWIG_Python_ConvertPtr_t p_SWIG_Python_ConvertPtr;
- p_SWIG_Python_ConvertPacked_t p_SWIG_Python_ConvertPacked;
- p_SWIG_Python_PackData_t p_SWIG_Python_PackData;
- p_SWIG_Python_UnpackData_t p_SWIG_Python_UnpackData;
- p_SWIG_Python_NewPointerObj_t p_SWIG_Python_NewPointerObj;
- p_SWIG_Python_NewPackedObj_t p_SWIG_Python_NewPackedObj;
- p_SWIG_Python_InstallConstants_t p_SWIG_Python_InstallConstants;
- p_SWIG_Python_MustGetPtr_t p_SWIG_Python_MustGetPtr;
-
bool (*p_wxPyCheckSwigType)(const wxChar* className);
PyObject* (*p_wxPyConstructObject)(void* ptr, const wxChar* className, int setThisOwn);
bool (*p_wxPyConvertSwigPtr)(PyObject* obj, void **ptr, const wxChar* className);
ext = Extension('_core_', ['src/helpers.cpp',
- 'src/libpy.c',
] + rc_file + swig_sources,
include_dirs = includes,
MustHaveApp(wxPyArtProvider::GetBitmap);
MustHaveApp(wxPyArtProvider::GetIcon);
-%name(ArtProvider) class wxPyArtProvider /*: public wxObject*/
+%rename(ArtProvider) wxPyArtProvider;
+class wxPyArtProvider /*: public wxObject*/
{
public:
%extend {
DocStr(wxBitmap(PyObject* listOfStrings),
"Construct a Bitmap from a list of strings formatted as XPM data.", "");
- %name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) {
+
+ %RenameCtor(BitmapFromXPMData, wxBitmap(PyObject* listOfStrings))
+ {
char** cArray = NULL;
wxBitmap* bmp;
function for monochrome bitmaps (depth 1) in portable programs: in
this case the bits parameter should contain an XBM image. For other
bit depths, the behaviour is platform dependent.", "");
- %name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) {
+
+ %RenameCtor(BitmapFromBits, wxBitmap(PyObject* bits, int width, int height, int depth=1 ))
+ {
char* buf;
int length;
PyString_AsStringAndSize(bits, &buf, &length);
if (! swigType) {
// it wasn't in the cache, so look it up from SWIG
name.Append(wxT(" *"));
- swigType = SWIG_Python_TypeQuery(name.mb_str());
+ swigType = SWIG_TypeQuery(name.mb_str());
// if it still wasn't found, try looking for a mapped name
if (!swigType) {
(char*)(const char*)name.mbc_str())) != NULL) {
name = wxString(PyString_AsString(item), *wxConvCurrent);
name.Append(wxT(" *"));
- swigType = SWIG_Python_TypeQuery(name.mb_str());
+ swigType = SWIG_TypeQuery(name.mb_str());
}
}
if (swigType) {
wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyConvertSwigPtr"));
#ifdef SWIG_COBJECT_TYPES
- robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) swigType->name, NULL);
+ robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name);
#else
{
char result[1024];
- char *r = result;
- *(r++) = '_';
- r = SWIG_Python_PackData(r, &ptr, sizeof(void *));
- strcpy(r, swigType->name);
- robj = PyString_FromString(result);
- }
+ robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ?
+ PyString_FromString(result) : 0;
+ }
#endif
return robj;
// even if they are located in another shared library.
static wxPyCoreAPI API = {
- (p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister,
- (p_SWIG_Python_TypeCheck_t)SWIG_Python_TypeCheck,
- (p_SWIG_Python_TypeCast_t)SWIG_Python_TypeCast,
- (p_SWIG_Python_TypeDynamicCast_t)SWIG_Python_TypeDynamicCast,
- (p_SWIG_Python_TypeName_t)SWIG_Python_TypeName,
- (p_SWIG_Python_TypePrettyName_t)SWIG_Python_TypePrettyName,
- (p_SWIG_Python_TypeQuery_t)SWIG_Python_TypeQuery,
- (p_SWIG_Python_TypeClientData_t)SWIG_Python_TypeClientData,
- (p_SWIG_Python_newvarlink_t)SWIG_Python_newvarlink,
- (p_SWIG_Python_addvarlink_t)SWIG_Python_addvarlink,
- (p_SWIG_Python_ConvertPtr_t)SWIG_Python_ConvertPtr,
- (p_SWIG_Python_ConvertPacked_t)SWIG_Python_ConvertPacked,
- (p_SWIG_Python_PackData_t)SWIG_Python_PackData,
- (p_SWIG_Python_UnpackData_t)SWIG_Python_UnpackData,
- (p_SWIG_Python_NewPointerObj_t)SWIG_Python_NewPointerObj,
- (p_SWIG_Python_NewPackedObj_t)SWIG_Python_NewPackedObj,
- (p_SWIG_Python_InstallConstants_t)SWIG_Python_InstallConstants,
- (p_SWIG_Python_MustGetPtr_t)SWIG_Python_MustGetPtr,
-
wxPyCheckSwigType,
wxPyConstructObject,
wxPyConvertSwigPtr,
// %extend {
// DocStr(wxCursor,
// "");
-// %name(CursorFromBits) wxCursor(PyObject* bits, int width, int height,
+// %RenameCtor(CursorFromBits, wxCursor(PyObject* bits, int width, int height,
// int hotSpotX=-1, int hotSpotY=-1,
-// PyObject* maskBits=NULL) {
+// PyObject* maskBits=NULL))
+// {
// char* bitsbuf;
// char* maskbuf = NULL;
// int length;
// returns the number of days in this year (356 or 355 for Gregorian
// calendar usually :-)
- %name(GetNumberOfDaysinYear)
- static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian);
+ %Rename(GetNumberOfDaysinYear,
+ static wxDateTime_t, GetNumberOfDays(int year, Calendar cal = Gregorian));
// get the number of the days in the given month (default value for
// the year means the current one)
- %name(GetNumberOfDaysInMonth)
- static wxDateTime_t GetNumberOfDays(Month month,
+ %Rename(GetNumberOfDaysInMonth,
+ static wxDateTime_t, GetNumberOfDays(Month month,
int year = Inv_Year,
- Calendar cal = Gregorian);
+ Calendar cal = Gregorian));
// get the full (default) or abbreviated month name in the current
// locale, returns empty string on error
// constructors
wxDateTime();
- %name(DateTimeFromTimeT)wxDateTime(time_t timet);
- %name(DateTimeFromJDN)wxDateTime(double jdn);
- %name(DateTimeFromHMS)wxDateTime(wxDateTime_t hour,
+ %RenameCtor(DateTimeFromTimeT, wxDateTime(time_t timet));
+ %RenameCtor(DateTimeFromJDN, wxDateTime(double jdn));
+ %RenameCtor(DateTimeFromHMS, wxDateTime(wxDateTime_t hour,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
- %name(DateTimeFromDMY)wxDateTime(wxDateTime_t day,
+ wxDateTime_t millisec = 0));
+ %RenameCtor(DateTimeFromDMY, wxDateTime(wxDateTime_t day,
Month month = Inv_Month,
int year = Inv_Year,
wxDateTime_t hour = 0,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
+ wxDateTime_t millisec = 0));
~wxDateTime();
wxDateTime& SetToCurrent();
// set to given time_t value
- %name(SetTimeT)wxDateTime& Set(time_t timet);
+ %Rename(SetTimeT, wxDateTime&, Set(time_t timet));
// set to given JDN (beware of rounding errors)
- %name(SetJDN)wxDateTime& Set(double jdn);
+ %Rename(SetJDN, wxDateTime&, Set(double jdn));
// set to given time, date = today
- %name(SetHMS)wxDateTime& Set(wxDateTime_t hour,
+ %Rename(SetHMS, wxDateTime&, Set(wxDateTime_t hour,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
+ wxDateTime_t millisec = 0));
// from separate values for each component with explicit date
// (defaults for month and year are the current values)
// arithmetics with dates (see also below for more operators)
// add a time span (positive or negative)
- %name(AddTS) wxDateTime& Add(const wxTimeSpan& diff);
+ %Rename(AddTS, wxDateTime&, Add(const wxTimeSpan& diff));
// add a date span (positive or negative)
- %name(AddDS) wxDateTime& Add(const wxDateSpan& diff);
+ %Rename(AddDS, wxDateTime&, Add(const wxDateSpan& diff));
// subtract a time span (positive or negative)
- %name(SubtractTS) wxDateTime& Subtract(const wxTimeSpan& diff);
+ %Rename(SubtractTS, wxDateTime&, Subtract(const wxTimeSpan& diff));
// subtract a date span (positive or negative)
- %name(SubtractDS) wxDateTime& Subtract(const wxDateSpan& diff);
+ %Rename(SubtractDS, wxDateTime&, Subtract(const wxDateSpan& diff));
// return the difference between two dates
wxTimeSpan Subtract(const wxDateTime& dt) const;
find colour borders if the pixels do not match the colour
exactly. However the function will still return true.", "");
bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE);
- %name(FloodFillPoint) bool FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE);
+ %Rename(FloodFillPoint, bool, FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE));
DocStr(
the line and is not drawn by this function (this is consistent with
the behaviour of many other toolkits).", "");
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
- %name(DrawLinePoint) void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
+ %Rename(DrawLinePoint, void, DrawLine(const wxPoint& pt1, const wxPoint& pt2));
DocStr(
horizontal line the height and width of the window, centred on the
given point.", "");
void CrossHair(wxCoord x, wxCoord y);
- %name(CrossHairPoint) void CrossHair(const wxPoint& pt);
+ %Rename(CrossHairPoint, void, CrossHair(const wxPoint& pt));
DocStr(
The arc is drawn in an anticlockwise direction from the start point to
the end point.", "");
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc);
- %name(DrawArcPoint) void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center);
+ %Rename(DrawArcPoint, void, DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center));
DocStr(
DrawCheckMark,
"Draws a check mark inside the given rectangle.", "");
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(DrawCheckMarkRect) void DrawCheckMark(const wxRect& rect);
+ %Rename(DrawCheckMarkRect, void, DrawCheckMark(const wxRect& rect));
DocStr(
DrawEllipticArc,
circle). Positive values mean counter-clockwise motion. If start is
equal to end, a complete ellipse will be drawn.", "");
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double start, double end);
- %name(DrawEllipticArcPointSize) void DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end);
+ %Rename(DrawEllipticArcPointSize, void, DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end));
DocStr(
DrawPoint,
"Draws a point using the current pen.", "");
void DrawPoint(wxCoord x, wxCoord y);
- %name(DrawPointPoint) void DrawPoint(const wxPoint& pt);
+ %Rename(DrawPointPoint, void, DrawPoint(const wxPoint& pt));
DocStr(
size. The current pen is used for the outline and the current brush
for filling the shape.", "");
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(DrawRectangleRect)void DrawRectangle(const wxRect& rect);
- %name(DrawRectanglePointSize) void DrawRectangle(const wxPoint& pt, const wxSize& sz);
+ %Rename(DrawRectangleRect,void, DrawRectangle(const wxRect& rect));
+ %Rename(DrawRectanglePointSize, void, DrawRectangle(const wxPoint& pt, const wxSize& sz));
DocStr(
the rectangle, and also avoids the strange effects X produces when the
corners are too big for the rectangle.", "");
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius);
- %name(DrawRoundedRectangleRect) void DrawRoundedRectangle(const wxRect& r, double radius);
- %name(DrawRoundedRectanglePointSize) void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius);
+ %Rename(DrawRoundedRectangleRect, void, DrawRoundedRectangle(const wxRect& r, double radius));
+ %Rename(DrawRoundedRectanglePointSize, void, DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius));
DocStr(
:see: `DrawEllipse`");
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
- %name(DrawCirclePoint) void DrawCircle(const wxPoint& pt, wxCoord radius);
+ %Rename(DrawCirclePoint, void, DrawCircle(const wxPoint& pt, wxCoord radius));
DocStr(
:see: `DrawCircle`");
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(DrawEllipseRect) void DrawEllipse(const wxRect& rect);
- %name(DrawEllipsePointSize) void DrawEllipse(const wxPoint& pt, const wxSize& sz);
+ %Rename(DrawEllipseRect, void, DrawEllipse(const wxRect& rect));
+ %Rename(DrawEllipsePointSize, void, DrawEllipse(const wxPoint& pt, const wxSize& sz));
DocStr(
PostScript). This can be the simplest way of drawing bitmaps on a
window.", "");
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
- %name(DrawIconPoint) void DrawIcon(const wxIcon& icon, const wxPoint& pt);
+ %Rename(DrawIconPoint, void, DrawIcon(const wxIcon& icon, const wxPoint& pt));
DocStr(
:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`");
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false);
- %name(DrawBitmapPoint) void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false);
+ %Rename(DrawBitmapPoint, void, DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false));
DocStr(
:see: `DrawRotatedText`");
void DrawText(const wxString& text, wxCoord x, wxCoord y);
- %name(DrawTextPoint) void DrawText(const wxString& text, const wxPoint& pt);
+ %Rename(DrawTextPoint, void, DrawText(const wxString& text, const wxPoint& pt));
DocStr(
:see: `DrawText`");
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
- %name(DrawRotatedTextPoint) void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle);
+ %Rename(DrawRotatedTextPoint, void, DrawRotatedText(const wxString& text, const wxPoint& pt, double angle));
DocDeclStr(
:see: `DestroyClippingRegion`, `wx.Region`");
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(SetClippingRegionPointSize) void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
- %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
- %name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
+ %Rename(SetClippingRegionPointSize, void, SetClippingRegion(const wxPoint& pt, const wxSize& sz));
+ %Rename(SetClippingRegionAsRegion, void, SetClippingRegion(const wxRegion& region));
+ %Rename(SetClippingRect, void, SetClippingRegion(const wxRect& rect));
public:
%pythonAppend wxBufferedDC
"self.__dc = args[0] # save a ref so the other dc will not be deleted before self";
+
%nokwargs wxBufferedDC;
DocStr(
// // TODO: Keep this one too?
// %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area )
// "val.__dc = args[0] # save a ref so the other dc will not be deleted before self";
-// %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area );
+// %RenameCtor(BufferedDCInternalBuffer, wxBufferedDC( wxDC *dc, const wxSize &area ));
// The buffer is blit to the real DC when the BufferedDC is destroyed.
class wxPrinterDC : public wxDC {
public:
wxPrinterDC(const wxPrintData& printData);
-// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
-// const wxString& device,
-// const wxString& output,
-// bool interactive = true,
-// int orientation = wxPORTRAIT);
};
#else
wxPrinterDC(const wxPrintData&)
{ wxPyRaiseNotImplemented(); }
-// wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
-// { wxPyRaiseNotImplemented(); }
};
%}
class wxPrinterDC : public wxDC {
public:
wxPrinterDC(const wxPrintData& printData);
-// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
-// const wxString& device,
-// const wxString& output,
-// bool interactive = true,
-// int orientation = wxPORTRAIT);
};
#endif
%define MAKE_CONST_WXSTRING(strname)
%{ static const wxString wxPy##strname(wx##strname); %}
%immutable;
- %name(strname) const wxString wxPy##strname;
+ %rename(strname) wxPy##strname;
+ const wxString wxPy##strname;
%mutable;
%enddef
%define MAKE_CONST_WXSTRING2(strname, val)
%{ static const wxString wxPy##strname(val); %}
%immutable;
- %name(strname) const wxString wxPy##strname;
+ %rename(strname) wxPy##strname;
+ const wxString wxPy##strname;
%mutable;
%enddef
#ifdef _DO_FULL_DOCS
%define DocDeclStrName(type, decl, docstr, details, newname)
%feature("docstring") decl docstr details;
- %name(newname) type decl
+ %rename(newname) decl;
+ type decl
%enddef
#else
%define DocDeclStrName(type, decl, docstr, details, newname)
%feature("docstring") decl docstr;
- %name(newname) type decl
+ %rename(newname) decl;
+ type decl
%enddef
#endif
// As above, but also give the decl a new %name
%define DocDeclAName(type, decl, astr, newname)
%feature("autodoc") decl astr;
- %name(newname) type decl
+ %rename(newname) decl;
+ type decl
%enddef
%define DocDeclAStrName(type, decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr details;
- %name(newname) type decl
+ %rename(newname) decl;
+ type decl
%enddef
#else
%define DocDeclAStrName(type, decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr;
- %name(newname) type decl
+ %rename(newname) decl;
+ type decl
%enddef
#endif
#ifdef _DO_FULL_DOCS
%define DocCtorStrName(decl, docstr, details, newname)
%feature("docstring") decl docstr details;
- %name(newname) decl
+ %rename(newname) decl;
+ decl
%enddef
#else
%define DocCtorStrName(decl, docstr, details, newname)
%feature("docstring") decl docstr;
- %name(newname) decl
+ %rename(newname) decl;
+ decl
%enddef
#endif
// As above, but also give the decl a new %name
%define DocCtorAName(decl, astr, newname)
%feature("autodoc") decl astr;
- %name(newname) decl
+ %rename(newname) decl;
+ decl
%enddef
%define DocCtorAStrName(decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr details;
- %name(newname) decl
+ %rename(newname) decl;
+ decl
%enddef
#else
%define DocCtorAStrName(decl, astr, docstr, details, newname)
%feature("autodoc") decl astr;
%feature("docstring") decl docstr;
- %name(newname) decl
+ %rename(newname) decl;
+ decl
%enddef
#endif
}
%enddef
+
+// A set of macros to make using %rename easier, since %name has been
+// deprecated...
+%define %Rename(newname, type, decl)
+ %rename(newname) decl;
+ type decl
+%enddef
+
+%define %RenameCtor(newname, decl)
+ %rename(newname) decl;
+ decl
+%enddef
+
+
//---------------------------------------------------------------------------
// Forward declarations and %renames for some classes, so the autodoc strings
// will be able to use the right types even when the real class declaration is
const wxString& filter = wxPyEmptyString,
int defaultFilter = 0,
const wxString& name = wxPyTreeCtrlNameStr);
- %name(PreGenericDirCtrl)wxGenericDirCtrl();
+ %RenameCtor(PreGenericDirCtrl, wxGenericDirCtrl());
bool Create(wxWindow *parent, const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
- %name(PreDirFilterListCtrl)wxDirFilterListCtrl();
+ %RenameCtor(PreDirFilterListCtrl, wxDirFilterListCtrl());
bool Create(wxGenericDirCtrl* parent, const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
%}
-%name(DropSource) class wxPyDropSource {
+%rename(DropSource) wxPyDropSource;
+class wxPyDropSource {
public:
%pythonAppend wxPyDropSource "self._setCallbackInfo(self, DropSource, 0)"
#ifndef __WXGTK__
%}
-%name(DropTarget) class wxPyDropTarget // : public wxDropTarget
+%rename(DropTarget) wxPyDropTarget;
+class wxPyDropTarget // : public wxDropTarget
{
public:
%pythonAppend wxPyDropTarget
%}
-%name(TextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget {
+%rename(TextDropTarget) wxPyTextDropTarget;
+class wxPyTextDropTarget : public wxPyDropTarget {
public:
%pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)"
%}
-%name(FileDropTarget) class wxPyFileDropTarget : public wxPyDropTarget
+%rename(FileDropTarget) wxPyFileDropTarget;
+class wxPyFileDropTarget : public wxPyDropTarget
{
public:
%pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)"
MustHaveApp(wxGenericDragImage);
-%name (DragImage) class wxGenericDragImage : public wxObject
+%rename (DragImage) wxGenericDragImage;
+class wxGenericDragImage : public wxObject
{
public:
wxGenericDragImage(const wxBitmap& image,
const wxCursor& cursor = wxNullCursor);
- %name(DragIcon)wxGenericDragImage(const wxIcon& image,
- const wxCursor& cursor = wxNullCursor);
+ %RenameCtor(DragIcon, wxGenericDragImage(const wxIcon& image,
+ const wxCursor& cursor = wxNullCursor));
- %name(DragString)wxGenericDragImage(const wxString& str,
- const wxCursor& cursor = wxNullCursor);
+ %RenameCtor(DragString, wxGenericDragImage(const wxString& str,
+ const wxCursor& cursor = wxNullCursor));
- %name(DragTreeItem)wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id);
+ %RenameCtor(DragTreeItem, wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id));
- %name(DragListItem)wxGenericDragImage(const wxPyListCtrl& listCtrl, long id);
+ %RenameCtor(DragListItem, wxGenericDragImage(const wxPyListCtrl& listCtrl, long id));
~wxGenericDragImage();
// Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. This is full screen only. fullScreenRect gives the
// position of the window on the screen, to restrict the drag to.
- %name(BeginDragBounded) bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
- wxWindow* boundingWindow);
+ %Rename(BeginDragBounded, bool, BeginDrag(const wxPoint& hotspot, wxWindow* window,
+ wxWindow* boundingWindow));
// End drag
-%name(CPPFileSystemHandler) class wxFileSystemHandler //: public wxObject
+%rename(CPPFileSystemHandler) wxFileSystemHandler;
+class wxFileSystemHandler //: public wxObject
{
public:
//wxFileSystemHandler();
-%name(FileSystemHandler) class wxPyFileSystemHandler : public wxFileSystemHandler
+%rename(FileSystemHandler) wxPyFileSystemHandler;
+class wxPyFileSystemHandler : public wxFileSystemHandler
{
public:
%pythonAppend wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)";
wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
~wxFont();
- %name(FontFromNativeInfo) wxFont(const wxNativeFontInfo& info);
+ %RenameCtor(FontFromNativeInfo, wxFont(const wxNativeFontInfo& info));
%extend {
- %name(FontFromNativeInfoString) wxFont(const wxString& info) {
+ %RenameCtor(FontFromNativeInfoString, wxFont(const wxString& info))
+ {
wxNativeFontInfo nfi;
nfi.FromString(info);
return new wxFont(nfi);
}
- %name(Font2) wxFont(int pointSize,
- wxFontFamily family,
- int flags = wxFONTFLAG_DEFAULT,
- const wxString& face = wxPyEmptyString,
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
+ %RenameCtor(Font2, wxFont(int pointSize,
+ wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& face = wxPyEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
+ {
return wxFont::New(pointSize, family, flags, face, encoding);
}
}
// There is a real ctor for this on wxMSW, but not the others, so just use
// the factory funciton in all cases.
%extend {
- %name(FontFromPixelSize) wxFont(const wxSize& pixelSize,
- int family,
- int style,
- int weight,
- bool underlined = false,
- const wxString& face = wxEmptyString,
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
+ %RenameCtor(FontFromPixelSize, wxFont(const wxSize& pixelSize,
+ int family,
+ int style,
+ int weight,
+ bool underlined = false,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
+ {
return wxFontBase::New(pixelSize, family,
style, weight, underlined,
face, encoding);
virtual void SetUnderlined( bool underlined );
virtual void SetEncoding(wxFontEncoding encoding);
void SetNativeFontInfo(const wxNativeFontInfo& info);
- %name(SetNativeFontInfoFromString) void SetNativeFontInfo(const wxString& info);
+ %Rename(SetNativeFontInfoFromString, void, SetNativeFontInfo(const wxString& info));
void SetNativeFontInfoUserDesc(const wxString& info);
// translate the fonts into human-readable string (i.e. GetStyleString()
MustHaveApp(wxPyFontEnumerator);
-%name(FontEnumerator) class wxPyFontEnumerator {
+%rename(FontEnumerator) wxPyFontEnumerator;
+class wxPyFontEnumerator {
public:
%pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)"
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyGaugeNameStr);
- %name(PreGauge)wxGauge();
+ %RenameCtor(PreGauge, wxGauge());
bool Create(wxWindow* parent, wxWindowID id=-1, int range=100,
const wxPoint& pos = wxDefaultPosition,
%extend {
DocStr(wxGBSizerItem( wxWindow *window, const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL ),
"Construct a `wx.GBSizerItem` for a window.", "");
- %name(GBSizerItemWindow) wxGBSizerItem( wxWindow *window,
- const wxGBPosition& pos,
- const wxGBSpan& span,
- int flag,
- int border,
- PyObject* userData=NULL )
+
+ %RenameCtor(GBSizerItemWindow, wxGBSizerItem( wxWindow *window,
+ const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag,
+ int border,
+ PyObject* userData=NULL ))
{
wxPyUserData* data = NULL;
if ( userData ) {
DocStr(wxGBSizerItem( wxSizer *sizer,const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL ),
"Construct a `wx.GBSizerItem` for a sizer", "");
- %name(GBSizerItemSizer) wxGBSizerItem( wxSizer *sizer,
- const wxGBPosition& pos,
- const wxGBSpan& span,
- int flag,
- int border,
- PyObject* userData=NULL )
+ %RenameCtor(GBSizerItemSizer, wxGBSizerItem( wxSizer *sizer,
+ const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag,
+ int border,
+ PyObject* userData=NULL ))
{
wxPyUserData* data = NULL;
if ( userData ) {
DocStr(wxGBSizerItem( int width,int height,const wxGBPosition& pos,const wxGBSpan& span,int flag,int border,PyObject* userData=NULL),
"Construct a `wx.GBSizerItem` for a spacer.", "");
- %name(GBSizerItemSpacer) wxGBSizerItem( int width,
- int height,
- const wxGBPosition& pos,
- const wxGBSpan& span,
- int flag,
- int border,
- PyObject* userData=NULL)
+ %RenameCtor(GBSizerItemSpacer, wxGBSizerItem( int width,
+ int height,
+ const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag,
+ int border,
+ PyObject* userData=NULL))
{
wxPyUserData* data = NULL;
if ( userData ) {
DocStr( wxSize,
"wx.Size is a useful data structure used to represent the size of
-something. It simply contians integer width and height proprtites.
-In most places in wxPython where a wx.Size is expected a
-(width,height) tuple can be used instead.", "");
+something. It simply contians integer width and height
+proprtites. In most places in wxPython where a wx.Size is
+expected a (width, height) tuple can be used instead.", "");
class wxSize
{
public:
- %name(width) int x;
- %name(height)int y;
+ %Rename(width, int, x);
+ %Rename(height,int, y);
%pythoncode { x = width; y = height }
DocCtorStr(
DocStr( Inside, "Return True if the point is (not strcitly) inside the rect.", "");
- %name(InsideXY)bool Inside(int x, int y) const;
+ %Rename(InsideXY, bool, Inside(int x, int y) const);
bool Inside(const wxPoint& pt) const;
DocDeclStr(
public:
DocStr(wxPoint2D, "Create a w.Point2D object.", "");
wxPoint2D( double x=0.0 , double y=0.0 );
- %name(Point2DCopy) wxPoint2D( const wxPoint2D &pt );
- %name(Point2DFromPoint) wxPoint2D( const wxPoint &pt );
+ %RenameCtor(Point2DCopy, wxPoint2D( const wxPoint2D &pt ));
+ %RenameCtor(Point2DFromPoint, wxPoint2D( const wxPoint &pt ));
DocDeclAStr(
void, GetFloor( int *OUTPUT , int *OUTPUT ) const,
bool, operator!=(const wxPoint2D& pt) const,
"Test for inequality", "");
- %name(x)double m_x;
- %name(y)double m_y;
+ %Rename(x, double, m_x);
+ %Rename(y, double, m_y);
%extend {
void Set( double x=0 , double y=0 ) {
~wxIcon();
// alternate constructors
- %name(EmptyIcon) wxIcon();
- %name(IconFromLocation) wxIcon(const wxIconLocation& loc);
+ %RenameCtor(EmptyIcon, wxIcon());
+ %RenameCtor(IconFromLocation, wxIcon(const wxIconLocation& loc));
%extend {
- %name(IconFromBitmap) wxIcon(const wxBitmap& bmp) {
+ %RenameCtor(IconFromBitmap, wxIcon(const wxBitmap& bmp))
+ {
wxIcon* icon = new wxIcon();
icon->CopyFromBitmap(bmp);
return icon;
}
- %name(IconFromXPMData) wxIcon(PyObject* listOfStrings) {
+ %RenameCtor(IconFromXPMData, wxIcon(PyObject* listOfStrings))
+ {
char** cArray = NULL;
wxIcon* icon;
wxIconBundle();
// initializes the bundle with the icon(s) found in the file
- %name(IconBundleFromFile) wxIconBundle( const wxString& file, long type );
+ %RenameCtor(IconBundleFromFile, wxIconBundle( const wxString& file, long type ));
// initializes the bundle with a single icon
- %name(IconBundleFromIcon)wxIconBundle( const wxIcon& icon );
+ %RenameCtor(IconBundleFromIcon, wxIconBundle( const wxIcon& icon ));
~wxIconBundle();
// adds all the icons contained in the file to the collection,
// if the collection already contains icons with the same
// width and height, they are replaced
- %name(AddIconFromFile)void AddIcon( const wxString& file, long type );
+ %Rename(AddIconFromFile,void, AddIcon( const wxString& file, long type ));
// returns the icon with the given size; if no such icon exists,
// returns the icon with size wxSYS_ICON_[XY]; if no such icon exists,
class wxImage : public wxObject {
public:
- wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
+ DocCtorStr(
+ wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ),
+ "", "");
+
~wxImage();
// Alternate constructors
- %name(ImageFromMime) wxImage(const wxString& name, const wxString& mimetype, int index = -1);
- %name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
- %name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
+ DocCtorStrName(
+ wxImage(const wxString& name, const wxString& mimetype, int index = -1),
+ "", "",
+ ImageFromMime);
+
+ DocCtorStrName(
+ wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1),
+ "", "",
+ ImageFromStream);
+
+ DocCtorStrName(
+ wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 ),
+ "", "",
+ ImageFromStreamMime);
+
%extend {
- %name(EmptyImage) wxImage(int width=0, int height=0, bool clear = true) {
+ %rename(EmptyImage) wxImage(int width=0, int height=0, bool clear = true);
+ wxImage(int width=0, int height=0, bool clear = true)
+ {
if (width > 0 && height > 0)
return new wxImage(width, height, clear);
else
}
MustHaveApp(wxImage(const wxBitmap &bitmap));
- %name(ImageFromBitmap) wxImage(const wxBitmap &bitmap) {
+ %rename(ImageFromBitmap) wxImage(const wxBitmap &bitmap);
+ wxImage(const wxBitmap &bitmap)
+ {
return new wxImage(bitmap.ConvertToImage());
}
- %name(ImageFromData) wxImage(int width, int height, unsigned char* data) {
+ %rename(ImageFromData) wxImage(int width, int height, unsigned char* data);
+ wxImage(int width, int height, unsigned char* data)
+ {
// Copy the source data so the wxImage can clean it up later
unsigned char* copy = (unsigned char*)malloc(width*height*3);
if (copy == NULL) {
memcpy(copy, data, width*height*3);
return new wxImage(width, height, copy, false);
}
- %name(ImageFromDataWithAlpha) wxImage(int width, int height,
- unsigned char* data, unsigned char* alpha) {
+
+
+ %rename(ImageFromDataWithAlpha) wxImage(int width, int height, unsigned char* data, unsigned char* alpha);
+ wxImage(int width, int height, unsigned char* data, unsigned char* alpha)
+ {
// Copy the source data so the wxImage can clean it up later
unsigned char* dcopy = (unsigned char*)malloc(width*height*3);
if (dcopy == NULL) {
static int GetImageCount( const wxString& name, long type = wxBITMAP_TYPE_ANY );
bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
- %name(LoadMimeFile)bool LoadFile( const wxString& name, const wxString& mimetype, int index = -1 );
+ %Rename(LoadMimeFile, bool, LoadFile( const wxString& name, const wxString& mimetype, int index = -1 ));
bool SaveFile( const wxString& name, int type );
- %name(SaveMimeFile)bool SaveFile( const wxString& name, const wxString& mimetype );
+ %Rename(SaveMimeFile, bool, SaveFile( const wxString& name, const wxString& mimetype ));
- %name(CanReadStream) static bool CanRead( wxInputStream& stream );
- %name(LoadStream) bool LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 );
- %name(LoadMimeStream) bool LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 );
+ %Rename(CanReadStream, static bool, CanRead( wxInputStream& stream ));
+ %Rename(LoadStream, bool, LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 ));
+ %Rename(LoadMimeStream, bool, LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 ));
bool Ok();
int GetWidth();
wxImage ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const;
void SetOption(const wxString& name, const wxString& value);
- %name(SetOptionInt)void SetOption(const wxString& name, int value);
+ %Rename(SetOptionInt, void, SetOption(const wxString& name, int value));
wxString GetOption(const wxString& name) const;
int GetOptionInt(const wxString& name) const;
bool HasOption(const wxString& name) const;
~wxImageList();
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
- %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour);
- %name(AddIcon)int Add(const wxIcon& icon);
+ %Rename(AddWithColourMask,int, Add(const wxBitmap& bitmap, const wxColour& maskColour));
+ %Rename(AddIcon,int, Add(const wxIcon& icon));
#ifdef __WXMSW__
bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
#else
-// %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon);
+// %Rename(ReplaceIcon,bool, Replace(int index, const wxIcon& icon));
// int Add(const wxBitmap& bitmap);
bool Replace(int index, const wxBitmap& bitmap);
#endif
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListBoxNameStr);
- %name(PreListBox)wxListBox();
+ %RenameCtor(PreListBox, wxListBox());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
// set the specified item at the first visible item or scroll to max
// range.
void SetFirstItem(int n);
- %name(SetFirstItemStr) void SetFirstItem(const wxString& s);
+ %Rename(SetFirstItemStr, void, SetFirstItem(const wxString& s));
// ensures that the given item is visible scrolling the listbox if
// necessary
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListBoxNameStr);
- %name(PreCheckListBox)wxCheckListBox();
+ %RenameCtor(PreCheckListBox, wxCheckListBox());
bool Create(wxWindow *parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
// return the index of the item at this position or wxNOT_FOUND
int HitTest(const wxPoint& pt) const;
- %name(HitTestXY)int HitTest(wxCoord x, wxCoord y) const;
+ %Rename(HitTestXY, int, HitTest(wxCoord x, wxCoord y) const);
};
//---------------------------------------------------------------------------
MustHaveApp(wxPyListCtrl);
-%name(ListCtrl)class wxPyListCtrl : public wxControl {
+%rename(ListCtrl) wxPyListCtrl;
+class wxPyListCtrl : public wxControl {
public:
%pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)"
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListCtrlNameStr);
- %name(PreListCtrl)wxPyListCtrl();
+ %RenameCtor(PreListCtrl, wxPyListCtrl());
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
bool SetItem(wxListItem& info) ;
// Sets a string field at a particular column
- %name(SetStringItem)long SetItem(long index, int col, const wxString& label, int imageId = -1);
+ %Rename(SetStringItem, long, SetItem(long index, int col, const wxString& label, int imageId = -1));
// Gets the item state
int GetItemState(long item, long stateMask) const ;
// Find an item whose data matches this data, starting from the item after 'start'
// or the beginning if 'start' is -1.
- %name(FindItemData) long FindItem(long start, long data);
+ %Rename(FindItemData, long, FindItem(long start, long data));
// Find an item nearest this position in the specified direction, starting from
// the item after 'start' or the beginning if 'start' is -1.
- %name(FindItemAtPos) long FindItem(long start, const wxPoint& pt, int direction);
+ %Rename(FindItemAtPos, long, FindItem(long start, const wxPoint& pt, int direction));
DocDeclAStr(
long InsertItem(wxListItem& info);
// Insert a string item
- %name(InsertStringItem) long InsertItem(long index, const wxString& label);
+ %Rename(InsertStringItem, long, InsertItem(long index, const wxString& label));
// Insert an image item
- %name(InsertImageItem) long InsertItem(long index, int imageIndex);
+ %Rename(InsertImageItem, long, InsertItem(long index, int imageIndex));
// Insert an image/string item
- %name(InsertImageStringItem) long InsertItem(long index, const wxString& label, int imageIndex);
+ %Rename(InsertImageStringItem, long, InsertItem(long index, const wxString& label, int imageIndex));
// For list view mode (only), inserts a column.
- %name(InsertColumnInfo) long InsertColumn(long col, wxListItem& info);
+ %Rename(InsertColumnInfo, long, InsertColumn(long col, wxListItem& info));
long InsertColumn(long col,
const wxString& heading,
long style = wxLC_REPORT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyListCtrlNameStr);
- %name(PreListView)wxListView();
+ %RenameCtor(PreListView, wxListView());
bool Create( wxWindow *parent,
wxWindowID id = -1,
%}
-%name(LogFatalError) void wxPyLogFatalError(const wxString& msg);
-%name(LogError) void wxPyLogError(const wxString& msg);
-%name(LogWarning) void wxPyLogWarning(const wxString& msg);
-%name(LogMessage) void wxPyLogMessage(const wxString& msg);
-%name(LogInfo) void wxPyLogInfo(const wxString& msg);
-%name(LogDebug) void wxPyLogDebug(const wxString& msg);
-%name(LogVerbose) void wxPyLogVerbose(const wxString& msg);
-%name(LogStatus) void wxPyLogStatus(const wxString& msg);
-%name(LogStatusFrame) void wxPyLogStatusFrame(wxFrame *pFrame, const wxString& msg);
-%name(LogSysError) void wxPyLogSysError(const wxString& msg);
-
-%name(LogGeneric) void wxPyLogGeneric(unsigned long level, const wxString& msg);
+%Rename(LogFatalError, void, wxPyLogFatalError(const wxString& msg));
+%Rename(LogError, void, wxPyLogError(const wxString& msg));
+%Rename(LogWarning, void, wxPyLogWarning(const wxString& msg));
+%Rename(LogMessage, void, wxPyLogMessage(const wxString& msg));
+%Rename(LogInfo, void, wxPyLogInfo(const wxString& msg));
+%Rename(LogDebug, void, wxPyLogDebug(const wxString& msg));
+%Rename(LogVerbose, void, wxPyLogVerbose(const wxString& msg));
+%Rename(LogStatus, void, wxPyLogStatus(const wxString& msg));
+%Rename(LogStatusFrame, void, wxPyLogStatusFrame(wxFrame *pFrame, const wxString& msg));
+%Rename(LogSysError, void, wxPyLogSysError(const wxString& msg));
+
+%Rename(LogGeneric, void, wxPyLogGeneric(unsigned long level, const wxString& msg));
%nokwargs wxPyLogTrace;
-%name(LogTrace) void wxPyLogTrace(unsigned long mask, const wxString& msg);
-%name(LogTrace) void wxPyLogTrace(const wxString& mask, const wxString& msg);
+%Rename(LogTrace, void, wxPyLogTrace(unsigned long mask, const wxString& msg));
+%Rename(LogTrace, void, wxPyLogTrace(const wxString& mask, const wxString& msg));
// wxLogFatalError helper: show the (fatal) error to the user in a safe way,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxPyFrameNameStr);
- %name(PreMDIParentFrame)wxMDIParentFrame();
+ %RenameCtor(PreMDIParentFrame, wxMDIParentFrame());
bool Create(wxWindow *parent,
const wxWindowID id=-1,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
- %name(PreMDIChildFrame)wxMDIChildFrame();
+ %RenameCtor(PreMDIChildFrame, wxMDIChildFrame());
// Turn it back on again
%typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxMDIClientWindow*; // turn off this typemap
wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
- %name(PreMDIClientWindow)wxMDIClientWindow();
+ %RenameCtor(PreMDIClientWindow, wxMDIClientWindow());
// Turn it back on again
%typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
const wxString& text,
const wxString& help = wxPyEmptyString);
// append a submenu
- %name(AppendMenu) wxMenuItem* Append(int id,
- const wxString& text,
- wxMenu *submenu,
- const wxString& help = wxPyEmptyString);
+ %Rename(AppendMenu, wxMenuItem*, Append(int id,
+ const wxString& text,
+ wxMenu *submenu,
+ const wxString& help = wxPyEmptyString));
// the most generic form of Append() - append anything
- %name(AppendItem) wxMenuItem* Append(wxMenuItem *item);
+ %Rename(AppendItem, wxMenuItem*, Append(wxMenuItem *item));
// insert a break in the menu (only works when appending the items, not
// inserting them)
virtual void Break();
// insert an item before given position
- %name(InsertItem) wxMenuItem* Insert(size_t pos, wxMenuItem *item);
+ %Rename(InsertItem, wxMenuItem*, Insert(size_t pos, wxMenuItem *item));
// insert an item before given position
wxMenuItem* Insert(size_t pos,
const wxString& help = wxPyEmptyString);
// insert a submenu
- %name(InsertMenu) wxMenuItem* Insert(size_t pos,
+ %Rename(InsertMenu, wxMenuItem*, Insert(size_t pos,
int id,
const wxString& text,
wxMenu *submenu,
- const wxString& help = wxPyEmptyString);
+ const wxString& help = wxPyEmptyString));
// prepend an item to the menu
- %name(PrependItem) wxMenuItem* Prepend(wxMenuItem *item);
+ %Rename(PrependItem, wxMenuItem*, Prepend(wxMenuItem *item));
// prepend any item to the menu
wxMenuItem* Prepend(int id,
const wxString& help = wxPyEmptyString);
// prepend a submenu
- %name(PrependMenu) wxMenuItem* Prepend(int id,
+ %Rename(PrependMenu, wxMenuItem*, Prepend(int id,
const wxString& text,
wxMenu *submenu,
- const wxString& help = wxPyEmptyString);
+ const wxString& help = wxPyEmptyString));
// detach an item from the menu, but don't delete it so that it can be
// added back later (but if it's not, the caller is responsible for
// deleting it!)
wxMenuItem *Remove(int id);
- %name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item);
+ %Rename(RemoveItem, wxMenuItem*, Remove(wxMenuItem *item));
// delete an item from the menu (submenus are not destroyed by this
// function, see Destroy)
bool Delete(int id);
- %name(DeleteItem) bool Delete(wxMenuItem *item);
+ %Rename(DeleteItem, bool, Delete(wxMenuItem *item));
// delete the item from menu and destroy it (if it's a submenu)
%extend { void Destroy() { delete self; } }
- %name(DestroyId) bool Destroy(int id);
- %name(DestroyItem) bool Destroy(wxMenuItem *item);
+ %Rename(DestroyId, bool, Destroy(int id));
+ %Rename(DestroyItem, bool, Destroy(wxMenuItem *item));
// get the items
// search
int FindItem(const wxString& item) const;
- %name(FindItemById) wxMenuItem* FindItem(int id /*, wxMenu **menu = NULL*/) const;
+ %Rename(FindItemById, wxMenuItem*, FindItem(int id /*, wxMenu **menu = NULL*/) const);
// find by position
wxMenuItem* FindItemByPosition(size_t position) const;
// find item by id (in any menu), returns NULL if not found
//
// if menu is !NULL, it will be filled with wxMenu this item belongs to
- %name(FindItemById) virtual wxMenuItem* FindItem(int id /*, wxMenu **menu = NULL*/) const;
+ %Rename(FindItemById, virtual wxMenuItem*, FindItem(int id /*, wxMenu **menu = NULL*/) const);
// find menu by its caption, return wxNOT_FOUND on failure
int FindMenu(const wxString& title) const;
// the array elements correspond to the parameters of the ctor above in
// the same order
- %name(FileTypeInfoSequence)wxFileTypeInfo(const wxArrayString& sArray);
+ %Rename(FileTypeInfoSequence,, wxFileTypeInfo(const wxArrayString& sArray));
// invalid item - use this to terminate the array passed to
// wxMimeTypesManager::AddFallbacks
- %name(NullFileTypeInfo)wxFileTypeInfo();
+ %Rename(NullFileTypeInfo,, wxFileTypeInfo());
// test if this object can be used
wxWindow *GetWindow();
- %name(MoveXY)void Move(int x, int y);
+ %Rename(MoveXY, void, Move(int x, int y));
void Move(const wxPoint& pt);
- %name(SetSizeWH) void SetSize(int width, int height);
+ %Rename(SetSizeWH, void, SetSize(int width, int height));
void SetSize(const wxSize& size);
void Show(int show = true);
void Hide();
void Save(wxConfigBase& config);
void AddFilesToMenu();
- %name(AddFilesToThisMenu)void AddFilesToMenu(wxMenu* menu);
+ %Rename(AddFilesToThisMenu, void, AddFilesToMenu(wxMenu* menu));
// Accessors
wxString GetHistoryFile(int i) const;
const wxString& path = wxPyEmptyString);
// default ctor, use Create() after it
- %name(PreSingleInstanceChecker) wxSingleInstanceChecker();
+ %RenameCtor(PreSingleInstanceChecker, wxSingleInstanceChecker());
~wxSingleInstanceChecker();
// const wxSize& size = wxDefaultSize,
// long style = 0,
// const wxString& name = wxPyEmptyString);
-// %name(PreBookCtrlBase)wxBookCtrlBase();
+// %RenameCtor(PreBookCtrlBase, wxBookCtrlBase());
// bool Create(wxWindow *parent,
// wxWindowID id,
// const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyNOTEBOOK_NAME);
- %name(PreNotebook)wxNotebook();
+ %RenameCtor(PreNotebook, wxNotebook());
// Turn it back on again
%typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); }
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyEmptyString);
- %name(PreListbook)wxListbook();
+ %RenameCtor(PreListbook, wxListbook());
bool Create(wxWindow *parent,
wxWindowID id=-1,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyEmptyString);
- %name(PreChoicebook)wxChoicebook();
+ %RenameCtor(PreChoicebook, wxChoicebook());
// quasi ctor
bool Create(wxWindow *parent,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxPyPanelNameStr);
- %name(PrePanel)wxPanel();
+ %RenameCtor(PrePanel, wxPanel());
// Turn it back on again
%typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); }
const wxSize& size = wxDefaultSize,
long style = wxHSCROLL | wxVSCROLL,
const wxString& name = wxPyPanelNameStr);
- %name(PreScrolledWindow)wxScrolledWindow();
+ %RenameCtor(PreScrolledWindow, wxScrolledWindow());
// Turn it back on again
%typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); }
%pythonAppend wxPopupWindow() ""
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
- %name(PrePopupWindow)wxPopupWindow();
+ %RenameCtor(PrePopupWindow, wxPopupWindow());
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
// wxPopupTransientWindow: a wxPopupWindow which disappears automatically
// when the user clicks mouse outside it or if it loses focus in any other way
-%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
+%rename(PopupTransientWindow) wxPyPopupTransientWindow;
+class wxPyPopupTransientWindow : public wxPopupWindow
{
public:
%pythonAppend wxPyPopupTransientWindow "self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow)"
%pythonAppend wxPyPopupTransientWindow() ""
wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
- %name(PrePopupTransientWindow)wxPyPopupTransientWindow();
+ %RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
class wxPopupWindow : public wxWindow {
public:
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
- %name(PrePopupWindow)wxPopupWindow();
+ %RenameCtor(PrePopupWindow, wxPopupWindow());
};
-%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
+%rename(PopupTransientWindow) wxPyPopupTransientWindow;
+class wxPyPopupTransientWindow : public wxPopupWindow
{
public:
wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
- %name(PrePopupTransientWindow)wxPyPopupTransientWindow();
+ %RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
};
MustHaveApp(wxPyPrintout);
// Now define the custom class for SWIGging
-%name(Printout) class wxPyPrintout : public wxObject {
+%rename(Printout) wxPyPrintout;
+class wxPyPrintout : public wxObject {
public:
%pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)"
%}
-%name(Process)class wxPyProcess : public wxEvtHandler {
+%rename(Process) wxPyProcess;
+class wxPyProcess : public wxEvtHandler {
public:
// kill the process with the given PID
static wxKillError Kill(int pid,
const wxValidator& validator=wxDefaultValidator,
const wxString& name = wxPyControlNameStr);
- %name(PrePyControl) wxPyControl();
+ %RenameCtor(PrePyControl, wxPyControl());
void _setCallbackInfo(PyObject* self, PyObject* _class);
long style = 0,
const wxString& name = wxPyPanelNameStr);
- %name(PrePyWindow) wxPyWindow();
+ %RenameCtor(PrePyWindow, wxPyWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
long style = 0,
const wxString& name = wxPyPanelNameStr);
- %name(PrePyPanel) wxPyPanel();
+ %RenameCtor(PrePyPanel, wxPyPanel());
void _setCallbackInfo(PyObject* self, PyObject* _class);
long style = 0,
const wxString& name = wxPyPanelNameStr);
- %name(PrePyScrolledWindow) wxPyScrolledWindow();
+ %RenameCtor(PrePyScrolledWindow, wxPyScrolledWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
long style = wxRA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyRadioBoxNameStr);
- %name(PreRadioBox)wxRadioBox();
+ %RenameCtor(PreRadioBox, wxRadioBox());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
%pythoncode { SetItemLabel = SetString };
// change the individual radio button state
- %name(EnableItem) virtual void Enable(int n, bool enable = true);
- %name(ShowItem) virtual void Show(int n, bool show = true);
+ %Rename(EnableItem, virtual void, Enable(int n, bool enable = true));
+ %Rename(ShowItem, virtual void, Show(int n, bool show = true));
#ifndef __WXGTK__
// layout parameters
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyRadioButtonNameStr);
- %name(PreRadioButton)wxRadioButton();
+ %RenameCtor(PreRadioButton, wxRadioButton());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
class wxRegion : public wxGDIObject {
public:
wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
- %name(RegionFromBitmap)wxRegion(const wxBitmap& bmp);
- %name(RegionFromBitmapColour)wxRegion(const wxBitmap& bmp,
- const wxColour& transColour,
- int tolerance = 0);
- %name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
- int fillStyle = wxWINDING_RULE);
+ %RenameCtor(RegionFromBitmap, wxRegion(const wxBitmap& bmp));
+ %RenameCtor(RegionFromBitmapColour, wxRegion(const wxBitmap& bmp,
+ const wxColour& transColour,
+ int tolerance = 0));
+ %RenameCtor(RegionFromPoints, wxRegion(int points, wxPoint* points_array,
+ int fillStyle = wxWINDING_RULE));
~wxRegion();
bool Offset(wxCoord x, wxCoord y);
wxRegionContain Contains(wxCoord x, wxCoord y);
- %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
- %name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
- %name(ContainsRectDim)wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
+ %Rename(ContainsPoint, wxRegionContain, Contains(const wxPoint& pt));
+ %Rename(ContainsRect, wxRegionContain, Contains(const wxRect& rect));
+ %Rename(ContainsRectDim, wxRegionContain, Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h));
wxRect GetBox();
bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(IntersectRect)bool Intersect(const wxRect& rect);
- %name(IntersectRegion)bool Intersect(const wxRegion& region);
+ %Rename(IntersectRect, bool, Intersect(const wxRect& rect));
+ %Rename(IntersectRegion, bool, Intersect(const wxRegion& region));
bool IsEmpty();
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(UnionRect)bool Union(const wxRect& rect);
- %name(UnionRegion)bool Union(const wxRegion& region);
+ %Rename(UnionRect, bool, Union(const wxRect& rect));
+ %Rename(UnionRegion, bool, Union(const wxRegion& region));
bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(SubtractRect)bool Subtract(const wxRect& rect);
- %name(SubtractRegion)bool Subtract(const wxRegion& region);
+ %Rename(SubtractRect, bool, Subtract(const wxRect& rect));
+ %Rename(SubtractRegion, bool, Subtract(const wxRegion& region));
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- %name(XorRect)bool Xor(const wxRect& rect);
- %name(XorRegion)bool Xor(const wxRegion& region);
+ %Rename(XorRect, bool, Xor(const wxRect& rect));
+ %Rename(XorRegion, bool, Xor(const wxRegion& region));
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
// with this region. If the bitmap has a mask then it will be used,
// otherwise the colour to be treated as transparent may be specified,
// along with an optional tolerance value.
- %name(UnionBitmap)bool Union(const wxBitmap& bmp);
- %name(UnionBitmapColour)bool Union(const wxBitmap& bmp,
- const wxColour& transColour,
- int tolerance = 0);
+ %Rename(UnionBitmap, bool, Union(const wxBitmap& bmp));
+ %Rename(UnionBitmapColour, bool, Union(const wxBitmap& bmp,
+ const wxColour& transColour,
+ int tolerance = 0));
};
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const wxString& name = wxPySashNameStr);
- %name(PreSashWindow)wxSashWindow();
+ %RenameCtor(PreSashWindow, wxSashWindow());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const wxString& name = wxPySashLayoutNameStr);
- %name(PreSashLayoutWindow)wxSashLayoutWindow();
+ %RenameCtor(PreSashLayoutWindow, wxSashLayoutWindow());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyScrollBarNameStr);
- %name(PreScrollBar)wxScrollBar();
+ %RenameCtor(PreScrollBar, wxScrollBar());
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
// to implement SetSystemColour/Font/Metric
static void SetOption(const wxString& name, const wxString& value);
- %name(SetOptionInt) static void SetOption(const wxString& name, int value);
+ %Rename(SetOptionInt, static void, SetOption(const wxString& name, int value));
static wxString GetOption(const wxString& name) ;
static int GetOptionInt(const wxString& name) ;
static bool HasOption(const wxString& name) ;
int border, PyObject* userData=NULL ),
"Constructs a `wx.SizerItem` for tracking a window.", "");
- %name(SizerItemWindow) wxSizerItem( wxWindow *window, int proportion, int flag,
- int border, PyObject* userData=NULL ) {
+ %RenameCtor(SizerItemWindow, wxSizerItem( wxWindow *window, int proportion, int flag,
+ int border, PyObject* userData=NULL ))
+ {
wxPyUserData* data = NULL;
if ( userData ) {
bool blocked = wxPyBeginBlockThreads();
wxSizerItem( int width, int height, int proportion, int flag,
int border, PyObject* userData=NULL),
"Constructs a `wx.SizerItem` for tracking a spacer.", "");
- %name(SizerItemSpacer) wxSizerItem( int width, int height, int proportion, int flag,
- int border, PyObject* userData=NULL) {
+
+ %RenameCtor(SizerItemSpacer, wxSizerItem( int width, int height, int proportion, int flag,
+ int border, PyObject* userData=NULL))
+ {
wxPyUserData* data = NULL;
if ( userData ) {
bool blocked = wxPyBeginBlockThreads();
DocStr(
wxSizerItem( wxSizer *sizer, int proportion, int flag,
int border, PyObject* userData=NULL ),
- "Constructs a `wx.SizerItem` for tracking a subsizer", "");
- %name(SizerItemSizer) wxSizerItem( wxSizer *sizer, int proportion, int flag,
- int border, PyObject* userData=NULL ) {
+ "Constructs a `wx.SizerItem` for tracking a subsizer", "");
+
+ %RenameCtor(SizerItemSizer, wxSizerItem( wxSizer *sizer, int proportion, int flag,
+ int border, PyObject* userData=NULL ))
+ {
wxPyUserData* data = NULL;
if ( userData ) {
bool blocked = wxPyBeginBlockThreads();
DocStr(SetRatio,
"Set the ratio item attribute.", "");
- %name(SetRatioWH) void SetRatio( int width, int height );
- %name(SetRatioSize) void SetRatio( wxSize size );
+ %Rename(SetRatioWH, void, SetRatio( int width, int height ));
+ %Rename(SetRatioSize, void, SetRatio( wxSize size ));
void SetRatio( float ratio );
DocDeclStr(
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPySliderNameStr);
- %name(PreSlider)wxSlider();
+ %RenameCtor(PreSlider, wxSlider());
bool Create(wxWindow* parent, wxWindowID id=-1,
int value=0, int minValue=0, int maxValue=100,
else
return new wxSound(fileName);
}
- %name(SoundFromData) wxSound(PyObject* data) {
+ %RenameCtor(SoundFromData, wxSound(PyObject* data))
+ {
unsigned char* buffer; int size;
wxSound *sound = NULL;
bool Play(unsigned flags = wxSOUND_ASYNC) const;
// Plays sound from filename:
- %name(PlaySound) static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC);
+ %Rename(PlaySound, static bool, Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC));
#ifndef __WXMAC__
static void Stop();
const wxSize& size = wxDefaultSize,
long style = wxSP_HORIZONTAL,
const wxString& name = wxPySPIN_BUTTON_NAME);
- %name(PreSpinButton)wxSpinButton();
+ %RenameCtor(PreSpinButton, wxSpinButton());
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
long style = wxSP_ARROW_KEYS,
int min = 0, int max = 100, int initial = 0,
const wxString& name = wxPySpinCtrlNameStr);
- %name(PreSpinCtrl)wxSpinCtrl();
+ %RenameCtor(PreSpinCtrl, wxSpinCtrl());
bool Create(wxWindow *parent,
wxWindowID id = -1,
virtual int GetValue() const;
virtual void SetValue( int value );
- %name(SetValueString) void SetValue(const wxString& text);
+ %Rename(SetValueString, void, SetValue(const wxString& text));
virtual void SetRange( int minVal, int maxVal );
virtual int GetMin() const;
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticBoxNameStr);
- %name(PreStaticBox)wxStaticBox();
+ %RenameCtor(PreStaticBox, wxStaticBox());
// Turn it back on again
%typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
const wxSize &size = wxDefaultSize,
long style = wxLI_HORIZONTAL,
const wxString& name = wxPyStaticTextNameStr);
- %name(PreStaticLine)wxStaticLine();
+ %RenameCtor(PreStaticLine, wxStaticLine());
bool Create( wxWindow *parent, wxWindowID id=-1,
const wxPoint &pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticTextNameStr);
- %name(PreStaticText)wxStaticText();
+ %RenameCtor(PreStaticText, wxStaticText());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticBitmapNameStr);
- %name(PreStaticBitmap)wxStaticBitmap();
+ %RenameCtor(PreStaticBitmap, wxStaticBitmap());
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxBitmap& bitmap = wxNullBitmap,
wxStatusBar(wxWindow* parent, wxWindowID id = -1,
long style = wxDEFAULT_STATUSBAR_STYLE,
const wxString& name = wxPyStatusLineNameStr);
- %name(PreStatusBar)wxStatusBar();
+ %RenameCtor(PreStatusBar, wxStatusBar());
// Turn it back on again
%typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); }
};
-%name(InputStream) class wxPyInputStream {
+%rename(InputStream) wxPyInputStream;
+class wxPyInputStream
+{
public:
%extend {
wxPyInputStream(PyObject* p) {
MustHaveApp(wxPyTaskBarIcon);
-%name(TaskBarIcon)class wxPyTaskBarIcon : public wxEvtHandler
+%rename(TaskBarIcon) wxPyTaskBarIcon;
+class wxPyTaskBarIcon : public wxEvtHandler
{
public:
%pythonAppend wxPyTaskBarIcon "self._setCallbackInfo(self, TaskBarIcon, 0)"
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyTextCtrlNameStr);
- %name(PreTextCtrl)wxTextCtrl();
+ %RenameCtor(PreTextCtrl, wxTextCtrl());
// Turn it back on again
%typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyToggleButtonNameStr);
- %name(PreToggleButton)wxToggleButton();
+ %RenameCtor(PreToggleButton, wxToggleButton());
bool Create(wxWindow *parent,
wxWindowID id=-1,
MustHaveApp(wxPyTimer);
-%name(Timer) class wxPyTimer : public wxEvtHandler
+%rename(Timer) wxPyTimer;
+class wxPyTimer : public wxEvtHandler
{
public:
// Don't let the OOR or callback info hold references to the object so
shortHelp, longHelp, clientData)
}
- %name(AddToolItem) wxToolBarToolBase *AddTool (wxToolBarToolBase *tool);
- %name(InsertToolItem) wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool);
+ %Rename(AddToolItem, wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool));
+ %Rename(InsertToolItem, wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool));
wxToolBarToolBase *AddControl(wxControl *control);
wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
void SetToolLongHelp(int id, const wxString& helpString);
wxString GetToolLongHelp(int id);
- %name(SetMarginsXY) void SetMargins(int x, int y);
+ %Rename(SetMarginsXY, void, SetMargins(int x, int y));
void SetMargins(const wxSize& size);
void SetToolPacking(int packing);
void SetToolSeparation(int separation);
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxPyToolBarNameStr);
- %name(PreToolBar)wxToolBar();
+ %RenameCtor(PreToolBar, wxToolBar());
// Turn it back on again
%typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
- %name(PreFrame)wxFrame();
+ %RenameCtor(PreFrame, wxFrame());
// Turn it back on again
%typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxPyDialogNameStr);
- %name(PreDialog)wxDialog();
+ %RenameCtor(PreDialog, wxDialog());
// Turn it back on again
%typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
- %name(PreMiniFrame)wxMiniFrame();
+ %RenameCtor(PreMiniFrame, wxMiniFrame());
bool Create(wxWindow* parent, const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
// Python code should rarely be neccessary. Just use the GetItemPyData and
// SetItemPyData tree methods instead of the GetItemData and SetItemData
// methods.
-%name(TreeItemData) class wxPyTreeItemData {
+%rename(TreeItemData) wxPyTreeItemData;
+class wxPyTreeItemData {
public:
wxPyTreeItemData(PyObject* obj = NULL);
MustHaveApp(wxPyTreeCtrl);
-%name(TreeCtrl)class wxPyTreeCtrl : public wxControl {
+%rename(TreeCtrl) wxPyTreeCtrl;
+class wxPyTreeCtrl : public wxControl {
public:
%pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
%pythonAppend wxPyTreeCtrl() ""
long style = wxTR_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyTreeCtrlNameStr);
- %name(PreTreeCtrl)wxPyTreeCtrl();
+ %RenameCtor(PreTreeCtrl, wxPyTreeCtrl());
// Turn it back on again
%typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
wxPyTreeItemData *data = NULL);
// insert a new item before the one with the given index
- %name(InsertItemBefore)
- wxTreeItemId InsertItem(const wxTreeItemId& parent,
+ %Rename(InsertItemBefore,
+ wxTreeItemId, InsertItem(const wxTreeItemId& parent,
size_t index,
const wxString& text,
int image = -1, int selectedImage = -1,
- wxPyTreeItemData *data = NULL);
+ wxPyTreeItemData *data = NULL));
// insert a new item in as the last child of the parent
wxTreeItemId AppendItem(const wxTreeItemId& parent,
MustHaveApp(wxPyVScrolledWindow);
-%name(VScrolledWindow) class wxPyVScrolledWindow : public wxPanel
+%rename(VScrolledWindow) wxPyVScrolledWindow;
+class wxPyVScrolledWindow : public wxPanel
{
public:
%pythonAppend wxPyVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)"
long style = 0,
const wxString& name = wxPyPanelNameStr);
- %name(PreVScrolledWindow)wxPyVScrolledWindow();
+ %RenameCtor(PreVScrolledWindow, wxPyVScrolledWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
// return the item at the specified (in physical coordinates) position or
// wxNOT_FOUND if none, i.e. if it is below the last item
- %name(HitTestXY) int HitTest(wxCoord x, wxCoord y) const;
+ %Rename(HitTestXY, int, HitTest(wxCoord x, wxCoord y) const);
int HitTest(const wxPoint& pt) const;
// recalculate all our parameters and redisplay all lines
*/
MustHaveApp(wxPyVListBox);
-%name(VListBox) class wxPyVListBox : public wxPyVScrolledWindow
+%rename(VListBox) wxPyVListBox;
+class wxPyVListBox : public wxPyVScrolledWindow
{
public:
%pythonAppend wxPyVListBox "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)"
long style = 0,
const wxString& name = wxPyVListBoxNameStr);
- %name(PreVListBox) wxPyVListBox();
+ %RenameCtor(PreVListBox, wxPyVListBox());
void _setCallbackInfo(PyObject* self, PyObject* _class);
//
// by default both margins are 0
void SetMargins(const wxPoint& pt);
- %name(SetMarginsXY) void SetMargins(wxCoord x, wxCoord y);
+ %Rename(SetMarginsXY, void, SetMargins(wxCoord x, wxCoord y));
// change the background colour of the selected cells
void SetSelectionBackground(const wxColour& col);
// wxHtmlListBox is a listbox whose items are wxHtmlCells
MustHaveApp(wxPyHtmlListBox);
-%name(HtmlListBox) class wxPyHtmlListBox : public wxPyVListBox
+%rename(HtmlListBox) wxPyHtmlListBox;
+class wxPyHtmlListBox : public wxPyVListBox
{
public:
%pythonAppend wxPyHtmlListBox "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)"
long style = 0,
const wxString& name = wxPyVListBoxNameStr);
- %name(PreHtmlListBox) wxPyHtmlListBox();
+ %RenameCtor(PreHtmlListBox, wxPyHtmlListBox());
void _setCallbackInfo(PyObject* self, PyObject* _class);
dimensions the border or title bar have when trying to fit the window
around panel items, for example.", "");
void SetClientSize( const wxSize& size );
- %name(SetClientSizeWH) void SetClientSize( int width, int height );
- %name(SetClientRect) void SetClientSize(const wxRect& rect);
+ %Rename(SetClientSizeWH, void, SetClientSize( int width, int height ));
+ %Rename(SetClientRect, void, SetClientSize(const wxRect& rect));
DocStr(GetPosition, // sets the docstring for both
virtual void SetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 );
- %name(SetSizeHintsSz) void SetSizeHints( const wxSize& minSize,
- const wxSize& maxSize=wxDefaultSize,
- const wxSize& incSize=wxDefaultSize);
+ %Rename(SetSizeHintsSz, void, SetSizeHints( const wxSize& minSize,
+ const wxSize& maxSize=wxDefaultSize,
+ const wxSize& incSize=wxDefaultSize));
DocStr(SetVirtualSizeHints,
the virtual area of the window outside the given bounds.", "");
virtual void SetVirtualSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1 );
- %name(SetVirtualSizeHintsSz)void SetVirtualSizeHints(
- const wxSize& minSize, const wxSize& maxSize=wxDefaultSize);
+ %Rename(SetVirtualSizeHintsSz, void, SetVirtualSizeHints(
+ const wxSize& minSize, const wxSize& maxSize=wxDefaultSize));
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.", "");
void SetVirtualSize(const wxSize& size );
- %name(SetVirtualSizeWH) void SetVirtualSize( int w, int h );
+ %Rename(SetVirtualSizeWH, void, SetVirtualSize( int w, int h ));
DocStr(GetVirtualSize,
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.", "");
- %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
- %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
- %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt);
- %name(DLG_SZE) wxSize ConvertDialogToPixels(const wxSize& sz);
+ %Rename(ConvertDialogPointToPixels, wxPoint, ConvertDialogToPixels(const wxPoint& pt));
+ %Rename(ConvertDialogSizeToPixels, wxSize, ConvertDialogToPixels(const wxSize& sz));
+ %Rename(DLG_PNT, wxPoint, ConvertDialogToPixels(const wxPoint& pt));
+ %Rename(DLG_SZE, wxSize, ConvertDialogToPixels(const wxSize& sz));
DocStr(ConvertPixelPointToDialog,
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.", "");
- %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt);
- %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz);
+ %Rename(ConvertPixelPointToDialog, wxPoint, ConvertPixelsToDialog(const wxPoint& pt));
+ %Rename(ConvertPixelSizeToDialog, wxSize, ConvertPixelsToDialog(const wxSize& sz));
optimize redrawing by only redrawing those areas, which have been
exposed.", "");
bool IsExposed( int x, int y, int w=1, int h=1 ) const;
- %name(IsExposedPoint) bool IsExposed( const wxPoint& pt ) const;
- %name(IsExposedRect) bool IsExposed( const wxRect& rect ) const;
+ %Rename(IsExposedPoint, bool, IsExposed( const wxPoint& pt ) const);
+ %Rename(IsExposedRect, bool, IsExposed( const wxRect& rect ) const);
selected, the corresponding menu event is generated and will be processed as
usual. If the default position is given then the current position of the
mouse cursor will be used.", "");
- %name(PopupMenuXY) bool PopupMenu(wxMenu *menu, int x=-1, int y=-1);
+ %Rename(PopupMenuXY, bool, PopupMenu(wxMenu *menu, int x=-1, int y=-1));
bool PopupMenu(wxMenu *menu, const wxPoint& pos=wxDefaultPosition);
DocStr(SetToolTip,
"Attach a tooltip to the window.", "");
- %name(SetToolTipString) void SetToolTip( const wxString &tip );
+ %Rename(SetToolTipString, void, SetToolTip( const wxString &tip ));
void SetToolTip( wxToolTip *tip );
DocDeclStr(
// user-friendly creation:
- %name(XmlNodeEasy) wxXmlNode(wxXmlNodeType type, const wxString& name,
- const wxString& content = wxPyEmptyString);
+ %RenameCtor(XmlNodeEasy, wxXmlNode(wxXmlNodeType type, const wxString& name,
+ const wxString& content = wxPyEmptyString));
void AddChild(wxXmlNode *child);
void InsertChild(wxXmlNode *child, wxXmlNode *before_node);
bool RemoveChild(wxXmlNode *child);
void AddProperty(wxXmlProperty *prop);
- %name(AddPropertyName) void AddProperty(const wxString& name, const wxString& value);
+ %Rename(AddPropertyName, void, AddProperty(const wxString& name, const wxString& value));
bool DeleteProperty(const wxString& name);
// access methods:
public:
wxXmlDocument(const wxString& filename,
const wxString& encoding = wxPyUTF8String);
- %name(XmlDocumentFromStream) wxXmlDocument(wxInputStream& stream,
- const wxString& encoding = wxPyUTF8String);
- %name(EmptyXmlDocument) wxXmlDocument();
+ %RenameCtor(XmlDocumentFromStream, wxXmlDocument(wxInputStream& stream,
+ const wxString& encoding = wxPyUTF8String));
+ %RenameCtor(EmptyXmlDocument, wxXmlDocument());
~wxXmlDocument();
// otherwise.
bool Load(const wxString& filename,
const wxString& encoding = wxPyUTF8String);
- %name(LoadFromStream)bool Load(wxInputStream& stream,
- const wxString& encoding = wxPyUTF8String);
+ %Rename(LoadFromStream, bool, Load(wxInputStream& stream,
+ const wxString& encoding = wxPyUTF8String));
// Saves document as .xml file.
bool Save(const wxString& filename) const;
- %name(SaveToStream)bool Save(wxOutputStream& stream) const;
+ %Rename(SaveToStream, bool, Save(wxOutputStream& stream) const);
bool IsOk() const;
// Now the version that will be SWIGged.
-%name(XmlResourceHandler) class wxPyXmlResourceHandler : public wxObject {
+%rename(XmlResourceHandler) wxPyXmlResourceHandler;
+class wxPyXmlResourceHandler : public wxObject {
public:
%pythonAppend wxPyXmlResourceHandler "self._setCallbackInfo(self, XmlResourceHandler)"
wxPyXmlResourceHandler() : wxXmlResourceHandler() {}
// subclass property of object nodes will be ignored
// (useful for previews in XRC editors)
wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE);
- %name(EmptyXmlResource) wxXmlResource(int flags = wxXRC_USE_LOCALE);
+ %RenameCtor(EmptyXmlResource, wxXmlResource(int flags = wxXRC_USE_LOCALE));
~wxXmlResource();
// Loads menubar from resource. Returns NULL on failure.
wxMenuBar *LoadMenuBar(const wxString& name);
- %name(LoadMenuBarOnFrame) wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name);
+ %Rename(LoadMenuBarOnFrame, wxMenuBar* , LoadMenuBar(wxWindow *parent, const wxString& name));
// Loads toolbar
// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
// dlg->ShowModal();
wxDialog *LoadDialog(wxWindow *parent, const wxString& name);
- %name(LoadOnDialog)bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name);
+ %Rename(LoadOnDialog, bool, LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name));
// Loads panel. panel points to parent window (if any). Second form
// is used to finish creation of already existing instance.
wxPanel *LoadPanel(wxWindow *parent, const wxString& name);
- %name(LoadOnPanel)bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name);
+ %Rename(LoadOnPanel, bool, LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name));
// Load a frame's contents from a resource
wxFrame *LoadFrame(wxWindow* parent, const wxString& name);
- %name(LoadOnFrame)bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name);
+ %Rename(LoadOnFrame, bool, LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name));
// Load an object from the resource specifying both the resource name and
// the classname. This lets you load nonstandard container windows.
// Load an object from the resource specifying both the resource name and
// the classname. This form lets you finish the creation of an existing
// instance.
- %name(LoadOnObject)bool LoadObject(wxObject *instance, wxWindow *parent, const wxString& name,
- const wxString& classname);
+ %Rename(LoadOnObject, bool, LoadObject(wxObject *instance, wxWindow *parent, const wxString& name,
+ const wxString& classname));
// Loads a bitmap resource from a file.
wxBitmap LoadBitmap(const wxString& name);
-%name(XmlSubclassFactory)class wxPyXmlSubclassFactory {
+%rename(XmlSubclassFactory) wxPyXmlSubclassFactory;
+class wxPyXmlSubclassFactory {
public:
%pythonAppend wxPyXmlSubclassFactory "self._setCallbackInfo(self, XmlSubclassFactory)"
wxPyXmlSubclassFactory();
+++ /dev/null
-/***********************************************************************
- * common.swg for wxPython
- *
- * Include only the function prototypes and such from SWIG's common.swg,
- * but not the runtime functions themselves. This helps keep the
- * wrapper files clean of unnecessary stuff that is in the libpy.c file
- * anyway.
- *
- ************************************************************************/
-
-#include <string.h>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-# if defined(_MSC_VER) || defined(__GNUC__)
-# if defined(STATIC_LINKED)
-# define SWIGEXPORT(a) a
-# define SWIGIMPORT(a) extern a
-# else
-# define SWIGEXPORT(a) __declspec(dllexport) a
-# define SWIGIMPORT(a) extern a
-# endif
-# else
-# if defined(__BORLANDC__)
-# define SWIGEXPORT(a) a _export
-# define SWIGIMPORT(a) a _export
-# else
-# define SWIGEXPORT(a) a
-# define SWIGIMPORT(a) a
-# endif
-# endif
-#else
-# define SWIGEXPORT(a) a
-# define SWIGIMPORT(a) a
-#endif
-
-#ifdef SWIG_GLOBAL
-# define SWIGRUNTIME(a) SWIGEXPORT(a)
-#else
-# define SWIGRUNTIME(a) static a
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *(*swig_converter_func)(void *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-typedef struct swig_type_info {
- const char *name;
- swig_converter_func converter;
- const char *str;
- void *clientdata;
- swig_dycast_func dcast;
- struct swig_type_info *next;
- struct swig_type_info *prev;
-} swig_type_info;
-
-
-SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
-SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
-SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
-SWIGIMPORT(const char *) SWIG_TypePrettyName(const swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
-SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
-SWIGIMPORT(char *) SWIG_PackData(char *, void *, int);
-SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int);
-
-
-#ifdef __cplusplus
-}
-#endif
-
long style = wxWANTS_CHARS,
const wxString& name = wxPyPanelNameStr);
- %name(PreGrid) wxGrid();
+ %RenameCtor(PreGrid, wxGrid());
// Turn it back on again
%}
-%name(HtmlTagHandler) class wxPyHtmlTagHandler : public wxObject {
+%rename(HtmlTagHandler) wxPyHtmlTagHandler;
+class wxPyHtmlTagHandler : public wxObject {
public:
%pythonAppend wxPyHtmlTagHandler "self._setCallbackInfo(self, HtmlTagHandler)"
wxPyHtmlTagHandler();
%}
-%name(HtmlWinTagHandler) class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler {
+%rename(HtmlWinTagHandler) wxPyHtmlWinTagHandler;
+class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler {
public:
%pythonAppend wxPyHtmlWinTagHandler "self._setCallbackInfo(self, HtmlWinTagHandler)"
wxPyHtmlWinTagHandler();
void Set(const wxPoint& fromPos, const wxHtmlCell *fromCell,
const wxPoint& toPos, const wxHtmlCell *toCell);
- %name(SetCells)void Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell);
+ %Rename(SetCells, void, Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell));
const wxHtmlCell *GetFromCell() const;
const wxHtmlCell *GetToCell() const;
int GetIndentUnits(int ind);
void SetAlign(const wxHtmlTag& tag);
void SetWidthFloat(int w, int units);
- %name(SetWidthFloatFromTag)void SetWidthFloat(const wxHtmlTag& tag);
+ %Rename(SetWidthFloatFromTag, void, SetWidthFloat(const wxHtmlTag& tag));
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
void SetBackgroundColour(const wxColour& clr);
wxColour GetBackgroundColour();
// And now the version seen by SWIG
-%name(HtmlFilter) class wxPyHtmlFilter : public wxObject {
+%rename(HtmlFilter) wxPyHtmlFilter;
+class wxPyHtmlFilter : public wxObject {
public:
%pythonAppend wxPyHtmlFilter "self._setCallbackInfo(self, HtmlFilter)"
wxPyHtmlFilter();
MustHaveApp(wxPyHtmlWindow);
-%name(HtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow {
+%rename(HtmlWindow) wxPyHtmlWindow;
+class wxPyHtmlWindow : public wxScrolledWindow {
public:
%pythonAppend wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)"
%pythonAppend wxPyHtmlWindow() ""
const wxSize& size = wxDefaultSize,
int style=wxHW_DEFAULT_STYLE,
const wxString& name = wxPyHtmlWindowNameStr);
- %name(PreHtmlWindow)wxPyHtmlWindow();
+ %RenameCtor(PreHtmlWindow, wxPyHtmlWindow());
// Turn it back on again
%typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
wxHtmlHelpData* GetData();
void SetTitleFormat(const wxString& format);
void Display(const wxString& x);
- %name(DisplayID) void Display(int id);
+ %Rename(DisplayID, void, Display(int id));
void DisplayContents();
void DisplayIndex();
bool KeywordSearch(const wxString& keyword);
void SetTempDir(const wxString& path);
bool AddBook(const wxString& book, int show_wait_msg = false);
void Display(const wxString& x);
- %name(DisplayID) void Display(int id);
+ %Rename(DisplayID, void, Display(int id));
void DisplayContents();
void DisplayIndex();
bool KeywordSearch(const wxString& keyword);
+++ /dev/null
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.22
- *
- * This file is not intended to be easily readable and contains a number of
- * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG
- * interface file instead.
- * ----------------------------------------------------------------------------- */
-
-#define SWIGPYTHON
-
-#define SWIG_GLOBAL 1
-
-
-#include "Python.h"
-
-/*************************************************************** -*- c -*-
- * python/precommon.swg
- *
- * Rename all exported symbols from common.swg, to avoid symbol
- * clashes if multiple interpreters are included
- *
- ************************************************************************/
-
-#define SWIG_TypeRegister SWIG_Python_TypeRegister
-#define SWIG_TypeCheck SWIG_Python_TypeCheck
-#define SWIG_TypeCast SWIG_Python_TypeCast
-#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
-#define SWIG_TypeName SWIG_Python_TypeName
-#define SWIG_TypePrettyName SWIG_Python_TypePrettyName
-#define SWIG_TypeQuery SWIG_Python_TypeQuery
-#define SWIG_TypeClientData SWIG_Python_TypeClientData
-#define SWIG_PackData SWIG_Python_PackData
-#define SWIG_UnpackData SWIG_Python_UnpackData
-
-
-/***********************************************************************
- * common.swg
- *
- * This file contains generic SWIG runtime support for pointer
- * type checking as well as a few commonly used macros to control
- * external linkage.
- *
- * Author : David Beazley (beazley@cs.uchicago.edu)
- *
- * Copyright (c) 1999-2000, The University of Chicago
- *
- * This file may be freely redistributed without license or fee provided
- * this copyright message remains intact.
- ************************************************************************/
-
-#include <string.h>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-# if defined(_MSC_VER) || defined(__GNUC__)
-# if defined(STATIC_LINKED)
-# define SWIGEXPORT(a) a
-# define SWIGIMPORT(a) extern a
-# else
-# define SWIGEXPORT(a) __declspec(dllexport) a
-# define SWIGIMPORT(a) extern a
-# endif
-# else
-# if defined(__BORLANDC__)
-# define SWIGEXPORT(a) a _export
-# define SWIGIMPORT(a) a _export
-# else
-# define SWIGEXPORT(a) a
-# define SWIGIMPORT(a) a
-# endif
-# endif
-#else
-# define SWIGEXPORT(a) a
-# define SWIGIMPORT(a) a
-#endif
-
-#ifdef SWIG_GLOBAL
-# define SWIGRUNTIME(a) SWIGEXPORT(a)
-#else
-# define SWIGRUNTIME(a) static a
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *(*swig_converter_func)(void *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-typedef struct swig_type_info {
- const char *name;
- swig_converter_func converter;
- const char *str;
- void *clientdata;
- swig_dycast_func dcast;
- struct swig_type_info *next;
- struct swig_type_info *prev;
-} swig_type_info;
-
-#ifdef SWIG_NOINCLUDE
-
-SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
-SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
-SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
-SWIGIMPORT(const char *) SWIG_TypePrettyName(const swig_type_info *);
-SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
-SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
-SWIGIMPORT(char *) SWIG_PackData(char *, void *, int);
-SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int);
-
-#else
-
-static swig_type_info *swig_type_list = 0;
-static swig_type_info **swig_type_list_handle = &swig_type_list;
-
-/* Register a type mapping with the type-checking */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeRegister(swig_type_info *ti) {
- swig_type_info *tc, *head, *ret, *next;
- /* Check to see if this type has already been registered */
- tc = *swig_type_list_handle;
- while (tc) {
- if (strcmp(tc->name, ti->name) == 0) {
- /* Already exists in the table. Just add additional types to the list */
- if (tc->clientdata) ti->clientdata = tc->clientdata;
- head = tc;
- next = tc->next;
- goto l1;
- }
- tc = tc->prev;
- }
- head = ti;
- next = 0;
-
- /* Place in list */
- ti->prev = *swig_type_list_handle;
- *swig_type_list_handle = ti;
-
- /* Build linked lists */
- l1:
- ret = head;
- tc = ti + 1;
- /* Patch up the rest of the links */
- while (tc->name) {
- head->next = tc;
- tc->prev = head;
- head = tc;
- tc++;
- }
- if (next) next->prev = head;
- head->next = next;
- return ret;
-}
-
-/* Check the typename */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeCheck(char *c, swig_type_info *ty) {
- swig_type_info *s;
- if (!ty) return 0; /* Void pointer */
- s = ty->next; /* First element always just a name */
- do {
- if (strcmp(s->name,c) == 0) {
- if (s == ty->next) return s;
- /* Move s to the top of the linked list */
- s->prev->next = s->next;
- if (s->next) {
- s->next->prev = s->prev;
- }
- /* Insert s as second element in the list */
- s->next = ty->next;
- if (ty->next) ty->next->prev = s;
- ty->next = s;
- s->prev = ty;
- return s;
- }
- s = s->next;
- } while (s && (s != ty->next));
- return 0;
-}
-
-/* Cast a pointer up an inheritance hierarchy */
-SWIGRUNTIME(void *)
-SWIG_TypeCast(swig_type_info *ty, void *ptr) {
- if ((!ty) || (!ty->converter)) return ptr;
- return (*ty->converter)(ptr);
-}
-
-/* Dynamic pointer casting. Down an inheritance hierarchy */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
- swig_type_info *lastty = ty;
- if (!ty || !ty->dcast) return ty;
- while (ty && (ty->dcast)) {
- ty = (*ty->dcast)(ptr);
- if (ty) lastty = ty;
- }
- return lastty;
-}
-
-/* Return the name associated with this type */
-SWIGRUNTIME(const char *)
-SWIG_TypeName(const swig_type_info *ty) {
- return ty->name;
-}
-
-/* Return the pretty name associated with this type,
- that is an unmangled type name in a form presentable to the user.
-*/
-SWIGRUNTIME(const char *)
-SWIG_TypePrettyName(const swig_type_info *type) {
- /* The "str" field contains the equivalent pretty names of the
- type, separated by vertical-bar characters. We choose
- to print the last name, as it is often (?) the most
- specific. */
- if (type->str != NULL) {
- const char *last_name = type->str;
- const char *s;
- for (s = type->str; *s; s++)
- if (*s == '|') last_name = s+1;
- return last_name;
- }
- else
- return type->name;
-}
-
-/*
- Compare two type names skipping the space characters, therefore
- "char*" == "char *" and "Class<int>" == "Class<int >", etc.
-
- Return 0 when the two name types are equivalent, as in
- strncmp, but skipping ' '.
-*/
-static int
-SWIG_TypeNameComp(const char *f1, const char *l1,
- const char *f2, const char *l2) {
- for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
- while ((*f1 == ' ') && (f1 != l1)) ++f1;
- while ((*f2 == ' ') && (f2 != l2)) ++f2;
- if (*f1 != *f2) return *f1 - *f2;
- }
- return (l1 - f1) - (l2 - f2);
-}
-
-/*
- Check type equivalence in a name list like <name1>|<name2>|...
-*/
-static int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
- int equiv = 0;
- const char* te = tb + strlen(tb);
- const char* ne = nb;
- while (!equiv && *ne) {
- for (nb = ne; *ne; ++ne) {
- if (*ne == '|') break;
- }
- equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
- if (*ne) ++ne;
- }
- return equiv;
-}
-
-
-/* Search for a swig_type_info structure */
-SWIGRUNTIME(swig_type_info *)
-SWIG_TypeQuery(const char *name) {
- swig_type_info *ty = *swig_type_list_handle;
- while (ty) {
- if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
- if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
- ty = ty->prev;
- }
- return 0;
-}
-
-/* Set the clientdata field for a type */
-SWIGRUNTIME(void)
-SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
- swig_type_info *tc, *equiv;
- if (ti->clientdata == clientdata) return;
- ti->clientdata = clientdata;
- equiv = ti->next;
- while (equiv) {
- if (!equiv->converter) {
- tc = *swig_type_list_handle;
- while (tc) {
- if ((strcmp(tc->name, equiv->name) == 0))
- SWIG_TypeClientData(tc,clientdata);
- tc = tc->prev;
- }
- }
- equiv = equiv->next;
- }
-}
-
-/* Pack binary data into a string */
-SWIGRUNTIME(char *)
-SWIG_PackData(char *c, void *ptr, int sz) {
- static char hex[17] = "0123456789abcdef";
- unsigned char *u = (unsigned char *) ptr;
- const unsigned char *eu = u + sz;
- register unsigned char uu;
- for (; u != eu; ++u) {
- uu = *u;
- *(c++) = hex[(uu & 0xf0) >> 4];
- *(c++) = hex[uu & 0xf];
- }
- return c;
-}
-
-/* Unpack binary data from a string */
-SWIGRUNTIME(char *)
-SWIG_UnpackData(char *c, void *ptr, int sz) {
- register unsigned char uu = 0;
- register int d;
- unsigned char *u = (unsigned char *) ptr;
- const unsigned char *eu = u + sz;
- for (; u != eu; ++u) {
- d = *(c++);
- if ((d >= '0') && (d <= '9'))
- uu = ((d - '0') << 4);
- else if ((d >= 'a') && (d <= 'f'))
- uu = ((d - ('a'-10)) << 4);
- d = *(c++);
- if ((d >= '0') && (d <= '9'))
- uu |= (d - '0');
- else if ((d >= 'a') && (d <= 'f'))
- uu |= (d - ('a'-10));
- *u = uu;
- }
- return c;
-}
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/***********************************************************************
- * pyrun.swg
- *
- * This file contains the runtime support for Python modules
- * and includes code for managing global variables and pointer
- * type checking.
- *
- * Author : David Beazley (beazley@cs.uchicago.edu)
- ************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SWIG_PY_INT 1
-#define SWIG_PY_FLOAT 2
-#define SWIG_PY_STRING 3
-#define SWIG_PY_POINTER 4
-#define SWIG_PY_BINARY 5
-
-/* Flags for pointer conversion */
-
-#define SWIG_POINTER_EXCEPTION 0x1
-#define SWIG_POINTER_DISOWN 0x2
-
-/* Exception handling in wrappers */
-#define SWIG_fail goto fail
-
-/* Constant information structure */
-typedef struct swig_const_info {
- int type;
- char *name;
- long lvalue;
- double dvalue;
- void *pvalue;
- swig_type_info **ptype;
-} swig_const_info;
-
-/* Common SWIG API */
-#define SWIG_ConvertPtr(obj, pp, type, flags) \
- SWIG_Python_ConvertPtr(obj, pp, type, flags)
-#define SWIG_NewPointerObj(p, type, flags) \
- SWIG_Python_NewPointerObj(p, type, flags)
-#define SWIG_MustGetPtr(p, type, argnum, flags) \
- SWIG_Python_MustGetPtr(p, type, argnum, flags)
-
-/* Python-specific SWIG API */
-#define SWIG_newvarlink() \
- SWIG_Python_newvarlink()
-#define SWIG_addvarlink(p, name, get_attr, set_attr) \
- SWIG_Python_addvarlink(p, name, get_attr, set_attr)
-#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
- SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type) \
- SWIG_Python_NewPackedObj(ptr, sz, type)
-#define SWIG_InstallConstants(d, constants) \
- SWIG_Python_InstallConstants(d, constants)
-
-typedef double (*py_objasdbl_conv)(PyObject *obj);
-
-#ifdef SWIG_NOINCLUDE
-
-SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
-SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
-SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
-SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void);
-SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
-SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
-SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
-
-
-#else
-
-
-/* -----------------------------------------------------------------------------
- * global variable support code.
- * ----------------------------------------------------------------------------- */
-
-typedef struct swig_globalvar {
- char *name; /* Name of global variable */
- PyObject *(*get_attr)(void); /* Return the current value */
- int (*set_attr)(PyObject *); /* Set the value */
- struct swig_globalvar *next;
-} swig_globalvar;
-
-typedef struct swig_varlinkobject {
- PyObject_HEAD
- swig_globalvar *vars;
-} swig_varlinkobject;
-
-static PyObject *
-swig_varlink_repr(swig_varlinkobject *v) {
- v = v;
- return PyString_FromString("<Global variables>");
-}
-
-static int
-swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
- swig_globalvar *var;
- flags = flags;
- fprintf(fp,"Global variables { ");
- for (var = v->vars; var; var=var->next) {
- fprintf(fp,"%s", var->name);
- if (var->next) fprintf(fp,", ");
- }
- fprintf(fp," }\n");
- return 0;
-}
-
-static PyObject *
-swig_varlink_getattr(swig_varlinkobject *v, char *n) {
- swig_globalvar *var = v->vars;
- while (var) {
- if (strcmp(var->name,n) == 0) {
- return (*var->get_attr)();
- }
- var = var->next;
- }
- PyErr_SetString(PyExc_NameError,"Unknown C global variable");
- return NULL;
-}
-
-static int
-swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
- swig_globalvar *var = v->vars;
- while (var) {
- if (strcmp(var->name,n) == 0) {
- return (*var->set_attr)(p);
- }
- var = var->next;
- }
- PyErr_SetString(PyExc_NameError,"Unknown C global variable");
- return 1;
-}
-
-statichere PyTypeObject varlinktype = {
- PyObject_HEAD_INIT(0)
- 0, /* Number of items in variable part (ob_size) */
- (char *)"swigvarlink", /* Type name (tp_name) */
- sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
- 0, /* Itemsize (tp_itemsize) */
- 0, /* Deallocator (tp_dealloc) */
- (printfunc) swig_varlink_print, /* Print (tp_print) */
- (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
- (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
- 0, /* tp_compare */
- (reprfunc) swig_varlink_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- 0, /* tp_flags */
- 0, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
-#if PY_VERSION_HEX >= 0x02020000
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
- 0, /* tp_free */
- 0, /* tp_is_gc */
- 0, /* tp_bases */
- 0, /* tp_mro */
- 0, /* tp_cache */
- 0, /* tp_subclasses */
- 0, /* tp_weaklist */
-#endif
-#if PY_VERSION_HEX >= 0x02030200
- 0, /* tp_del */
-#endif
-#ifdef COUNT_ALLOCS
- /* these must be last */
- 0, /* tp_alloc */
- 0, /* tp_free */
- 0, /* tp_maxalloc */
- 0, /* tp_next */
-#endif
-};
-
-/* Create a variable linking object for use later */
-SWIGRUNTIME(PyObject *)
-SWIG_Python_newvarlink(void) {
- swig_varlinkobject *result = 0;
- result = PyMem_NEW(swig_varlinkobject,1);
- varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */
- result->ob_type = &varlinktype;
- result->vars = 0;
- result->ob_refcnt = 0;
- Py_XINCREF((PyObject *) result);
- return ((PyObject*) result);
-}
-
-SWIGRUNTIME(void)
-SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
- swig_varlinkobject *v;
- swig_globalvar *gv;
- v= (swig_varlinkobject *) p;
- gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
- gv->name = (char *) malloc(strlen(name)+1);
- strcpy(gv->name,name);
- gv->get_attr = get_attr;
- gv->set_attr = set_attr;
- gv->next = v->vars;
- v->vars = gv;
-}
-
-/* Convert a pointer value */
-SWIGRUNTIME(int)
-SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
- swig_type_info *tc;
- char *c = 0;
- static PyObject *SWIG_this = 0;
- int newref = 0;
- PyObject *pyobj = 0;
-
- if (!obj) return 0;
- if (obj == Py_None) {
- *ptr = 0;
- return 0;
- }
-#ifdef SWIG_COBJECT_TYPES
- if (!(PyCObject_Check(obj))) {
- if (!SWIG_this)
- SWIG_this = PyString_FromString("this");
- pyobj = obj;
- obj = PyObject_GetAttr(obj,SWIG_this);
- newref = 1;
- if (!obj) goto type_error;
- if (!PyCObject_Check(obj)) {
- Py_DECREF(obj);
- goto type_error;
- }
- }
- *ptr = PyCObject_AsVoidPtr(obj);
- c = (char *) PyCObject_GetDesc(obj);
- if (newref) Py_DECREF(obj);
- goto cobject;
-#else
- if (!(PyString_Check(obj))) {
- if (!SWIG_this)
- SWIG_this = PyString_FromString("this");
- pyobj = obj;
- obj = PyObject_GetAttr(obj,SWIG_this);
- newref = 1;
- if (!obj) goto type_error;
- if (!PyString_Check(obj)) {
- Py_DECREF(obj);
- goto type_error;
- }
- }
- c = PyString_AS_STRING(obj);
- /* Pointer values must start with leading underscore */
- if (*c != '_') {
- *ptr = (void *) 0;
- if (strcmp(c,"NULL") == 0) {
- if (newref) { Py_DECREF(obj); }
- return 0;
- } else {
- if (newref) { Py_DECREF(obj); }
- goto type_error;
- }
- }
- c++;
- c = SWIG_UnpackData(c,ptr,sizeof(void *));
- if (newref) { Py_DECREF(obj); }
-#endif
-
-#ifdef SWIG_COBJECT_TYPES
-cobject:
-#endif
-
- if (ty) {
- tc = SWIG_TypeCheck(c,ty);
- if (!tc) goto type_error;
- *ptr = SWIG_TypeCast(tc,(void*) *ptr);
- }
-
- if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
- PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
- }
- return 0;
-
-type_error:
- PyErr_Clear();
- if (flags & SWIG_POINTER_EXCEPTION) {
- if (ty && c) {
- PyErr_Format(PyExc_TypeError,
- "Type error. Got %s, expected %s",
- c, ty->name);
- } else {
- PyErr_SetString(PyExc_TypeError,"Expected a pointer");
- }
- }
- return -1;
-}
-
-/* Convert a pointer value, signal an exception on a type mismatch */
-SWIGRUNTIME(void *)
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
- void *result;
- SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
- return result;
-}
-
-/* Convert a packed value value */
-SWIGRUNTIME(int)
-SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
- swig_type_info *tc;
- char *c = 0;
-
- if ((!obj) || (!PyString_Check(obj))) goto type_error;
- c = PyString_AS_STRING(obj);
- /* Pointer values must start with leading underscore */
- if (*c != '_') goto type_error;
- c++;
- c = SWIG_UnpackData(c,ptr,sz);
- if (ty) {
- tc = SWIG_TypeCheck(c,ty);
- if (!tc) goto type_error;
- }
- return 0;
-
-type_error:
-
- if (flags) {
- if (ty && c) {
- PyErr_Format(PyExc_TypeError,
- "Type error. Got %s, expected %s",
- c, ty->name);
- } else {
- PyErr_SetString(PyExc_TypeError,"Expected a pointer");
- }
- }
- return -1;
-}
-
-/* Create a new pointer object */
-SWIGRUNTIME(PyObject *)
-SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
- PyObject *robj;
- if (!ptr) {
- Py_INCREF(Py_None);
- return Py_None;
- }
-#ifdef SWIG_COBJECT_TYPES
- robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
-#else
- {
- char result[1024];
- char *r = result;
- *(r++) = '_';
- r = SWIG_PackData(r,&ptr,sizeof(void *));
- strcpy(r,type->name);
- robj = PyString_FromString(result);
- }
-#endif
- if (!robj || (robj == Py_None)) return robj;
- if (type->clientdata) {
- PyObject *inst;
- PyObject *args = Py_BuildValue((char*)"(O)", robj);
- Py_DECREF(robj);
- inst = PyObject_CallObject((PyObject *) type->clientdata, args);
- Py_DECREF(args);
- if (inst) {
- if (own) {
- PyObject_SetAttrString(inst,(char*)"thisown",Py_True);
- }
- robj = inst;
- }
- }
- return robj;
-}
-
-SWIGRUNTIME(PyObject *)
-SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
- char result[1024];
- char *r = result;
- if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
- *(r++) = '_';
- r = SWIG_PackData(r,ptr,sz);
- strcpy(r,type->name);
- return PyString_FromString(result);
-}
-
-/* Install Constants */
-SWIGRUNTIME(void)
-SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
- int i;
- PyObject *obj;
- for (i = 0; constants[i].type; i++) {
- switch(constants[i].type) {
- case SWIG_PY_INT:
- obj = PyInt_FromLong(constants[i].lvalue);
- break;
- case SWIG_PY_FLOAT:
- obj = PyFloat_FromDouble(constants[i].dvalue);
- break;
- case SWIG_PY_STRING:
- if (constants[i].pvalue) {
- obj = PyString_FromString((char *) constants[i].pvalue);
- } else {
- Py_INCREF(Py_None);
- obj = Py_None;
- }
- break;
- case SWIG_PY_POINTER:
- obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
- break;
- case SWIG_PY_BINARY:
- obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
- break;
- default:
- obj = 0;
- break;
- }
- if (obj) {
- PyDict_SetItemString(d,constants[i].name,obj);
- Py_DECREF(obj);
- }
- }
-}
-
-#endif
-
-/* Contract support */
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* -------- TYPES TABLE (BEGIN) -------- */
-
-#define SWIGTYPE_p_char swig_types[0]
-static swig_type_info *swig_types[2];
-
-/* -------- TYPES TABLE (END) -------- */
-
-#define SWIG_init initswigrun
-
-#define SWIG_name "swigrun"
-
-/* Auxiliar swig macros that appear in the header */
-
-#define SWIG_OLDOBJ 1
-#define SWIG_NEWOBJ SWIG_OLDOBJ + 1
-#define SWIG_PYSTR SWIG_NEWOBJ + 1
-
-#ifdef __cplusplus
-#define SWIGSTATICINLINE(a) static inline a
-#define SWIGSTATIC(a) static a
-#define swig_new_array(size,Type) (new Type[(size)])
-#define swig_delete(cptr) delete cptr
-#define swig_delete_array(cptr) delete[] cptr
-#define swig_const_cast(a,Type) const_cast<Type >(a)
-#define swig_static_cast(a,Type) static_cast<Type >(a)
-#define swig_reinterpret_cast(a,Type) reinterpret_cast<Type >(a)
-#define swig_new_copy(ptr,Type) (new Type(*ptr))
-#define swig_numeric_cast(a,Type) static_cast<Type >(a)
-
-#else /* C case */
-
-#define SWIGSTATICINLINE(a) static a
-#define SWIGSTATIC(a) static a
-#define swig_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type)))
-#define swig_delete(cptr) free((char*)cptr)
-#define swig_delete_array(cptr) free((char*)cptr)
-#define swig_const_cast(a,Type) (Type)(a)
-#define swig_static_cast(a,Type) (Type)(a)
-#define swig_reinterpret_cast(a,Type) (Type)(a)
-#define swig_numeric_cast(a,Type) (Type)(a)
-#define swig_new_copy(ptr,Type) ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
-
-#endif /* __cplusplus */
-
-
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_signed_SS_char PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_char PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_short PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_short PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_int PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_long PyInt_FromLong
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_float PyFloat_FromDouble
-/*@@*/
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_double PyFloat_FromDouble
-/*@@*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-static PyMethodDef SwigMethods[] = {
- { NULL, NULL, 0, NULL }
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-
-static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
-
-static swig_type_info *swig_types_initial[] = {
-_swigt__p_char,
-0
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
-
-static swig_const_info swig_const_table[] = {
-{0, 0, 0, 0.0, 0, 0}};
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-extern "C"
-#endif
-SWIGEXPORT(void) SWIG_init(void) {
- static PyObject *SWIG_globals = 0;
- static int typeinit = 0;
- PyObject *m, *d;
- int i;
- if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
- m = Py_InitModule((char *) SWIG_name, SwigMethods);
- d = PyModule_GetDict(m);
-
- if (!typeinit) {
- for (i = 0; swig_types_initial[i]; i++) {
- swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
- }
- typeinit = 1;
- }
- SWIG_InstallConstants(d,swig_const_table);
-
-}
-
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyMediaCtrlNameStr);
- %name(PreMediaCtrl) wxMediaCtrl();
+ %RenameCtor(PreMediaCtrl, wxMediaCtrl());
// %extend {
-// %name(MediaCtrlFromURI)
+// %RenameCtor(MediaCtrlFromURI,
// wxMediaCtrl(wxWindow* parent,
// wxWindowID id=-1,
// const wxString& location=wxPyEmptyString,
// long style = 0,
// const wxString& szBackend = wxPyEmptyString,
// const wxValidator& validator = wxDefaultValidator,
-// const wxString& name = wxPyMediaCtrlNameStr)
+// const wxString& name = wxPyMediaCtrlNameStr))
// {
// return new wxMediaCtrl(parent, id, wxURI(location),
// pos, size, style, szBackend, validator, name);
+++ /dev/null
-// There is a bug in the standard t_output_helper, this one will replace it
-// until it is fixed.
-
-
-%fragment("t_output_helper","header") %{
- static PyObject* t_output_helper(PyObject* target, PyObject* o) {
- PyObject* o2;
- PyObject* o3;
-
- if (!target) {
- target = o;
- } else if (target == Py_None) {
- Py_DECREF(Py_None);
- target = o;
- } else {
- if (!PyTuple_Check(target)) {
- o2 = target;
- target = PyTuple_New(1);
- PyTuple_SetItem(target, 0, o2);
- }
- o3 = PyTuple_New(1);
- PyTuple_SetItem(o3, 0, o);
-
- o2 = target;
- target = PySequence_Concat(o2, o3);
- Py_DECREF(o2);
- Py_DECREF(o3);
- }
- return target;
- }
-%}
-
-
-
-// These fragments are inserted in modules that need to convert PyObjects to
-// integer values, my versions allow any numeric type to be used, as long as
-// it can be converted to a PyInt. (Specifically, I allow floats where the
-// default SWIG_AsVal_long would just raise an exception.
-//
-// NOTE: This file has to be %included very early in the SWIGging process as
-// it no longer allows existing fragments to be replaced with one of the same
-// name. So to make this work I had to bring a copy of python.swg into this
-// project and do the %include there before most other of the standard swiglib
-// files are %included. This may change in 1.3.23, so adjust accordingly then.
-
-
-
-%fragment(SWIG_AsVal_frag(long), "header") {
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal(long)(PyObject* obj, long* val)
-{
- if (PyNumber_Check(obj)) {
- if (val) *val = PyInt_AsLong(obj);
- return 1;
- }
- else {
- PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
- obj->ob_type->tp_name);
- PyErr_SetObject(PyExc_TypeError, errmsg);
- Py_DECREF(errmsg);
- }
- return 0;
-}
-}
-
-
-%fragment(SWIG_AsVal_frag(unsigned long), "header",
- fragment=SWIG_AsVal_frag(long)) {
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal(unsigned long)(PyObject* obj, unsigned long* val)
-{
- long v = 0;
- if (SWIG_AsVal_long(obj, &v) && v < 0) {
- PyErr_SetString(PyExc_TypeError, "negative value received for unsigned type");
- return 0;
- }
- else if (val)
- *val = (unsigned long)v;
- return 1;
-}
-}
-
-
-%fragment(SWIG_AsVal_frag(double), "header") {
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal(double)(PyObject *obj, double* val)
-{
- if (PyNumber_Check(obj)) {
- if (val) *val = PyFloat_AsDouble(obj);
- return 1;
- }
- else {
- PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
- obj->ob_type->tp_name);
- PyErr_SetObject(PyExc_TypeError, errmsg);
- Py_DECREF(errmsg);
- }
- return 0;
-}
-}
--- /dev/null
+
+
+// There standard t_output_helper has been changed to return a list rather
+// than a tuple, we'll replace it with the old implementation here.
+
+
+%fragment("t_output_helper","header") %{
+ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
+ PyObject* o2;
+ PyObject* o3;
+
+ if (!target) {
+ target = o;
+ } else if (target == Py_None) {
+ Py_DECREF(Py_None);
+ target = o;
+ } else {
+ if (!PyTuple_Check(target)) {
+ o2 = target;
+ target = PyTuple_New(1);
+ PyTuple_SetItem(target, 0, o2);
+ }
+ o3 = PyTuple_New(1);
+ PyTuple_SetItem(o3, 0, o);
+
+ o2 = target;
+ target = PySequence_Concat(o2, o3);
+ Py_DECREF(o2);
+ Py_DECREF(o3);
+ }
+ return target;
+ }
+%}
+
+
+
+// These fragments are inserted in modules that need to convert PyObjects to
+// integer values, my versions allow any numeric type to be used, as long as
+// it can be converted to a PyInt. (Specifically, I allow floats where the
+// default SWIG_AsVal_long would just raise an exception.
+//
+
+
+%fragment(SWIG_AsVal_frag(long), "header") {
+SWIGINTERN int
+SWIG_AsVal(long)(PyObject* obj, long* val)
+{
+ if (PyNumber_Check(obj)) {
+ if (val) *val = PyInt_AsLong(obj);
+ return 1;
+ }
+ else {
+ SWIG_type_error("number", obj);
+ }
+ return 0;
+}
+}
+
+
+%fragment(SWIG_AsVal_frag(unsigned long), "header",
+ fragment=SWIG_AsVal_frag(long)) {
+SWIGINTERN int
+SWIG_AsVal(unsigned long)(PyObject* obj, unsigned long* val)
+{
+ long v = 0;
+ if (SWIG_AsVal_long(obj, &v) && v < 0) {
+ SWIG_type_error("unsigned number", obj);
+ }
+ else if (val)
+ *val = (unsigned long)v;
+ return 1;
+}
+}
+
+
+%fragment(SWIG_AsVal_frag(double), "header") {
+SWIGINTERN int
+SWIG_AsVal(double)(PyObject *obj, double* val)
+{
+ if (PyNumber_Check(obj)) {
+ if (val) *val = PyFloat_AsDouble(obj);
+ return 1;
+ }
+ else {
+ SWIG_type_error("number", obj);
+ }
+ return 0;
+}
+}
+++ /dev/null
-/***********************************************************************
- * pyrun.swg for wxPython
- *
- * Include only the function prototypes and such from SWIG's pyrun.swg,
- * but not the runtime functions themselves. This helps keep the
- * wrapper files clean of unnecessary stuff that is in the libpy.c file
- * anyway.
- *
- ************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SWIG_PY_INT 1
-#define SWIG_PY_FLOAT 2
-#define SWIG_PY_STRING 3
-#define SWIG_PY_POINTER 4
-#define SWIG_PY_BINARY 5
-
-/* Flags for pointer conversion */
-
-#define SWIG_POINTER_EXCEPTION 0x1
-#define SWIG_POINTER_DISOWN 0x2
-
-/* Exception handling in wrappers */
-#define SWIG_fail goto fail
-
-/* Constant information structure */
-typedef struct swig_const_info {
- int type;
- char *name;
- long lvalue;
- double dvalue;
- void *pvalue;
- swig_type_info **ptype;
-} swig_const_info;
-
-/* Common SWIG API */
-#define SWIG_ConvertPtr(obj, pp, type, flags) \
- SWIG_Python_ConvertPtr(obj, pp, type, flags)
-#define SWIG_NewPointerObj(p, type, flags) \
- SWIG_Python_NewPointerObj(p, type, flags)
-#define SWIG_MustGetPtr(p, type, argnum, flags) \
- SWIG_Python_MustGetPtr(p, type, argnum, flags)
-
-/* Python-specific SWIG API */
-#define SWIG_newvarlink() \
- SWIG_Python_newvarlink()
-#define SWIG_addvarlink(p, name, get_attr, set_attr) \
- SWIG_Python_addvarlink(p, name, get_attr, set_attr)
-#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
- SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type) \
- SWIG_Python_NewPackedObj(ptr, sz, type)
-#define SWIG_InstallConstants(d, constants) \
- SWIG_Python_InstallConstants(d, constants)
-
-typedef double (*py_objasdbl_conv)(PyObject *obj);
-
-SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
-SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
-SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
-SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void);
-SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
-SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
-SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
-SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
-
-
-/* Contract support */
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
-
-#ifdef __cplusplus
-}
-#endif
-
+++ /dev/null
-/* -----------------------------------------------------------------------------
- * python.swg
- *
- * Python configuration module.
- * ----------------------------------------------------------------------------- */
-
-/* Python.h has to appear first */
-
-%insert(runtime) %{
-#include "Python.h"
-%}
-
-%insert(runtime) "precommon.swg";
-%insert(runtime) "common.swg"; /* Common type-checking code */
-%insert(runtime) "pyrun.swg"; /* Python run-time code */
-
-/* Special directive for shadow code */
-
-#define %shadow %insert("shadow")
-#define %pythoncode %insert("python")
-
-%include "pymacros.swg"
-
-
-/* -----------------------------------------------------------------------------
- * SWIGTYPE typemaps
- * ----------------------------------------------------------------------------- */
-
-%include "pyswigtype.swg"
-
-
-/* -----------------------------------------------------------------------------
- * Check for local fragment defintions
- * ----------------------------------------------------------------------------- */
-
-%include "my_fragments.i"
-
-
-/* -----------------------------------------------------------------------------
- * Typemap specializations
- * ----------------------------------------------------------------------------- */
-
-%include "pyinout.swg"
-%include "pyvoid.swg"
-%include "pyobject.swg"
-%include "pystrbase.swg"
-%include "pystrings.swg"
-%include "pyvaltypes.swg"
-%include "pyptrtypes.swg"
-%include "pyprimtypes.swg"
-%include "pymisctypes.swg"
-%include "pyenum.swg"
-
-/* ------------------------------------------------------------
- * Overloaded operator support
- * ------------------------------------------------------------ */
-%include "pyopers.swg"
-
-/* ------------------------------------------------------------
- * Warnings for Python keywords
- * ------------------------------------------------------------ */
-%include "pythonkw.swg"
-
-/* ------------------------------------------------------------
- * The start of the Python initialization function
- * ------------------------------------------------------------ */
-
-%init %{
-#ifdef __cplusplus
-extern "C"
-#endif
-SWIGEXPORT(void) SWIG_init(void) {
- static PyObject *SWIG_globals = 0;
- static int typeinit = 0;
- PyObject *m, *d;
- int i;
- if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
- m = Py_InitModule((char *) SWIG_name, SwigMethods);
- d = PyModule_GetDict(m);
-
- if (!typeinit) {
- for (i = 0; swig_types_initial[i]; i++) {
- swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
- }
- typeinit = 1;
- }
- SWIG_InstallConstants(d,swig_const_table);
-%}
-
-
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyWebKitNameStr);
- %name(PreWebKitCtrl)wxWebKitCtrl();
+ %RenameCtor(PreWebKitCtrl, wxWebKitCtrl());
bool Create(wxWindow *parent,
// wxWizardPage(wxWizard *parent,
// const wxBitmap& bitmap = wxNullBitmap,
// const char* resource = NULL);
-// %name(PreWizardPage)wxWizardPage();
+// %RenameCtor(PreWizardPage, wxWizardPage());
%extend {
bool Create(wxWizard *parent,
}
}
- %name(PrePyWizardPage)wxPyWizardPage();
+ %RenameCtor(PrePyWizardPage, wxPyWizardPage());
// Turn it back on again
%typemap(out) wxPyWizardPage* { $result = wxPyMake_wxObject($1, $owner); }
wxWizardPage *next = NULL,
const wxBitmap& bitmap = wxNullBitmap,
const wxChar* resource = NULL);
- %name(PreWizardPageSimple)wxWizardPageSimple();
+ %RenameCtor(PreWizardPageSimple, wxWizardPageSimple());
bool Create(wxWizard *parent = NULL,
wxWizardPage *prev = NULL,
const wxBitmap& bitmap = wxNullBitmap,
const wxPoint& pos = wxDefaultPosition,
long style = wxDEFAULT_DIALOG_STYLE);
- %name(PreWizard)wxWizard();
+ %RenameCtor(PreWizard, wxWizard());
bool Create(wxWindow *parent,
int id = -1,