X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7a014180017908d32f0af32ebfa140fdc82b390..777dffec694eae7231e4133e5dc6bbca78045f29:/wxPython/src/_defs.i diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 691a02987d..0315e31fd8 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -31,6 +31,10 @@ %feature("nodefaultdtor"); #endif +// For all items that don't have a %rename already, give them a %rename that +// removes the leading 'wx' (except for wxEVT_* items.) +%rename("%(wxpy)s") ""; + // For now, just supress the warning about using Python keywords as parameter // names. Will need to come back later and correct these rather than just // hide them... @@ -50,7 +54,10 @@ // This one will turn off the generation of the thread wrapper code %define %threadWrapperOff -%exception +%exception { + $action + if (PyErr_Occurred()) SWIG_fail; +} %enddef // Turn it on by default @@ -68,8 +75,16 @@ } %enddef - +// This macro can be used to disable the releasing of the GIL when calling the +// C++ function. This is like using threadWrapperOff for just this function. +%define KeepGIL(name) +%exception name { + $action + if (PyErr_Occurred()) SWIG_fail; +} +%enddef + //--------------------------------------------------------------------------- // some type definitions to simplify things for SWIG @@ -93,6 +108,7 @@ typedef unsigned long wxUIntPtr; #define %noautodoc %feature("noautodoc") #if SWIG_VERSION >= 0x010327 +#undef %kwargs #define %kwargs %feature("kwargs", "1") #define %nokwargs %feature("kwargs", "0") #else @@ -103,6 +119,8 @@ typedef unsigned long wxUIntPtr; #define %disownarg(typespec) %typemap(in) typespec = SWIGTYPE* DISOWN #define %cleardisown(typespec) %typemap(in) typespec +#define %ref %feature("ref") +#define %unref %feature("unref") #ifndef %pythoncode @@ -475,6 +493,8 @@ enum { wxCLIP_CHILDREN, wxCLIP_SIBLINGS, + wxWINDOW_STYLE_MASK, + wxALWAYS_SHOW_SB, wxRETAINED, @@ -510,7 +530,9 @@ enum { wxRB_USE_CHECKBOX, wxST_SIZEGRIP, wxST_NO_AUTORESIZE, - + wxST_DOTS_MIDDLE, + wxST_DOTS_END, + wxFLOOD_SURFACE, wxFLOOD_BORDER, wxODDEVEN_RULE, @@ -574,12 +596,15 @@ enum { wxID_HELP, wxID_PRINT, wxID_PRINT_SETUP, + wxID_PAGE_SETUP, wxID_PREVIEW, wxID_ABOUT, wxID_HELP_CONTENTS, wxID_HELP_COMMANDS, wxID_HELP_PROCEDURES, wxID_HELP_CONTEXT, + wxID_HELP_INDEX, + wxID_HELP_SEARCH, wxID_CLOSE_ALL, wxID_PREFERENCES, @@ -662,14 +687,6 @@ enum { wxID_HIGHEST, - wxOPEN, - wxSAVE, - wxHIDE_READONLY, - wxOVERWRITE_PROMPT, - wxFILE_MUST_EXIST, - wxMULTIPLE, - wxCHANGE_DIR, - wxACCEL_ALT, wxACCEL_CTRL, wxACCEL_SHIFT, @@ -684,9 +701,6 @@ enum { wxPD_SMOOTH, wxPD_CAN_SKIP, - wxDD_NEW_DIR_BUTTON, - wxDD_DEFAULT_STYLE, - wxMENU_TEAROFF, wxMB_DOCKABLE, wxNO_FULL_REPAINT_ON_RESIZE,