-#if !wxUSE_JOYSTICK && !defined(__WXMSW__)
-// A C++ stub class for wxJoystick for platforms that don't have it.
-class wxJoystick : public wxObject {
-public:
- wxJoystick(int joystick = wxJOYSTICK1) {
- bool blocked = wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError,
- "wxJoystick is not available on this platform.");
- wxPyEndBlockThreads(blocked);
- }
- wxPoint GetPosition() { return wxPoint(-1,-1); }
- int GetZPosition() { return -1; }
- int GetButtonState() { return -1; }
- int GetPOVPosition() { return -1; }
- int GetPOVCTSPosition() { return -1; }
- int GetRudderPosition() { return -1; }
- int GetUPosition() { return -1; }
- int GetVPosition() { return -1; }
- int GetMovementThreshold() { return -1; }
- void SetMovementThreshold(int threshold) {}
-
- bool IsOk(void) { return False; }
- int GetNumberJoysticks() { return -1; }
- int GetManufacturerId() { return -1; }
- int GetProductId() { return -1; }
- wxString GetProductName() { return wxEmptyString; }
- int GetXMin() { return -1; }
- int GetYMin() { return -1; }
- int GetZMin() { return -1; }
- int GetXMax() { return -1; }
- int GetYMax() { return -1; }
- int GetZMax() { return -1; }
- int GetNumberButtons() { return -1; }
- int GetNumberAxes() { return -1; }
- int GetMaxButtons() { return -1; }
- int GetMaxAxes() { return -1; }
- int GetPollingMin() { return -1; }
- int GetPollingMax() { return -1; }
- int GetRudderMin() { return -1; }
- int GetRudderMax() { return -1; }
- int GetUMin() { return -1; }
- int GetUMax() { return -1; }
- int GetVMin() { return -1; }
- int GetVMax() { return -1; }
-
- bool HasRudder() { return False; }
- bool HasZ() { return False; }
- bool HasU() { return False; }
- bool HasV() { return False; }
- bool HasPOV() { return False; }
- bool HasPOV4Dir() { return False; }
- bool HasPOVCTS() { return False; }
-
- bool SetCapture(wxWindow* win, int pollingFreq = 0) { return False; }
- bool ReleaseCapture() { return False; }
-};
-#endif
-
-
-#include <wx/sound.h>
-
-
-#if !wxUSE_SOUND
-// A C++ stub class for wxWave for platforms that don't have it.
-class wxSound : public wxObject
-{
-public:
- wxSound() {
- bool blocked = wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError,
- "wxSound is not available on this platform.");
- wxPyEndBlockThreads(blocked);
- }
- wxSound(const wxString&/*, bool*/) {
- bool blocked = wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError,
- "wxSound is not available on this platform.");
- wxPyEndBlockThreads(blocked);
- }
- wxSound(int, const wxByte*) {
- bool blocked = wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError,
- "wxSound is not available on this platform.");
- wxPyEndBlockThreads(blocked);
- }
-
- ~wxSound() {};
-
- bool Create(const wxString&/*, bool*/) { return false; }
- bool Create(int, const wxByte*) { return false; };
- bool IsOk() { return false; };
- bool Play(unsigned) const { return false; }
- static bool Play(const wxString&, unsigned) { return false; }
- static void Stop() {}
-};
-
-#endif
-
-wxSound *new_wxSound(wxString const &fileName){
- if (fileName.Length() == 0)
- return new wxSound;
- else
- return new wxSound(fileName);
- }
-wxSound *new_wxSound(PyObject *data){
- unsigned char* buffer; int size;
- wxSound *sound = NULL;
-
- bool blocked = wxPyBeginBlockThreads();
- if (!PyArg_Parse(data, "t#", &buffer, &size))
- goto done;
- sound = new wxSound(size, buffer);
- done:
- wxPyEndBlockThreads(blocked);
- return sound;
- }
-bool wxSound_CreateFromData(wxSound *self,PyObject *data){
- #ifndef __WXMAC__
- unsigned char* buffer;
- int size;
- bool rv = False;
-
- bool blocked = wxPyBeginBlockThreads();
- if (!PyArg_Parse(data, "t#", &buffer, &size))
- goto done;
- rv = self->Create(size, buffer);
- done:
- wxPyEndBlockThreads(blocked);
- return rv;
- #else
- bool blocked = wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError,
- "Create from data is not available on this platform.");
- wxPyEndBlockThreads(blocked);
- return False;
- #endif
- }
-
-#include <wx/mimetype.h>
-
-PyObject *wxFileType_GetMimeType(wxFileType *self){
- wxString str;
- if (self->GetMimeType(&str))
- return wx2PyString(str);
- else
- RETURN_NONE();
- }
-PyObject *wxFileType_GetMimeTypes(wxFileType *self){
- wxArrayString arr;
- if (self->GetMimeTypes(arr))
- return wxArrayString2PyList_helper(arr);
- else
- RETURN_NONE();
- }
-PyObject *wxFileType_GetExtensions(wxFileType *self){
- wxArrayString arr;
- if (self->GetExtensions(arr))
- return wxArrayString2PyList_helper(arr);
- else
- RETURN_NONE();
- }
-wxIcon *wxFileType_GetIcon(wxFileType *self){
- wxIconLocation loc;
- if (self->GetIcon(&loc))
- return new wxIcon(loc);
- else
- return NULL;
- }
-PyObject *wxFileType_GetIconInfo(wxFileType *self){
- wxIconLocation loc;
- if (self->GetIcon(&loc)) {
- wxString iconFile = loc.GetFileName();
- int iconIndex = -1;
-
-
-
- // Make a tuple and put the values in it
- bool blocked = wxPyBeginBlockThreads();
- PyObject* tuple = PyTuple_New(3);
- PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc),
- wxT("wxIcon"), True));
- PyTuple_SetItem(tuple, 1, wx2PyString(iconFile));
- PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex));
- wxPyEndBlockThreads(blocked);
- return tuple;
- }
- else
- RETURN_NONE();
- }
-PyObject *wxFileType_GetDescription(wxFileType *self){
- wxString str;
- if (self->GetDescription(&str))
- return wx2PyString(str);
- else
- RETURN_NONE();
- }
-PyObject *wxFileType_GetOpenCommand(wxFileType *self,wxString const &filename,wxString const &mimetype){
- wxString str;
- if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype)))
- return wx2PyString(str);
- else
- RETURN_NONE();
- }
-PyObject *wxFileType_GetPrintCommand(wxFileType *self,wxString const &filename,wxString const &mimetype){
- wxString str;
- if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype)))
- return wx2PyString(str);
- else
- RETURN_NONE();
- }
-PyObject *wxFileType_GetAllCommands(wxFileType *self,wxString const &filename,wxString const &mimetype){
- wxArrayString verbs;
- wxArrayString commands;
- if (self->GetAllCommands(&verbs, &commands,
- wxFileType::MessageParameters(filename, mimetype))) {
- bool blocked = wxPyBeginBlockThreads();
- PyObject* tuple = PyTuple_New(2);
- PyTuple_SetItem(tuple, 0, wxArrayString2PyList_helper(verbs));
- PyTuple_SetItem(tuple, 1, wxArrayString2PyList_helper(commands));
- wxPyEndBlockThreads(blocked);
- return tuple;
- }
- else
- RETURN_NONE();
- }
-wxString FileType_ExpandCommand(wxString const &command,wxString const &filename,wxString const &mimetype){
- return wxFileType::ExpandCommand(command,
- wxFileType::MessageParameters(filename, mimetype));
- }
-PyObject *wxMimeTypesManager_EnumAllFileTypes(wxMimeTypesManager *self){
- wxArrayString arr;
- self->EnumAllFileTypes(arr);
- return wxArrayString2PyList_helper(arr);
- }
-
-#include <wx/artprov.h>
-
- static const wxString wxPyART_TOOLBAR(wxART_TOOLBAR);
- static const wxString wxPyART_MENU(wxART_MENU);
- static const wxString wxPyART_FRAME_ICON(wxART_FRAME_ICON);
- static const wxString wxPyART_CMN_DIALOG(wxART_CMN_DIALOG);
- static const wxString wxPyART_HELP_BROWSER(wxART_HELP_BROWSER);
- static const wxString wxPyART_MESSAGE_BOX(wxART_MESSAGE_BOX);
- static const wxString wxPyART_BUTTON(wxART_BUTTON);
- static const wxString wxPyART_OTHER(wxART_OTHER);
- static const wxString wxPyART_ADD_BOOKMARK(wxART_ADD_BOOKMARK);
- static const wxString wxPyART_DEL_BOOKMARK(wxART_DEL_BOOKMARK);
- static const wxString wxPyART_HELP_SIDE_PANEL(wxART_HELP_SIDE_PANEL);
- static const wxString wxPyART_HELP_SETTINGS(wxART_HELP_SETTINGS);
- static const wxString wxPyART_HELP_BOOK(wxART_HELP_BOOK);
- static const wxString wxPyART_HELP_FOLDER(wxART_HELP_FOLDER);
- static const wxString wxPyART_HELP_PAGE(wxART_HELP_PAGE);
- static const wxString wxPyART_GO_BACK(wxART_GO_BACK);
- static const wxString wxPyART_GO_FORWARD(wxART_GO_FORWARD);
- static const wxString wxPyART_GO_UP(wxART_GO_UP);
- static const wxString wxPyART_GO_DOWN(wxART_GO_DOWN);
- static const wxString wxPyART_GO_TO_PARENT(wxART_GO_TO_PARENT);
- static const wxString wxPyART_GO_HOME(wxART_GO_HOME);
- static const wxString wxPyART_FILE_OPEN(wxART_FILE_OPEN);
- static const wxString wxPyART_PRINT(wxART_PRINT);
- static const wxString wxPyART_HELP(wxART_HELP);
- static const wxString wxPyART_TIP(wxART_TIP);
- static const wxString wxPyART_REPORT_VIEW(wxART_REPORT_VIEW);
- static const wxString wxPyART_LIST_VIEW(wxART_LIST_VIEW);
- static const wxString wxPyART_NEW_DIR(wxART_NEW_DIR);
- static const wxString wxPyART_FOLDER(wxART_FOLDER);
- static const wxString wxPyART_GO_DIR_UP(wxART_GO_DIR_UP);
- static const wxString wxPyART_EXECUTABLE_FILE(wxART_EXECUTABLE_FILE);
- static const wxString wxPyART_NORMAL_FILE(wxART_NORMAL_FILE);
- static const wxString wxPyART_TICK_MARK(wxART_TICK_MARK);
- static const wxString wxPyART_CROSS_MARK(wxART_CROSS_MARK);
- static const wxString wxPyART_ERROR(wxART_ERROR);
- static const wxString wxPyART_QUESTION(wxART_QUESTION);
- static const wxString wxPyART_WARNING(wxART_WARNING);
- static const wxString wxPyART_INFORMATION(wxART_INFORMATION);
- static const wxString wxPyART_MISSING_IMAGE(wxART_MISSING_IMAGE);
- // Python aware wxArtProvider
-class wxPyArtProvider : public wxArtProvider {
-public:
-
- virtual wxBitmap CreateBitmap(const wxArtID& id,
- const wxArtClient& client,
- const wxSize& size) {
- wxBitmap rval = wxNullBitmap;
- bool blocked = wxPyBeginBlockThreads();
- if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) {
- PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0);
- PyObject* ro;
- wxBitmap* ptr;
- PyObject* s1, *s2;
- s1 = wx2PyString(id);
- s2 = wx2PyString(client);
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOO)", s1, s2, so));
- Py_DECREF(so);
- Py_DECREF(s1);
- Py_DECREF(s2);
- if (ro) {
- if (wxPyConvertSwigPtr(ro, (void**)&ptr, wxT("wxBitmap")))
- rval = *ptr;
- Py_DECREF(ro);
- }
- }
- wxPyEndBlockThreads(blocked);
- return rval;
- }
-
- PYPRIVATE;
-};
-
-void wxPyArtProvider_Destroy(wxPyArtProvider *self){ delete self; }
-
-
-
- static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) {
- PyObject* ret = PyTuple_New(3);
- if (ret) {
- PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
- PyTuple_SET_ITEM(ret, 1, wx2PyString(str));
- PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index));
- }
- return ret;
- }
-
-PyObject *wxConfigBase_GetFirstGroup(wxConfigBase *self){
- bool cont;
- long index = 0;
- wxString value;
-
- cont = self->GetFirstGroup(value, index);
- return __EnumerationHelper(cont, value, index);
- }
-PyObject *wxConfigBase_GetNextGroup(wxConfigBase *self,long index){
- bool cont;
- wxString value;
-
- cont = self->GetNextGroup(value, index);
- return __EnumerationHelper(cont, value, index);
- }
-PyObject *wxConfigBase_GetFirstEntry(wxConfigBase *self){
- bool cont;
- long index = 0;
- wxString value;
-
- cont = self->GetFirstEntry(value, index);
- return __EnumerationHelper(cont, value, index);
- }
-PyObject *wxConfigBase_GetNextEntry(wxConfigBase *self,long index){
- bool cont;
- wxString value;
-
- cont = self->GetNextEntry(value, index);
- return __EnumerationHelper(cont, value, index);
- }
-long wxConfigBase_ReadInt(wxConfigBase *self,wxString const &key,long defaultVal){
- long rv;
- self->Read(key, &rv, defaultVal);
- return rv;
- }
-
-// See my_fragments.i
-SWIGSTATICINLINE(int)
-SWIG_AsVal_double(PyObject *obj, double* val)
-{
- if (PyNumber_Check(obj)) {
- if (val) *val = PyFloat_AsDouble(obj);
- return 1;
- }
- else {
- PyObject* errmsg = PyString_FromFormat("Expected number, got %s",
- obj->ob_type->tp_name);
- PyErr_SetObject(PyExc_TypeError, errmsg);
- Py_DECREF(errmsg);
- }
- return 0;
-}
-
-
-SWIGSTATICINLINE(double)
-SWIG_As_double(PyObject* obj)
-{
- double v;
- if (!SWIG_AsVal_double(obj, &v)) {
- /*
- this is needed to make valgrind/purify happier. the other
- solution is throw an exception, but since this code should work
- with plain C ....
- */
- memset((void*)&v, 0, sizeof(double));
- }
- return v;
-}
-
-
-SWIGSTATICINLINE(int)
-SWIG_Check_double(PyObject* obj)
-{
- return SWIG_AsVal_double(obj, (double*)0);
-}
-
-double wxConfigBase_ReadFloat(wxConfigBase *self,wxString const &key,double defaultVal){
- double rv;
- self->Read(key, &rv, defaultVal);
- return rv;
- }
-bool wxConfigBase_ReadBool(wxConfigBase *self,wxString const &key,bool defaultVal){
- bool rv;
- self->Read(key, &rv, defaultVal);
- return rv;
- }
-
-#include <wx/datetime.h>
-
-
- static const wxString wxPyDateFormatStr(wxT("%c"));
- static const wxString wxPyTimeSpanFormatStr(wxT("%H:%M:%S"));
-
-#define LOCAL_TZ wxDateTime::Local
-
-
-#if UINT_MAX < LONG_MAX
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_int SWIG_From_long
-/*@@*/
-#else
-/*@/opt/swig/share/swig/1.3.22/python/pymacros.swg,63,SWIG_define@*/
-#define SWIG_From_unsigned_SS_int SWIG_From_unsigned_SS_long
-/*@@*/
-#endif
-
-wxDateTime wxDateTime___add____SWIG_0(wxDateTime *self,wxTimeSpan const &other){ return *self + other; }
-wxDateTime wxDateTime___add____SWIG_1(wxDateTime *self,wxDateSpan const &other){ return *self + other; }
-wxTimeSpan wxDateTime___sub____SWIG_0(wxDateTime *self,wxDateTime const &other){ return *self - other; }
-wxDateTime wxDateTime___sub____SWIG_1(wxDateTime *self,wxTimeSpan const &other){ return *self - other; }
-wxDateTime wxDateTime___sub____SWIG_2(wxDateTime *self,wxDateSpan const &other){ return *self - other; }
-bool wxDateTime___lt__(wxDateTime *self,wxDateTime const *other){
- if (!other || !self->IsValid() || !other->IsValid()) return self < other;
- return (*self < *other);
- }
-bool wxDateTime___le__(wxDateTime *self,wxDateTime const *other){
- if (!other || !self->IsValid() || !other->IsValid()) return self <= other;
- return (*self <= *other);
- }
-bool wxDateTime___gt__(wxDateTime *self,wxDateTime const *other){
- if (!other || !self->IsValid() || !other->IsValid()) return self > other;
- return (*self > *other);
- }
-bool wxDateTime___ge__(wxDateTime *self,wxDateTime const *other){
- if (!other || !self->IsValid() || !other->IsValid()) return self >= other;
- return (*self >= *other);
- }
-bool wxDateTime___eq__(wxDateTime *self,wxDateTime const *other){
- if (!other || !self->IsValid() || !other->IsValid()) return self == other;
- return (*self == *other);
- }
-bool wxDateTime___ne__(wxDateTime *self,wxDateTime const *other){
- if (!other || !self->IsValid() || !other->IsValid()) return self != other;
- return (*self != *other);
- }
-int wxDateTime_ParseRfc822Date(wxDateTime *self,wxString const &date){
- const wxChar* rv;
- const wxChar* _date = date;
- rv = self->ParseRfc822Date(_date);
- if (rv == NULL) return -1;
- return rv - _date;
- }
-int wxDateTime_ParseFormat(wxDateTime *self,wxString const &date,wxString const &format,wxDateTime const &dateDef){
- const wxChar* rv;
- const wxChar* _date = date;
- rv = self->ParseFormat(_date, format, dateDef);
- if (rv == NULL) return -1;
- return rv - _date;
- }
-int wxDateTime_ParseDateTime(wxDateTime *self,wxString const &datetime){
- const wxChar* rv;
- const wxChar* _datetime = datetime;
- rv = self->ParseDateTime(_datetime);
- if (rv == NULL) return -1;
- return rv - _datetime;
- }
-int wxDateTime_ParseDate(wxDateTime *self,wxString const &date){
- const wxChar* rv;
- const wxChar* _date = date;
- rv = self->ParseDate(_date);
- if (rv == NULL) return -1;
- return rv - _date;
- }
-int wxDateTime_ParseTime(wxDateTime *self,wxString const &time){
- const wxChar* rv;
- const wxChar* _time = time;
- rv = self->ParseTime(_time);
- if (rv == NULL) return -1;
- return rv - _time;
- }
-wxTimeSpan wxTimeSpan___add__(wxTimeSpan *self,wxTimeSpan const &other){ return *self + other; }
-wxTimeSpan wxTimeSpan___sub__(wxTimeSpan *self,wxTimeSpan const &other){ return *self - other; }
-wxTimeSpan wxTimeSpan___mul__(wxTimeSpan *self,int n){ return *self * n; }
-wxTimeSpan wxTimeSpan___rmul__(wxTimeSpan *self,int n){ return n * *self; }
-bool wxTimeSpan___lt__(wxTimeSpan *self,wxTimeSpan const *other){ return other ? (*self < *other) : False; }
-bool wxTimeSpan___le__(wxTimeSpan *self,wxTimeSpan const *other){ return other ? (*self <= *other) : False; }
-bool wxTimeSpan___gt__(wxTimeSpan *self,wxTimeSpan const *other){ return other ? (*self > *other) : True; }
-bool wxTimeSpan___ge__(wxTimeSpan *self,wxTimeSpan const *other){ return other ? (*self >= *other) : True; }
-bool wxTimeSpan___eq__(wxTimeSpan *self,wxTimeSpan const *other){ return other ? (*self == *other) : False; }
-bool wxTimeSpan___ne__(wxTimeSpan *self,wxTimeSpan const *other){ return other ? (*self != *other) : True; }
-wxDateSpan wxDateSpan___add__(wxDateSpan *self,wxDateSpan const &other){ return *self + other; }
-wxDateSpan wxDateSpan___sub__(wxDateSpan *self,wxDateSpan const &other){ return *self - other; }
-wxDateSpan wxDateSpan___mul__(wxDateSpan *self,int n){ return *self * n; }
-wxDateSpan wxDateSpan___rmul__(wxDateSpan *self,int n){ return n * *self; }
-bool wxDateSpan___eq__(wxDateSpan *self,wxDateSpan const *other){ return other ? (*self == *other) : False; }
-bool wxDateSpan___ne__(wxDateSpan *self,wxDateSpan const *other){ return other ? (*self != *other) : True; }
-
-#include <wx/dataobj.h>
-
-PyObject *wxDataObject_GetAllFormats(wxDataObject *self,wxDataObject::Direction dir){
- size_t count = self->GetFormatCount(dir);
- wxDataFormat* formats = new wxDataFormat[count];
- self->GetAllFormats(formats, dir);
-
- bool blocked = wxPyBeginBlockThreads();
- PyObject* list = PyList_New(count);
- for (size_t i=0; i<count; i++) {
- wxDataFormat* format = new wxDataFormat(formats[i]);
- PyObject* obj = wxPyConstructObject((void*)format, wxT("wxDataFormat"), True);
- PyList_Append(list, obj);
- Py_DECREF(obj);
- }
- wxPyEndBlockThreads(blocked);
- delete [] formats;
- return list;
- }
-PyObject *wxDataObject_GetDataHere(wxDataObject *self,wxDataFormat const &format){
- PyObject* rval = NULL;
- size_t size = self->GetDataSize(format);
- bool blocked = wxPyBeginBlockThreads();
- if (size) {
- char* buf = new char[size];
- if (self->GetDataHere(format, buf))
- rval = PyString_FromStringAndSize(buf, size);
- delete [] buf;
- }
- if (! rval) {
- rval = Py_None;
- Py_INCREF(rval);
- }
- wxPyEndBlockThreads(blocked);
- return rval;
- }
-bool wxDataObject_SetData(wxDataObject *self,wxDataFormat const &format,PyObject *data){
- bool rval;
- bool blocked = wxPyBeginBlockThreads();
- if (PyString_Check(data)) {
- rval = self->SetData(format, PyString_Size(data), PyString_AsString(data));
- }
- else {
- // raise a TypeError if not a string
- PyErr_SetString(PyExc_TypeError, "String expected.");
- rval = False;
- }
- wxPyEndBlockThreads(blocked);
- return rval;
- }
-PyObject *wxDataObjectSimple_GetDataHere(wxDataObjectSimple *self){
- PyObject* rval = NULL;
- size_t size = self->GetDataSize();
- bool blocked = wxPyBeginBlockThreads();
- if (size) {
- char* buf = new char[size];
- if (self->GetDataHere(buf))
- rval = PyString_FromStringAndSize(buf, size);
- delete [] buf;
- }
- if (! rval) {
- rval = Py_None;
- Py_INCREF(rval);
- }
- wxPyEndBlockThreads(blocked);
- return rval;
- }
-bool wxDataObjectSimple_SetData(wxDataObjectSimple *self,PyObject *data){
- bool rval;
- bool blocked = wxPyBeginBlockThreads();
- if (PyString_Check(data)) {
- rval = self->SetData(PyString_Size(data), PyString_AsString(data));
- }
- else {
- // raise a TypeError if not a string
- PyErr_SetString(PyExc_TypeError, "String expected.");
- rval = False;
- }
- wxPyEndBlockThreads(blocked);
- return rval;
- }
- // Create a new class for wxPython to use
-class wxPyDataObjectSimple : public wxDataObjectSimple {
-public:
- wxPyDataObjectSimple(const wxDataFormat& format = wxFormatInvalid)
- : wxDataObjectSimple(format) {}
-
- DEC_PYCALLBACK_SIZET__const(GetDataSize);
- bool GetDataHere(void *buf) const;
- bool SetData(size_t len, const void *buf) const;
- PYPRIVATE;
-};
-
-IMP_PYCALLBACK_SIZET__const(wxPyDataObjectSimple, wxDataObjectSimple, GetDataSize);
-
-bool wxPyDataObjectSimple::GetDataHere(void *buf) const {
- // We need to get the data for this object and write it to buf. I think
- // the best way to do this for wxPython is to have the Python method
- // return either a string or None and then act appropriately with the
- // C++ version.
-
- bool rval = False;
- bool blocked = wxPyBeginBlockThreads();
- if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) {
- PyObject* ro;
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
- if (ro) {
- rval = (ro != Py_None && PyString_Check(ro));
- if (rval)
- memcpy(buf, PyString_AsString(ro), PyString_Size(ro));
- Py_DECREF(ro);
- }
- }
- wxPyEndBlockThreads(blocked);
- return rval;
-}
-
-bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{
- // For this one we simply need to make a string from buf and len
- // and send it to the Python method.
- bool rval = False;
- bool blocked = wxPyBeginBlockThreads();
- if (wxPyCBH_findCallback(m_myInst, "SetData")) {
- PyObject* data = PyString_FromStringAndSize((char*)buf, len);
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", data));
- Py_DECREF(data);
- }
- wxPyEndBlockThreads(blocked);
- return rval;
-}
-
- // Create a new class for wxPython to use
-class wxPyTextDataObject : public wxTextDataObject {
-public:
- wxPyTextDataObject(const wxString& text = wxPyEmptyString)
- : wxTextDataObject(text) {}
-
- DEC_PYCALLBACK_SIZET__const(GetTextLength);
- DEC_PYCALLBACK_STRING__const(GetText);
- DEC_PYCALLBACK__STRING(SetText);
- PYPRIVATE;
-};
-
-IMP_PYCALLBACK_SIZET__const(wxPyTextDataObject, wxTextDataObject, GetTextLength);
-IMP_PYCALLBACK_STRING__const(wxPyTextDataObject, wxTextDataObject, GetText);
-IMP_PYCALLBACK__STRING(wxPyTextDataObject, wxTextDataObject, SetText);
-
-
- // Create a new class for wxPython to use
-class wxPyBitmapDataObject : public wxBitmapDataObject {
-public:
- wxPyBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap)
- : wxBitmapDataObject(bitmap) {}
-
- wxBitmap GetBitmap() const;
- void SetBitmap(const wxBitmap& bitmap);
- PYPRIVATE;
-};
-
-wxBitmap wxPyBitmapDataObject::GetBitmap() const {
- wxBitmap* rval = &wxNullBitmap;
- bool blocked = wxPyBeginBlockThreads();
- if (wxPyCBH_findCallback(m_myInst, "GetBitmap")) {
- PyObject* ro;
- wxBitmap* ptr;
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
- if (ro) {
- if (wxPyConvertSwigPtr(ro, (void **)&ptr, wxT("wxBitmap")))
- rval = ptr;
- Py_DECREF(ro);
- }
- }
- wxPyEndBlockThreads(blocked);
- return *rval;
-}
-
-void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
- bool blocked = wxPyBeginBlockThreads();
- if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) {
- PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), False);
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo));
- Py_DECREF(bo);
- }
- wxPyEndBlockThreads(blocked);
-}
-
-bool wxCustomDataObject_SetData(wxCustomDataObject *self,PyObject *data){
- bool rval;
- bool blocked = wxPyBeginBlockThreads();
- if (PyString_Check(data)) {
- rval = self->SetData(PyString_Size(data), PyString_AsString(data));
- }
- else {
- // raise a TypeError if not a string
- PyErr_SetString(PyExc_TypeError, "String expected.");
- rval = False;
- }
- wxPyEndBlockThreads(blocked);
- return rval;
- }
-PyObject *wxCustomDataObject_GetData(wxCustomDataObject *self){
- PyObject* obj;
- bool blocked = wxPyBeginBlockThreads();
- obj = PyString_FromStringAndSize((char*)self->GetData(), self->GetSize());
- wxPyEndBlockThreads(blocked);
- return obj;
- }
-
-class wxMetafileDataObject : public wxDataObjectSimple
-{
-public:
- wxMetafileDataObject() { wxPyRaiseNotImplemented(); }
-};
-
-
-IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
-
-
-IMP_PYCALLBACK__(wxPyDropTarget, wxDropTarget, OnLeave);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyDropTarget, wxDropTarget, OnEnter);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyDropTarget, wxDropTarget, OnDragOver);
-IMP_PYCALLBACK_DR_2WXCDR_pure(wxPyDropTarget, wxDropTarget, OnData);
-IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
-
-
-class wxPyTextDropTarget : public wxTextDropTarget {
-public:
- wxPyTextDropTarget() {}
-
- DEC_PYCALLBACK_BOOL_INTINTSTR_pure(OnDropText);
-
- DEC_PYCALLBACK__(OnLeave);
- DEC_PYCALLBACK_DR_2WXCDR(OnEnter);
- DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
- DEC_PYCALLBACK_DR_2WXCDR(OnData);
- DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
-
- PYPRIVATE;
-};
-
-IMP_PYCALLBACK_BOOL_INTINTSTR_pure(wxPyTextDropTarget, wxTextDropTarget, OnDropText);
-IMP_PYCALLBACK__(wxPyTextDropTarget, wxTextDropTarget, OnLeave);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyTextDropTarget, wxTextDropTarget, OnEnter);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyTextDropTarget, wxTextDropTarget, OnDragOver);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyTextDropTarget, wxTextDropTarget, OnData);
-IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop);
-
-
-
-class wxPyFileDropTarget : public wxFileDropTarget {
-public:
- wxPyFileDropTarget() {}
-
- virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
-
- DEC_PYCALLBACK__(OnLeave);
- DEC_PYCALLBACK_DR_2WXCDR(OnEnter);
- DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
- DEC_PYCALLBACK_DR_2WXCDR(OnData);
- DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
-
- PYPRIVATE;
-};
-
-bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
- const wxArrayString& filenames) {
- bool rval = False;
- bool blocked = wxPyBeginBlockThreads();
- if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
- PyObject* list = wxArrayString2PyList_helper(filenames);
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",x,y,list));
- Py_DECREF(list);
- }
- wxPyEndBlockThreads(blocked);
- return rval;
-}
-
-
-
-IMP_PYCALLBACK__(wxPyFileDropTarget, wxFileDropTarget, OnLeave);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyFileDropTarget, wxFileDropTarget, OnEnter);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyFileDropTarget, wxFileDropTarget, OnDragOver);
-IMP_PYCALLBACK_DR_2WXCDR(wxPyFileDropTarget, wxFileDropTarget, OnData);
-IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop);
-
-
-
-
-bool wxClipboardLocker___nonzero__(wxClipboardLocker *self){ return !!(*self); }
-
-#include <wx/display.h>
-
-bool wxVideoMode___eq__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self == *other) : False; }
-bool wxVideoMode___ne__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self != *other) : True; }
-
-// dummy version of wxDisplay for when it is not enabled in the wxWidgets build
-#if !wxUSE_DISPLAY
-#include <wx/dynarray.h>
-#include <wx/vidmode.h>
-
-WX_DECLARE_OBJARRAY(wxVideoMode, wxArrayVideoModes);
-#include "wx/arrimpl.cpp"
-WX_DEFINE_OBJARRAY(wxArrayVideoModes);
-const wxVideoMode wxDefaultVideoMode;
-
-class wxDisplay
-{
-public:
- wxDisplay(size_t index = 0) { wxPyRaiseNotImplemented(); }
- ~wxDisplay() {}
-
- static size_t GetCount()
- { wxPyRaiseNotImplemented(); return 0; }
-
- static int GetFromPoint(const wxPoint& pt)
- { wxPyRaiseNotImplemented(); return wxNOT_FOUND; }
- static int GetFromWindow(wxWindow *window)
- { wxPyRaiseNotImplemented(); return wxNOT_FOUND; }
-
- virtual bool IsOk() const { return false; }
- virtual wxRect GetGeometry() const { wxRect r; return r; }
- virtual wxString GetName() const { return wxEmptyString; }
- bool IsPrimary() const { return false; }
-
- wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode)
- { wxArrayVideoModes a; return a; }
-
- virtual wxVideoMode GetCurrentMode() const
- { return wxDefaultVideoMode; }
-
- virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode)
- { return false; }
-
- void ResetMode() {}
-};
-#endif
-
-int Display_GetFromWindow(wxWindow *window){ wxPyRaiseNotImplemented(); return wxNOT_FOUND; }
-PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){
- PyObject* pyList = NULL;
- wxArrayVideoModes arr = self->GetModes(mode);
- bool blocked = wxPyBeginBlockThreads();
- pyList = PyList_New(0);
- for (int i=0; i < arr.GetCount(); i++) {
- wxVideoMode* m = new wxVideoMode(arr.Item(i));
- PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
- PyList_Append(pyList, pyObj);
- Py_DECREF(pyObj);
- }
- wxPyEndBlockThreads(blocked);
- return pyList;
- }
-#ifdef __cplusplus
-extern "C" {
-#endif
-static PyObject *_wrap_SystemSettings_GetColour(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- wxColour result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "index", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_GetColour",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxSystemSettings::GetColour((wxSystemColour )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxColour * resultptr;
- resultptr = new wxColour((wxColour &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxColour, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemSettings_GetFont(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- wxFont result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "index", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_GetFont",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxSystemSettings::GetFont((wxSystemFont )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxFont * resultptr;
- resultptr = new wxFont((wxFont &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxFont, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemSettings_GetMetric(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "index", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_GetMetric",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemSettings_HasFeature(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- bool result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "index", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_HasFeature",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxSystemSettings::HasFeature((wxSystemFeature )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemSettings_GetScreenType(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":SystemSettings_GetScreenType",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxSystemSettings::GetScreenType();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemSettings_SetScreenType(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "screen", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_SetScreenType",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxSystemSettings::SetScreenType((wxSystemScreenType )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * SystemSettings_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxSystemSettings, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static int _wrap_WINDOW_DEFAULT_VARIANT_set(PyObject *) {
- PyErr_SetString(PyExc_TypeError,"Variable WINDOW_DEFAULT_VARIANT is read-only.");
- return 1;
-}
-
-
-static PyObject *_wrap_WINDOW_DEFAULT_VARIANT_get() {
- PyObject *pyobj;
-
- {
-#if wxUSE_UNICODE
- pyobj = PyUnicode_FromWideChar((&wxPyWINDOW_DEFAULT_VARIANT)->c_str(), (&wxPyWINDOW_DEFAULT_VARIANT)->Len());
-#else
- pyobj = PyString_FromStringAndSize((&wxPyWINDOW_DEFAULT_VARIANT)->c_str(), (&wxPyWINDOW_DEFAULT_VARIANT)->Len());
-#endif
- }
- return pyobj;
-}
-
-
-static PyObject *_wrap_new_SystemOptions(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxSystemOptions *result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_SystemOptions",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxSystemOptions *)new wxSystemOptions();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSystemOptions, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemOptions_SetOption(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString *arg2 = 0 ;
- bool temp1 = False ;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "name",(char *) "value", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SystemOptions_SetOption",kwnames,&obj0,&obj1)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxSystemOptions::SetOption((wxString const &)*arg1,(wxString const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemOptions_SetOptionInt(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- int arg2 ;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "name",(char *) "value", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SystemOptions_SetOptionInt",kwnames,&obj0,&obj1)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- arg2 = (int)SWIG_As_int(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxSystemOptions::SetOption((wxString const &)*arg1,arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemOptions_GetOption(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "name", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemOptions_GetOption",kwnames,&obj0)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxSystemOptions::GetOption((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemOptions_GetOptionInt(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- int result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "name", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemOptions_GetOptionInt",kwnames,&obj0)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxSystemOptions::GetOptionInt((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_SystemOptions_HasOption(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- bool result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "name", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemOptions_HasOption",kwnames,&obj0)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxSystemOptions::HasOption((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject * SystemOptions_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxSystemOptions, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static int _wrap_FileSelectorPromptStr_set(PyObject *) {
- PyErr_SetString(PyExc_TypeError,"Variable FileSelectorPromptStr is read-only.");
- return 1;
-}
-
-
-static PyObject *_wrap_FileSelectorPromptStr_get() {
- PyObject *pyobj;
-
- {
-#if wxUSE_UNICODE
- pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len());
-#else
- pyobj = PyString_FromStringAndSize((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len());
-#endif
- }
- return pyobj;
-}
-
-
-static int _wrap_FileSelectorDefaultWildcardStr_set(PyObject *) {
- PyErr_SetString(PyExc_TypeError,"Variable FileSelectorDefaultWildcardStr is read-only.");
- return 1;
-}
-
-
-static PyObject *_wrap_FileSelectorDefaultWildcardStr_get() {
- PyObject *pyobj;
-
- {
-#if wxUSE_UNICODE
- pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len());
-#else
- pyobj = PyString_FromStringAndSize((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len());
-#endif
- }
- return pyobj;
-}
-
-
-static int _wrap_DirSelectorPromptStr_set(PyObject *) {
- PyErr_SetString(PyExc_TypeError,"Variable DirSelectorPromptStr is read-only.");
- return 1;
-}
-
-
-static PyObject *_wrap_DirSelectorPromptStr_get() {
- PyObject *pyobj;
-
- {
-#if wxUSE_UNICODE
- pyobj = PyUnicode_FromWideChar((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len());
-#else
- pyobj = PyString_FromStringAndSize((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len());
-#endif
- }
- return pyobj;
-}
-
-
-static PyObject *_wrap_NewId(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- long result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":NewId",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (long)wxNewId();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_long((long)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_RegisterId(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- long arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "id", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:RegisterId",kwnames,&obj0)) goto fail;
- arg1 = (long)SWIG_As_long(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxRegisterId(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetCurrentId(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- long result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetCurrentId",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (long)wxGetCurrentId();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_long((long)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_IsStockID(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- bool result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "id", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:IsStockID",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxIsStockID(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_IsStockLabel(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- wxString *arg2 = 0 ;
- bool result;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "id",(char *) "label", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IsStockLabel",kwnames,&obj0,&obj1)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxIsStockLabel(arg1,(wxString const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- {
- if (temp2)
- delete arg2;
- }
- return resultobj;
- fail:
- {
- if (temp2)
- delete arg2;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetStockLabel(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- wxString result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "id", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GetStockLabel",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetStockLabel(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Bell(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Bell",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxBell();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_EndBusyCursor(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":EndBusyCursor",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxEndBusyCursor();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetElapsedTime(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- bool arg1 = (bool) True ;
- long result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "resetTimer", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) goto fail;
- if (obj0) {
- arg1 = (bool)SWIG_As_bool(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (long)wxGetElapsedTime(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_long((long)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetMousePosition(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int *arg1 = (int *) 0 ;
- int *arg2 = (int *) 0 ;
- int temp1 ;
- int res1 = 0 ;
- int temp2 ;
- int res2 = 0 ;
- char *kwnames[] = {
- NULL
- };
-
- arg1 = &temp1; res1 = SWIG_NEWOBJ;
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetMousePosition",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxGetMousePosition(arg1,arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- resultobj = t_output_helper(resultobj, ((res1 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg1)) : SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_IsBusy(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- bool result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":IsBusy",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxIsBusy();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Now(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Now",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxNow();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Shell(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString const &arg1_defvalue = wxPyEmptyString ;
- wxString *arg1 = (wxString *) &arg1_defvalue ;
- bool result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "command", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Shell",kwnames,&obj0)) goto fail;
- if (obj0) {
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxShell((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_StartTimer(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":StartTimer",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxStartTimer();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetOsVersion(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int *arg1 = (int *) 0 ;
- int *arg2 = (int *) 0 ;
- int result;
- int temp1 ;
- int res1 = 0 ;
- int temp2 ;
- int res2 = 0 ;
- char *kwnames[] = {
- NULL
- };
-
- arg1 = &temp1; res1 = SWIG_NEWOBJ;
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetOsVersion",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxGetOsVersion(arg1,arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- resultobj = t_output_helper(resultobj, ((res1 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg1)) : SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetOsDescription(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetOsDescription",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetOsDescription();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetFreeMemory(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- long result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetFreeMemory",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (long)wxGetFreeMemory();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_long((long)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Shutdown(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- bool result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "wFlags", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Shutdown",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxShutdown((wxShutdownFlags )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Sleep(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "secs", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Sleep",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxSleep(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_MilliSleep(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- unsigned long arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "milliseconds", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MilliSleep",kwnames,&obj0)) goto fail;
- arg1 = (unsigned long)SWIG_As_unsigned_SS_long(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxMilliSleep(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_MicroSleep(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- unsigned long arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "microseconds", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MicroSleep",kwnames,&obj0)) goto fail;
- arg1 = (unsigned long)SWIG_As_unsigned_SS_long(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxMicroSleep(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_EnableTopLevelWindows(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- bool arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "enable", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:EnableTopLevelWindows",kwnames,&obj0)) goto fail;
- arg1 = (bool)SWIG_As_bool(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxEnableTopLevelWindows(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_StripMenuCodes(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "in", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StripMenuCodes",kwnames,&obj0)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxStripMenuCodes((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetEmailAddress(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetEmailAddress",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetEmailAddress();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetHostName(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetHostName",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetHostName();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetFullHostName(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetFullHostName",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetFullHostName();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetUserId(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetUserId",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetUserId();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetUserName(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetUserName",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetUserName();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetHomeDir(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetHomeDir",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetHomeDir();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetUserHome(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString const &arg1_defvalue = wxPyEmptyString ;
- wxString *arg1 = (wxString *) &arg1_defvalue ;
- wxString result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "user", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetUserHome",kwnames,&obj0)) goto fail;
- if (obj0) {
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetUserHome((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetProcessId(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- unsigned long result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetProcessId",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (unsigned long)wxGetProcessId();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_unsigned_SS_long((unsigned long)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Trap(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Trap",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxTrap();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FileSelector(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString const &arg1_defvalue = wxPyFileSelectorPromptStr ;
- wxString *arg1 = (wxString *) &arg1_defvalue ;
- wxString const &arg2_defvalue = wxPyEmptyString ;
- wxString *arg2 = (wxString *) &arg2_defvalue ;
- wxString const &arg3_defvalue = wxPyEmptyString ;
- wxString *arg3 = (wxString *) &arg3_defvalue ;
- wxString const &arg4_defvalue = wxPyEmptyString ;
- wxString *arg4 = (wxString *) &arg4_defvalue ;
- wxString const &arg5_defvalue = wxPyFileSelectorDefaultWildcardStr ;
- wxString *arg5 = (wxString *) &arg5_defvalue ;
- int arg6 = (int) 0 ;
- wxWindow *arg7 = (wxWindow *) NULL ;
- int arg8 = (int) -1 ;
- int arg9 = (int) -1 ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- bool temp3 = False ;
- bool temp4 = False ;
- bool temp5 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- PyObject * obj5 = 0 ;
- PyObject * obj6 = 0 ;
- PyObject * obj7 = 0 ;
- PyObject * obj8 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "default_path",(char *) "default_filename",(char *) "default_extension",(char *) "wildcard",(char *) "flags",(char *) "parent",(char *) "x",(char *) "y", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOOO:FileSelector",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
- if (obj0) {
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- }
- if (obj1) {
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- }
- if (obj2) {
- {
- arg3 = wxString_in_helper(obj2);
- if (arg3 == NULL) SWIG_fail;
- temp3 = True;
- }
- }
- if (obj3) {
- {
- arg4 = wxString_in_helper(obj3);
- if (arg4 == NULL) SWIG_fail;
- temp4 = True;
- }
- }
- if (obj4) {
- {
- arg5 = wxString_in_helper(obj4);
- if (arg5 == NULL) SWIG_fail;
- temp5 = True;
- }
- }
- if (obj5) {
- arg6 = (int)SWIG_As_int(obj5);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj6) {
- if ((SWIG_ConvertPtr(obj6,(void **)(&arg7),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- if (obj7) {
- arg8 = (int)SWIG_As_int(obj7);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj8) {
- arg9 = (int)SWIG_As_int(obj8);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxString const &)*arg5,arg6,arg7,arg8,arg9);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- {
- if (temp4)
- delete arg4;
- }
- {
- if (temp5)
- delete arg5;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- {
- if (temp4)
- delete arg4;
- }
- {
- if (temp5)
- delete arg5;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_LoadFileSelector(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString *arg2 = 0 ;
- wxString const &arg3_defvalue = wxPyEmptyString ;
- wxString *arg3 = (wxString *) &arg3_defvalue ;
- wxWindow *arg4 = (wxWindow *) NULL ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- bool temp3 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- char *kwnames[] = {
- (char *) "what",(char *) "extension",(char *) "default_name",(char *) "parent", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:LoadFileSelector",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- if (obj2) {
- {
- arg3 = wxString_in_helper(obj2);
- if (arg3 == NULL) SWIG_fail;
- temp3 = True;
- }
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxLoadFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_SaveFileSelector(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString *arg2 = 0 ;
- wxString const &arg3_defvalue = wxPyEmptyString ;
- wxString *arg3 = (wxString *) &arg3_defvalue ;
- wxWindow *arg4 = (wxWindow *) NULL ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- bool temp3 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- char *kwnames[] = {
- (char *) "what",(char *) "extension",(char *) "default_name",(char *) "parent", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:SaveFileSelector",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- if (obj2) {
- {
- arg3 = wxString_in_helper(obj2);
- if (arg3 == NULL) SWIG_fail;
- temp3 = True;
- }
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxSaveFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_DirSelector(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString const &arg1_defvalue = wxPyDirSelectorPromptStr ;
- wxString *arg1 = (wxString *) &arg1_defvalue ;
- wxString const &arg2_defvalue = wxPyEmptyString ;
- wxString *arg2 = (wxString *) &arg2_defvalue ;
- long arg3 = (long) wxDD_DEFAULT_STYLE ;
- wxPoint const &arg4_defvalue = wxDefaultPosition ;
- wxPoint *arg4 = (wxPoint *) &arg4_defvalue ;
- wxWindow *arg5 = (wxWindow *) NULL ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- wxPoint temp4 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "defaultPath",(char *) "style",(char *) "pos",(char *) "parent", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOO:DirSelector",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
- if (obj0) {
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- }
- if (obj1) {
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- }
- if (obj2) {
- arg3 = (long)SWIG_As_long(obj2);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj3) {
- {
- arg4 = &temp4;
- if ( ! wxPoint_helper(obj3, &arg4)) SWIG_fail;
- }
- }
- if (obj4) {
- if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxDirSelector((wxString const &)*arg1,(wxString const &)*arg2,arg3,(wxPoint const &)*arg4,arg5);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetTextFromUser(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString const &arg2_defvalue = wxPyEmptyString ;
- wxString *arg2 = (wxString *) &arg2_defvalue ;
- wxString const &arg3_defvalue = wxPyEmptyString ;
- wxString *arg3 = (wxString *) &arg3_defvalue ;
- wxWindow *arg4 = (wxWindow *) NULL ;
- int arg5 = (int) -1 ;
- int arg6 = (int) -1 ;
- bool arg7 = (bool) True ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- bool temp3 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- PyObject * obj5 = 0 ;
- PyObject * obj6 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "caption",(char *) "default_value",(char *) "parent",(char *) "x",(char *) "y",(char *) "centre", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:GetTextFromUser",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- if (obj1) {
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- }
- if (obj2) {
- {
- arg3 = wxString_in_helper(obj2);
- if (arg3 == NULL) SWIG_fail;
- temp3 = True;
- }
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- if (obj4) {
- arg5 = (int)SWIG_As_int(obj4);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj5) {
- arg6 = (int)SWIG_As_int(obj5);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj6) {
- arg7 = (bool)SWIG_As_bool(obj6);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetTextFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4,arg5,arg6,arg7);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetPasswordFromUser(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString const &arg2_defvalue = wxPyEmptyString ;
- wxString *arg2 = (wxString *) &arg2_defvalue ;
- wxString const &arg3_defvalue = wxPyEmptyString ;
- wxString *arg3 = (wxString *) &arg3_defvalue ;
- wxWindow *arg4 = (wxWindow *) NULL ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- bool temp3 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "caption",(char *) "default_value",(char *) "parent", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:GetPasswordFromUser",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- if (obj1) {
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- }
- if (obj2) {
- {
- arg3 = wxString_in_helper(obj2);
- if (arg3 == NULL) SWIG_fail;
- temp3 = True;
- }
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetPasswordFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetSingleChoice(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString *arg2 = 0 ;
- int arg3 ;
- wxString *arg4 = (wxString *) 0 ;
- wxWindow *arg5 = (wxWindow *) NULL ;
- int arg6 = (int) -1 ;
- int arg7 = (int) -1 ;
- bool arg8 = (bool) True ;
- int arg9 = (int) 150 ;
- int arg10 = (int) 200 ;
- wxString result;
- bool temp1 = False ;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- PyObject * obj5 = 0 ;
- PyObject * obj6 = 0 ;
- PyObject * obj7 = 0 ;
- PyObject * obj8 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "caption",(char *) "choices",(char *) "parent",(char *) "x",(char *) "y",(char *) "centre",(char *) "width",(char *) "height", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:GetSingleChoice",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- arg3 = PyList_Size(obj2);
- arg4 = wxString_LIST_helper(obj2);
- if (arg4 == NULL) SWIG_fail;
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg5),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- if (obj4) {
- arg6 = (int)SWIG_As_int(obj4);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj5) {
- arg7 = (int)SWIG_As_int(obj5);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj6) {
- arg8 = (bool)SWIG_As_bool(obj6);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj7) {
- arg9 = (int)SWIG_As_int(obj7);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj8) {
- arg10 = (int)SWIG_As_int(obj8);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetSingleChoice((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (arg4) delete [] arg4;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (arg4) delete [] arg4;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetSingleChoiceIndex(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString *arg2 = 0 ;
- int arg3 ;
- wxString *arg4 = (wxString *) 0 ;
- wxWindow *arg5 = (wxWindow *) NULL ;
- int arg6 = (int) -1 ;
- int arg7 = (int) -1 ;
- bool arg8 = (bool) True ;
- int arg9 = (int) 150 ;
- int arg10 = (int) 200 ;
- int result;
- bool temp1 = False ;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- PyObject * obj5 = 0 ;
- PyObject * obj6 = 0 ;
- PyObject * obj7 = 0 ;
- PyObject * obj8 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "caption",(char *) "choices",(char *) "parent",(char *) "x",(char *) "y",(char *) "centre",(char *) "width",(char *) "height", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:GetSingleChoiceIndex",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- arg3 = PyList_Size(obj2);
- arg4 = wxString_LIST_helper(obj2);
- if (arg4 == NULL) SWIG_fail;
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg5),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- if (obj4) {
- arg6 = (int)SWIG_As_int(obj4);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj5) {
- arg7 = (int)SWIG_As_int(obj5);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj6) {
- arg8 = (bool)SWIG_As_bool(obj6);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj7) {
- arg9 = (int)SWIG_As_int(obj7);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj8) {
- arg10 = (int)SWIG_As_int(obj8);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxGetSingleChoiceIndex((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (arg4) delete [] arg4;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (arg4) delete [] arg4;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_MessageBox(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString const &arg2_defvalue = wxPyEmptyString ;
- wxString *arg2 = (wxString *) &arg2_defvalue ;
- int arg3 = (int) wxOK|wxCENTRE ;
- wxWindow *arg4 = (wxWindow *) NULL ;
- int arg5 = (int) -1 ;
- int arg6 = (int) -1 ;
- int result;
- bool temp1 = False ;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- PyObject * obj5 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "caption",(char *) "style",(char *) "parent",(char *) "x",(char *) "y", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:MessageBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- if (obj1) {
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- }
- if (obj2) {
- arg3 = (int)SWIG_As_int(obj2);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj3) {
- if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- if (obj4) {
- arg5 = (int)SWIG_As_int(obj4);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj5) {
- arg6 = (int)SWIG_As_int(obj5);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxMessageBox((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_GetNumberFromUser(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxString *arg2 = 0 ;
- wxString *arg3 = 0 ;
- long arg4 ;
- long arg5 = (long) 0 ;
- long arg6 = (long) 100 ;
- wxWindow *arg7 = (wxWindow *) NULL ;
- wxPoint const &arg8_defvalue = wxDefaultPosition ;
- wxPoint *arg8 = (wxPoint *) &arg8_defvalue ;
- long result;
- bool temp1 = False ;
- bool temp2 = False ;
- bool temp3 = False ;
- wxPoint temp8 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- PyObject * obj4 = 0 ;
- PyObject * obj5 = 0 ;
- PyObject * obj6 = 0 ;
- PyObject * obj7 = 0 ;
- char *kwnames[] = {
- (char *) "message",(char *) "prompt",(char *) "caption",(char *) "value",(char *) "min",(char *) "max",(char *) "parent",(char *) "pos", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:GetNumberFromUser",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- arg3 = wxString_in_helper(obj2);
- if (arg3 == NULL) SWIG_fail;
- temp3 = True;
- }
- arg4 = (long)SWIG_As_long(obj3);
- if (PyErr_Occurred()) SWIG_fail;
- if (obj4) {
- arg5 = (long)SWIG_As_long(obj4);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj5) {
- arg6 = (long)SWIG_As_long(obj5);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj6) {
- if ((SWIG_ConvertPtr(obj6,(void **)(&arg7),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- if (obj7) {
- {
- arg8 = &temp8;
- if ( ! wxPoint_helper(obj7, &arg8)) SWIG_fail;
- }
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (long)wxGetNumberFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4,arg5,arg6,arg7,(wxPoint const &)*arg8);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_long((long)result);
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- {
- if (temp2)
- delete arg2;
- }
- {
- if (temp3)
- delete arg3;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_ColourDisplay(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- bool result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":ColourDisplay",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxColourDisplay();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_DisplayDepth(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplayDepth",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxDisplayDepth();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetDisplayDepth(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplayDepth",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxGetDisplayDepth();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_DisplaySize(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int *arg1 = (int *) 0 ;
- int *arg2 = (int *) 0 ;
- int temp1 ;
- int res1 = 0 ;
- int temp2 ;
- int res2 = 0 ;
- char *kwnames[] = {
- NULL
- };
-
- arg1 = &temp1; res1 = SWIG_NEWOBJ;
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplaySize",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxDisplaySize(arg1,arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- resultobj = t_output_helper(resultobj, ((res1 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg1)) : SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetDisplaySize(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxSize result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplaySize",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetDisplaySize();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxSize * resultptr;
- resultptr = new wxSize((wxSize &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_DisplaySizeMM(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int *arg1 = (int *) 0 ;
- int *arg2 = (int *) 0 ;
- int temp1 ;
- int res1 = 0 ;
- int temp2 ;
- int res2 = 0 ;
- char *kwnames[] = {
- NULL
- };
-
- arg1 = &temp1; res1 = SWIG_NEWOBJ;
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplaySizeMM",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxDisplaySizeMM(arg1,arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- resultobj = t_output_helper(resultobj, ((res1 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg1)) : SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetDisplaySizeMM(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxSize result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplaySizeMM",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetDisplaySizeMM();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxSize * resultptr;
- resultptr = new wxSize((wxSize &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_ClientDisplayRect(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int *arg1 = (int *) 0 ;
- int *arg2 = (int *) 0 ;
- int *arg3 = (int *) 0 ;
- int *arg4 = (int *) 0 ;
- int temp1 ;
- int res1 = 0 ;
- int temp2 ;
- int res2 = 0 ;
- int temp3 ;
- int res3 = 0 ;
- int temp4 ;
- int res4 = 0 ;
- char *kwnames[] = {
- NULL
- };
-
- arg1 = &temp1; res1 = SWIG_NEWOBJ;
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- arg3 = &temp3; res3 = SWIG_NEWOBJ;
- arg4 = &temp4; res4 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":ClientDisplayRect",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxClientDisplayRect(arg1,arg2,arg3,arg4);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- resultobj = t_output_helper(resultobj, ((res1 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg1)) : SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res3 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg3)) : SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res4 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg4)) : SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetClientDisplayRect(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxRect result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetClientDisplayRect",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxGetClientDisplayRect();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxRect * resultptr;
- resultptr = new wxRect((wxRect &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_SetCursor(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCursor *arg1 = 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "cursor", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SetCursor",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCursor,
- SWIG_POINTER_EXCEPTION | 0)) == -1)
- SWIG_fail;
- if (arg1 == NULL) {
- PyErr_SetString(PyExc_TypeError,"null reference");
- SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxSetCursor(*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_BeginBusyCursor(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCursor *arg1 = (wxCursor *) wxHOURGLASS_CURSOR ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "cursor", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:BeginBusyCursor",kwnames,&obj0)) goto fail;
- if (obj0) {
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCursor,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxBeginBusyCursor(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetActiveWindow(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxWindow *result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetActiveWindow",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindow *)wxGetActiveWindow();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 0);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GenericFindWindowAtPoint(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxPoint *arg1 = 0 ;
- wxWindow *result;
- wxPoint temp1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "pt", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GenericFindWindowAtPoint",kwnames,&obj0)) goto fail;
- {
- arg1 = &temp1;
- if ( ! wxPoint_helper(obj0, &arg1)) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindow *)wxGenericFindWindowAtPoint((wxPoint const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 0);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FindWindowAtPoint(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxPoint *arg1 = 0 ;
- wxWindow *result;
- wxPoint temp1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "pt", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FindWindowAtPoint",kwnames,&obj0)) goto fail;
- {
- arg1 = &temp1;
- if ( ! wxPoint_helper(obj0, &arg1)) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindow *)wxFindWindowAtPoint((wxPoint const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 0);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetTopLevelParent(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxWindow *arg1 = (wxWindow *) 0 ;
- wxWindow *result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "win", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GetTopLevelParent",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindow *)wxGetTopLevelParent(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 0);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_GetKeyState(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- bool result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "key", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GetKeyState",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxGetKeyState((wxKeyCode )arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_WakeUpMainThread(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":WakeUpMainThread",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxWakeUpMainThread();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_MutexGuiEnter(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":MutexGuiEnter",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxMutexGuiEnter();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_MutexGuiLeave(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":MutexGuiLeave",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxMutexGuiLeave();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_new_MutexGuiLocker(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxMutexGuiLocker *result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_MutexGuiLocker",kwnames)) goto fail;
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxMutexGuiLocker *)new wxMutexGuiLocker();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxMutexGuiLocker, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_delete_MutexGuiLocker(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxMutexGuiLocker *arg1 = (wxMutexGuiLocker *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_MutexGuiLocker",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMutexGuiLocker,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete arg1;
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * MutexGuiLocker_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxMutexGuiLocker, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_Thread_IsMain(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- bool result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Thread_IsMain",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)wxThread_IsMain();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_new_ToolTip(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxToolTip *result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "tip", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_ToolTip",kwnames,&obj0)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxToolTip *)new wxToolTip((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 1);
- }
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_ToolTip_SetTip(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxToolTip *arg1 = (wxToolTip *) 0 ;
- wxString *arg2 = 0 ;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "tip", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolTip_SetTip",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToolTip,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->SetTip((wxString const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- {
- if (temp2)
- delete arg2;
- }
- return resultobj;
- fail:
- {
- if (temp2)
- delete arg2;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_ToolTip_GetTip(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxToolTip *arg1 = (wxToolTip *) 0 ;
- wxString result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToolTip_GetTip",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToolTip,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (arg1)->GetTip();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
-#if wxUSE_UNICODE
- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
-#else
- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
-#endif
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_ToolTip_GetWindow(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxToolTip *arg1 = (wxToolTip *) 0 ;
- wxWindow *result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToolTip_GetWindow",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToolTip,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindow *)(arg1)->GetWindow();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 0);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_ToolTip_Enable(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- bool arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "flag", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToolTip_Enable",kwnames,&obj0)) goto fail;
- arg1 = (bool)SWIG_As_bool(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxToolTip::Enable(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_ToolTip_SetDelay(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- long arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "milliseconds", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToolTip_SetDelay",kwnames,&obj0)) goto fail;
- arg1 = (long)SWIG_As_long(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxToolTip::SetDelay(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * ToolTip_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxToolTip, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_new_Caret(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxWindow *arg1 = (wxWindow *) 0 ;
- wxSize *arg2 = 0 ;
- wxCaret *result;
- wxSize temp2 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "window",(char *) "size", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_Caret",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- arg2 = &temp2;
- if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxCaret *)new wxCaret(arg1,(wxSize const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxCaret, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_delete_Caret(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_Caret",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete arg1;
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_IsOk(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- bool result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_IsOk",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)(arg1)->IsOk();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_IsVisible(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- bool result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_IsVisible",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)(arg1)->IsVisible();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_GetPosition(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- wxPoint result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_GetPosition",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (arg1)->GetPosition();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxPoint * resultptr;
- resultptr = new wxPoint((wxPoint &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxPoint, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_GetPositionTuple(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- int *arg2 = (int *) 0 ;
- int *arg3 = (int *) 0 ;
- int temp2 ;
- int res2 = 0 ;
- int temp3 ;
- int res3 = 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- arg3 = &temp3; res3 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_GetPositionTuple",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->GetPosition(arg2,arg3);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res3 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg3)) : SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_GetSize(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- wxSize result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_GetSize",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (arg1)->GetSize();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- wxSize * resultptr;
- resultptr = new wxSize((wxSize &) result);
- resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_GetSizeTuple(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- int *arg2 = (int *) 0 ;
- int *arg3 = (int *) 0 ;
- int temp2 ;
- int res2 = 0 ;
- int temp3 ;
- int res3 = 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- arg2 = &temp2; res2 = SWIG_NEWOBJ;
- arg3 = &temp3; res3 = SWIG_NEWOBJ;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_GetSizeTuple",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->GetSize(arg2,arg3);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, 0)));
- resultobj = t_output_helper(resultobj, ((res3 == SWIG_NEWOBJ) ?
- SWIG_From_int((*arg3)) : SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, 0)));
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_GetWindow(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- wxWindow *result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_GetWindow",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindow *)(arg1)->GetWindow();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- resultobj = wxPyMake_wxObject(result, 0);
- }
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_MoveXY(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- int arg2 ;
- int arg3 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "x",(char *) "y", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Caret_MoveXY",kwnames,&obj0,&obj1,&obj2)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- arg2 = (int)SWIG_As_int(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- arg3 = (int)SWIG_As_int(obj2);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Move(arg2,arg3);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_Move(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- wxPoint *arg2 = 0 ;
- wxPoint temp2 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "pt", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Caret_Move",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- arg2 = &temp2;
- if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Move((wxPoint const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_SetSizeWH(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- int arg2 ;
- int arg3 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "width",(char *) "height", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Caret_SetSizeWH",kwnames,&obj0,&obj1,&obj2)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- arg2 = (int)SWIG_As_int(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- arg3 = (int)SWIG_As_int(obj2);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->SetSize(arg2,arg3);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_SetSize(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- wxSize *arg2 = 0 ;
- wxSize temp2 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "size", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Caret_SetSize",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- arg2 = &temp2;
- if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->SetSize((wxSize const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_Show(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- int arg2 = (int) True ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "show", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Caret_Show",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- if (obj1) {
- arg2 = (int)SWIG_As_int(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Show(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_Hide(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCaret *arg1 = (wxCaret *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_Hide",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCaret,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Hide();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * Caret_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxCaret, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_Caret_GetBlinkTime(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Caret_GetBlinkTime",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxCaret_GetBlinkTime();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Caret_SetBlinkTime(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "milliseconds", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_SetBlinkTime",kwnames,&obj0)) goto fail;
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxCaret_SetBlinkTime(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_new_BusyCursor(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxCursor *arg1 = (wxCursor *) wxHOURGLASS_CURSOR ;
- wxBusyCursor *result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "cursor", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_BusyCursor",kwnames,&obj0)) goto fail;
- if (obj0) {
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCursor,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxBusyCursor *)new wxBusyCursor(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBusyCursor, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_delete_BusyCursor(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxBusyCursor *arg1 = (wxBusyCursor *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_BusyCursor",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBusyCursor,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete arg1;
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * BusyCursor_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxBusyCursor, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_new_WindowDisabler(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxWindow *arg1 = (wxWindow *) NULL ;
- wxWindowDisabler *result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "winToSkip", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_WindowDisabler",kwnames,&obj0)) goto fail;
- if (obj0) {
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxWindowDisabler *)new wxWindowDisabler(arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxWindowDisabler, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_delete_WindowDisabler(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxWindowDisabler *arg1 = (wxWindowDisabler *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_WindowDisabler",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindowDisabler,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete arg1;
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * WindowDisabler_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxWindowDisabler, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_new_BusyInfo(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxString *arg1 = 0 ;
- wxBusyInfo *result;
- bool temp1 = False ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "message", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_BusyInfo",kwnames,&obj0)) goto fail;
- {
- arg1 = wxString_in_helper(obj0);
- if (arg1 == NULL) SWIG_fail;
- temp1 = True;
- }
- {
- if (!wxPyCheckForApp()) SWIG_fail;
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxBusyInfo *)new wxBusyInfo((wxString const &)*arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBusyInfo, 1);
- {
- if (temp1)
- delete arg1;
- }
- return resultobj;
- fail:
- {
- if (temp1)
- delete arg1;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_delete_BusyInfo(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxBusyInfo *arg1 = (wxBusyInfo *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_BusyInfo",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBusyInfo,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete arg1;
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * BusyInfo_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxBusyInfo, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_new_StopWatch(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxStopWatch *result;
- char *kwnames[] = {
- NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_StopWatch",kwnames)) goto fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxStopWatch *)new wxStopWatch();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxStopWatch, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_StopWatch_Start(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxStopWatch *arg1 = (wxStopWatch *) 0 ;
- long arg2 = (long) 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "t0", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:StopWatch_Start",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStopWatch,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- if (obj1) {
- arg2 = (long)SWIG_As_long(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Start(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_StopWatch_Pause(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxStopWatch *arg1 = (wxStopWatch *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StopWatch_Pause",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStopWatch,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Pause();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_StopWatch_Resume(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxStopWatch *arg1 = (wxStopWatch *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StopWatch_Resume",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStopWatch,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Resume();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_StopWatch_Time(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxStopWatch *arg1 = (wxStopWatch *) 0 ;
- long result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StopWatch_Time",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStopWatch,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (long)((wxStopWatch const *)arg1)->Time();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_long((long)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject * StopWatch_swigregister(PyObject *, PyObject *args) {
- PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
- SWIG_TypeClientData(SWIGTYPE_p_wxStopWatch, obj);
- Py_INCREF(obj);
- return Py_BuildValue((char *)"");
-}
-static PyObject *_wrap_new_FileHistory(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- int arg1 = (int) 9 ;
- int arg2 = (int) wxID_FILE1 ;
- wxFileHistory *result;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "maxFiles",(char *) "idBase", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_FileHistory",kwnames,&obj0,&obj1)) goto fail;
- if (obj0) {
- arg1 = (int)SWIG_As_int(obj0);
- if (PyErr_Occurred()) SWIG_fail;
- }
- if (obj1) {
- arg2 = (int)SWIG_As_int(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxFileHistory *)new wxFileHistory(arg1,arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxFileHistory, 1);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_delete_FileHistory(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_FileHistory",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete arg1;
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FileHistory_AddFileToHistory(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- wxString *arg2 = 0 ;
- bool temp2 = False ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "file", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FileHistory_AddFileToHistory",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- arg2 = wxString_in_helper(obj1);
- if (arg2 == NULL) SWIG_fail;
- temp2 = True;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->AddFileToHistory((wxString const &)*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- {
- if (temp2)
- delete arg2;
- }
- return resultobj;
- fail:
- {
- if (temp2)
- delete arg2;
- }
- return NULL;
-}
-
-
-static PyObject *_wrap_FileHistory_RemoveFileFromHistory(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- int arg2 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "i", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FileHistory_RemoveFileFromHistory",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- arg2 = (int)SWIG_As_int(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->RemoveFileFromHistory(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FileHistory_GetMaxFiles(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileHistory_GetMaxFiles",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)((wxFileHistory const *)arg1)->GetMaxFiles();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_From_int((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FileHistory_UseMenu(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- wxMenu *arg2 = (wxMenu *) 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "menu", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FileHistory_UseMenu",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMenu,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->UseMenu(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FileHistory_RemoveMenu(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- wxMenu *arg2 = (wxMenu *) 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "menu", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FileHistory_RemoveMenu",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMenu,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->RemoveMenu(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_FileHistory_Load(PyObject *, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxFileHistory *arg1 = (wxFileHistory *) 0 ;
- wxConfigBase *arg2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "config", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FileHistory_Load",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFileHistory,
- SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
- if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxConfigBase,
- SWIG_POINTER_EXCEPTION | 0)) == -1)
- SWIG_fail;
- if (arg2 == NULL) {
- PyErr_SetString(PyExc_TypeError,"null reference");
- SWIG_fail;
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Load(*arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;