SWIGged updates for wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-03-21 06:48:55 +00:00
parent 137b5242b1
commit 9a74fcaf97
26 changed files with 2510 additions and 736 deletions

View File

@@ -89,6 +89,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
@@ -451,7 +455,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
char * _arg5 = (char *) "GLCanvas";
wxString * _arg5 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg6 = (int *) NULL;
wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
@@ -459,6 +463,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
int * temp1;
PyObject * _obj6 = 0;
PyObject * _argo7 = 0;
@@ -466,7 +471,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5,&_obj6,&_argo7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -486,6 +491,12 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
}
if (_obj5)
{
_arg5 = wxString_in_helper(_obj5);
if (_arg5 == NULL)
return NULL;
}
if (_obj6)
{
@@ -509,7 +520,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7);
_result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6,*_arg7);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -520,6 +531,10 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj5)
delete _arg5;
}
{
delete [] _arg6;
}
@@ -536,7 +551,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args,
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) 0;
char * _arg6 = (char *) "GLCanvas";
wxString * _arg6 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg7 = (int *) NULL;
wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
@@ -545,6 +560,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args,
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
PyObject * _obj6 = 0;
int * temp1;
PyObject * _obj7 = 0;
PyObject * _argo8 = 0;
@@ -552,7 +568,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args,
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6,&_obj7,&_argo8))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -579,6 +595,12 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args,
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
if (_obj6)
{
_arg6 = wxString_in_helper(_obj6);
if (_arg6 == NULL)
return NULL;
}
if (_obj7)
{
@@ -602,7 +624,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args,
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8);
_result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -613,6 +635,10 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args,
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj6)
delete _arg6;
}
{
delete [] _arg7;
}

View File

