A few tweaks and cleanups

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-04-17 18:03:11 +00:00
parent f772a88b55
commit 19e30148e1
10 changed files with 96 additions and 268 deletions

View File

@@ -95,14 +95,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxHtmlBookRecordTowxObject(void *ptr) {
wxHtmlBookRecord *src;
wxObject *dest;
src = (wxHtmlBookRecord *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxHtmlBookRecord(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxHtmlBookRecord(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -2438,7 +2430,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxHtmlContentsItem","_struct_wxHtmlContentsItem",0},
{ "_wxObject","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxObject},
{ "_wxObject","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxObject},
{ "_wxObject","_wxHtmlBookRecord",SwigwxHtmlBookRecordTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},

View File

@@ -42,7 +42,7 @@ from printfw import *
from sizers import *
from filesys import *
class wxHtmlBookRecordPtr(wxObjectPtr):
class wxHtmlBookRecordPtr :
def __init__(self,this):
self.this = this
self.thisown = 0

View File

@@ -137,7 +137,7 @@ IMP_PYCALLBACK_STRING__pure( wxPyTipProvider, wxTipProvider, GetTip);
#include <wx/generic/dragimgg.h>
// A Log class that can be derived from in wxPython
// A wxLog class that can be derived from in wxPython
class wxPyLog : public wxLog {
public:
wxPyLog() : wxLog() {}
@@ -5395,60 +5395,6 @@ static PyObject *_wrap_wxLogWindow_PassMessages(PyObject *self, PyObject *args,
return _resultobj;
}
#define new_wxLogNull() (new wxLogNull())
static PyObject *_wrap_new_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxLogNull * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogNull",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxLogNull *)new_wxLogNull();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogNull_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define delete_wxLogNull(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxLogNull * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLogNull",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogNull_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLogNull. Expected _wxLogNull_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete_wxLogNull(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static void *SwigwxLogChainTowxLog(void *ptr) {
wxLogChain *src;
wxLog *dest;
@@ -5623,6 +5569,60 @@ static PyObject *_wrap_wxLogChain_GetOldLog(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define new_wxLogNull() (new wxLogNull())
static PyObject *_wrap_new_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxLogNull * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogNull",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxLogNull *)new_wxLogNull();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogNull_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define delete_wxLogNull(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxLogNull * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLogNull",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogNull_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLogNull. Expected _wxLogNull_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete_wxLogNull(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static void *SwigwxPyLogTowxLog(void *ptr) {
wxPyLog *src;
wxLog *dest;
@@ -9966,13 +9966,13 @@ static PyMethodDef misc2cMethods[] = {
{ "wxPyLog_Destroy", (PyCFunction) _wrap_wxPyLog_Destroy, METH_VARARGS | METH_KEYWORDS },
{ "wxPyLog__setCallbackInfo", (PyCFunction) _wrap_wxPyLog__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyLog", (PyCFunction) _wrap_new_wxPyLog, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS },
{ "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS },
{ "wxLogChain_GetOldLog", (PyCFunction) _wrap_wxLogChain_GetOldLog, METH_VARARGS | METH_KEYWORDS },
{ "wxLogChain_IsPassingMessages", (PyCFunction) _wrap_wxLogChain_IsPassingMessages, METH_VARARGS | METH_KEYWORDS },
{ "wxLogChain_PassMessages", (PyCFunction) _wrap_wxLogChain_PassMessages, METH_VARARGS | METH_KEYWORDS },
{ "wxLogChain_SetLog", (PyCFunction) _wrap_wxLogChain_SetLog, METH_VARARGS | METH_KEYWORDS },
{ "new_wxLogChain", (PyCFunction) _wrap_new_wxLogChain, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS },
{ "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS },
{ "wxLogWindow_PassMessages", (PyCFunction) _wrap_wxLogWindow_PassMessages, METH_VARARGS | METH_KEYWORDS },
{ "wxLogWindow_IsPassingMessages", (PyCFunction) _wrap_wxLogWindow_IsPassingMessages, METH_VARARGS | METH_KEYWORDS },
{ "wxLogWindow_GetOldLog", (PyCFunction) _wrap_wxLogWindow_GetOldLog, METH_VARARGS | METH_KEYWORDS },

View File

@@ -424,23 +424,6 @@ class wxLogWindow(wxLogWindowPtr):
class wxLogNullPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,misc2c=misc2c):
if self.thisown == 1 :
misc2c.delete_wxLogNull(self)
def __repr__(self):
return "<C wxLogNull instance at %s>" % (self.this,)
class wxLogNull(wxLogNullPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(misc2c.new_wxLogNull,_args,_kwargs)
self.thisown = 1
class wxLogChainPtr(wxLogPtr):
def __init__(self,this):
self.this = this
@@ -468,6 +451,23 @@ class wxLogChain(wxLogChainPtr):
class wxLogNullPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,misc2c=misc2c):
if self.thisown == 1 :
misc2c.delete_wxLogNull(self)
def __repr__(self):
return "<C wxLogNull instance at %s>" % (self.this,)
class wxLogNull(wxLogNullPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(misc2c.new_wxLogNull,_args,_kwargs)
self.thisown = 1
class wxPyLogPtr(wxLogPtr):
def __init__(self,this):
self.this = this

View File

@@ -595,7 +595,8 @@ PyObject *ptrfree(PyObject *_PTRVALUE) {
wxPyApp* wxGetApp() {
return wxPythonApp;
//return wxPythonApp;
return (wxPyApp*)wxGetApp();
}
void wxApp_CleanUp() {