return _resultobj;
}
+#define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
+static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxImage * _result;
+ wxImage * _arg0;
+ wxRect * _arg1;
+ PyObject * _argo0 = 0;
+ wxRect temp;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","rect", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_GetSubImage",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
+ return NULL;
+ }
+ }
+{
+ _arg1 = &temp;
+ if (! wxRect_helper(_obj1, &_arg1))
+ return NULL;
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1));
+
+ wxPy_END_ALLOW_THREADS;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
static PyObject * wxImage_GetData(wxImage *self) {
unsigned char* data = self->GetData();
int len = self->GetWidth() * self->GetHeight() * 3;
PyErr_SetString(PyExc_TypeError, "Expected string object");
return /* NULL */ ;
}
- dataPtr = (unsigned char*)PyString_AsString(data);
+
+ size_t len = self->GetWidth() * self->GetHeight() * 3;
+ dataPtr = new unsigned char[len];
+ memcpy(dataPtr, PyString_AsString(data), len);
self->SetData(dataPtr);
}
static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
{ "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS },
+ { "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_GetHeight", (PyCFunction) _wrap_wxImage_GetHeight, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_GetWidth", (PyCFunction) _wrap_wxImage_GetWidth, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_Ok", (PyCFunction) _wrap_wxImage_Ok, METH_VARARGS | METH_KEYWORDS },
def GetHeight(self, *_args, **_kwargs):
val = apply(imagec.wxImage_GetHeight,(self,) + _args, _kwargs)
return val
+ def GetSubImage(self, *_args, **_kwargs):
+ val = apply(imagec.wxImage_GetSubImage,(self,) + _args, _kwargs)
+ if val: val = wxImagePtr(val) ; val.thisown = 1
+ return val
def GetData(self, *_args, **_kwargs):
val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs)
return val
return _resultobj;
}
+#define wxScrolledWindow_CalcScrolledPosition(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CalcScrolledPosition(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
+static PyObject *_wrap_wxScrolledWindow_CalcScrolledPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxScrolledWindow * _arg0;
+ int _arg1;
+ int _arg2;
+ int * _arg3;
+ int temp;
+ int * _arg4;
+ int temp0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","x","y", NULL };
+
+ self = self;
+{
+ _arg3 = &temp;
+}
+{
+ _arg4 = &temp0;
+}
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_CalcScrolledPosition",_kwnames,&_argo0,&_arg1,&_arg2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_CalcScrolledPosition. Expected _wxScrolledWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ PyObject *o;
+ o = PyInt_FromLong((long) (*_arg3));
+ _resultobj = t_output_helper(_resultobj, o);
+}
+{
+ PyObject *o;
+ o = PyInt_FromLong((long) (*_arg4));
+ _resultobj = t_output_helper(_resultobj, o);
+}
+ return _resultobj;
+}
+
+#define wxScrolledWindow_CalcUnscrolledPosition(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CalcUnscrolledPosition(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
+static PyObject *_wrap_wxScrolledWindow_CalcUnscrolledPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxScrolledWindow * _arg0;
+ int _arg1;
+ int _arg2;
+ int * _arg3;
+ int temp;
+ int * _arg4;
+ int temp0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","x","y", NULL };
+
+ self = self;
+{
+ _arg3 = &temp;
+}
+{
+ _arg4 = &temp0;
+}
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_CalcUnscrolledPosition",_kwnames,&_argo0,&_arg1,&_arg2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_CalcUnscrolledPosition. Expected _wxScrolledWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ PyObject *o;
+ o = PyInt_FromLong((long) (*_arg3));
+ _resultobj = t_output_helper(_resultobj, o);
+}
+{
+ PyObject *o;
+ o = PyInt_FromLong((long) (*_arg4));
+ _resultobj = t_output_helper(_resultobj, o);
+}
+ return _resultobj;
+}
+
static void *SwigwxMenuTowxEvtHandler(void *ptr) {
wxMenu *src;
wxEvtHandler *dest;
{ "wxMenu_AppendMenu", (PyCFunction) _wrap_wxMenu_AppendMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxMenu_Append", (PyCFunction) _wrap_wxMenu_Append, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMenu", (PyCFunction) _wrap_new_wxMenu, METH_VARARGS | METH_KEYWORDS },
+ { "wxScrolledWindow_CalcUnscrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcUnscrolledPosition, METH_VARARGS | METH_KEYWORDS },
+ { "wxScrolledWindow_CalcScrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcScrolledPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxScrolledWindow_ViewStart", (PyCFunction) _wrap_wxScrolledWindow_ViewStart, METH_VARARGS | METH_KEYWORDS },
{ "wxScrolledWindow_SetScrollbars", (PyCFunction) _wrap_wxScrolledWindow_SetScrollbars, METH_VARARGS | METH_KEYWORDS },
{ "wxScrolledWindow_Scroll", (PyCFunction) _wrap_wxScrolledWindow_Scroll, METH_VARARGS | METH_KEYWORDS },
def ViewStart(self, *_args, **_kwargs):
val = apply(windowsc.wxScrolledWindow_ViewStart,(self,) + _args, _kwargs)
return val
+ def CalcScrolledPosition(self, *_args, **_kwargs):
+ val = apply(windowsc.wxScrolledWindow_CalcScrolledPosition,(self,) + _args, _kwargs)
+ return val
+ def CalcUnscrolledPosition(self, *_args, **_kwargs):
+ val = apply(windowsc.wxScrolledWindow_CalcUnscrolledPosition,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxScrolledWindow instance at %s>" % (self.this,)
class wxScrolledWindow(wxScrolledWindowPtr):
return _resultobj;
}
+#define wxSplitterWindow_ReplaceWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReplaceWindow(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxSplitterWindow * _arg0;
+ wxWindow * _arg1;
+ wxWindow * _arg2;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _argo2 = 0;
+ char *_kwnames[] = { "self","winOld","winNew", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSplitterWindow_ReplaceWindow",_kwnames,&_argo0,&_argo1,&_argo2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_ReplaceWindow. Expected _wxSplitterWindow_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+ if (_argo2) {
+ if (_argo2 == Py_None) { _arg2 = NULL; }
+ else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
#define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0))
static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS },
{ "wxSplitterWindow_SetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_SetSashPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxSplitterWindow_SetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_SetBorderSize, METH_VARARGS | METH_KEYWORDS },
+ { "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxSplitterWindow_IsSplit", (PyCFunction) _wrap_wxSplitterWindow_IsSplit, METH_VARARGS | METH_KEYWORDS },
{ "wxSplitterWindow_Initialize", (PyCFunction) _wrap_wxSplitterWindow_Initialize, METH_VARARGS | METH_KEYWORDS },
{ "wxSplitterWindow_GetWindow2", (PyCFunction) _wrap_wxSplitterWindow_GetWindow2, METH_VARARGS | METH_KEYWORDS },
def IsSplit(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs)
return val
+ def ReplaceWindow(self, *_args, **_kwargs):
+ val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs)
+ return val
def SetBorderSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs)
return val
PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER));
PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D));
PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER));
+ PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE));
+ PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT));
PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE));
PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER));
PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE));
wxSP_NOBORDER = wxc.wxSP_NOBORDER
wxSP_3D = wxc.wxSP_3D
wxSP_BORDER = wxc.wxSP_BORDER
+wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE
+wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT
wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE
wxFLOOD_BORDER = wxc.wxFLOOD_BORDER
wxODDEVEN_RULE = wxc.wxODDEVEN_RULE