// appears to me that the other platforms are already doing it, so I'll just
// automatically do it for wxMSW here.
#ifdef __WXMSW__
-#define wxPy_premultiply(p, a) ((p) * (a) / 256)
-#define wxPy_unpremultiply(p, a) ((a) ? ((p) * 256 / (a)) : (p))
+#define wxPy_premultiply(p, a) ((p) * (a) / 0xff)
+#define wxPy_unpremultiply(p, a) ((a) ? ((p) * 0xff / (a)) : (p))
#else
#define wxPy_premultiply(p, a) (p)
#define wxPy_unpremultiply(p, a) (p)
int ecode1 = 0 ;
int val2 ;
int ecode2 = 0 ;
+ Py_ssize_t temp3 ;
+ Py_ssize_t temp5 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
}
arg2 = static_cast< int >(val2);
{
- if (obj2 != Py_None) {
- if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
- }
+ if (PyObject_AsReadBuffer(obj2, (const void**)(&arg3), &temp3) == -1) SWIG_fail;
+ arg4 = (int)temp3;
}
{
if (obj3 != Py_None) {
- if (!PyArg_Parse(obj3, "t#", &arg5, &arg6)) SWIG_fail;
+ if (PyObject_AsReadBuffer(obj3, (const void**)(&arg5), &temp5) == -1) SWIG_fail;
+ arg6 = (int)temp5;
}
}
{
int ecode1 = 0 ;
int val2 ;
int ecode2 = 0 ;
+ Py_ssize_t temp3 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
}
arg2 = static_cast< int >(val2);
{
- if (obj2 != Py_None) {
- if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
- }
+ if (PyObject_AsReadBuffer(obj2, (const void**)(&arg3), &temp3) == -1) SWIG_fail;
+ arg4 = (int)temp3;
}
{
result = (wxBitmap *)_BitmapFromBuffer(arg1,arg2,arg3,arg4);
int ecode1 = 0 ;
int val2 ;
int ecode2 = 0 ;
+ Py_ssize_t temp3 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
}
arg2 = static_cast< int >(val2);
{
- if (obj2 != Py_None) {
- if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
- }
+ if (PyObject_AsReadBuffer(obj2, (const void**)(&arg3), &temp3) == -1) SWIG_fail;
+ arg4 = (int)temp3;
}
{
result = (wxBitmap *)_BitmapFromBufferRGBA(arg1,arg2,arg3,arg4);
wxPyPtrTypeMap_Add("wxFontEnumerator", "wxPyFontEnumerator");
+ SWIG_Python_SetConstant(d, "Layout_Default",SWIG_From_int(static_cast< int >(wxLayout_Default)));
+ SWIG_Python_SetConstant(d, "Layout_LeftToRight",SWIG_From_int(static_cast< int >(wxLayout_LeftToRight)));
+ SWIG_Python_SetConstant(d, "Layout_RightToLeft",SWIG_From_int(static_cast< int >(wxLayout_RightToLeft)));
SWIG_Python_SetConstant(d, "LANGUAGE_DEFAULT",SWIG_From_int(static_cast< int >(wxLANGUAGE_DEFAULT)));
SWIG_Python_SetConstant(d, "LANGUAGE_UNKNOWN",SWIG_From_int(static_cast< int >(wxLANGUAGE_UNKNOWN)));
SWIG_Python_SetConstant(d, "LANGUAGE_ABKHAZIAN",SWIG_From_int(static_cast< int >(wxLANGUAGE_ABKHAZIAN)));