int count = self->GetDashes(&dashes);
bool blocked = wxPyBeginBlockThreads();
PyObject* retval = PyList_New(0);
- for (int x=0; x<count; x++)
- PyList_Append(retval, PyInt_FromLong(dashes[x]));
+ for (int x=0; x<count; x++) {
+ PyObject* pyint = PyInt_FromLong(dashes[x]);
+ PyList_Append(retval, pyint);
+ Py_DECREF(pyint);
+ }
wxPyEndBlockThreads(blocked);
return retval;
}
PyObject *wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self){
wxArrayString* arr = self->GetEncodings();
- return wxArrayString2PyList_helper(*arr);
+ if (arr)
+ return wxArrayString2PyList_helper(*arr);
+ else
+ return PyList_New(0);
}
PyObject *wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self){
wxArrayString* arr = self->GetFacenames();
- return wxArrayString2PyList_helper(*arr);
+ if (arr)
+ return wxArrayString2PyList_helper(*arr);
+ else
+ return PyList_New(0);
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_GDIObject",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxGDIObject *)new wxGDIObject();
temp1 = True;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxColour *)new wxColour((wxString const &)*arg1);
if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_unsigned_char,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxPalette *)new wxPalette(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,(unsigned char const *)arg4);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxPen *)new wxPen(*arg1,arg2,arg3);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBrush *)new wxBrush((wxColour const &)*arg1,arg2);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBitmap *)new wxBitmap((wxString const &)*arg1,(wxBitmapType )arg2);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBitmap *)new wxBitmap(arg1,arg2,arg3);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBitmap *)new wxBitmap((wxIcon const &)*arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBitmap *)new wxBitmap((wxImage const &)*arg1,arg2);
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_BitmapFromXPMData",kwnames,&obj0)) goto fail;
arg1 = obj0;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBitmap *)new_wxBitmap(arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBitmap *)new_wxBitmap(arg1,arg2,arg3,arg4);
}
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMask *)new_wxMask((wxBitmap const &)*arg1,(wxColour const &)*arg2);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxIcon *)new wxIcon((wxString const &)*arg1,(wxBitmapType )arg2,arg3,arg4);
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_EmptyIcon",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxIcon *)new wxIcon();
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxIcon *)new wxIcon((wxIconLocation const &)*arg1);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxIcon *)new_wxIcon((wxBitmap const &)*arg1);
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_IconFromXPMData",kwnames,&obj0)) goto fail;
arg1 = obj0;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxIcon *)new_wxIcon(arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxCursor *)new_wxCursor((wxString const *)arg1,arg2,arg3,arg4);
arg1 = (int) SWIG_AsInt(obj0);
if (PyErr_Occurred()) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxCursor *)new wxCursor(arg1);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxCursor *)new wxCursor((wxImage const &)*arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxRegion *)new wxRegion(arg1,arg2,arg3,arg4);
static PyObject *_wrap_new_RegionFromBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxBitmap *arg1 = 0 ;
- wxColour const &arg2_defvalue = wxNullColour ;
- wxColour *arg2 = (wxColour *) &arg2_defvalue ;
+ wxRegion *result;
+ PyObject * obj0 = 0 ;
+ char *kwnames[] = {
+ (char *) "bmp", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_RegionFromBitmap",kwnames,&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap,
+ 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();
+ result = (wxRegion *)new wxRegion((wxBitmap const &)*arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxRegion, 1);
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
+static PyObject *_wrap_new_RegionFromBitmapColour(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxBitmap *arg1 = 0 ;
+ wxColour *arg2 = 0 ;
int arg3 = (int) 0 ;
wxRegion *result;
wxColour temp2 ;
(char *) "bmp",(char *) "transColour",(char *) "tolerance", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:new_RegionFromBitmap",kwnames,&obj0,&obj1,&obj2)) goto fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_RegionFromBitmapColour",kwnames,&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap,
SWIG_POINTER_EXCEPTION | 0)) == -1)
SWIG_fail;
PyErr_SetString(PyExc_TypeError,"null reference");
SWIG_fail;
}
- if (obj1) {
- {
- arg2 = &temp2;
- if ( ! wxColour_helper(obj1, &arg2)) SWIG_fail;
- }
+ {
+ arg2 = &temp2;
+ if ( ! wxColour_helper(obj1, &arg2)) SWIG_fail;
}
if (obj2) {
arg3 = (int) SWIG_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxRegion *)new wxRegion((wxBitmap const &)*arg1,(wxColour const &)*arg2,arg3);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxRegion *)new_wxRegion(arg1,arg2,arg3);
PyObject *resultobj;
wxRegion *arg1 = (wxRegion *) 0 ;
wxBitmap *arg2 = 0 ;
- wxColour const &arg3_defvalue = wxNullColour ;
- wxColour *arg3 = (wxColour *) &arg3_defvalue ;
+ bool result;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char *kwnames[] = {
+ (char *) "self",(char *) "bmp", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Region_UnionBitmap",kwnames,&obj0,&obj1)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRegion,
+ SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxBitmap,
+ SWIG_POINTER_EXCEPTION | 0)) == -1)
+ SWIG_fail;
+ if (arg2 == NULL) {
+ PyErr_SetString(PyExc_TypeError,"null reference");
+ SWIG_fail;
+ }
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (bool)(arg1)->Union((wxBitmap const &)*arg2);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ {
+ resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
+ }
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
+static PyObject *_wrap_Region_UnionBitmapColour(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxRegion *arg1 = (wxRegion *) 0 ;
+ wxBitmap *arg2 = 0 ;
+ wxColour *arg3 = 0 ;
int arg4 = (int) 0 ;
bool result;
wxColour temp3 ;
(char *) "self",(char *) "bmp",(char *) "transColour",(char *) "tolerance", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Region_UnionBitmap",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Region_UnionBitmapColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRegion,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxBitmap,
PyErr_SetString(PyExc_TypeError,"null reference");
SWIG_fail;
}
- if (obj2) {
- {
- arg3 = &temp3;
- if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail;
- }
+ {
+ arg3 = &temp3;
+ if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail;
}
if (obj3) {
arg4 = (int) SWIG_AsInt(obj3);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxRegionIterator *)new wxRegionIterator((wxRegion const &)*arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxFont *)new wxFont(arg1,arg2,arg3,arg4,arg5,(wxString const &)*arg6,(wxFontEncoding )arg7);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxFont *)new wxFont((wxNativeFontInfo const &)*arg1);
temp1 = True;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxFont *)new_wxFont((wxString const &)*arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxFont *)new_wxFont(arg1,(wxFontFamily )arg2,arg3,(wxString const &)*arg4,(wxFontEncoding )arg5);
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)(arg1)->GetNoAntiAliasing();
+ result = (bool)((wxFont const *)arg1)->GetNoAntiAliasing();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Font_GetDefaultEncoding",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)wxFont::GetDefaultEncoding();
arg1 = (wxFontEncoding) SWIG_AsInt(obj0);
if (PyErr_Occurred()) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxFont::SetDefaultEncoding((wxFontEncoding )arg1);
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_FontEnumerator",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxPyFontEnumerator *)new wxPyFontEnumerator();
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_MemoryDC",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMemoryDC *)new wxMemoryDC();
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDC,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMemoryDC *)new wxMemoryDC(arg1);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedDC *)new wxBufferedDC(arg1,(wxBitmap const &)*arg2);
if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedDC *)new wxBufferedDC(arg1,(wxSize const &)*arg2);
if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedDC *)new wxBufferedDC(arg1,(wxSize const &)*arg2);
}
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxBufferedPaintDC *)new wxBufferedPaintDC(arg1,(wxBitmap const &)*arg2);
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_ScreenDC",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxScreenDC *)new wxScreenDC();
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxClientDC *)new wxClientDC(arg1);
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxPaintDC *)new wxPaintDC(arg1);
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxWindowDC *)new wxWindowDC(arg1);
arg2 = (bool) SWIG_AsBool(obj1);
if (PyErr_Occurred()) SWIG_fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMirrorDC *)new wxMirrorDC(*arg1,arg2);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxPostScriptDC *)new wxPostScriptDC((wxPrintData const &)*arg1);
}
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMetaFile *)new wxMetaFile((wxString const &)*arg1);
}
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMetaFileDC *)new wxMetaFileDC((wxString const &)*arg1,arg2,arg3,(wxString const &)*arg4);
SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxPrinterDC *)new wxPrinterDC((wxPrintData const &)*arg1);
if (PyErr_Occurred()) SWIG_fail;
}
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxImageList *)new wxImageList(arg1,arg2,arg3,arg4);
if (PyErr_Occurred()) SWIG_fail;
}
{
- resultobj = wxPyMake_wxObject(result);
+ resultobj = wxPyMake_wxObject(result, 1);
}
return resultobj;
fail:
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_ColourDatabase",kwnames)) goto fail;
{
+ if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxColourDatabase *)new wxColourDatabase();
{ (char *)"Cursor_swigregister", Cursor_swigregister, METH_VARARGS },
{ (char *)"new_Region", (PyCFunction) _wrap_new_Region, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_RegionFromBitmap", (PyCFunction) _wrap_new_RegionFromBitmap, METH_VARARGS | METH_KEYWORDS },
+ { (char *)"new_RegionFromBitmapColour", (PyCFunction) _wrap_new_RegionFromBitmapColour, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_RegionFromPoints", (PyCFunction) _wrap_new_RegionFromPoints, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_Region", (PyCFunction) _wrap_delete_Region, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Region_Clear", (PyCFunction) _wrap_Region_Clear, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Region_XorRegion", (PyCFunction) _wrap_Region_XorRegion, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Region_ConvertToBitmap", (PyCFunction) _wrap_Region_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Region_UnionBitmap", (PyCFunction) _wrap_Region_UnionBitmap, METH_VARARGS | METH_KEYWORDS },
+ { (char *)"Region_UnionBitmapColour", (PyCFunction) _wrap_Region_UnionBitmapColour, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Region_swigregister", Region_swigregister, METH_VARARGS },
{ (char *)"new_RegionIterator", (PyCFunction) _wrap_new_RegionIterator, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_RegionIterator", (PyCFunction) _wrap_delete_RegionIterator, METH_VARARGS | METH_KEYWORDS },