SWIGged updates for wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-05-27 17:55:09 +00:00
parent 47feb54b6b
commit e67409dcb6
9 changed files with 494 additions and 111 deletions

View File

@@ -2789,7 +2789,7 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1);
_result = (wxFontDialog *)new_wxFontDialog(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;

View File

@@ -3212,6 +3212,207 @@ static PyObject *_wrap_wxMouseCaptureChangedEvent_GetCapturedWindow(PyObject *se
return _resultobj;
}
static void *SwigwxSetCursorEventTowxEvent(void *ptr) {
wxSetCursorEvent *src;
wxEvent *dest;
src = (wxSetCursorEvent *) ptr;
dest = (wxEvent *) src;
return (void *) dest;
}
static void *SwigwxSetCursorEventTowxObject(void *ptr) {
wxSetCursorEvent *src;
wxObject *dest;
src = (wxSetCursorEvent *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxSetCursorEvent(_swigarg0,_swigarg1) (new wxSetCursorEvent(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxSetCursorEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSetCursorEvent * _result;
wxCoord _arg0 = (wxCoord ) 0;
wxCoord _arg1 = (wxCoord ) 0;
char *_kwnames[] = { "x","y", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxSetCursorEvent",_kwnames,&_arg0,&_arg1))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxSetCursorEvent *)new_wxSetCursorEvent(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxSetCursorEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxSetCursorEvent_GetX(_swigobj) (_swigobj->GetX())
static PyObject *_wrap_wxSetCursorEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCoord _result;
wxSetCursorEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetX",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetX. Expected _wxSetCursorEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxCoord )wxSetCursorEvent_GetX(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxSetCursorEvent_GetY(_swigobj) (_swigobj->GetY())
static PyObject *_wrap_wxSetCursorEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCoord _result;
wxSetCursorEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetY",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetY. Expected _wxSetCursorEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxCoord )wxSetCursorEvent_GetY(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxSetCursorEvent_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0))
static PyObject *_wrap_wxSetCursorEvent_SetCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSetCursorEvent * _arg0;
wxCursor * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","cursor", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSetCursorEvent_SetCursor",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_SetCursor. Expected _wxSetCursorEvent_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSetCursorEvent_SetCursor. Expected _wxCursor_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxSetCursorEvent_SetCursor(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxSetCursorEvent_GetCursor(_swigobj) (_swigobj->GetCursor())
static PyObject *_wrap_wxSetCursorEvent_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCursor * _result;
wxSetCursorEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_GetCursor",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_GetCursor. Expected _wxSetCursorEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
const wxCursor & _result_ref = wxSetCursorEvent_GetCursor(_arg0);
_result = (wxCursor *) &_result_ref;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxSetCursorEvent_HasCursor(_swigobj) (_swigobj->HasCursor())
static PyObject *_wrap_wxSetCursorEvent_HasCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxSetCursorEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursorEvent_HasCursor",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSetCursorEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursorEvent_HasCursor. Expected _wxSetCursorEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxSetCursorEvent_HasCursor(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static void *SwigwxKeyEventTowxEvent(void *ptr) {
wxKeyEvent *src;
wxEvent *dest;
@@ -7497,6 +7698,12 @@ static PyMethodDef eventscMethods[] = {
{ "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS },
{ "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS },
{ "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxSetCursorEvent_HasCursor", (PyCFunction) _wrap_wxSetCursorEvent_HasCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxSetCursorEvent_GetCursor", (PyCFunction) _wrap_wxSetCursorEvent_GetCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxSetCursorEvent_SetCursor", (PyCFunction) _wrap_wxSetCursorEvent_SetCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxSetCursorEvent_GetY", (PyCFunction) _wrap_wxSetCursorEvent_GetY, METH_VARARGS | METH_KEYWORDS },
{ "wxSetCursorEvent_GetX", (PyCFunction) _wrap_wxSetCursorEvent_GetX, METH_VARARGS | METH_KEYWORDS },
{ "new_wxSetCursorEvent", (PyCFunction) _wrap_new_wxSetCursorEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxMouseCaptureChangedEvent_GetCapturedWindow", (PyCFunction) _wrap_wxMouseCaptureChangedEvent_GetCapturedWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMouseCaptureChangedEvent", (PyCFunction) _wrap_new_wxMouseCaptureChangedEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxMouseEvent_m_linesPerAction_get", (PyCFunction) _wrap_wxMouseEvent_m_linesPerAction_get, METH_VARARGS | METH_KEYWORDS },
@@ -7636,6 +7843,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent},
{ "_wxEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxEvent},
{ "_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent},
{ "_wxEvent","_wxSetCursorEvent",SwigwxSetCursorEventTowxEvent},
{ "_wxEvent","_wxMouseCaptureChangedEvent",SwigwxMouseCaptureChangedEventTowxEvent},
{ "_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent},
{ "_wxEvent","_wxSpinEvent",SwigwxSpinEventTowxEvent},
@@ -7728,6 +7936,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxObject","_wxMoveEvent",SwigwxMoveEventTowxObject},
{ "_wxObject","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxObject},
{ "_wxObject","_wxKeyEvent",SwigwxKeyEventTowxObject},
{ "_wxObject","_wxSetCursorEvent",SwigwxSetCursorEventTowxObject},
{ "_wxObject","_wxMouseCaptureChangedEvent",SwigwxMouseCaptureChangedEventTowxObject},
{ "_wxObject","_wxMouseEvent",SwigwxMouseEventTowxObject},
{ "_wxObject","_wxSpinEvent",SwigwxSpinEventTowxObject},

View File

@@ -406,6 +406,36 @@ class wxMouseCaptureChangedEvent(wxMouseCaptureChangedEventPtr):
class wxSetCursorEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetX(self, *_args, **_kwargs):
val = apply(eventsc.wxSetCursorEvent_GetX,(self,) + _args, _kwargs)
return val
def GetY(self, *_args, **_kwargs):
val = apply(eventsc.wxSetCursorEvent_GetY,(self,) + _args, _kwargs)
return val
def SetCursor(self, *_args, **_kwargs):
val = apply(eventsc.wxSetCursorEvent_SetCursor,(self,) + _args, _kwargs)
return val
def GetCursor(self, *_args, **_kwargs):
val = apply(eventsc.wxSetCursorEvent_GetCursor,(self,) + _args, _kwargs)
if val: val = wxCursorPtr(val)
return val
def HasCursor(self, *_args, **_kwargs):
val = apply(eventsc.wxSetCursorEvent_HasCursor,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxSetCursorEvent instance at %s>" % (self.this,)
class wxSetCursorEvent(wxSetCursorEventPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(eventsc.new_wxSetCursorEvent,_args,_kwargs)
self.thisown = 1
class wxKeyEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this

View File

@@ -1295,82 +1295,6 @@ static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwa
return _resultobj;
}
static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxString * _arg0;
wxWindow * _arg1 = (wxWindow *) NULL;
PyObject * _obj0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "label","parent", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1))
return NULL;
{
_arg0 = wxString_in_helper(_obj0);
if (_arg0 == NULL)
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 wxFindWindowByLabel. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
{
if (_obj0)
delete _arg0;
}
return _resultobj;
}
static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxString * _arg0;
wxWindow * _arg1 = (wxWindow *) NULL;
PyObject * _obj0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "name","parent", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1))
return NULL;
{
_arg0 = wxString_in_helper(_obj0);
if (_arg0 == NULL)
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 wxFindWindowByName. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
{
if (_obj0)
delete _arg0;
}
return _resultobj;
}
static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR;
@@ -2534,17 +2458,17 @@ static PyObject *_wrap_wxSystemSettings_HasFeature(PyObject *self, PyObject *arg
return _resultobj;
}
static PyObject *_wrap_wxSystemSettings_GetScreen(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_wxSystemSettings_GetScreenType(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSystemScreen _result;
wxSystemScreenType _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSystemSettings_GetScreen",_kwnames))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSystemSettings_GetScreenType",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxSystemScreen )wxSystemSettings::GetScreenType();
_result = (wxSystemScreenType )wxSystemSettings::GetScreenType();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -2552,17 +2476,17 @@ static PyObject *_wrap_wxSystemSettings_GetScreen(PyObject *self, PyObject *args
return _resultobj;
}
static PyObject *_wrap_wxSystemSettings_SetScreen(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_wxSystemSettings_SetScreenType(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSystemScreen _arg0;
wxSystemScreenType _arg0;
char *_kwnames[] = { "screen", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_SetScreen",_kwnames,&_arg0))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_SetScreenType",_kwnames,&_arg0))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxSystemSettings::SetScreen(_arg0);
wxSystemSettings::SetScreenType(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -10169,8 +10093,8 @@ static PyMethodDef misc2cMethods[] = {
{ "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS },
{ "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_SetScreen", (PyCFunction) _wrap_wxSystemSettings_SetScreen, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetScreen", (PyCFunction) _wrap_wxSystemSettings_GetScreen, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_SetScreenType", (PyCFunction) _wrap_wxSystemSettings_SetScreenType, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetScreenType", (PyCFunction) _wrap_wxSystemSettings_GetScreenType, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_HasFeature", (PyCFunction) _wrap_wxSystemSettings_HasFeature, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetMetric", (PyCFunction) _wrap_wxSystemSettings_GetMetric, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetFont", (PyCFunction) _wrap_wxSystemSettings_GetFont, METH_VARARGS | METH_KEYWORDS },
@@ -10216,8 +10140,6 @@ static PyMethodDef misc2cMethods[] = {
{ "wxGenericFindWindowAtPoint", (PyCFunction) _wrap_wxGenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS },
{ "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxBeginBusyCursor", (PyCFunction) _wrap_wxBeginBusyCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS },
{ "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxGetClientDisplayRect", (PyCFunction) _wrap_wxGetClientDisplayRect, METH_VARARGS | METH_KEYWORDS },
{ "wxClientDisplayRect", (PyCFunction) _wrap_wxClientDisplayRect, METH_VARARGS | METH_KEYWORDS },
@@ -10461,10 +10383,10 @@ SWIGEXPORT(void) initmisc2c() {
PyDict_SetItemString(d,"wxSYS_CAN_DRAW_FRAME_DECORATIONS", PyInt_FromLong((long) wxSYS_CAN_DRAW_FRAME_DECORATIONS));
PyDict_SetItemString(d,"wxSYS_CAN_ICONIZE_FRAME", PyInt_FromLong((long) wxSYS_CAN_ICONIZE_FRAME));
PyDict_SetItemString(d,"wxSYS_SCREEN_NONE", PyInt_FromLong((long) wxSYS_SCREEN_NONE));
PyDict_SetItemString(d,"wxSYS_SCREEN_DESKTOP", PyInt_FromLong((long) wxSYS_SCREEN_DESKTOP));
PyDict_SetItemString(d,"wxSYS_SCREEN_SMALL", PyInt_FromLong((long) wxSYS_SCREEN_SMALL));
PyDict_SetItemString(d,"wxSYS_SCREEN_PDA", PyInt_FromLong((long) wxSYS_SCREEN_PDA));
PyDict_SetItemString(d,"wxSYS_SCREEN_TINY", PyInt_FromLong((long) wxSYS_SCREEN_TINY));
PyDict_SetItemString(d,"wxSYS_SCREEN_PDA", PyInt_FromLong((long) wxSYS_SCREEN_PDA));
PyDict_SetItemString(d,"wxSYS_SCREEN_SMALL", PyInt_FromLong((long) wxSYS_SCREEN_SMALL));
PyDict_SetItemString(d,"wxSYS_SCREEN_DESKTOP", PyInt_FromLong((long) wxSYS_SCREEN_DESKTOP));
PyDict_SetItemString(d,"wxLOG_FatalError", PyInt_FromLong((long) wxLOG_FatalError));
PyDict_SetItemString(d,"wxLOG_Error", PyInt_FromLong((long) wxLOG_Error));
PyDict_SetItemString(d,"wxLOG_Warning", PyInt_FromLong((long) wxLOG_Warning));

View File

@@ -1006,14 +1006,6 @@ def wxGetClientDisplayRect(*_args, **_kwargs):
wxSetCursor = misc2c.wxSetCursor
def wxFindWindowByLabel(*_args, **_kwargs):
val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs)
return val
def wxFindWindowByName(*_args, **_kwargs):
val = apply(misc2c.wxFindWindowByName,_args,_kwargs)
return val
wxBeginBusyCursor = misc2c.wxBeginBusyCursor
def wxGetActiveWindow(*_args, **_kwargs):
@@ -1132,9 +1124,9 @@ wxSystemSettings_GetMetric = misc2c.wxSystemSettings_GetMetric
wxSystemSettings_HasFeature = misc2c.wxSystemSettings_HasFeature
wxSystemSettings_GetScreen = misc2c.wxSystemSettings_GetScreen
wxSystemSettings_GetScreenType = misc2c.wxSystemSettings_GetScreenType
wxSystemSettings_SetScreen = misc2c.wxSystemSettings_SetScreen
wxSystemSettings_SetScreenType = misc2c.wxSystemSettings_SetScreenType
wxToolTip_Enable = misc2c.wxToolTip_Enable
@@ -1276,10 +1268,10 @@ wxSYS_SWAP_BUTTONS = misc2c.wxSYS_SWAP_BUTTONS
wxSYS_CAN_DRAW_FRAME_DECORATIONS = misc2c.wxSYS_CAN_DRAW_FRAME_DECORATIONS
wxSYS_CAN_ICONIZE_FRAME = misc2c.wxSYS_CAN_ICONIZE_FRAME
wxSYS_SCREEN_NONE = misc2c.wxSYS_SCREEN_NONE
wxSYS_SCREEN_DESKTOP = misc2c.wxSYS_SCREEN_DESKTOP
wxSYS_SCREEN_SMALL = misc2c.wxSYS_SCREEN_SMALL
wxSYS_SCREEN_PDA = misc2c.wxSYS_SCREEN_PDA
wxSYS_SCREEN_TINY = misc2c.wxSYS_SCREEN_TINY
wxSYS_SCREEN_PDA = misc2c.wxSYS_SCREEN_PDA
wxSYS_SCREEN_SMALL = misc2c.wxSYS_SCREEN_SMALL
wxSYS_SCREEN_DESKTOP = misc2c.wxSYS_SCREEN_DESKTOP
wxLOG_FatalError = misc2c.wxLOG_FatalError
wxLOG_Error = misc2c.wxLOG_Error
wxLOG_Warning = misc2c.wxLOG_Warning

View File

@@ -143,6 +143,20 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
win->SubclassWin(hWnd);
return win;
}
wxWindow* wxFindWindowById( long id, const wxWindow *parent = NULL ) {
return wxWindow::FindWindowById(id, parent);
}
wxWindow* wxFindWindowByName( const wxString& name,
const wxWindow *parent = NULL ) {
return wxWindow::FindWindowByName(name, parent);
}
wxWindow* wxFindWindowByLabel( const wxString& label,
const wxWindow *parent = NULL ) {
return wxWindow::FindWindowByLabel(label, parent);
}
#ifdef __cplusplus
extern "C" {
#endif
@@ -165,6 +179,110 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec
return _resultobj;
}
static PyObject *_wrap_wxFindWindowById(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
long _arg0;
wxWindow * _arg1 = (wxWindow *) NULL;
PyObject * _argo1 = 0;
char *_kwnames[] = { "id","parent", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l|O:wxFindWindowById",_kwnames,&_arg0,&_argo1))
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 wxFindWindowById. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxFindWindowById(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxString * _arg0;
wxWindow * _arg1 = (wxWindow *) NULL;
PyObject * _obj0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "name","parent", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1))
return NULL;
{
_arg0 = wxString_in_helper(_obj0);
if (_arg0 == NULL)
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 wxFindWindowByName. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
{
if (_obj0)
delete _arg0;
}
return _resultobj;
}
static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxString * _arg0;
wxWindow * _arg1 = (wxWindow *) NULL;
PyObject * _obj0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "label","parent", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1))
return NULL;
{
_arg0 = wxString_in_helper(_obj0);
if (_arg0 == NULL)
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 wxFindWindowByLabel. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
{
if (_obj0)
delete _arg0;
}
return _resultobj;
}
static void *SwigwxEvtHandlerTowxObject(void *ptr) {
wxEvtHandler *src;
wxObject *dest;
@@ -3634,6 +3752,43 @@ static PyObject *_wrap_wxWindow_RefreshRect(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define wxWindow_AddChild(_swigobj,_swigarg0) (_swigobj->AddChild(_swigarg0))
static PyObject *_wrap_wxWindow_AddChild(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _arg0;
wxWindow * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","child", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_AddChild",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_AddChild. Expected _wxWindow_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 wxWindow_AddChild. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxWindow_AddChild(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxWindow_RemoveChild(_swigobj,_swigarg0) (_swigobj->RemoveChild(_swigarg0))
static PyObject *_wrap_wxWindow_RemoveChild(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -4725,6 +4880,7 @@ static PyObject *_wrap_wxWindow_SetClientSize(PyObject *self, PyObject *args, Py
#define wxWindow_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0))
static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
wxCursor * _arg1;
PyObject * _argo0 = 0;
@@ -4750,12 +4906,47 @@ static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObje
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxWindow_SetCursor(_arg0,*_arg1);
_result = (bool )wxWindow_SetCursor(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_GetCursor(_swigobj) (_swigobj->GetCursor())
static PyObject *_wrap_wxWindow_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCursor * _result;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetCursor",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetCursor. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxCursor & _result_ref = wxWindow_GetCursor(_arg0);
_result = (wxCursor *) &_result_ref;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
@@ -11808,6 +11999,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_SetTitle", (PyCFunction) _wrap_wxWindow_SetTitle, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetExtraStyle", (PyCFunction) _wrap_wxWindow_SetExtraStyle, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetEventHandler", (PyCFunction) _wrap_wxWindow_SetEventHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetCursor", (PyCFunction) _wrap_wxWindow_GetCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetCursor", (PyCFunction) _wrap_wxWindow_SetCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetClientSize", (PyCFunction) _wrap_wxWindow_SetClientSize, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetClientSizeWH", (PyCFunction) _wrap_wxWindow_SetClientSizeWH, METH_VARARGS | METH_KEYWORDS },
@@ -11840,6 +12032,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_ScreenToClientXY", (PyCFunction) _wrap_wxWindow_ScreenToClientXY, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Reparent", (PyCFunction) _wrap_wxWindow_Reparent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_RemoveChild", (PyCFunction) _wrap_wxWindow_RemoveChild, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_AddChild", (PyCFunction) _wrap_wxWindow_AddChild, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_RefreshRect", (PyCFunction) _wrap_wxWindow_RefreshRect, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Refresh", (PyCFunction) _wrap_wxWindow_Refresh, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS },
@@ -11941,6 +12134,9 @@ static PyMethodDef windowscMethods[] = {
{ "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS },
{ "wxFindWindowById", (PyCFunction) _wrap_wxFindWindowById, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};

View File

@@ -365,6 +365,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def RefreshRect(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_RefreshRect,(self,) + _args, _kwargs)
return val
def AddChild(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_AddChild,(self,) + _args, _kwargs)
return val
def RemoveChild(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_RemoveChild,(self,) + _args, _kwargs)
return val
@@ -463,6 +466,10 @@ class wxWindowPtr(wxEvtHandlerPtr):
def SetCursor(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetCursor,(self,) + _args, _kwargs)
return val
def GetCursor(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetCursor,(self,) + _args, _kwargs)
if val: val = wxCursorPtr(val)
return val
def SetEventHandler(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetEventHandler,(self,) + _args, _kwargs)
return val
@@ -1158,6 +1165,18 @@ def wxWindow_FromHWND(*_args, **_kwargs):
val = apply(windowsc.wxWindow_FromHWND,_args,_kwargs)
return val
def wxFindWindowById(*_args, **_kwargs):
val = apply(windowsc.wxFindWindowById,_args,_kwargs)
return val
def wxFindWindowByName(*_args, **_kwargs):
val = apply(windowsc.wxFindWindowByName,_args,_kwargs)
return val
def wxFindWindowByLabel(*_args, **_kwargs):
val = apply(windowsc.wxFindWindowByLabel,_args,_kwargs)
return val
wxValidator_IsSilent = windowsc.wxValidator_IsSilent
wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError

View File

@@ -2003,8 +2003,13 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxSB_VERTICAL", PyInt_FromLong((long) wxSB_VERTICAL));
PyDict_SetItemString(d,"wxST_SIZEGRIP", PyInt_FromLong((long) wxST_SIZEGRIP));
PyDict_SetItemString(d,"wxST_NO_AUTORESIZE", PyInt_FromLong((long) wxST_NO_AUTORESIZE));
PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW));
PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW));
PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW));
PyDict_SetItemString(d,"wxBU_LEFT", PyInt_FromLong((long) wxBU_LEFT));
PyDict_SetItemString(d,"wxBU_TOP", PyInt_FromLong((long) wxBU_TOP));
PyDict_SetItemString(d,"wxBU_RIGHT", PyInt_FromLong((long) wxBU_RIGHT));
PyDict_SetItemString(d,"wxBU_BOTTOM", PyInt_FromLong((long) wxBU_BOTTOM));
PyDict_SetItemString(d,"wxBU_EXACTFIT", PyInt_FromLong((long) wxBU_EXACTFIT));
PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL));
PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL));
PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS));
@@ -2548,6 +2553,7 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxEVT_NC_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_NC_LEFT_DCLICK));
PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK));
PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK));
PyDict_SetItemString(d,"wxEVT_SET_CURSOR", PyInt_FromLong((long) wxEVT_SET_CURSOR));
PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR));
PyDict_SetItemString(d,"wxEVT_KEY_DOWN", PyInt_FromLong((long) wxEVT_KEY_DOWN));
PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP));

View File

@@ -288,8 +288,13 @@ wxSB_HORIZONTAL = wxc.wxSB_HORIZONTAL
wxSB_VERTICAL = wxc.wxSB_VERTICAL
wxST_SIZEGRIP = wxc.wxST_SIZEGRIP
wxST_NO_AUTORESIZE = wxc.wxST_NO_AUTORESIZE
wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
wxBU_LEFT = wxc.wxBU_LEFT
wxBU_TOP = wxc.wxBU_TOP
wxBU_RIGHT = wxc.wxBU_RIGHT
wxBU_BOTTOM = wxc.wxBU_BOTTOM
wxBU_EXACTFIT = wxc.wxBU_EXACTFIT
wxSP_VERTICAL = wxc.wxSP_VERTICAL
wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL
wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS
@@ -833,6 +838,7 @@ wxEVT_NC_LEAVE_WINDOW = wxc.wxEVT_NC_LEAVE_WINDOW
wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK
wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK
wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK
wxEVT_SET_CURSOR = wxc.wxEVT_SET_CURSOR
wxEVT_CHAR = wxc.wxEVT_CHAR
wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN
wxEVT_KEY_UP = wxc.wxEVT_KEY_UP
@@ -1040,6 +1046,9 @@ def EVT_WINDOW_CREATE(win, func):
def EVT_WINDOW_DESTROY(win, func):
win.Connect(-1, -1, wxEVT_DESTROY, func)
def EVT_SET_CURSOR(win, func):
win.Connect(-1, -1, wxEVT_SET_CURSOR, func)
def EVT_IDLE(win, func):
@@ -1629,7 +1638,7 @@ class wxPyOnDemandOutputWindow:
self.frame.Close()
_defRedirect = (wxPlatform == '__WXMSW__')
_defRedirect = (wxPlatform == '__WXMSW__' or wxPlatform == '__WXMAC__')
#----------------------------------------------------------------------
# The main application class. Derive from this and implement an OnInit