PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
type, otype);
}
- Py_DECREF(str);
+ if (str)
+ Py_DECREF(str);
return;
}
}
void wxPyTimer::Notify() {
bool found;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "Notify")))
wxPyCBH_callCallback(m_myInst, Py_BuildValue("()"));
wxPyEndBlockThreads(blocked);
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t) {
bool found;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "DoLog"))) {
PyObject* s = wx2PyString(szString);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iOi)", level, s, t));
virtual void DoLogString(const wxChar *szString, time_t t) {
bool found;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString"))) {
PyObject* s = wx2PyString(szString);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", s, t));
class wxJoystick : public wxObject {
public:
wxJoystick(int joystick = wxJOYSTICK1) {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError,
"wxJoystick is not available on this platform.");
wxPyEndBlockThreads(blocked);
{
public:
wxSound() {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError,
"wxSound is not available on this platform.");
wxPyEndBlockThreads(blocked);
}
wxSound(const wxString&/*, bool*/) {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError,
"wxSound is not available on this platform.");
wxPyEndBlockThreads(blocked);
}
wxSound(int, const wxByte*) {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError,
"wxSound is not available on this platform.");
wxPyEndBlockThreads(blocked);
unsigned char* buffer; int size;
wxSound *sound = NULL;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (!PyArg_Parse(data, "t#", &buffer, &size))
goto done;
sound = new wxSound(size, buffer);
int size;
bool rv = false;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (!PyArg_Parse(data, "t#", &buffer, &size))
goto done;
rv = self->Create(size, buffer);
wxPyEndBlockThreads(blocked);
return rv;
#else
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError,
"Create from data is not available on this platform.");
wxPyEndBlockThreads(blocked);
// Make a tuple and put the values in it
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyObject* tuple = PyTuple_New(3);
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc),
wxT("wxIcon"), true));
wxArrayString commands;
if (self->GetAllCommands(&verbs, &commands,
wxFileType::MessageParameters(filename, mimetype))) {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyObject* tuple = PyTuple_New(2);
PyTuple_SetItem(tuple, 0, wxArrayString2PyList_helper(verbs));
PyTuple_SetItem(tuple, 1, wxArrayString2PyList_helper(commands));
const wxArtClient& client,
const wxSize& size) {
wxBitmap rval = wxNullBitmap;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) {
PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0);
PyObject* ro;
wxString am;
wxString pm;
wxDateTime::GetAmPmStrings(&am, &pm);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, wx2PyString(am));
PyTuple_SET_ITEM(tup, 1, wx2PyString(pm));
wxDataFormat* formats = new wxDataFormat[count];
self->GetAllFormats(formats, dir);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyObject* list = PyList_New(count);
for (size_t i=0; i<count; i++) {
wxDataFormat* format = new wxDataFormat(formats[i]);
static PyObject *wxDataObject_GetDataHere(wxDataObject *self,wxDataFormat const &format){
PyObject* rval = NULL;
size_t size = self->GetDataSize(format);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (size) {
char* buf = new char[size];
if (self->GetDataHere(format, buf))
}
static bool wxDataObject_SetData(wxDataObject *self,wxDataFormat const &format,PyObject *data){
bool rval;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (PyString_Check(data)) {
rval = self->SetData(format, PyString_Size(data), PyString_AsString(data));
}
static PyObject *wxDataObjectSimple_GetDataHere(wxDataObjectSimple *self){
PyObject* rval = NULL;
size_t size = self->GetDataSize();
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (size) {
char* buf = new char[size];
if (self->GetDataHere(buf))
}
static bool wxDataObjectSimple_SetData(wxDataObjectSimple *self,PyObject *data){
bool rval;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (PyString_Check(data)) {
rval = self->SetData(PyString_Size(data), PyString_AsString(data));
}
// C++ version.
bool rval = false;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) {
PyObject* ro;
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
// 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();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetData")) {
PyObject* data = PyString_FromStringAndSize((char*)buf, len);
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", data));
wxBitmap wxPyBitmapDataObject::GetBitmap() const {
wxBitmap* rval = &wxNullBitmap;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetBitmap")) {
PyObject* ro;
wxBitmap* ptr;
}
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) {
PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo));
}
static bool wxCustomDataObject_SetData(wxCustomDataObject *self,PyObject *data){
bool rval;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (PyString_Check(data)) {
rval = self->SetData(PyString_Size(data), PyString_AsString(data));
}
}
static PyObject *wxCustomDataObject_GetData(wxCustomDataObject *self){
PyObject* obj;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
obj = PyString_FromStringAndSize((char*)self->GetData(), self->GetSize());
wxPyEndBlockThreads(blocked);
return obj;
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames) {
bool rval = false;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
PyObject* list = wxArrayString2PyList_helper(filenames);
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",x,y,list));
static PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode=wxDefaultVideoMode){
PyObject* pyList = NULL;
wxArrayVideoModes arr = self->GetModes(mode);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
for (int i=0; i < arr.GetCount(); i++) {
wxVideoMode* m = new wxVideoMode(arr.Item(i));
static PyObject *_wrap_SystemSettings_GetMetric(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxSystemMetric arg1 ;
+ wxWindow *arg2 = (wxWindow *) NULL ;
int result;
PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
char *kwnames[] = {
- (char *) "index", NULL
+ (char *) "index",(char *) "win", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_GetMetric",kwnames,&obj0)) goto fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SystemSettings_GetMetric",kwnames,&obj0,&obj1)) goto fail;
{
arg1 = (wxSystemMetric)(SWIG_As_int(obj0));
if (SWIG_arg_fail(1)) SWIG_fail;
}
+ if (obj1) {
+ SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0);
+ if (SWIG_arg_fail(2)) SWIG_fail;
+ }
{
if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1);
+ result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1,arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
+static PyObject *_wrap_SystemOptions_IsFalse(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_IsFalse",kwnames,&obj0)) goto fail;
+ {
+ arg1 = wxString_in_helper(obj0);
+ if (arg1 == NULL) SWIG_fail;
+ temp1 = true;
+ }
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (bool)wxSystemOptions::IsFalse((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;
}
+static PyObject *_wrap_LaunchDefaultBrowser(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxString *arg1 = 0 ;
+ bool result;
+ bool temp1 = false ;
+ PyObject * obj0 = 0 ;
+ char *kwnames[] = {
+ (char *) "url", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:LaunchDefaultBrowser",kwnames,&obj0)) goto fail;
+ {
+ arg1 = wxString_in_helper(obj0);
+ if (arg1 == NULL) SWIG_fail;
+ temp1 = true;
+ }
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (bool)wxLaunchDefaultBrowser((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_GetKeyState(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxKeyCode arg1 ;
}
+static PyObject *_wrap_ArtProvider_GetSizeHint(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxString *arg1 = 0 ;
+ bool arg2 = (bool) false ;
+ wxSize result;
+ bool temp1 = false ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char *kwnames[] = {
+ (char *) "client",(char *) "platform_dependent", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ArtProvider_GetSizeHint",kwnames,&obj0,&obj1)) goto fail;
+ {
+ arg1 = wxString_in_helper(obj0);
+ if (arg1 == NULL) SWIG_fail;
+ temp1 = true;
+ }
+ if (obj1) {
+ {
+ arg2 = (bool)(SWIG_As_bool(obj1));
+ if (SWIG_arg_fail(2)) SWIG_fail;
+ }
+ }
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = wxPyArtProvider::GetSizeHint((wxString const &)*arg1,arg2);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ {
+ wxSize * resultptr;
+ resultptr = new wxSize((wxSize &)(result));
+ resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1);
+ }
+ {
+ if (temp1)
+ delete arg1;
+ }
+ return resultobj;
+ fail:
+ {
+ if (temp1)
+ delete arg1;
+ }
+ return NULL;
+}
+
+
static PyObject *_wrap_ArtProvider_Destroy(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPyArtProvider *arg1 = (wxPyArtProvider *) 0 ;
}
+static PyObject *_wrap_DropTarget_SetDefaultAction(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxPyDropTarget *arg1 = (wxPyDropTarget *) 0 ;
+ wxDragResult arg2 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char *kwnames[] = {
+ (char *) "self",(char *) "action", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DropTarget_SetDefaultAction",kwnames,&obj0,&obj1)) goto fail;
+ SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxPyDropTarget, SWIG_POINTER_EXCEPTION | 0);
+ if (SWIG_arg_fail(1)) SWIG_fail;
+ {
+ arg2 = (wxDragResult)(SWIG_As_int(obj1));
+ if (SWIG_arg_fail(2)) SWIG_fail;
+ }
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ (arg1)->SetDefaultAction((wxDragResult )arg2);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ Py_INCREF(Py_None); resultobj = Py_None;
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
+static PyObject *_wrap_DropTarget_GetDefaultAction(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxPyDropTarget *arg1 = (wxPyDropTarget *) 0 ;
+ wxDragResult result;
+ PyObject * obj0 = 0 ;
+ char *kwnames[] = {
+ (char *) "self", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DropTarget_GetDefaultAction",kwnames,&obj0)) goto fail;
+ SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxPyDropTarget, SWIG_POINTER_EXCEPTION | 0);
+ if (SWIG_arg_fail(1)) SWIG_fail;
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (wxDragResult)(arg1)->GetDefaultAction();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ resultobj = SWIG_From_int((result));
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject * DropTarget_swigregister(PyObject *, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
{ (char *)"SystemOptions_GetOption", (PyCFunction) _wrap_SystemOptions_GetOption, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"SystemOptions_GetOptionInt", (PyCFunction) _wrap_SystemOptions_GetOptionInt, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"SystemOptions_HasOption", (PyCFunction) _wrap_SystemOptions_HasOption, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"SystemOptions_IsFalse", (PyCFunction) _wrap_SystemOptions_IsFalse, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"SystemOptions_swigregister", SystemOptions_swigregister, METH_VARARGS, NULL},
{ (char *)"NewId", (PyCFunction) _wrap_NewId, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RegisterId", (PyCFunction) _wrap_RegisterId, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"FindWindowAtPoint", (PyCFunction) _wrap_FindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"GetTopLevelParent", (PyCFunction) _wrap_GetTopLevelParent, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"LaunchDefaultBrowser", (PyCFunction) _wrap_LaunchDefaultBrowser, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"GetKeyState", (PyCFunction) _wrap_GetKeyState, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"WakeUpMainThread", (PyCFunction) _wrap_WakeUpMainThread, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"MutexGuiEnter", (PyCFunction) _wrap_MutexGuiEnter, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ArtProvider_RemoveProvider", (PyCFunction) _wrap_ArtProvider_RemoveProvider, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ArtProvider_GetBitmap", (PyCFunction) _wrap_ArtProvider_GetBitmap, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ArtProvider_GetIcon", (PyCFunction) _wrap_ArtProvider_GetIcon, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"ArtProvider_GetSizeHint", (PyCFunction) _wrap_ArtProvider_GetSizeHint, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ArtProvider_Destroy", (PyCFunction) _wrap_ArtProvider_Destroy, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ArtProvider_swigregister", ArtProvider_swigregister, METH_VARARGS, NULL},
{ (char *)"delete_ConfigBase", (PyCFunction) _wrap_delete_ConfigBase, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"DropTarget_base_OnLeave", (PyCFunction) _wrap_DropTarget_base_OnLeave, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"DropTarget_base_OnDrop", (PyCFunction) _wrap_DropTarget_base_OnDrop, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"DropTarget_GetData", (PyCFunction) _wrap_DropTarget_GetData, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"DropTarget_SetDefaultAction", (PyCFunction) _wrap_DropTarget_SetDefaultAction, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"DropTarget_GetDefaultAction", (PyCFunction) _wrap_DropTarget_GetDefaultAction, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"DropTarget_swigregister", DropTarget_swigregister, METH_VARARGS, NULL},
{ (char *)"new_TextDropTarget", (PyCFunction) _wrap_new_TextDropTarget, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"TextDropTarget__setCallbackInfo", (PyCFunction) _wrap_TextDropTarget__setCallbackInfo, METH_VARARGS | METH_KEYWORDS, NULL},