SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12581,13 +12581,15 @@ static PyObject *_wrap_wxGrid_GetSelectedCells(PyObject *self, PyObject *args, P
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
const wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectedCells(_arg0);
|
||||
_result = (wxGridCellCoordsArray *) &_result_ref;
|
||||
_result = new wxGridCellCoordsArray (wxGrid_GetSelectedCells(_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = wxGridCellCoordsArray_helper(_result);
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
@@ -12612,13 +12614,15 @@ static PyObject *_wrap_wxGrid_GetSelectionBlockTopLeft(PyObject *self, PyObject
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
const wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectionBlockTopLeft(_arg0);
|
||||
_result = (wxGridCellCoordsArray *) &_result_ref;
|
||||
_result = new wxGridCellCoordsArray (wxGrid_GetSelectionBlockTopLeft(_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = wxGridCellCoordsArray_helper(_result);
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
@@ -12643,13 +12647,15 @@ static PyObject *_wrap_wxGrid_GetSelectionBlockBottomRight(PyObject *self, PyObj
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
const wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectionBlockBottomRight(_arg0);
|
||||
_result = (wxGridCellCoordsArray *) &_result_ref;
|
||||
_result = new wxGridCellCoordsArray (wxGrid_GetSelectionBlockBottomRight(_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = wxGridCellCoordsArray_helper(_result);
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
@@ -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;
|
||||
@@ -5568,8 +5531,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 },
|
||||
|
@@ -753,10 +753,6 @@ wxNewId = miscc.wxNewId
|
||||
|
||||
wxRegisterId = miscc.wxRegisterId
|
||||
|
||||
NewId = miscc.NewId
|
||||
|
||||
RegisterId = miscc.RegisterId
|
||||
|
||||
wxGetCurrentId = miscc.wxGetCurrentId
|
||||
|
||||
wxBell = miscc.wxBell
|
||||
|
@@ -1546,6 +1546,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;
|
||||
@@ -11670,6 +11698,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_IsBeingDeleted", (PyCFunction) _wrap_wxWindow_IsBeingDeleted, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_DestroyChildren", (PyCFunction) _wrap_wxWindow_DestroyChildren, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -162,6 +162,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
|
||||
|
@@ -1558,12 +1558,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
|
||||
@@ -1574,15 +1569,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')
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user