X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41f1cec7ae286b1bc5cc189bbf31c060c7ff812a..83448d71476c44b449f09395cda06fa72b19a50e:/wxPython/src/msw/calendar_wrap.cpp diff --git a/wxPython/src/msw/calendar_wrap.cpp b/wxPython/src/msw/calendar_wrap.cpp index d382274422..a07bde18ce 100644 --- a/wxPython/src/msw/calendar_wrap.cpp +++ b/wxPython/src/msw/calendar_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -45,6 +45,8 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData /*********************************************************************** @@ -59,36 +61,35 @@ private: #include -#if defined(_WIN32) || defined(__WIN32__) -# if defined(_MSC_VER) -# if defined(STATIC_LINKED) -# define SWIGEXPORT(a) a -# define SWIGIMPORT(a) extern a -# else -# define SWIGEXPORT(a) __declspec(dllexport) a -# define SWIGIMPORT(a) extern a -# endif -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# define SWIGIMPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# define SWIGIMPORT(a) a -# endif -# endif +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(_MSC_VER) || defined(__GNUC__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) extern a +# else +# define SWIGEXPORT(a) __declspec(dllexport) a +# define SWIGIMPORT(a) extern a +# endif +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# define SWIGIMPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) a +# endif +# endif #else -# define SWIGEXPORT(a) a -# define SWIGIMPORT(a) a +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) a #endif #ifdef SWIG_GLOBAL -#define SWIGRUNTIME(a) SWIGEXPORT(a) +# define SWIGRUNTIME(a) SWIGEXPORT(a) #else -#define SWIGRUNTIME(a) static a +# define SWIGRUNTIME(a) static a #endif - #ifdef __cplusplus extern "C" { #endif @@ -97,10 +98,10 @@ typedef void *(*swig_converter_func)(void *); typedef struct swig_type_info *(*swig_dycast_func)(void **); typedef struct swig_type_info { - const char *name; + const char *name; swig_converter_func converter; const char *str; - void *clientdata; + void *clientdata; swig_dycast_func dcast; struct swig_type_info *next; struct swig_type_info *prev; @@ -114,6 +115,8 @@ SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **); SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *); SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); +SWIGIMPORT(char *) SWIG_PackData(char *, void *, int); +SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #ifdef __cplusplus @@ -121,6 +124,7 @@ SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); #endif + /*********************************************************************** * pyrun.swg for wxPython * @@ -131,9 +135,180 @@ SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); * ************************************************************************/ - #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -162,8 +337,6 @@ typedef struct swig_const_info { swig_type_info **ptype; } swig_const_info; - - /* Common SWIG API */ #define SWIG_ConvertPtr(obj, pp, type, flags) \ SWIG_Python_ConvertPtr(obj, pp, type, flags) @@ -171,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -179,34 +352,27 @@ typedef struct swig_const_info { SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \ SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags) -#define SWIG_PackData(c, ptr, sz) \ - SWIG_Python_PackData(c, ptr, sz) -#define SWIG_UnpackData(c, ptr, sz) \ - SWIG_Python_UnpackData(c, ptr, sz) #define SWIG_NewPackedObj(ptr, sz, type) \ SWIG_Python_NewPackedObj(ptr, sz, type) #define SWIG_InstallConstants(d, constants) \ SWIG_Python_InstallConstants(d, constants) -SWIGEXPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int); -SWIGEXPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own); -SWIGEXPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int); +SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int); +SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own); +SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int); +SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void); +SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); +SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *); +SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]); -SWIGEXPORT(PyObject *) SWIG_Python_newvarlink(void); -SWIGEXPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -SWIGEXPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); -SWIGEXPORT(char *) SWIG_Python_PackData(char *c, void *, int); -SWIGEXPORT(char *) SWIG_Python_UnpackData(char *c, void *, int); -SWIGEXPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *); -SWIGEXPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]); /* Contract support */ #define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else - #ifdef __cplusplus } #endif @@ -246,9 +412,7 @@ static swig_type_info *swig_types[15]; #include - - DECLARE_DEF_STRING(CalendarNameStr); - + static const wxString wxPyCalendarNameStr(wxCalendarNameStr); #ifdef __cplusplus extern "C" { #endif @@ -504,8 +668,10 @@ static PyObject *_wrap_CalendarDateAttr_SetHoliday(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarDateAttr_SetHoliday",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarDateAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetHoliday(arg2); @@ -872,6 +1038,61 @@ static PyObject *_wrap_CalendarEvent_GetDate(PyObject *self, PyObject *args, PyO } +static PyObject *_wrap_CalendarEvent_SetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarEvent *arg1 = (wxCalendarEvent *) 0 ; + wxDateTime *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "date", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarEvent_SetDate",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg2 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetDate((wxDateTime const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_CalendarEvent_SetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarEvent *arg1 = (wxCalendarEvent *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "wd", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:CalendarEvent_SetWeekDay",kwnames,&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetWeekDay((wxDateTime::WeekDay )arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_CalendarEvent_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCalendarEvent *arg1 = (wxCalendarEvent *) 0 ; @@ -904,6 +1125,26 @@ static PyObject * CalendarEvent_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_CalendarNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable CalendarNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_CalendarNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyCalendarNameStr)->c_str(), (&wxPyCalendarNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyCalendarNameStr)->c_str(), (&wxPyCalendarNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_CalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -1317,8 +1558,10 @@ static PyObject *_wrap_CalendarCtrl_EnableYearChange(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableYearChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1347,8 +1590,10 @@ static PyObject *_wrap_CalendarCtrl_EnableMonthChange(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableMonthChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1377,8 +1622,10 @@ static PyObject *_wrap_CalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableHolidayDisplay",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1695,8 +1942,10 @@ static PyObject *_wrap_CalendarCtrl_GetAttr(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_GetAttr",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxCalendarDateAttr *)((wxCalendarCtrl const *)arg1)->GetAttr(arg2); @@ -1725,8 +1974,10 @@ static PyObject *_wrap_CalendarCtrl_SetAttr(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:CalendarCtrl_SetAttr",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxCalendarDateAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1754,8 +2005,10 @@ static PyObject *_wrap_CalendarCtrl_SetHoliday(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_SetHoliday",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetHoliday(arg2); @@ -1782,8 +2035,10 @@ static PyObject *_wrap_CalendarCtrl_ResetAttr(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_ResetAttr",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ResetAttr(arg2); @@ -1854,8 +2109,10 @@ static PyObject *_wrap_CalendarCtrl_Enable(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1885,8 +2142,10 @@ static PyObject *_wrap_CalendarCtrl_Show(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1902,6 +2161,60 @@ static PyObject *_wrap_CalendarCtrl_Show(PyObject *self, PyObject *args, PyObjec } +static PyObject *_wrap_CalendarCtrl_GetMonthControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarCtrl *arg1 = (wxCalendarCtrl *) 0 ; + wxControl *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:CalendarCtrl_GetMonthControl",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxControl *)((wxCalendarCtrl const *)arg1)->GetMonthControl(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_CalendarCtrl_GetYearControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarCtrl *arg1 = (wxCalendarCtrl *) 0 ; + wxControl *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:CalendarCtrl_GetYearControl",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxControl *)((wxCalendarCtrl const *)arg1)->GetYearControl(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result); + } + return resultobj; + fail: + return NULL; +} + + static PyObject * CalendarCtrl_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -1932,6 +2245,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"CalendarDateAttr_swigregister", CalendarDateAttr_swigregister, METH_VARARGS }, { (char *)"new_CalendarEvent", (PyCFunction) _wrap_new_CalendarEvent, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarEvent_GetDate", (PyCFunction) _wrap_CalendarEvent_GetDate, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarEvent_SetDate", (PyCFunction) _wrap_CalendarEvent_SetDate, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarEvent_SetWeekDay", (PyCFunction) _wrap_CalendarEvent_SetWeekDay, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarEvent_GetWeekDay", (PyCFunction) _wrap_CalendarEvent_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarEvent_swigregister", CalendarEvent_swigregister, METH_VARARGS }, { (char *)"new_CalendarCtrl", (PyCFunction) _wrap_new_CalendarCtrl, METH_VARARGS | METH_KEYWORDS }, @@ -1963,6 +2278,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"CalendarCtrl_HitTest", (PyCFunction) _wrap_CalendarCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarCtrl_Enable", (PyCFunction) _wrap_CalendarCtrl_Enable, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarCtrl_Show", (PyCFunction) _wrap_CalendarCtrl_Show, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarCtrl_GetMonthControl", (PyCFunction) _wrap_CalendarCtrl_GetMonthControl, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarCtrl_GetYearControl", (PyCFunction) _wrap_CalendarCtrl_GetYearControl, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarCtrl_swigregister", CalendarCtrl_swigregister, METH_VARARGS }, { NULL, NULL } }; @@ -2511,6 +2828,8 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_CALENDAR_MONTH_CHANGED", PyInt_FromLong(wxEVT_CALENDAR_MONTH_CHANGED)); PyDict_SetItemString(d, "wxEVT_CALENDAR_YEAR_CHANGED", PyInt_FromLong(wxEVT_CALENDAR_YEAR_CHANGED)); PyDict_SetItemString(d, "wxEVT_CALENDAR_WEEKDAY_CLICKED", PyInt_FromLong(wxEVT_CALENDAR_WEEKDAY_CLICKED)); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"CalendarNameStr",_wrap_CalendarNameStr_get, _wrap_CalendarNameStr_set); }