SIGged updates for wxMac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-02-23 21:02:33 +00:00
parent 94082a71f8
commit a341e32e10
18 changed files with 1538 additions and 406 deletions
+12 -15
View File
@@ -3182,19 +3182,23 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject *
return _resultobj;
}
#define wxListCtrl_GetColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetColumn(_swigarg0,_swigarg1))
static wxListItem * wxPyListCtrl_GetColumn(wxPyListCtrl *self,int col) {
wxListItem item;
if (self->GetColumn(col, item))
return new wxListItem(item);
else
return NULL;
}
static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxListItem * _result;
wxPyListCtrl * _arg0;
int _arg1;
wxListItem * _arg2;
PyObject * _argo0 = 0;
PyObject * _argo2 = 0;
char *_kwnames[] = { "self","col","item", NULL };
char *_kwnames[] = { "self","col", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxListCtrl_GetColumn",_kwnames,&_argo0,&_arg1,&_argo2))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListCtrl_GetColumn",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3203,20 +3207,13 @@ static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args, PyOb
return NULL;
}
}
if (_argo2) {
if (_argo2 == Py_None) { _arg2 = NULL; }
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_GetColumn. Expected _wxListItem_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxListCtrl_GetColumn(_arg0,_arg1,*_arg2);
_result = (wxListItem *)wxPyListCtrl_GetColumn(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
+6
View File
@@ -612,6 +612,12 @@ class wxListCtrlPtr(wxControlPtr):
def __repr__(self):
return "<C wxListCtrl instance at %s>" % (self.this,)
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
if val is not None: val.thisown = 1
return val
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
val.thisown = 1
+45
View File
@@ -6192,6 +6192,48 @@ static PyObject *_wrap_wxNotifyEvent_Veto(PyObject *self, PyObject *args, PyObje
return _resultobj;
}
static void *SwigwxDisplayChangedEventTowxEvent(void *ptr) {
wxDisplayChangedEvent *src;
wxEvent *dest;
src = (wxDisplayChangedEvent *) ptr;
dest = (wxEvent *) src;
return (void *) dest;
}
static void *SwigwxDisplayChangedEventTowxObject(void *ptr) {
wxDisplayChangedEvent *src;
wxObject *dest;
src = (wxDisplayChangedEvent *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxDisplayChangedEvent() (new wxDisplayChangedEvent())
static PyObject *_wrap_new_wxDisplayChangedEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDisplayChangedEvent * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxDisplayChangedEvent",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxDisplayChangedEvent *)new_wxDisplayChangedEvent();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxDisplayChangedEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
static void *SwigwxPaletteChangedEventTowxEvent(void *ptr) {
wxPaletteChangedEvent *src;
wxEvent *dest;
@@ -7097,6 +7139,7 @@ static PyMethodDef eventscMethods[] = {
{ "wxPaletteChangedEvent_GetChangedWindow", (PyCFunction) _wrap_wxPaletteChangedEvent_GetChangedWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxPaletteChangedEvent_SetChangedWindow", (PyCFunction) _wrap_wxPaletteChangedEvent_SetChangedWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPaletteChangedEvent", (PyCFunction) _wrap_new_wxPaletteChangedEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxDisplayChangedEvent", (PyCFunction) _wrap_new_wxDisplayChangedEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxNotifyEvent_Veto", (PyCFunction) _wrap_wxNotifyEvent_Veto, METH_VARARGS | METH_KEYWORDS },
{ "wxNotifyEvent_Allow", (PyCFunction) _wrap_wxNotifyEvent_Allow, METH_VARARGS | METH_KEYWORDS },
{ "wxNotifyEvent_IsAllowed", (PyCFunction) _wrap_wxNotifyEvent_IsAllowed, METH_VARARGS | METH_KEYWORDS },
@@ -7306,6 +7349,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent},
{ "_wxEvent","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxEvent},
{ "_wxEvent","_wxPaletteChangedEvent",SwigwxPaletteChangedEventTowxEvent},
{ "_wxEvent","_wxDisplayChangedEvent",SwigwxDisplayChangedEventTowxEvent},
{ "_wxEvent","_wxNotifyEvent",SwigwxNotifyEventTowxEvent},
{ "_wxEvent","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent},
{ "_wxEvent","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent},
@@ -7396,6 +7440,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxObject","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject},
{ "_wxObject","_wxQueryNewPaletteEvent",SwigwxQueryNewPaletteEventTowxObject},
{ "_wxObject","_wxPaletteChangedEvent",SwigwxPaletteChangedEventTowxObject},
{ "_wxObject","_wxDisplayChangedEvent",SwigwxDisplayChangedEventTowxObject},
{ "_wxObject","_wxNotifyEvent",SwigwxNotifyEventTowxObject},
{ "_wxObject","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxObject},
{ "_wxObject","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxObject},
+14
View File
@@ -874,6 +874,20 @@ class wxNotifyEvent(wxNotifyEventPtr):
class wxDisplayChangedEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __repr__(self):
return "<C wxDisplayChangedEvent instance at %s>" % (self.this,)
class wxDisplayChangedEvent(wxDisplayChangedEventPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(eventsc.new_wxDisplayChangedEvent,_args,_kwargs)
self.thisown = 1
class wxPaletteChangedEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
+14 -8
View File
@@ -329,6 +329,8 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw
wxString * _arg2;
wxString * _arg3;
wxDateTime * _arg4;
wxPyInputStream * temp;
bool created;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
@@ -341,16 +343,16 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:new_wxFSFile",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_argo4))
return NULL;
{
if (PyInstance_Check(_obj0)) {
wxPyInputStream* ptr;
if (SWIG_GetPtrObj(_obj0, (void **) &ptr,"_wxPyInputStream_p")) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p.");
if (SWIG_GetPtrObj(_obj0, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
_arg0 = ptr->wxi;
} else {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p.");
return NULL;
created = TRUE;
}
}
{
@@ -427,6 +429,10 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (created)
delete _arg0;
}
{
if (_obj1)
delete _arg1;
+626 -28
View File
File diff suppressed because it is too large Load Diff
+64
View File
@@ -692,6 +692,13 @@ class wxDCPtr(wxObjectPtr):
def DrawIcon(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawIcon,(self,) + _args, _kwargs)
return val
def DrawLabel(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawLabel,(self,) + _args, _kwargs)
return val
def DrawImageLabel(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawImageLabel,(self,) + _args, _kwargs)
if val: val = wxRectPtr(val) ; val.thisown = 1
return val
def DrawLine(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawLine,(self,) + _args, _kwargs)
return val
@@ -1034,6 +1041,60 @@ class wxWindowDC(wxWindowDCPtr):
class wxMetaFilePtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxMetaFile(self)
def Ok(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFile_Ok,(self,) + _args, _kwargs)
return val
def SetClipboard(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFile_SetClipboard,(self,) + _args, _kwargs)
return val
def GetSize(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFile_GetSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFile_GetWidth,(self,) + _args, _kwargs)
return val
def GetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFile_GetHeight,(self,) + _args, _kwargs)
return val
def GetFileName(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFile_GetFileName,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxMetaFile instance at %s>" % (self.this,)
class wxMetaFile(wxMetaFilePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gdic.new_wxMetaFile,_args,_kwargs)
self.thisown = 1
class wxMetaFileDCPtr(wxDCPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Close(self, *_args, **_kwargs):
val = apply(gdic.wxMetaFileDC_Close,(self,) + _args, _kwargs)
if val: val = wxMetaFilePtr(val)
return val
def __repr__(self):
return "<C wxMetaFileDC instance at %s>" % (self.this,)
class wxMetaFileDC(wxMetaFileDCPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gdic.new_wxMetaFileDC,_args,_kwargs)
self.thisown = 1
class wxPalettePtr(wxGDIObjectPtr):
def __init__(self,this):
self.this = this
@@ -1114,6 +1175,9 @@ class wxRegionPtr(wxGDIObjectPtr):
def Clear(self, *_args, **_kwargs):
val = apply(gdic.wxRegion_Clear,(self,) + _args, _kwargs)
return val
def Offset(self, *_args, **_kwargs):
val = apply(gdic.wxRegion_Offset,(self,) + _args, _kwargs)
return val
def Contains(self, *_args, **_kwargs):
val = apply(gdic.wxRegion_Contains,(self,) + _args, _kwargs)
return val
+303
View File
@@ -98,14 +98,17 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
return new wxImage(width, height);
}
wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype, int index) {
return new wxImage(name, mimetype, index);
}
wxImage* wxImageFromBitmap(const wxBitmap &bitmap) {
return new wxImage(bitmap);
}
wxImage* wxImageFromData(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);
@@ -117,6 +120,18 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
return new wxImage(width, height, copy, FALSE);
}
wxImage* wxImageFromStream(wxInputStream& stream,
long type = wxBITMAP_TYPE_ANY, int index = -1) {
return new wxImage(stream, type, index);
}
wxImage* wxImageFromStreamMime(wxInputStream& stream,
const wxString& mimetype, int index = -1 ) {
return new wxImage(stream, mimetype, index);
}
#if 0
extern wxImage wxNullImage;
@@ -300,6 +315,125 @@ static PyObject *_wrap_wxImageFromData(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
static PyObject *_wrap_wxImageFromStream(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxImage * _result;
wxInputStream * _arg0;
long _arg1 = (long ) wxBITMAP_TYPE_ANY;
int _arg2 = (int ) -1;
wxPyInputStream * temp;
bool created;
PyObject * _obj0 = 0;
char *_kwnames[] = { "stream","type","index", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|li:wxImageFromStream",_kwnames,&_obj0,&_arg1,&_arg2))
return NULL;
{
if (SWIG_GetPtrObj(_obj0, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
created = TRUE;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxImage *)wxImageFromStream(*_arg0,_arg1,_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (created)
delete _arg0;
}
return _resultobj;
}
static PyObject *_wrap_wxImageFromStreamMime(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxImage * _result;
wxInputStream * _arg0;
wxString * _arg1;
int _arg2 = (int ) -1;
wxPyInputStream * temp;
bool created;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "stream","mimetype","index", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxImageFromStreamMime",_kwnames,&_obj0,&_obj1,&_arg2))
return NULL;
{
if (SWIG_GetPtrObj(_obj0, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
created = TRUE;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg1 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxImage *)wxImageFromStreamMime(*_arg0,*_arg1,_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (created)
delete _arg0;
}
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
static PyObject *_wrap_wxInitAllImageHandlers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
char *_kwnames[] = { NULL };
@@ -1922,6 +2056,170 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
static PyObject *_wrap_wxImage_CanReadStream(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxInputStream * _arg0;
wxPyInputStream * temp;
bool created;
PyObject * _obj0 = 0;
char *_kwnames[] = { "stream", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_CanReadStream",_kwnames,&_obj0))
return NULL;
{
if (SWIG_GetPtrObj(_obj0, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg0 = temp->m_wxis;
created = FALSE;
} else {
_arg0 = wxPyCBInputStream::create(_obj0, FALSE);
if (_arg0 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
created = TRUE;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxImage::CanRead(*_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (created)
delete _arg0;
}
return _resultobj;
}
#define wxImage_LoadStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxImage_LoadStream(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxImage * _arg0;
wxInputStream * _arg1;
long _arg2 = (long ) wxBITMAP_TYPE_ANY;
int _arg3 = (int ) -1;
PyObject * _argo0 = 0;
wxPyInputStream * temp;
bool created;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","stream","type","index", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|li:wxImage_LoadStream",_kwnames,&_argo0,&_obj1,&_arg2,&_arg3))
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_LoadStream. Expected _wxImage_p.");
return NULL;
}
}
{
if (SWIG_GetPtrObj(_obj1, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg1 = temp->m_wxis;
created = FALSE;
} else {
_arg1 = wxPyCBInputStream::create(_obj1, FALSE);
if (_arg1 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
created = TRUE;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxImage_LoadStream(_arg0,*_arg1,_arg2,_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (created)
delete _arg1;
}
return _resultobj;
}
#define wxImage_LoadMimeStream(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFile(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxImage_LoadMimeStream(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxImage * _arg0;
wxInputStream * _arg1;
wxString * _arg2;
int _arg3 = (int ) -1;
PyObject * _argo0 = 0;
wxPyInputStream * temp;
bool created;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","stream","mimetype","index", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxImage_LoadMimeStream",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3))
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_LoadMimeStream. Expected _wxImage_p.");
return NULL;
}
}
{
if (SWIG_GetPtrObj(_obj1, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg1 = temp->m_wxis;
created = FALSE;
} else {
_arg1 = wxPyCBInputStream::create(_obj1, FALSE);
if (_arg1 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
created = TRUE;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg2 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxImage_LoadMimeStream(_arg0,*_arg1,*_arg2,_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (created)
delete _arg1;
}
{
if (_obj2)
delete _arg2;
}
return _resultobj;
}
#define wxImage_Ok(_swigobj) (_swigobj->Ok())
static PyObject *_wrap_wxImage_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -2994,6 +3292,9 @@ static PyMethodDef imagecMethods[] = {
{ "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 },
{ "wxImage_LoadMimeStream", (PyCFunction) _wrap_wxImage_LoadMimeStream, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_LoadStream", (PyCFunction) _wrap_wxImage_LoadStream, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_CanReadStream", (PyCFunction) _wrap_wxImage_CanReadStream, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_SaveMimeFile", (PyCFunction) _wrap_wxImage_SaveMimeFile, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_SaveFile", (PyCFunction) _wrap_wxImage_SaveFile, METH_VARARGS | METH_KEYWORDS },
{ "wxImage_LoadMimeFile", (PyCFunction) _wrap_wxImage_LoadMimeFile, METH_VARARGS | METH_KEYWORDS },
@@ -3032,6 +3333,8 @@ static PyMethodDef imagecMethods[] = {
{ "wxImageHandler_GetName", (PyCFunction) _wrap_wxImageHandler_GetName, METH_VARARGS | METH_KEYWORDS },
{ "wxBitmapFromImage", (PyCFunction) _wrap_wxBitmapFromImage, METH_VARARGS | METH_KEYWORDS },
{ "wxInitAllImageHandlers", (PyCFunction) _wrap_wxInitAllImageHandlers, METH_VARARGS | METH_KEYWORDS },
{ "wxImageFromStreamMime", (PyCFunction) _wrap_wxImageFromStreamMime, METH_VARARGS | METH_KEYWORDS },
{ "wxImageFromStream", (PyCFunction) _wrap_wxImageFromStream, METH_VARARGS | METH_KEYWORDS },
{ "wxImageFromData", (PyCFunction) _wrap_wxImageFromData, METH_VARARGS | METH_KEYWORDS },
{ "wxImageFromBitmap", (PyCFunction) _wrap_wxImageFromBitmap, METH_VARARGS | METH_KEYWORDS },
{ "wxImageFromMime", (PyCFunction) _wrap_wxImageFromMime, METH_VARARGS | METH_KEYWORDS },
+20
View File
@@ -4,6 +4,8 @@ import imagec
from misc import *
from gdi import *
from streams import *
class wxImageHandlerPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
@@ -233,6 +235,12 @@ class wxImagePtr(wxObjectPtr):
def SaveMimeFile(self, *_args, **_kwargs):
val = apply(imagec.wxImage_SaveMimeFile,(self,) + _args, _kwargs)
return val
def LoadStream(self, *_args, **_kwargs):
val = apply(imagec.wxImage_LoadStream,(self,) + _args, _kwargs)
return val
def LoadMimeStream(self, *_args, **_kwargs):
val = apply(imagec.wxImage_LoadMimeStream,(self,) + _args, _kwargs)
return val
def Ok(self, *_args, **_kwargs):
val = apply(imagec.wxImage_Ok,(self,) + _args, _kwargs)
return val
@@ -348,6 +356,16 @@ def wxImageFromData(*_args, **_kwargs):
if val: val = wxImagePtr(val); val.thisown = 1
return val
def wxImageFromStream(*_args, **_kwargs):
val = apply(imagec.wxImageFromStream,_args,_kwargs)
if val: val = wxImagePtr(val); val.thisown = 1
return val
def wxImageFromStreamMime(*_args, **_kwargs):
val = apply(imagec.wxImageFromStreamMime,_args,_kwargs)
if val: val = wxImagePtr(val); val.thisown = 1
return val
wxInitAllImageHandlers = imagec.wxInitAllImageHandlers
def wxBitmapFromImage(*_args, **_kwargs):
@@ -359,6 +377,8 @@ wxImage_CanRead = imagec.wxImage_CanRead
wxImage_GetImageCount = imagec.wxImage_GetImageCount
wxImage_CanReadStream = imagec.wxImage_CanReadStream
wxImage_AddHandler = imagec.wxImage_AddHandler
wxImage_InsertHandler = imagec.wxImage_InsertHandler
+1 -3
View File
@@ -93,8 +93,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
static char* wxStringErrorMsg = "String type required";
#endif
static wxString wxPyEmptyStr("");
PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) {
wxRegion reg1(*r1);
wxRegion reg2(*r2);
@@ -399,7 +397,7 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxString * _arg0 = (wxString *) &wxPyEmptyStr;
wxString * _arg0 = (wxString *) &wxEmptyString;
PyObject * _obj0 = 0;
char *_kwnames[] = { "command", NULL };
+8 -10
View File
@@ -106,8 +106,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
static char* wxStringErrorMsg = "String type required";
#endif
static wxString wxPyEmptyStr("");
int wxCaret_GetBlinkTime() {
return wxCaret::GetBlinkTime();
}
@@ -335,8 +333,8 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec
PyObject * _resultobj;
wxString * _result;
wxString * _arg0;
wxString * _arg1 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg1 = (wxString *) &wxEmptyString;
wxString * _arg2 = (wxString *) &wxEmptyString;
wxWindow * _arg3 = (wxWindow *) NULL;
int _arg4 = (int ) -1;
int _arg5 = (int ) -1;
@@ -446,8 +444,8 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO
PyObject * _resultobj;
wxString * _result;
wxString * _arg0;
wxString * _arg1 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg1 = (wxString *) &wxEmptyString;
wxString * _arg2 = (wxString *) &wxEmptyString;
wxWindow * _arg3 = (wxWindow *) NULL;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
@@ -763,7 +761,7 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw
PyObject * _resultobj;
int _result;
wxString * _arg0;
wxString * _arg1 = (wxString *) &wxPyEmptyStr;
wxString * _arg1 = (wxString *) &wxEmptyString;
int _arg2 = (int ) wxOK|wxCENTRE;
wxWindow * _arg3 = (wxWindow *) NULL;
int _arg4 = (int ) -1;
@@ -8570,7 +8568,7 @@ static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args,
PyObject * _result;
wxFileType * _arg0;
wxString * _arg1;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
@@ -8655,7 +8653,7 @@ static PyObject *_wrap_wxFileType_GetPrintCommand(PyObject *self, PyObject *args
PyObject * _result;
wxFileType * _arg0;
wxString * _arg1;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
@@ -8748,7 +8746,7 @@ static PyObject *_wrap_wxFileType_GetAllCommands(PyObject *self, PyObject *args,
PyObject * _result;
wxFileType * _arg0;
wxString * _arg1;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
+8 -10
View File
@@ -91,8 +91,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
#else
static char* wxStringErrorMsg = "String type required";
#endif
static wxString wxPyEmptyStr("");
#ifdef __cplusplus
extern "C" {
#endif
@@ -1472,8 +1470,8 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO
wxBitmap * _arg3 = (wxBitmap *) &wxNullBitmap;
int _arg4 = (int ) FALSE;
PyObject * _arg5 = (PyObject *) NULL;
wxString * _arg6 = (wxString *) &wxPyEmptyStr;
wxString * _arg7 = (wxString *) &wxPyEmptyStr;
wxString * _arg6 = (wxString *) &wxEmptyString;
wxString * _arg7 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
PyObject * _argo2 = 0;
PyObject * _argo3 = 0;
@@ -1576,8 +1574,8 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg
wxToolBarBase * _arg0;
int _arg1;
wxBitmap * _arg2;
wxString * _arg3 = (wxString *) &wxPyEmptyStr;
wxString * _arg4 = (wxString *) &wxPyEmptyStr;
wxString * _arg3 = (wxString *) &wxEmptyString;
wxString * _arg4 = (wxString *) &wxEmptyString;
int _arg5 = (int ) FALSE;
PyObject * _argo0 = 0;
PyObject * _argo2 = 0;
@@ -1675,8 +1673,8 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args,
wxBitmap * _arg4 = (wxBitmap *) &wxNullBitmap;
int _arg5 = (int ) FALSE;
PyObject * _arg6 = (PyObject *) NULL;
wxString * _arg7 = (wxString *) &wxPyEmptyStr;
wxString * _arg8 = (wxString *) &wxPyEmptyStr;
wxString * _arg7 = (wxString *) &wxEmptyString;
wxString * _arg8 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
PyObject * _argo3 = 0;
PyObject * _argo4 = 0;
@@ -1780,8 +1778,8 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject *
size_t _arg1;
int _arg2;
wxBitmap * _arg3;
wxString * _arg4 = (wxString *) &wxPyEmptyStr;
wxString * _arg5 = (wxString *) &wxPyEmptyStr;
wxString * _arg4 = (wxString *) &wxEmptyString;
wxString * _arg5 = (wxString *) &wxEmptyString;
int _arg6 = (int ) FALSE;
PyObject * _argo0 = 0;
PyObject * _argo3 = 0;
+3 -300
View File
@@ -91,310 +91,13 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
#else
static char* wxStringErrorMsg = "String type required";
#endif
// C++
// definitions of wxStringPtrList and wxPyInputStream
#include <wx/listimpl.cpp>
WX_DEFINE_LIST(wxStringPtrList);
void wxPyInputStream::close() {
/* do nothing */
}
void wxPyInputStream::flush() {
/*do nothing*/
}
bool wxPyInputStream::eof() {
if (wxi)
return wxi->Eof();
else
return TRUE;
}
wxPyInputStream::~wxPyInputStream() {
/*do nothing*/
}
wxString* wxPyInputStream::read(int size) {
wxString* s = NULL;
const int BUFSIZE = 1024;
// check if we have a real wxInputStream to work with
if (!wxi) {
PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below");
return NULL;
}
if (size < 0) {
// init buffers
char * buf = new char[BUFSIZE];
if (!buf) {
PyErr_NoMemory();
return NULL;
}
s = new wxString();
if (!s) {
delete buf;
PyErr_NoMemory();
return NULL;
}
// read until EOF
while (! wxi->Eof()) {
wxi->Read(buf, BUFSIZE);
//*s += wxString(buf, wxi->LastRead());
s->Append(buf, wxi->LastRead());
}
delete buf;
// error check
if (wxi->LastError() == wxSTREAM_READ_ERROR) {
delete s;
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
return NULL;
}
} else { // Read only size number of characters
s = new wxString;
if (!s) {
PyErr_NoMemory();
return NULL;
}
// read size bytes
wxi->Read(s->GetWriteBuf(size+1), size);
s->UngetWriteBuf(wxi->LastRead());
// error check
if (wxi->LastError() == wxSTREAM_READ_ERROR) {
delete s;
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
return NULL;
}
}
return s;
}
wxString* wxPyInputStream::readline (int size) {
// check if we have a real wxInputStream to work with
if (!wxi) {
PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below");
return NULL;
}
// init buffer
int i;
char ch;
wxString* s = new wxString;
if (!s) {
PyErr_NoMemory();
return NULL;
}
// read until \n or byte limit reached
for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) {
*s += ch = wxi->GetC();
}
// errorcheck
if (wxi->LastError() == wxSTREAM_READ_ERROR) {
delete s;
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
return NULL;
}
return s;
}
wxStringPtrList* wxPyInputStream::readlines (int sizehint) {
// check if we have a real wxInputStream to work with
if (!wxi) {
PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below");
return NULL;
}
// init list
wxStringPtrList* l = new wxStringPtrList();
if (!l) {
PyErr_NoMemory();
return NULL;
}
// read sizehint bytes or until EOF
int i;
for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) {
wxString* s = readline();
if (s == NULL) {
l->DeleteContents(TRUE);
l->Clear();
return NULL;
}
l->Append(s);
i = i + s->Length();
}
// error check
if (wxi->LastError() == wxSTREAM_READ_ERROR) {
l->DeleteContents(TRUE);
l->Clear();
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
return NULL;
}
return l;
}
void wxPyInputStream::seek(int offset, int whence) {
if (wxi)
wxi->SeekI(offset, wxSeekMode(whence));
}
int wxPyInputStream::tell(){
if (wxi)
return wxi->TellI();
}
// wxInputStream which operates on a Python file-like object
class wxPyCBInputStream : public wxInputStream {
protected:
PyObject* read;
PyObject* seek;
PyObject* tell;
PyObject* py;
virtual size_t OnSysRead(void *buffer, size_t bufsize) {
if (bufsize == 0)
return 0;
wxPyBeginBlockThreads();
PyObject* arglist = Py_BuildValue("(i)", bufsize);
PyObject* result = PyEval_CallObject(read, arglist);
Py_DECREF(arglist);
size_t o = 0;
if ((result != NULL) && PyString_Check(result)) {
o = PyString_Size(result);
if (o == 0)
m_lasterror = wxSTREAM_EOF;
if (o > bufsize)
o = bufsize;
strncpy((char*)buffer, PyString_AsString(result), o);
Py_DECREF(result);
}
else
m_lasterror = wxSTREAM_READ_ERROR;
wxPyEndBlockThreads();
m_lastcount = o;
return o;
}
virtual size_t OnSysWrite(const void *buffer, size_t bufsize){
m_lasterror = wxSTREAM_WRITE_ERROR;
return 0;
}
virtual off_t OnSysSeek(off_t off, wxSeekMode mode){
wxPyBeginBlockThreads();
PyObject*arglist = Py_BuildValue("(ii)", off, mode);
PyObject*result = PyEval_CallObject(seek, arglist);
Py_DECREF(arglist);
Py_XDECREF(result);
wxPyEndBlockThreads();
return OnSysTell();
}
virtual off_t OnSysTell() const{
wxPyBeginBlockThreads();
PyObject* arglist = Py_BuildValue("()");
PyObject* result = PyEval_CallObject(tell, arglist);
Py_DECREF(arglist);
off_t o = 0;
if (result != NULL) {
o = PyInt_AsLong(result);
Py_DECREF(result);
};
wxPyEndBlockThreads();
return o;
}
wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t)
: py(p), read(r), seek(s), tell(t)
{}
public:
~wxPyCBInputStream() {
wxPyBeginBlockThreads();
Py_XDECREF(py);
Py_XDECREF(read);
Py_XDECREF(seek);
Py_XDECREF(tell);
wxPyEndBlockThreads();
}
virtual size_t GetSize() {
if (seek && tell) {
off_t temp = OnSysTell();
off_t ret = OnSysSeek(0, wxFromEnd);
OnSysSeek(temp, wxFromStart);
return ret;
}
else
return 0;
}
static wxPyCBInputStream* create(PyObject *py) {
PyObject* read;
PyObject* seek;
PyObject* tell;
if (!PyInstance_Check(py) && !PyFile_Check(py)) {
PyErr_SetString(PyExc_TypeError, "Not a file-like object");
Py_XDECREF(py);
return NULL;
}
read = getMethod(py, "read");
seek = getMethod(py, "seek");
tell = getMethod(py, "tell");
if (!read) {
PyErr_SetString(PyExc_TypeError, "Not a file-like object");
Py_XDECREF(py);
Py_XDECREF(read);
Py_XDECREF(seek);
Py_XDECREF(tell);
return NULL;
}
return new wxPyCBInputStream(py, read, seek, tell);
}
static PyObject* getMethod(PyObject* py, char* name) {
if (!PyObject_HasAttrString(py, name))
return NULL;
PyObject* o = PyObject_GetAttrString(py, name);
if (!PyMethod_Check(o) && !PyCFunction_Check(o)) {
Py_DECREF(o);
return NULL;
}
return o;
}
protected:
};
#ifdef __cplusplus
extern "C" {
#endif
static wxPyInputStream *new_wxPyInputStream(PyObject *p) {
wxInputStream* wxi = wxPyCBInputStream::create(p);
if (wxi)
return new wxPyInputStream(wxi);
wxInputStream* wxis = wxPyCBInputStream::create(p);
if (wxis)
return new wxPyInputStream(wxis);
else
return NULL;
}
+9 -11
View File
@@ -93,8 +93,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
static char* wxStringErrorMsg = "String type required";
#endif
static wxString wxPyEmptyStr("");
static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) {
PyObject* ret = PyTuple_New(3);
if (ret) {
@@ -1018,7 +1016,7 @@ static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObjec
wxString * _result;
wxConfigBase * _arg0;
wxString * _arg1;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
@@ -2052,10 +2050,10 @@ static void *SwigwxConfigTowxConfigBase(void *ptr) {
static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxConfig * _result;
wxString * _arg0 = (wxString *) &wxPyEmptyStr;
wxString * _arg1 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg3 = (wxString *) &wxPyEmptyStr;
wxString * _arg0 = (wxString *) &wxEmptyString;
wxString * _arg1 = (wxString *) &wxEmptyString;
wxString * _arg2 = (wxString *) &wxEmptyString;
wxString * _arg3 = (wxString *) &wxEmptyString;
long _arg4 = (long ) 0;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
@@ -2215,10 +2213,10 @@ static void *SwigwxFileConfigTowxConfigBase(void *ptr) {
static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFileConfig * _result;
wxString * _arg0 = (wxString *) &wxPyEmptyStr;
wxString * _arg1 = (wxString *) &wxPyEmptyStr;
wxString * _arg2 = (wxString *) &wxPyEmptyStr;
wxString * _arg3 = (wxString *) &wxPyEmptyStr;
wxString * _arg0 = (wxString *) &wxEmptyString;
wxString * _arg1 = (wxString *) &wxEmptyString;
wxString * _arg2 = (wxString *) &wxEmptyString;
wxString * _arg3 = (wxString *) &wxEmptyString;
long _arg4 = (long ) 0;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
File diff suppressed because it is too large Load Diff
+29
View File
@@ -176,6 +176,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
val = apply(windowsc.wxWindow_GetBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val) ; val.thisown = 1
return val
def GetBorder(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetBorder,(self,) + _args, _kwargs)
return val
def GetChildren(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetChildren,(self,) + _args, _kwargs)
return val
@@ -192,6 +195,14 @@ class wxWindowPtr(wxEvtHandlerPtr):
val = apply(windowsc.wxWindow_GetClientSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetClientAreaOrigin(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetClientAreaOrigin,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def GetClientRect(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetClientRect,(self,) + _args, _kwargs)
if val: val = wxRectPtr(val) ; val.thisown = 1
return val
def GetConstraints(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetConstraints,(self,) + _args, _kwargs)
if val: val = wxLayoutConstraintsPtr(val)
@@ -277,9 +288,15 @@ class wxWindowPtr(wxEvtHandlerPtr):
def SetWindowStyle(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetWindowStyle,(self,) + _args, _kwargs)
return val
def HasScrollbar(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_HasScrollbar,(self,) + _args, _kwargs)
return val
def Hide(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Hide,(self,) + _args, _kwargs)
return val
def HitTest(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_HitTest,(self,) + _args, _kwargs)
return val
def InitDialog(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_InitDialog,(self,) + _args, _kwargs)
return val
@@ -446,6 +463,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def TransferDataToWindow(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_TransferDataToWindow,(self,) + _args, _kwargs)
return val
def UpdateWindowUI(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_UpdateWindowUI,(self,) + _args, _kwargs)
return val
def Validate(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Validate,(self,) + _args, _kwargs)
return val
@@ -491,6 +511,12 @@ class wxWindowPtr(wxEvtHandlerPtr):
def GetSizer(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs)
return val
def SetContainingSizer(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetContainingSizer,(self,) + _args, _kwargs)
return val
def GetContainingSizer(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetContainingSizer,(self,) + _args, _kwargs)
return val
def GetValidator(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetValidator,(self,) + _args, _kwargs)
return val
@@ -523,6 +549,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def SetHelpText(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetHelpText,(self,) + _args, _kwargs)
return val
def SetHelpTextForId(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetHelpTextForId,(self,) + _args, _kwargs)
return val
def ScrollLines(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_ScrollLines,(self,) + _args, _kwargs)
return val
+19
View File
@@ -629,6 +629,7 @@ extern "C" SWIGEXPORT(void) initsizersc();
extern "C" SWIGEXPORT(void) initclip_dndc();
extern "C" SWIGEXPORT(void) initstreamsc();
extern "C" SWIGEXPORT(void) initfilesysc();
extern "C" SWIGEXPORT(void) initutilsc();
@@ -2450,6 +2451,22 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxDUPLEX_SIMPLEX", PyInt_FromLong((long) wxDUPLEX_SIMPLEX));
PyDict_SetItemString(d,"wxDUPLEX_HORIZONTAL", PyInt_FromLong((long) wxDUPLEX_HORIZONTAL));
PyDict_SetItemString(d,"wxDUPLEX_VERTICAL", PyInt_FromLong((long) wxDUPLEX_VERTICAL));
PyDict_SetItemString(d,"wxHT_NOWHERE", PyInt_FromLong((long) wxHT_NOWHERE));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_FIRST", PyInt_FromLong((long) wxHT_SCROLLBAR_FIRST));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_ARROW_LINE_1", PyInt_FromLong((long) wxHT_SCROLLBAR_ARROW_LINE_1));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_ARROW_LINE_2", PyInt_FromLong((long) wxHT_SCROLLBAR_ARROW_LINE_2));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_ARROW_PAGE_1", PyInt_FromLong((long) wxHT_SCROLLBAR_ARROW_PAGE_1));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_ARROW_PAGE_2", PyInt_FromLong((long) wxHT_SCROLLBAR_ARROW_PAGE_2));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_THUMB", PyInt_FromLong((long) wxHT_SCROLLBAR_THUMB));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_BAR_1", PyInt_FromLong((long) wxHT_SCROLLBAR_BAR_1));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_BAR_2", PyInt_FromLong((long) wxHT_SCROLLBAR_BAR_2));
PyDict_SetItemString(d,"wxHT_SCROLLBAR_LAST", PyInt_FromLong((long) wxHT_SCROLLBAR_LAST));
PyDict_SetItemString(d,"wxHT_WINDOW_OUTSIDE", PyInt_FromLong((long) wxHT_WINDOW_OUTSIDE));
PyDict_SetItemString(d,"wxHT_WINDOW_INSIDE", PyInt_FromLong((long) wxHT_WINDOW_INSIDE));
PyDict_SetItemString(d,"wxHT_WINDOW_VERT_SCROLLBAR", PyInt_FromLong((long) wxHT_WINDOW_VERT_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_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));
@@ -2549,6 +2566,7 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT));
PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT));
PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED));
PyDict_SetItemString(d,"wxEVT_DISPLAY_CHANGED", PyInt_FromLong((long) wxEVT_DISPLAY_CHANGED));
PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED));
PyDict_SetItemString(d,"wxEVT_QUERY_NEW_PALETTE", PyInt_FromLong((long) wxEVT_QUERY_NEW_PALETTE));
PyDict_SetItemString(d,"wxEVT_PALETTE_CHANGED", PyInt_FromLong((long) wxEVT_PALETTE_CHANGED));
@@ -2609,6 +2627,7 @@ SWIGEXPORT(void) initwxc() {
initclip_dndc();
initstreamsc();
initfilesysc();
initutilsc();
PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
+29 -1
View File
@@ -738,6 +738,22 @@ wxPAPER_A3_EXTRA_TRANSVERSE = wxc.wxPAPER_A3_EXTRA_TRANSVERSE
wxDUPLEX_SIMPLEX = wxc.wxDUPLEX_SIMPLEX
wxDUPLEX_HORIZONTAL = wxc.wxDUPLEX_HORIZONTAL
wxDUPLEX_VERTICAL = wxc.wxDUPLEX_VERTICAL
wxHT_NOWHERE = wxc.wxHT_NOWHERE
wxHT_SCROLLBAR_FIRST = wxc.wxHT_SCROLLBAR_FIRST
wxHT_SCROLLBAR_ARROW_LINE_1 = wxc.wxHT_SCROLLBAR_ARROW_LINE_1
wxHT_SCROLLBAR_ARROW_LINE_2 = wxc.wxHT_SCROLLBAR_ARROW_LINE_2
wxHT_SCROLLBAR_ARROW_PAGE_1 = wxc.wxHT_SCROLLBAR_ARROW_PAGE_1
wxHT_SCROLLBAR_ARROW_PAGE_2 = wxc.wxHT_SCROLLBAR_ARROW_PAGE_2
wxHT_SCROLLBAR_THUMB = wxc.wxHT_SCROLLBAR_THUMB
wxHT_SCROLLBAR_BAR_1 = wxc.wxHT_SCROLLBAR_BAR_1
wxHT_SCROLLBAR_BAR_2 = wxc.wxHT_SCROLLBAR_BAR_2
wxHT_SCROLLBAR_LAST = wxc.wxHT_SCROLLBAR_LAST
wxHT_WINDOW_OUTSIDE = wxc.wxHT_WINDOW_OUTSIDE
wxHT_WINDOW_INSIDE = wxc.wxHT_WINDOW_INSIDE
wxHT_WINDOW_VERT_SCROLLBAR = wxc.wxHT_WINDOW_VERT_SCROLLBAR
wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR
wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER
wxHT_MAX = wxc.wxHT_MAX
FALSE = wxc.FALSE
false = wxc.false
TRUE = wxc.TRUE
@@ -837,6 +853,7 @@ wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT
wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT
wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT
wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED
wxEVT_DISPLAY_CHANGED = wxc.wxEVT_DISPLAY_CHANGED
wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED
wxEVT_QUERY_NEW_PALETTE = wxc.wxEVT_QUERY_NEW_PALETTE
wxEVT_PALETTE_CHANGED = wxc.wxEVT_PALETTE_CHANGED
@@ -968,6 +985,9 @@ def EVT_INIT_DIALOG(win, func):
def EVT_SYS_COLOUR_CHANGED(win, func):
win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
def EVT_DISPLAY_CHANGED(win, func):
win.Connect(-1, -1, wxEVT_DISPLAY_CHANGED, func)
def EVT_SHOW(win, func):
win.Connect(-1, -1, wxEVT_SHOW, func)
@@ -1648,7 +1668,15 @@ class __wxPyCleanup:
def __del__(self):
self.cleanup()
__cleanMeUp = __wxPyCleanup()
sys.__wxPythonCleanup = __wxPyCleanup()
## # another possible solution, but it gets called too early...
## if sys.version[0] == '2':
## import atexit
## atexit.register(wxc.wxApp_CleanUp)
## else:
## sys.exitfunc = wxc.wxApp_CleanUp
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------