@@ -84,6 +84,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(STCNameStr);
#ifdef __cplusplus
extern "C" {
#endif
@@ -128,17 +131,18 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
char * _arg5 = (char *) "styledtext";
wxString * _arg5 = (wxString *) &wxPySTCNameStr;
PyObject * _argo0 = 0;
wxPoint temp;
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "parent","id","pos","size","style","name", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxStyledTextCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxStyledTextCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -158,10 +162,16 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
}
if (_obj5)
{
_arg5 = wxString_in_helper(_obj5);
if (_arg5 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5);
_result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -172,6 +182,10 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj5)
delete _arg5;
}
return _resultobj;
}
@@ -218,10 +232,10 @@ static PyObject *_wrap_wxStyledTextCtrl_AddText(PyObject *self, PyObject *args,
static PyObject *_wrap_wxStyledTextCtrl_AddStyledText(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxStyledTextCtrl * _arg0;
wxString * _arg1;
wxMemoryBuffer * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","text", NULL };
char *_kwnames[] = { "self","data", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AddStyledText",_kwnames,&_argo0,&_obj1))
@@ -234,9 +248,14 @@ static PyObject *_wrap_wxStyledTextCtrl_AddStyledText(PyObject *self, PyObject *
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, "String buffer expected");
return NULL;
}
char* str = PyString_AS_STRING(_obj1);
int len = PyString_GET_SIZE(_obj1);
_arg1 = new wxMemoryBuffer(len);
memcpy(_arg1->GetData(), str, len);
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -609,7 +628,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSavePoint(PyObject *self, PyObject *a
#define wxStyledTextCtrl_GetStyledText(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetStyledText(_swigarg0,_swigarg1))
static PyObject *_wrap_wxStyledTextCtrl_GetStyledText(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxMemoryBuffer * _result;
wxStyledTextCtrl * _arg0;
int _arg1;
int _arg2;
@@ -628,16 +647,12 @@ static PyObject *_wrap_wxStyledTextCtrl_GetStyledText(PyObject *self, PyObject *
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxString (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2));
_result = new wxMemoryBuffer (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
_resultobj = PyString_FromStringAndSize((char*)_result->GetData(), _result->GetDataLen());
}
{
delete _result;
@@ -2231,6 +2246,36 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetCase(PyObject *self, PyObject *a
return _resultobj;
}
#define wxStyledTextCtrl_StyleSetCharacterSet(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetCharacterSet(_swigarg0,_swigarg1))
static PyObject *_wrap_wxStyledTextCtrl_StyleSetCharacterSet(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxStyledTextCtrl * _arg0;
int _arg1;
int _arg2;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","style","characterSet", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetCharacterSet",_kwnames,&_argo0,&_arg1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetCharacterSet. Expected _wxStyledTextCtrl_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxStyledTextCtrl_StyleSetCharacterSet(_arg0,_arg1,_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxStyledTextCtrl_SetSelForeground(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelForeground(_swigarg0,_swigarg1))
static PyObject *_wrap_wxStyledTextCtrl_SetSelForeground(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -6907,34 +6952,6 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLayoutCache(PyObject *self, PyObject
return _resultobj;
}
#define wxStyledTextCtrl_DeleteBackNotLine(_swigobj) (_swigobj->DeleteBackNotLine())
static PyObject *_wrap_wxStyledTextCtrl_DeleteBackNotLine(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxStyledTextCtrl * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_DeleteBackNotLine",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_DeleteBackNotLine. Expected _wxStyledTextCtrl_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxStyledTextCtrl_DeleteBackNotLine(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxStyledTextCtrl_MoveCaretInsideView(_swigobj) (_swigobj->MoveCaretInsideView())
static PyObject *_wrap_wxStyledTextCtrl_MoveCaretInsideView(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -9312,12 +9329,13 @@ static PyObject *_wrap_wxStyledTextEvent_SetModificationType(PyObject *self, PyO
static PyObject *_wrap_wxStyledTextEvent_SetText(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxStyledTextEvent * _arg0;
char * _arg1;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","t", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxStyledTextEvent_SetText",_kwnames,&_argo0,&_arg1))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextEvent_SetText",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -9326,14 +9344,23 @@ static PyObject *_wrap_wxStyledTextEvent_SetText(PyObject *self, PyObject *args,
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxStyledTextEvent_SetText(_arg0,_arg1);
wxStyledTextEvent_SetText(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
@@ -10597,7 +10624,6 @@ static PyMethodDef stc_cMethods[] = {
{ "wxStyledTextCtrl_BraceHighlight", (PyCFunction) _wrap_wxStyledTextCtrl_BraceHighlight, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_LineLength", (PyCFunction) _wrap_wxStyledTextCtrl_LineLength, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_MoveCaretInsideView", (PyCFunction) _wrap_wxStyledTextCtrl_MoveCaretInsideView, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_DeleteBackNotLine", (PyCFunction) _wrap_wxStyledTextCtrl_DeleteBackNotLine, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_GetLayoutCache", (PyCFunction) _wrap_wxStyledTextCtrl_GetLayoutCache, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_SetLayoutCache", (PyCFunction) _wrap_wxStyledTextCtrl_SetLayoutCache, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_GetWrapMode", (PyCFunction) _wrap_wxStyledTextCtrl_GetWrapMode, METH_VARARGS | METH_KEYWORDS },
@@ -10750,6 +10776,7 @@ static PyMethodDef stc_cMethods[] = {
{ "wxStyledTextCtrl_SetCaretForeground", (PyCFunction) _wrap_wxStyledTextCtrl_SetCaretForeground, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_SetSelBackground", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelBackground, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_SetSelForeground", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelForeground, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_StyleSetCharacterSet", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetCharacterSet, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_StyleSetCase", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetCase, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_StyleSetUnderline", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetUnderline, METH_VARARGS | METH_KEYWORDS },
{ "wxStyledTextCtrl_StyleResetDefault", (PyCFunction) _wrap_wxStyledTextCtrl_StyleResetDefault, METH_VARARGS | METH_KEYWORDS },

View File

@@ -310,6 +310,9 @@ class wxStyledTextCtrlPtr(wxControlPtr):
def StyleSetCase(self, *_args, **_kwargs):
val = apply(stc_c.wxStyledTextCtrl_StyleSetCase,(self,) + _args, _kwargs)
return val
def StyleSetCharacterSet(self, *_args, **_kwargs):
val = apply(stc_c.wxStyledTextCtrl_StyleSetCharacterSet,(self,) + _args, _kwargs)
return val
def SetSelForeground(self, *_args, **_kwargs):
val = apply(stc_c.wxStyledTextCtrl_SetSelForeground,(self,) + _args, _kwargs)
return val
@@ -769,9 +772,6 @@ class wxStyledTextCtrlPtr(wxControlPtr):
def GetLayoutCache(self, *_args, **_kwargs):
val = apply(stc_c.wxStyledTextCtrl_GetLayoutCache,(self,) + _args, _kwargs)
return val
def DeleteBackNotLine(self, *_args, **_kwargs):
val = apply(stc_c.wxStyledTextCtrl_DeleteBackNotLine,(self,) + _args, _kwargs)
return val
def MoveCaretInsideView(self, *_args, **_kwargs):
val = apply(stc_c.wxStyledTextCtrl_MoveCaretInsideView,(self,) + _args, _kwargs)
return val