SWIGged updates for wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-20 02:08:34 +00:00
parent 4c7d2b2646
commit 123908fc47
6 changed files with 108 additions and 16 deletions

View File

@@ -304,7 +304,7 @@ static PyObject *_wrap_wxImageFromStream(PyObject *self, PyObject *args, PyObjec
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
_arg0 = wxPyCBInputStream_create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
@@ -353,7 +353,7 @@ static PyObject *_wrap_wxImageFromStreamMime(PyObject *self, PyObject *args, PyO
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
_arg0 = wxPyCBInputStream_create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
@@ -1943,7 +1943,7 @@ static PyObject *_wrap_wxImage_CanReadStream(PyObject *self, PyObject *args, PyO
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
_arg0 = wxPyCBInputStream_create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
@@ -1994,7 +1994,7 @@ static PyObject *_wrap_wxImage_LoadStream(PyObject *self, PyObject *args, PyObje
_arg1 = temp->m_wxis;
created = FALSE;
} else {
_arg1 = wxPyCBInputStream::create(_obj1, FALSE);
_arg1 = wxPyCBInputStream_create(_obj1, FALSE);
if (_arg1 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
@@ -2046,7 +2046,7 @@ static PyObject *_wrap_wxImage_LoadMimeStream(PyObject *self, PyObject *args, Py
_arg1 = temp->m_wxis;
created = FALSE;
} else {
_arg1 = wxPyCBInputStream::create(_obj1, FALSE);
_arg1 = wxPyCBInputStream_create(_obj1, FALSE);
if (_arg1 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
@@ -2348,6 +2348,7 @@ static void wxImage_SetData(wxImage *self,PyObject * data) {
dataPtr = (unsigned char*) malloc(len);
memcpy(dataPtr, PyString_AsString(data), len);
self->SetData(dataPtr);
// wxImage takes ownership of dataPtr...
}
static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;

View File

@@ -2533,6 +2533,76 @@ static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args, PyObject *
return _resultobj;
}
#define wxRect_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0))
static PyObject *_wrap_wxRect_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxRect * _arg0;
wxPoint * _arg1;
wxRect temp;
PyObject * _obj0 = 0;
wxPoint temp0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","p", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_SetPosition",_kwnames,&_obj0,&_obj1))
return NULL;
{
_arg0 = &temp;
if (! wxRect_helper(_obj0, &_arg0))
return NULL;
}
{
_arg1 = &temp0;
if (! wxPoint_helper(_obj1, &_arg1))
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxRect_SetPosition(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxRect_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0))
static PyObject *_wrap_wxRect_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxRect * _arg0;
wxSize * _arg1;
wxRect temp;
PyObject * _obj0 = 0;
wxSize temp0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","s", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_SetSize",_kwnames,&_obj0,&_obj1))
return NULL;
{
_arg0 = &temp;
if (! wxRect_helper(_obj0, &_arg0))
return NULL;
}
{
_arg1 = &temp0;
if (! wxSize_helper(_obj1, &_arg1))
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxRect_SetSize(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxRect_GetLeft(_swigobj) (_swigobj->GetLeft())
static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -4205,6 +4275,8 @@ static PyMethodDef misccMethods[] = {
{ "wxRect_GetBottom", (PyCFunction) _wrap_wxRect_GetBottom, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetTop", (PyCFunction) _wrap_wxRect_GetTop, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetLeft", (PyCFunction) _wrap_wxRect_GetLeft, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_SetSize", (PyCFunction) _wrap_wxRect_SetSize, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_SetPosition", (PyCFunction) _wrap_wxRect_SetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetSize", (PyCFunction) _wrap_wxRect_GetSize, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_GetPosition", (PyCFunction) _wrap_wxRect_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxRect_SetHeight", (PyCFunction) _wrap_wxRect_SetHeight, METH_VARARGS | METH_KEYWORDS },

View File

@@ -252,6 +252,12 @@ class wxRectPtr :
val = apply(miscc.wxRect_GetSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def SetPosition(self, *_args, **_kwargs):
val = apply(miscc.wxRect_SetPosition,(self,) + _args, _kwargs)
return val
def SetSize(self, *_args, **_kwargs):
val = apply(miscc.wxRect_SetSize,(self,) + _args, _kwargs)
return val
def GetLeft(self, *_args, **_kwargs):
val = apply(miscc.wxRect_GetLeft,(self,) + _args, _kwargs)
return val

View File

@@ -6084,12 +6084,13 @@ static PyObject *_wrap_wxProcess_Open(PyObject *self, PyObject *args, PyObject *
PyObject * _resultobj;
wxPyProcess * _result;
wxString * _arg0;
int _arg1 = (int ) wxEXEC_ASYNC;
PyObject * _obj0 = 0;
char *_kwnames[] = { "cmd", NULL };
char *_kwnames[] = { "cmd","flags", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Open",_kwnames,&_obj0))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxProcess_Open",_kwnames,&_obj0,&_arg1))
return NULL;
{
_arg0 = wxString_in_helper(_obj0);
@@ -6098,7 +6099,7 @@ static PyObject *_wrap_wxProcess_Open(PyObject *self, PyObject *args, PyObject *
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxPyProcess *)wxPyProcess::Open(*_arg0);
_result = (wxPyProcess *)wxPyProcess::Open(*_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;

View File

@@ -682,7 +682,9 @@ static wxPyCoreAPI API = {
wxPyClientData_dtor,
wxPyUserData_dtor,
wxPyOORClientData_dtor
wxPyOORClientData_dtor,
wxPyCBInputStream_create
};
@@ -2514,6 +2516,7 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_PAGEDOWN));
PyDict_SetItemString(d,"wxEVT_SCROLL_THUMBTRACK", PyInt_FromLong((long) wxEVT_SCROLL_THUMBTRACK));
PyDict_SetItemString(d,"wxEVT_SCROLL_THUMBRELEASE", PyInt_FromLong((long) wxEVT_SCROLL_THUMBRELEASE));
PyDict_SetItemString(d,"wxEVT_SCROLL_ENDSCROLL", PyInt_FromLong((long) wxEVT_SCROLL_ENDSCROLL));
PyDict_SetItemString(d,"wxEVT_SCROLLWIN_TOP", PyInt_FromLong((long) wxEVT_SCROLLWIN_TOP));
PyDict_SetItemString(d,"wxEVT_SCROLLWIN_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLLWIN_BOTTOM));
PyDict_SetItemString(d,"wxEVT_SCROLLWIN_LINEUP", PyInt_FromLong((long) wxEVT_SCROLLWIN_LINEUP));

View File

@@ -854,6 +854,7 @@ wxEVT_SCROLL_PAGEUP = wxc.wxEVT_SCROLL_PAGEUP
wxEVT_SCROLL_PAGEDOWN = wxc.wxEVT_SCROLL_PAGEDOWN
wxEVT_SCROLL_THUMBTRACK = wxc.wxEVT_SCROLL_THUMBTRACK
wxEVT_SCROLL_THUMBRELEASE = wxc.wxEVT_SCROLL_THUMBRELEASE
wxEVT_SCROLL_ENDSCROLL = wxc.wxEVT_SCROLL_ENDSCROLL
wxEVT_SCROLLWIN_TOP = wxc.wxEVT_SCROLLWIN_TOP
wxEVT_SCROLLWIN_BOTTOM = wxc.wxEVT_SCROLLWIN_BOTTOM
wxEVT_SCROLLWIN_LINEUP = wxc.wxEVT_SCROLLWIN_LINEUP
@@ -1132,14 +1133,15 @@ def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
# Scrolling
def EVT_SCROLL(win, func):
win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func)
win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func)
win.Connect(-1, -1, wxEVT_SCROLL_THUMBRELEASE,func)
win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
def EVT_SCROLL_TOP(win, func):
win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
@@ -1165,6 +1167,9 @@ def EVT_SCROLL_THUMBTRACK(win, func):
def EVT_SCROLL_THUMBRELEASE(win, func):
win.Connect(-1, -1, wxEVT_SCROLL_THUMBRELEASE, func)
def EVT_SCROLL_ENDSCROLL(win, func):
win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
# Scrolling, with an id
@@ -1177,6 +1182,7 @@ def EVT_COMMAND_SCROLL(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE,func)
win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
def EVT_COMMAND_SCROLL_TOP(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
@@ -1202,6 +1208,9 @@ def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
def EVT_COMMAND_SCROLL_THUMBRELEASE(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE, func)
def EVT_COMMAND_SCROLL_ENDSCROLL(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_ENDSCROLL, func)
#---
def EVT_SCROLLWIN(win, func):
win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)