SWIGged updates for wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-03-05 04:24:04 +00:00
parent c9631d614b
commit 680419f53f
5 changed files with 64 additions and 52 deletions

View File

@@ -194,43 +194,6 @@ static PyObject *_wrap_wxRegisterId(PyObject *self, PyObject *args, PyObject *kw
return _resultobj;
}
static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":NewId",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (long )wxNewId();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _arg0;
char *_kwnames[] = { "id", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:RegisterId",_kwnames,&_arg0))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxRegisterId(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
@@ -5587,8 +5550,6 @@ static PyMethodDef misccMethods[] = {
{ "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS },
{ "wxGetCurrentId", (PyCFunction) _wrap_wxGetCurrentId, METH_VARARGS | METH_KEYWORDS },
{ "RegisterId", (PyCFunction) _wrap_RegisterId, METH_VARARGS | METH_KEYWORDS },
{ "NewId", (PyCFunction) _wrap_NewId, METH_VARARGS | METH_KEYWORDS },
{ "wxRegisterId", (PyCFunction) _wrap_wxRegisterId, METH_VARARGS | METH_KEYWORDS },
{ "wxNewId", (PyCFunction) _wrap_wxNewId, METH_VARARGS | METH_KEYWORDS },
{ "wxIntersectRect", (PyCFunction) _wrap_wxIntersectRect, METH_VARARGS | METH_KEYWORDS },

View File

@@ -753,10 +753,6 @@ wxNewId = miscc.wxNewId
wxRegisterId = miscc.wxRegisterId
NewId = miscc.NewId
RegisterId = miscc.RegisterId
wxGetCurrentId = miscc.wxGetCurrentId
wxBell = miscc.wxBell

View File

@@ -1603,6 +1603,34 @@ static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxWindow_Disable(_swigobj) (_swigobj->Disable())
static PyObject *_wrap_wxWindow_Disable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_Disable",_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_Disable. Expected _wxWindow_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxWindow_Disable(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxWindow_FindWindowById(_swigobj,_swigarg0) (_swigobj->FindWindow(_swigarg0))
static PyObject *_wrap_wxWindow_FindWindowById(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -12149,6 +12177,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_Fit", (PyCFunction) _wrap_wxWindow_Fit, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FindWindowByName", (PyCFunction) _wrap_wxWindow_FindWindowByName, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FindWindowById", (PyCFunction) _wrap_wxWindow_FindWindowById, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Disable", (PyCFunction) _wrap_wxWindow_Disable, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Enable", (PyCFunction) _wrap_wxWindow_Enable, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_DragAcceptFiles", (PyCFunction) _wrap_wxWindow_DragAcceptFiles, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_IsBeingDeleted", (PyCFunction) _wrap_wxWindow_IsBeingDeleted, METH_VARARGS | METH_KEYWORDS },

View File

@@ -165,6 +165,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def Enable(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Enable,(self,) + _args, _kwargs)
return val
def Disable(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Disable,(self,) + _args, _kwargs)
return val
def FindWindowById(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_FindWindowById,(self,) + _args, _kwargs)
return val

View File

@@ -1564,12 +1564,7 @@ wxPen = wxPyPen
wxScrollbar = wxScrollBar
wxPoint2D = wxPoint2DDouble
# Use Python's bool constants if available, make aliases if not
try:
True
except NameError:
True = 1==1
False = 1==0
wxPyAssertionError = wxc.wxPyAssertionError
# backwards compatibility
@@ -1580,15 +1575,43 @@ NULL = None
wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
false = FALSE = False
true = TRUE = True
# workarounds for bad wxRTTI names
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
wxPyAssertionError = wxc.wxPyAssertionError
def NewId():
import warnings
warnings.warn("Use wxNewId instead", DeprecationWarning, 2)
return wxNewId()
def RegisterId(ID):
import warnings
warnings.warn("Use wxRegisterId instead", DeprecationWarning, 2)
return wxRegisterId(ID)
# Use Python's bool constants if available, make aliases if not
try:
True
except NameError:
True = 1==1
False = 1==0
class _DeprecatedNonBool:
def __init__(self, val, txt):
self.__val = val
self.__txt = txt
def __int__(self):
import warnings
warnings.warn("Use Python's %s instead" % self.__txt, DeprecationWarning, 3)
return self.__val
TRUE = true = _DeprecatedNonBool(True, 'True')
FALSE = false = _DeprecatedNonBool(False, 'False')
#----------------------------------------------------------------------