SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11172,6 +11172,36 @@ static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObj
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxSpinCtrl_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxSpinCtrl_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxSpinCtrl * _arg0;
|
||||||
|
long _arg1;
|
||||||
|
long _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","from","to", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxSpinCtrl_SetSelection",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetSelection. Expected _wxSpinCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxSpinCtrl_SetSelection(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxToggleButtonTowxControl(void *ptr) {
|
static void *SwigwxToggleButtonTowxControl(void *ptr) {
|
||||||
wxToggleButton *src;
|
wxToggleButton *src;
|
||||||
wxControl *dest;
|
wxControl *dest;
|
||||||
@@ -11509,6 +11539,7 @@ static PyMethodDef controlscMethods[] = {
|
|||||||
{ "wxToggleButton_Create", (PyCFunction) _wrap_wxToggleButton_Create, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToggleButton_Create", (PyCFunction) _wrap_wxToggleButton_Create, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxPreToggleButton", (PyCFunction) _wrap_new_wxPreToggleButton, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxPreToggleButton", (PyCFunction) _wrap_new_wxPreToggleButton, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxToggleButton", (PyCFunction) _wrap_new_wxToggleButton, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxToggleButton", (PyCFunction) _wrap_new_wxToggleButton, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxSpinCtrl_SetSelection", (PyCFunction) _wrap_wxSpinCtrl_SetSelection, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS },
|
{ "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS },
|
{ "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS },
|
{ "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -1112,6 +1112,9 @@ class wxSpinCtrlPtr(wxSpinButtonPtr):
|
|||||||
def SetValue(self, *_args, **_kwargs):
|
def SetValue(self, *_args, **_kwargs):
|
||||||
val = controlsc.wxSpinCtrl_SetValue(self, *_args, **_kwargs)
|
val = controlsc.wxSpinCtrl_SetValue(self, *_args, **_kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetSelection(self, *_args, **_kwargs):
|
||||||
|
val = controlsc.wxSpinCtrl_SetSelection(self, *_args, **_kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<%s.%s instance; proxy of C++ wxSpinCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
return "<%s.%s instance; proxy of C++ wxSpinCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||||
class wxSpinCtrl(wxSpinCtrlPtr):
|
class wxSpinCtrl(wxSpinCtrlPtr):
|
||||||
|
@@ -185,11 +185,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxCursor* wxCursorFromImage(const wxImage& image) {
|
wxCursor* wxCursorFromImage(const wxImage& image) {
|
||||||
#ifndef __WXMAC__
|
|
||||||
return new wxCursor(image);
|
return new wxCursor(image);
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// Alternate 'constructor'
|
// Alternate 'constructor'
|
||||||
wxColour* wxNamedColour(const wxString& colorName) {
|
wxColour* wxNamedColour(const wxString& colorName) {
|
||||||
|
@@ -4756,6 +4756,52 @@ static PyObject *_wrap_wxPrinter_Setup(PyObject *self, PyObject *args, PyObject
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxPrinter_GetAbort(_swigobj) (_swigobj->GetAbort())
|
||||||
|
static PyObject *_wrap_wxPrinter_GetAbort(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxPrinter * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrinter_GetAbort",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrinter_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrinter_GetAbort. Expected _wxPrinter_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (bool )wxPrinter_GetAbort(_arg0);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxPrinter_GetLastError(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPrinterError _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPrinter_GetLastError",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (wxPrinterError )wxPrinter::GetLastError();
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxPrintPreviewTowxObject(void *ptr) {
|
static void *SwigwxPrintPreviewTowxObject(void *ptr) {
|
||||||
wxPrintPreview *src;
|
wxPrintPreview *src;
|
||||||
wxObject *dest;
|
wxObject *dest;
|
||||||
@@ -5479,6 +5525,8 @@ static PyMethodDef printfwcMethods[] = {
|
|||||||
{ "wxPrintPreview_GetCurrentPage", (PyCFunction) _wrap_wxPrintPreview_GetCurrentPage, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPrintPreview_GetCurrentPage", (PyCFunction) _wrap_wxPrintPreview_GetCurrentPage, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPrintPreview_GetCanvas", (PyCFunction) _wrap_wxPrintPreview_GetCanvas, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPrintPreview_GetCanvas", (PyCFunction) _wrap_wxPrintPreview_GetCanvas, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxPrintPreview", (PyCFunction) _wrap_new_wxPrintPreview, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxPrintPreview", (PyCFunction) _wrap_new_wxPrintPreview, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxPrinter_GetLastError", (PyCFunction) _wrap_wxPrinter_GetLastError, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxPrinter_GetAbort", (PyCFunction) _wrap_wxPrinter_GetAbort, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPrinter_Setup", (PyCFunction) _wrap_wxPrinter_Setup, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPrinter_Setup", (PyCFunction) _wrap_wxPrinter_Setup, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPrinter_ReportError", (PyCFunction) _wrap_wxPrinter_ReportError, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPrinter_ReportError", (PyCFunction) _wrap_wxPrinter_ReportError, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPrinter_PrintDialog", (PyCFunction) _wrap_wxPrinter_PrintDialog, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPrinter_PrintDialog", (PyCFunction) _wrap_wxPrinter_PrintDialog, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -5755,6 +5803,9 @@ SWIGEXPORT(void) initprintfwc() {
|
|||||||
SWIG_globals = SWIG_newvarlink();
|
SWIG_globals = SWIG_newvarlink();
|
||||||
m = Py_InitModule("printfwc", printfwcMethods);
|
m = Py_InitModule("printfwc", printfwcMethods);
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
|
PyDict_SetItemString(d,"wxPRINTER_NO_ERROR", PyInt_FromLong((long) wxPRINTER_NO_ERROR));
|
||||||
|
PyDict_SetItemString(d,"wxPRINTER_CANCELLED", PyInt_FromLong((long) wxPRINTER_CANCELLED));
|
||||||
|
PyDict_SetItemString(d,"wxPRINTER_ERROR", PyInt_FromLong((long) wxPRINTER_ERROR));
|
||||||
|
|
||||||
wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout");
|
wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout");
|
||||||
{
|
{
|
||||||
|
@@ -544,6 +544,9 @@ class wxPrinterPtr(wxObjectPtr):
|
|||||||
def Setup(self, *_args, **_kwargs):
|
def Setup(self, *_args, **_kwargs):
|
||||||
val = printfwc.wxPrinter_Setup(self, *_args, **_kwargs)
|
val = printfwc.wxPrinter_Setup(self, *_args, **_kwargs)
|
||||||
return val
|
return val
|
||||||
|
def GetAbort(self, *_args, **_kwargs):
|
||||||
|
val = printfwc.wxPrinter_GetAbort(self, *_args, **_kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<%s.%s instance; proxy of C++ wxPrinter instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
return "<%s.%s instance; proxy of C++ wxPrinter instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||||
class wxPrinter(wxPrinterPtr):
|
class wxPrinter(wxPrinterPtr):
|
||||||
@@ -643,7 +646,12 @@ wxPostScriptDC_SetResolution = printfwc.wxPostScriptDC_SetResolution
|
|||||||
|
|
||||||
wxPostScriptDC_GetResolution = printfwc.wxPostScriptDC_GetResolution
|
wxPostScriptDC_GetResolution = printfwc.wxPostScriptDC_GetResolution
|
||||||
|
|
||||||
|
wxPrinter_GetLastError = printfwc.wxPrinter_GetLastError
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------- VARIABLE WRAPPERS ------------------
|
#-------------- VARIABLE WRAPPERS ------------------
|
||||||
|
|
||||||
|
wxPRINTER_NO_ERROR = printfwc.wxPRINTER_NO_ERROR
|
||||||
|
wxPRINTER_CANCELLED = printfwc.wxPRINTER_CANCELLED
|
||||||
|
wxPRINTER_ERROR = printfwc.wxPRINTER_ERROR
|
||||||
|
@@ -1280,7 +1280,7 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO
|
|||||||
PyObject * _argo2 = 0;
|
PyObject * _argo2 = 0;
|
||||||
PyObject * _obj3 = 0;
|
PyObject * _obj3 = 0;
|
||||||
int tempbool4 = (int) FALSE;
|
int tempbool4 = (int) FALSE;
|
||||||
char *_kwnames[] = { "self","page","page","text","select","imageId", NULL };
|
char *_kwnames[] = { "self","index","page","text","select","imageId", NULL };
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5))
|
||||||
|
@@ -3013,7 +3013,6 @@ SWIGEXPORT(void) initwxc() {
|
|||||||
PyDict_SetItemString(d,"wxEVT_COMMAND_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_ENTER));
|
PyDict_SetItemString(d,"wxEVT_COMMAND_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_ENTER));
|
||||||
PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY));
|
PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY));
|
||||||
PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER));
|
PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER));
|
||||||
PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0"));
|
|
||||||
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
||||||
SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set);
|
SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set);
|
||||||
SWIG_addvarlink(SWIG_globals,"wxDefaultSize",_wrap_wxDefaultSize_get, _wrap_wxDefaultSize_set);
|
SWIG_addvarlink(SWIG_globals,"wxDefaultSize",_wrap_wxDefaultSize_get, _wrap_wxDefaultSize_set);
|
||||||
@@ -3058,17 +3057,12 @@ SWIGEXPORT(void) initwxc() {
|
|||||||
initfontsc();
|
initfontsc();
|
||||||
|
|
||||||
|
|
||||||
|
// Although these are redfined in __version__ they need to be here too so
|
||||||
|
// that an assert can be done to ensure that the wxPython and the wxWindows
|
||||||
|
// versions match.
|
||||||
PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
|
PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
|
||||||
PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
|
PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
|
||||||
PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
|
PyDict_SetItemString(d,"wxRELEASE_VERSION", PyInt_FromLong((long)wxRELEASE_NUMBER ));
|
||||||
PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
|
|
||||||
#if wxUSE_UNICODE
|
|
||||||
wxString tempStr(wxVERSION_STRING);
|
|
||||||
PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromWideChar(tempStr.c_str(), tempStr.Len()));
|
|
||||||
#else
|
|
||||||
PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@@ -956,7 +956,6 @@ wxEVT_COMMAND_KILL_FOCUS = wxc.wxEVT_COMMAND_KILL_FOCUS
|
|||||||
wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER
|
wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER
|
||||||
wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY
|
wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY
|
||||||
wxEVT_TIMER = wxc.wxEVT_TIMER
|
wxEVT_TIMER = wxc.wxEVT_TIMER
|
||||||
__version__ = wxc.__version__
|
|
||||||
cvar = wxc.cvar
|
cvar = wxc.cvar
|
||||||
wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition)
|
wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition)
|
||||||
wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize)
|
wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize)
|
||||||
@@ -1624,15 +1623,17 @@ if wxPlatform == "__WXMSW__":
|
|||||||
del os
|
del os
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# wxWindows version numbers. wxPython version is in __version__.
|
# Load version numbers from __version__... Ensure that major and minor
|
||||||
|
# versions are the same for both wxPython and wxWindows.
|
||||||
|
|
||||||
wxMAJOR_VERSION = wxc.wxMAJOR_VERSION
|
from wxPython.__version__ import *
|
||||||
wxMINOR_VERSION = wxc.wxMINOR_VERSION
|
__version__ = wxVERSION_STRING
|
||||||
wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER
|
|
||||||
wxVERSION_STRING = wxc.wxVERSION_STRING
|
|
||||||
wxVERSION_NUMBER = wxc.wxVERSION_NUMBER
|
|
||||||
|
|
||||||
wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
|
assert wxMAJOR_VERSION == wxc.wxMAJOR_VERSION, "wxPython/wxWindows version mismatch"
|
||||||
|
assert wxMINOR_VERSION == wxc.wxMINOR_VERSION, "wxPython/wxWindows version mismatch"
|
||||||
|
if wxRELEASE_VERSION != wxc.wxRELEASE_VERSION:
|
||||||
|
import warnings
|
||||||
|
warnings.warn("wxPython/wxWindows release number mismatch")
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user