SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,7 +185,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxCursor* wxCursorFromImage(const wxImage& image) {
|
wxCursor* wxCursorFromImage(const wxImage& image) {
|
||||||
|
#ifndef __WXMAC__
|
||||||
return new wxCursor(image);
|
return new wxCursor(image);
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// Alternate 'constructor'
|
// Alternate 'constructor'
|
||||||
wxColour* wxNamedColour(const wxString& colorName) {
|
wxColour* wxNamedColour(const wxString& colorName) {
|
||||||
|
@@ -1449,9 +1449,9 @@ static PyObject *_wrap_wxPyApp_Yield(PyObject *self, PyObject *args, PyObject *k
|
|||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _result;
|
bool _result;
|
||||||
wxPyApp * _arg0;
|
wxPyApp * _arg0;
|
||||||
bool _arg1 = (bool ) (0);
|
bool _arg1 = (bool ) FALSE;
|
||||||
PyObject * _argo0 = 0;
|
PyObject * _argo0 = 0;
|
||||||
int tempbool1 = (int) (0);
|
int tempbool1 = (int) FALSE;
|
||||||
char *_kwnames[] = { "self","onlyIfNeeded", NULL };
|
char *_kwnames[] = { "self","onlyIfNeeded", NULL };
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
@@ -2575,10 +2575,6 @@ SWIGEXPORT(void) initwxc() {
|
|||||||
PyDict_SetItemString(d,"wxHT_WINDOW_HORZ_SCROLLBAR", PyInt_FromLong((long) wxHT_WINDOW_HORZ_SCROLLBAR));
|
PyDict_SetItemString(d,"wxHT_WINDOW_HORZ_SCROLLBAR", PyInt_FromLong((long) wxHT_WINDOW_HORZ_SCROLLBAR));
|
||||||
PyDict_SetItemString(d,"wxHT_WINDOW_CORNER", PyInt_FromLong((long) wxHT_WINDOW_CORNER));
|
PyDict_SetItemString(d,"wxHT_WINDOW_CORNER", PyInt_FromLong((long) wxHT_WINDOW_CORNER));
|
||||||
PyDict_SetItemString(d,"wxHT_MAX", PyInt_FromLong((long) wxHT_MAX));
|
PyDict_SetItemString(d,"wxHT_MAX", PyInt_FromLong((long) wxHT_MAX));
|
||||||
PyDict_SetItemString(d,"FALSE", PyInt_FromLong((long) 0));
|
|
||||||
PyDict_SetItemString(d,"false", PyInt_FromLong((long) 0));
|
|
||||||
PyDict_SetItemString(d,"TRUE", PyInt_FromLong((long) 1));
|
|
||||||
PyDict_SetItemString(d,"true", PyInt_FromLong((long) 1));
|
|
||||||
PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL));
|
PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL));
|
||||||
PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST));
|
PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST));
|
||||||
PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED));
|
PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED));
|
||||||
|
@@ -46,7 +46,7 @@ class wxPyAppPtr(wxEvtHandlerPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,delfunc=wxc.delete_wxPyApp):
|
def __del__(self, delfunc=wxc.delete_wxPyApp):
|
||||||
if self.thisown == 1:
|
if self.thisown == 1:
|
||||||
delfunc(self)
|
delfunc(self)
|
||||||
def _setCallbackInfo(self, *_args, **_kwargs):
|
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||||
@@ -803,10 +803,6 @@ wxHT_WINDOW_VERT_SCROLLBAR = wxc.wxHT_WINDOW_VERT_SCROLLBAR
|
|||||||
wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR
|
wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR
|
||||||
wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER
|
wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER
|
||||||
wxHT_MAX = wxc.wxHT_MAX
|
wxHT_MAX = wxc.wxHT_MAX
|
||||||
FALSE = wxc.FALSE
|
|
||||||
false = wxc.false
|
|
||||||
TRUE = wxc.TRUE
|
|
||||||
true = wxc.true
|
|
||||||
wxEVT_NULL = wxc.wxEVT_NULL
|
wxEVT_NULL = wxc.wxEVT_NULL
|
||||||
wxEVT_FIRST = wxc.wxEVT_FIRST
|
wxEVT_FIRST = wxc.wxEVT_FIRST
|
||||||
wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED
|
wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED
|
||||||
@@ -1535,14 +1531,25 @@ wxPen = wxPyPen
|
|||||||
wxScrollbar = wxScrollBar
|
wxScrollbar = wxScrollBar
|
||||||
wxPoint2D = wxPoint2DDouble
|
wxPoint2D = wxPoint2DDouble
|
||||||
|
|
||||||
|
# Use Python's bool constants if available, make aliases if not
|
||||||
|
try:
|
||||||
|
True
|
||||||
|
except NameError:
|
||||||
|
True = 1==1
|
||||||
|
False = 1==0
|
||||||
|
|
||||||
|
|
||||||
# backwards compatibility
|
# backwards compatibility
|
||||||
wxNoRefBitmap = wxBitmap
|
wxNoRefBitmap = wxBitmap
|
||||||
wxPyDefaultPosition = wxDefaultPosition
|
wxPyDefaultPosition = wxDefaultPosition
|
||||||
wxPyDefaultSize = wxDefaultSize
|
wxPyDefaultSize = wxDefaultSize
|
||||||
NULL = None
|
NULL = None
|
||||||
wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
|
wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
|
||||||
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
||||||
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
||||||
|
false = FALSE = False
|
||||||
|
true = TRUE = True
|
||||||
|
|
||||||
|
|
||||||
# workarounds for bad wxRTTI names
|
# workarounds for bad wxRTTI names
|
||||||
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
|
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
|
||||||
@@ -1619,8 +1626,8 @@ def wxPy_isinstance(obj, klasses):
|
|||||||
import types
|
import types
|
||||||
if sys.version[:3] < "2.2" and type(klasses) in [types.TupleType, types.ListType]:
|
if sys.version[:3] < "2.2" and type(klasses) in [types.TupleType, types.ListType]:
|
||||||
for klass in klasses:
|
for klass in klasses:
|
||||||
if isinstance(obj, klass): return true
|
if isinstance(obj, klass): return True
|
||||||
return false
|
return False
|
||||||
else:
|
else:
|
||||||
return isinstance(obj, klasses)
|
return isinstance(obj, klasses)
|
||||||
|
|
||||||
@@ -1710,7 +1717,7 @@ class wxPyOnDemandOutputWindow:
|
|||||||
self.text = wxTextCtrl(self.frame, -1, "",
|
self.text = wxTextCtrl(self.frame, -1, "",
|
||||||
style = wxTE_MULTILINE|wxTE_READONLY)
|
style = wxTE_MULTILINE|wxTE_READONLY)
|
||||||
self.frame.SetSize(wxSize(450, 300))
|
self.frame.SetSize(wxSize(450, 300))
|
||||||
self.frame.Show(true)
|
self.frame.Show(True)
|
||||||
EVT_CLOSE(self.frame, self.OnCloseWindow)
|
EVT_CLOSE(self.frame, self.OnCloseWindow)
|
||||||
self.text.AppendText(str)
|
self.text.AppendText(str)
|
||||||
|
|
||||||
@@ -1731,7 +1738,7 @@ class wxApp(wxPyApp):
|
|||||||
error = 'wxApp.error'
|
error = 'wxApp.error'
|
||||||
outputWindowClass = wxPyOnDemandOutputWindow
|
outputWindowClass = wxPyOnDemandOutputWindow
|
||||||
|
|
||||||
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=false):
|
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
|
||||||
wxPyApp.__init__(self)
|
wxPyApp.__init__(self)
|
||||||
self.stdioWin = None
|
self.stdioWin = None
|
||||||
self.saveStdio = (sys.stdout, sys.stderr)
|
self.saveStdio = (sys.stdout, sys.stderr)
|
||||||
@@ -1783,7 +1790,7 @@ class wxPySimpleApp(wxApp):
|
|||||||
wxApp.__init__(self, flag)
|
wxApp.__init__(self, flag)
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
wxInitAllImageHandlers()
|
wxInitAllImageHandlers()
|
||||||
return true
|
return True
|
||||||
|
|
||||||
|
|
||||||
class wxPyWidgetTester(wxApp):
|
class wxPyWidgetTester(wxApp):
|
||||||
@@ -1794,11 +1801,11 @@ class wxPyWidgetTester(wxApp):
|
|||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
|
self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
|
||||||
self.SetTopWindow(self.frame)
|
self.SetTopWindow(self.frame)
|
||||||
return true
|
return True
|
||||||
|
|
||||||
def SetWidget(self, widgetClass, *args):
|
def SetWidget(self, widgetClass, *args):
|
||||||
w = apply(widgetClass, (self.frame,) + args)
|
w = apply(widgetClass, (self.frame,) + args)
|
||||||
self.frame.Show(true)
|
self.frame.Show(True)
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# DO NOT hold any other references to this object. This is how we
|
# DO NOT hold any other references to this object. This is how we
|
||||||
|
Reference in New Issue
Block a user