From b1fcee843e89d6f170d08fb7a238d81fb9142974 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 14 Feb 2006 22:13:50 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/activex/activex_wrap.cpp | 1 - wxPython/contrib/animate/gtk/animate_wrap.cpp | 1 - wxPython/contrib/animate/mac/animate_wrap.cpp | 1 - wxPython/contrib/animate/msw/animate_wrap.cpp | 1 - wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp | 1 - wxPython/contrib/gizmos/mac/gizmos_wrap.cpp | 1 - wxPython/contrib/gizmos/msw/gizmos_wrap.cpp | 1 - .../contrib/glcanvas/gtk/glcanvas_wrap.cpp | 1 - .../contrib/glcanvas/mac/glcanvas_wrap.cpp | 1 - .../contrib/glcanvas/msw/glcanvas_wrap.cpp | 1 - wxPython/contrib/stc/gtk/stc_wrap.cpp | 1 - wxPython/contrib/stc/mac/stc_wrap.cpp | 1 - wxPython/contrib/stc/msw/stc_wrap.cpp | 1 - wxPython/src/gtk/_controls.py | 18 + wxPython/src/gtk/_controls_wrap.cpp | 68 +++- wxPython/src/gtk/_core.py | 73 +++- wxPython/src/gtk/_core_wrap.cpp | 211 ++++++++--- wxPython/src/gtk/_gdi.py | 28 ++ wxPython/src/gtk/_gdi_wrap.cpp | 110 +++++- wxPython/src/gtk/_misc_wrap.cpp | 4 +- wxPython/src/gtk/_windows.py | 25 ++ wxPython/src/gtk/_windows_wrap.cpp | 157 +++++++- wxPython/src/gtk/calendar_wrap.cpp | 1 - wxPython/src/gtk/grid_wrap.cpp | 1 - wxPython/src/gtk/html.py | 12 + wxPython/src/gtk/html_wrap.cpp | 133 ++++++- wxPython/src/gtk/media.py | 34 +- wxPython/src/gtk/media_wrap.cpp | 335 ++++++++++++++---- wxPython/src/gtk/webkit_wrap.cpp | 1 - wxPython/src/gtk/wizard_wrap.cpp | 1 - wxPython/src/gtk/xrc_wrap.cpp | 1 - wxPython/src/mac/_controls.py | 18 + wxPython/src/mac/_controls_wrap.cpp | 68 +++- wxPython/src/mac/_core.py | 73 +++- wxPython/src/mac/_core_wrap.cpp | 211 ++++++++--- wxPython/src/mac/_gdi.py | 28 ++ wxPython/src/mac/_gdi_wrap.cpp | 110 +++++- wxPython/src/mac/_misc_wrap.cpp | 4 +- wxPython/src/mac/_windows.py | 25 ++ wxPython/src/mac/_windows_wrap.cpp | 157 +++++++- wxPython/src/mac/calendar_wrap.cpp | 1 - wxPython/src/mac/grid_wrap.cpp | 1 - wxPython/src/mac/html.py | 12 + wxPython/src/mac/html_wrap.cpp | 137 ++++++- wxPython/src/mac/media.py | 34 +- wxPython/src/mac/media_wrap.cpp | 335 ++++++++++++++---- wxPython/src/mac/webkit_wrap.cpp | 1 - wxPython/src/mac/wizard_wrap.cpp | 1 - wxPython/src/mac/xrc_wrap.cpp | 1 - wxPython/src/msw/_controls.py | 18 + wxPython/src/msw/_controls_wrap.cpp | 68 +++- wxPython/src/msw/_core.py | 48 ++- wxPython/src/msw/_core_wrap.cpp | 161 ++++++--- wxPython/src/msw/_gdi.py | 28 ++ wxPython/src/msw/_gdi_wrap.cpp | 110 +++++- wxPython/src/msw/_misc_wrap.cpp | 1 - wxPython/src/msw/_windows.py | 25 ++ wxPython/src/msw/_windows_wrap.cpp | 157 +++++++- wxPython/src/msw/calendar_wrap.cpp | 1 - wxPython/src/msw/grid_wrap.cpp | 1 - wxPython/src/msw/html.py | 12 + wxPython/src/msw/html_wrap.cpp | 133 ++++++- wxPython/src/msw/media.py | 12 +- wxPython/src/msw/media_wrap.cpp | 215 +++++++---- wxPython/src/msw/webkit_wrap.cpp | 1 - wxPython/src/msw/wizard_wrap.cpp | 1 - wxPython/src/msw/xrc_wrap.cpp | 1 - 67 files changed, 2976 insertions(+), 460 deletions(-) diff --git a/wxPython/contrib/activex/activex_wrap.cpp b/wxPython/contrib/activex/activex_wrap.cpp index c9d46b10eb..3ed75acc5d 100644 --- a/wxPython/contrib/activex/activex_wrap.cpp +++ b/wxPython/contrib/activex/activex_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/animate/gtk/animate_wrap.cpp b/wxPython/contrib/animate/gtk/animate_wrap.cpp index 7358311d2b..18f55173ed 100644 --- a/wxPython/contrib/animate/gtk/animate_wrap.cpp +++ b/wxPython/contrib/animate/gtk/animate_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/animate/mac/animate_wrap.cpp b/wxPython/contrib/animate/mac/animate_wrap.cpp index 7358311d2b..18f55173ed 100644 --- a/wxPython/contrib/animate/mac/animate_wrap.cpp +++ b/wxPython/contrib/animate/mac/animate_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/animate/msw/animate_wrap.cpp b/wxPython/contrib/animate/msw/animate_wrap.cpp index e116062291..d0e42a3019 100644 --- a/wxPython/contrib/animate/msw/animate_wrap.cpp +++ b/wxPython/contrib/animate/msw/animate_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp index 597fa49653..bcba9e463d 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp index 9a3ed201fc..080be1af82 100644 --- a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp index 7f4d02313a..99bdcc60a8 100644 --- a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp index 9d0f57d603..18f125ebf7 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/glcanvas/mac/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/mac/glcanvas_wrap.cpp index 7e1face0c2..ed7fec8f30 100644 --- a/wxPython/contrib/glcanvas/mac/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/mac/glcanvas_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp index c2f0cb453b..fa828b955c 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/stc/gtk/stc_wrap.cpp b/wxPython/contrib/stc/gtk/stc_wrap.cpp index 5b48641616..6f6b2535bd 100644 --- a/wxPython/contrib/stc/gtk/stc_wrap.cpp +++ b/wxPython/contrib/stc/gtk/stc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/stc/mac/stc_wrap.cpp b/wxPython/contrib/stc/mac/stc_wrap.cpp index 5b48641616..6f6b2535bd 100644 --- a/wxPython/contrib/stc/mac/stc_wrap.cpp +++ b/wxPython/contrib/stc/mac/stc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/contrib/stc/msw/stc_wrap.cpp b/wxPython/contrib/stc/msw/stc_wrap.cpp index d6a5739844..1344daca71 100644 --- a/wxPython/contrib/stc/msw/stc_wrap.cpp +++ b/wxPython/contrib/stc/msw/stc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index b701cf8b27..1434294357 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -240,6 +240,14 @@ class BitmapButton(Button): """ return _controls_.BitmapButton_GetBitmapSelected(*args, **kwargs) + def GetBitmapHover(*args, **kwargs): + """ + GetBitmapHover(self) -> Bitmap + + Returns the bitmap used when the mouse is over the button, may be invalid. + """ + return _controls_.BitmapButton_GetBitmapHover(*args, **kwargs) + def SetBitmapDisabled(*args, **kwargs): """ SetBitmapDisabled(self, Bitmap bitmap) @@ -273,6 +281,16 @@ class BitmapButton(Button): """ return _controls_.BitmapButton_SetBitmapLabel(*args, **kwargs) + def SetBitmapHover(*args, **kwargs): + """ + SetBitmapHover(self, Bitmap hover) + + Sets the bitmap to be shown when the mouse is over the button. This function + is new since wxWidgets version 2.7.0 and the hover bitmap is currently only + supported in wxMSW. + """ + return _controls_.BitmapButton_SetBitmapHover(*args, **kwargs) + def SetMargins(*args, **kwargs): """SetMargins(self, int x, int y)""" return _controls_.BitmapButton_SetMargins(*args, **kwargs) diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index df858f6875..9ce48ef386 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -3163,6 +3162,36 @@ static PyObject *_wrap_BitmapButton_GetBitmapSelected(PyObject *, PyObject *args } +static PyObject *_wrap_BitmapButton_GetBitmapHover(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; + wxBitmap result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BitmapButton_GetBitmapHover",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetBitmapHover(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxBitmap * resultptr; + resultptr = new wxBitmap(static_cast(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxBitmap, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BitmapButton_SetBitmapDisabled(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; @@ -3303,6 +3332,41 @@ static PyObject *_wrap_BitmapButton_SetBitmapLabel(PyObject *, PyObject *args, P } +static PyObject *_wrap_BitmapButton_SetBitmapHover(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; + wxBitmap *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "hover", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BitmapButton_SetBitmapHover",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + if (arg2 == NULL) { + SWIG_null_ref("wxBitmap"); + } + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBitmapHover((wxBitmap const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BitmapButton_SetMargins(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; @@ -36239,10 +36303,12 @@ static PyMethodDef SwigMethods[] = { { (char *)"BitmapButton_GetBitmapDisabled", (PyCFunction) _wrap_BitmapButton_GetBitmapDisabled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetBitmapFocus", (PyCFunction) _wrap_BitmapButton_GetBitmapFocus, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetBitmapSelected", (PyCFunction) _wrap_BitmapButton_GetBitmapSelected, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"BitmapButton_GetBitmapHover", (PyCFunction) _wrap_BitmapButton_GetBitmapHover, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapDisabled", (PyCFunction) _wrap_BitmapButton_SetBitmapDisabled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapFocus", (PyCFunction) _wrap_BitmapButton_SetBitmapFocus, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapSelected", (PyCFunction) _wrap_BitmapButton_SetBitmapSelected, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapLabel", (PyCFunction) _wrap_BitmapButton_SetBitmapLabel, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"BitmapButton_SetBitmapHover", (PyCFunction) _wrap_BitmapButton_SetBitmapHover, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetMargins", (PyCFunction) _wrap_BitmapButton_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetMarginX", (PyCFunction) _wrap_BitmapButton_GetMarginX, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetMarginY", (PyCFunction) _wrap_BitmapButton_GetMarginY, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 39847bbff4..18d204f336 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -1321,7 +1321,7 @@ class Rect(object): """ Offset(self, Point pt) - Same as OffsetXY but uses dx,dy from Point + Same as `OffsetXY` but uses dx,dy from Point """ return _core_.Rect_Offset(*args, **kwargs) @@ -1397,6 +1397,16 @@ class Rect(object): """ return _core_.Rect_Intersects(*args, **kwargs) + def CenterIn(*args, **kwargs): + """ + CenterIn(self, Rect r, int dir=BOTH) -> Rect + + Center this rectangle within the one passed to the method, which is + usually, but not necessarily, the larger one. + """ + return _core_.Rect_CenterIn(*args, **kwargs) + + CentreIn = CenterIn x = property(_core_.Rect_x_get, _core_.Rect_x_set) y = property(_core_.Rect_y_get, _core_.Rect_y_set) width = property(_core_.Rect_width_get, _core_.Rect_width_set) @@ -5098,6 +5108,21 @@ class KeyEvent(Event): self.this = newobj.this self.thisown = 1 del newobj.thisown + def GetModifiers(*args, **kwargs): + """ + GetModifiers(self) -> int + + Returns a bitmask of the current modifier settings. Can be used to + check if the key event has exactly the given modifiers without having + to explicitly check that the other modifiers are not down. For + example:: + + if event.GetModifers() == wx.MOD_CONTROL: + DoSomething() + + """ + return _core_.KeyEvent_GetModifiers(*args, **kwargs) + def ControlDown(*args, **kwargs): """ ControlDown(self) -> bool @@ -6017,6 +6042,14 @@ class UpdateUIEvent(CommandEvent): """ return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) + def GetShown(*args, **kwargs): + """ + GetShown(self) -> bool + + Returns ``True`` if the UI element should be shown. + """ + return _core_.UpdateUIEvent_GetShown(*args, **kwargs) + def GetText(*args, **kwargs): """ GetText(self) -> String @@ -6052,6 +6085,15 @@ class UpdateUIEvent(CommandEvent): """ return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) + def GetSetShown(*args, **kwargs): + """ + GetSetShown(self) -> bool + + Returns ``True`` if the application has called `Show`. For wxWidgets + internal use only. + """ + return _core_.UpdateUIEvent_GetSetShown(*args, **kwargs) + def Check(*args, **kwargs): """ Check(self, bool check) @@ -6068,6 +6110,14 @@ class UpdateUIEvent(CommandEvent): """ return _core_.UpdateUIEvent_Enable(*args, **kwargs) + def Show(*args, **kwargs): + """ + Show(self, bool show) + + Show or hide the UI element. + """ + return _core_.UpdateUIEvent_Show(*args, **kwargs) + def SetText(*args, **kwargs): """ SetText(self, String text) @@ -8525,15 +8575,6 @@ class Window(EvtHandler): return _core_.Window_Center(*args, **kwargs) Centre = Center - def CenterOnScreen(*args, **kwargs): - """ - CenterOnScreen(self, int dir=BOTH) - - Center on screen (only works for top level windows) - """ - return _core_.Window_CenterOnScreen(*args, **kwargs) - - CentreOnScreen = CenterOnScreen def CenterOnParent(*args, **kwargs): """ CenterOnParent(self, int dir=BOTH) @@ -10034,9 +10075,13 @@ class Window(EvtHandler): SetAutoLayout(self, bool autoLayout) Determines whether the Layout function will be called automatically - when the window is resized. It is called implicitly by SetSizer but - if you use SetConstraints you should call it manually or otherwise the - window layout won't be correctly updated when its size changes. + when the window is resized. lease note that this only happens for the + windows usually used to contain children, namely `wx.Panel` and + `wx.TopLevelWindow` (and the classes deriving from them). + + This method is called implicitly by `SetSizer` but if you use + `SetConstraints` you should call it manually or otherwise the window + layout won't be correctly updated when its size changes. """ return _core_.Window_SetAutoLayout(*args, **kwargs) @@ -12058,7 +12103,7 @@ class Sizer(Object): """ IsShown(self, item) - Determines if the item is currently shown. sizer. To make a sizer + Determines if the item is currently shown. To make a sizer item disappear or reappear, use Show followed by `Layout`. The *item* parameter can be either a window, a sizer, or the zero-based index of the item. diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 37b874b65e..308bce22f2 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -1589,7 +1588,7 @@ static swig_module_info swig_module = {swig_types, 132, 0, 0, 0, 0}; // in the wrapper code. #include - WX_DECLARE_STRING_HASH_MAP( swig_type_info*, wxPyTypeInfoHashMap ); +WX_DECLARE_STRING_HASH_MAP( swig_type_info*, wxPyTypeInfoHashMap ); // Maintains a hashmap of className to swig_type_info pointers. Given the @@ -1668,6 +1667,7 @@ bool wxPyConvertSwigPtr(PyObject* obj, void **ptr, } + // Make a SWIGified pointer object suitable for a .this attribute PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { @@ -1676,7 +1676,6 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { swig_type_info* swigType = wxPyFindSwigType(className); wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyMakeSwigPtr")); -#if SWIG_VERSION < 0x010328 #ifdef SWIG_COBJECT_TYPES robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name); #else @@ -1685,14 +1684,11 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ? PyString_FromString(result) : 0; } -#endif -#else // SWIG_VERSION >= 1.3.28 - robj = PySwigObject_New(ptr, swigType, 0); #endif return robj; } - + // Python's PyInstance_Check does not return True for instances of new-style // classes. This should get close enough for both new and old classes but I // should re-evaluate the need for doing instance checks... @@ -1701,7 +1697,6 @@ bool wxPyInstance_Check(PyObject* obj) { } - // This one checks if the object is an instance of a SWIG proxy class (it has // a .this attribute, and the .this attribute is a PySwigObject.) bool wxPySwigInstance_Check(PyObject* obj) { @@ -1719,7 +1714,6 @@ bool wxPySwigInstance_Check(PyObject* obj) { PyErr_Clear(); return false; } - // Export a C API in a struct. Other modules will be able to load this from @@ -6333,6 +6327,51 @@ static PyObject *_wrap_Rect_Intersects(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Rect_CenterIn(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxRect *arg1 = (wxRect *) 0 ; + wxRect *arg2 = 0 ; + int arg3 = (int) wxBOTH ; + wxRect result; + wxRect temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "r",(char *) "dir", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Rect_CenterIn",kwnames,&obj0,&obj1,&obj2)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxRect, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + if (obj2) { + { + arg3 = static_cast(SWIG_As_int(obj2)); + if (SWIG_arg_fail(3)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->CenterIn((wxRect const &)*arg2,arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxRect * resultptr; + resultptr = new wxRect(static_cast(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Rect_x_set(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxRect *arg1 = (wxRect *) 0 ; @@ -19123,6 +19162,34 @@ static PyObject *_wrap_new_KeyEvent(PyObject *, PyObject *args, PyObject *kwargs } +static PyObject *_wrap_KeyEvent_GetModifiers(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxKeyEvent *arg1 = (wxKeyEvent *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:KeyEvent_GetModifiers",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxKeyEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxKeyEvent const *)arg1)->GetModifiers(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_KeyEvent_ControlDown(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxKeyEvent *arg1 = (wxKeyEvent *) 0 ; @@ -21643,6 +21710,34 @@ static PyObject *_wrap_UpdateUIEvent_GetEnabled(PyObject *, PyObject *args, PyOb } +static PyObject *_wrap_UpdateUIEvent_GetShown(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:UpdateUIEvent_GetShown",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxUpdateUIEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxUpdateUIEvent const *)arg1)->GetShown(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_UpdateUIEvent_GetText(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; @@ -21759,6 +21854,34 @@ static PyObject *_wrap_UpdateUIEvent_GetSetEnabled(PyObject *, PyObject *args, P } +static PyObject *_wrap_UpdateUIEvent_GetSetShown(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:UpdateUIEvent_GetSetShown",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxUpdateUIEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxUpdateUIEvent const *)arg1)->GetSetShown(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_UpdateUIEvent_Check(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; @@ -21821,6 +21944,37 @@ static PyObject *_wrap_UpdateUIEvent_Enable(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_UpdateUIEvent_Show(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "show", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:UpdateUIEvent_Show",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxUpdateUIEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_bool(obj1)); + if (SWIG_arg_fail(2)) 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_UpdateUIEvent_SetText(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; @@ -27418,39 +27572,6 @@ static PyObject *_wrap_Window_Center(PyObject *, PyObject *args, PyObject *kwarg } -static PyObject *_wrap_Window_CenterOnScreen(PyObject *, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = NULL; - wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 = (int) wxBOTH ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "dir", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_CenterOnScreen",kwnames,&obj0,&obj1)) goto fail; - SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0); - if (SWIG_arg_fail(1)) SWIG_fail; - if (obj1) { - { - arg2 = static_cast(SWIG_As_int(obj1)); - if (SWIG_arg_fail(2)) SWIG_fail; - } - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->CenterOnScreen(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Window_CenterOnParent(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxWindow *arg1 = (wxWindow *) 0 ; @@ -46398,6 +46519,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_InsideXY", (PyCFunction) _wrap_Rect_InsideXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_Inside", (PyCFunction) _wrap_Rect_Inside, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_Intersects", (PyCFunction) _wrap_Rect_Intersects, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_CenterIn", (PyCFunction) _wrap_Rect_CenterIn, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_x_set", (PyCFunction) _wrap_Rect_x_set, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_x_get", (PyCFunction) _wrap_Rect_x_get, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_y_set", (PyCFunction) _wrap_Rect_y_set, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -46793,6 +46915,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SetCursorEvent_HasCursor", (PyCFunction) _wrap_SetCursorEvent_HasCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SetCursorEvent_swigregister", SetCursorEvent_swigregister, METH_VARARGS, NULL}, { (char *)"new_KeyEvent", (PyCFunction) _wrap_new_KeyEvent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"KeyEvent_GetModifiers", (PyCFunction) _wrap_KeyEvent_GetModifiers, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_ControlDown", (PyCFunction) _wrap_KeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_MetaDown", (PyCFunction) _wrap_KeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_AltDown", (PyCFunction) _wrap_KeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -46892,12 +47015,15 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_UpdateUIEvent", (PyCFunction) _wrap_new_UpdateUIEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetChecked", (PyCFunction) _wrap_UpdateUIEvent_GetChecked, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetEnabled", (PyCFunction) _wrap_UpdateUIEvent_GetEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"UpdateUIEvent_GetShown", (PyCFunction) _wrap_UpdateUIEvent_GetShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetText", (PyCFunction) _wrap_UpdateUIEvent_GetText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetSetText", (PyCFunction) _wrap_UpdateUIEvent_GetSetText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetSetChecked", (PyCFunction) _wrap_UpdateUIEvent_GetSetChecked, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetSetEnabled", (PyCFunction) _wrap_UpdateUIEvent_GetSetEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"UpdateUIEvent_GetSetShown", (PyCFunction) _wrap_UpdateUIEvent_GetSetShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_Check", (PyCFunction) _wrap_UpdateUIEvent_Check, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_Enable", (PyCFunction) _wrap_UpdateUIEvent_Enable, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"UpdateUIEvent_Show", (PyCFunction) _wrap_UpdateUIEvent_Show, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_SetText", (PyCFunction) _wrap_UpdateUIEvent_SetText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_SetUpdateInterval", (PyCFunction) _wrap_UpdateUIEvent_SetUpdateInterval, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetUpdateInterval", (PyCFunction) _wrap_UpdateUIEvent_GetUpdateInterval, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -47098,7 +47224,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_GetBestFittingSize", (PyCFunction) _wrap_Window_GetBestFittingSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetAdjustedBestSize", (PyCFunction) _wrap_Window_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Center", (PyCFunction) _wrap_Window_Center, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Window_CenterOnScreen", (PyCFunction) _wrap_Window_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_CenterOnParent", (PyCFunction) _wrap_Window_CenterOnParent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Fit", (PyCFunction) _wrap_Window_Fit, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_FitInside", (PyCFunction) _wrap_Window_FitInside, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index 9ede0f4800..b9e070be7c 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -2729,6 +2729,34 @@ class DC(_core.Object): """ return _gdi_.DC_FloodFillPoint(*args, **kwargs) + def GradientFillConcentric(*args, **kwargs): + """ + GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour, + Point circleCenter) + + Fill the area specified by rect with a radial gradient, starting from + initialColour in the center of the circle and fading to destColour on + the outside of the circle. The circleCenter argument is the relative + coordinants of the center of the circle in the specified rect. + + Note: Currently this function is very slow, don't use it for real-time + drawing. + """ + return _gdi_.DC_GradientFillConcentric(*args, **kwargs) + + def GradientFillLinear(*args, **kwargs): + """ + GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour, + int nDirection=EAST) + + Fill the area specified by rect with a linear gradient, starting from + initialColour and eventually fading to destColour. The nDirection + parameter specifies the direction of the colour change, default is to + use initialColour on the left part of the rectangle and destColour on + the right side. + """ + return _gdi_.DC_GradientFillLinear(*args, **kwargs) + def GetPixel(*args, **kwargs): """ GetPixel(self, int x, int y) -> Colour diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index c8bd331716..8c8a718873 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -12585,6 +12584,113 @@ static PyObject *_wrap_DC_FloodFillPoint(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_DC_GradientFillConcentric(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDC *arg1 = (wxDC *) 0 ; + wxRect *arg2 = 0 ; + wxColour *arg3 = 0 ; + wxColour *arg4 = 0 ; + wxPoint *arg5 = 0 ; + wxRect temp2 ; + wxColour temp3 ; + wxColour temp4 ; + wxPoint temp5 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect",(char *) "initialColour",(char *) "destColour",(char *) "circleCenter", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:DC_GradientFillConcentric",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; + } + { + arg4 = &temp4; + if ( ! wxColour_helper(obj3, &arg4)) SWIG_fail; + } + { + arg5 = &temp5; + if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->GradientFillConcentric((wxRect const &)*arg2,(wxColour const &)*arg3,(wxColour const &)*arg4,(wxPoint const &)*arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_DC_GradientFillLinear(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDC *arg1 = (wxDC *) 0 ; + wxRect *arg2 = 0 ; + wxColour *arg3 = 0 ; + wxColour *arg4 = 0 ; + wxDirection arg5 = (wxDirection) wxEAST ; + wxRect temp2 ; + wxColour temp3 ; + wxColour temp4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect",(char *) "initialColour",(char *) "destColour",(char *) "nDirection", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:DC_GradientFillLinear",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; + } + { + arg4 = &temp4; + if ( ! wxColour_helper(obj3, &arg4)) SWIG_fail; + } + if (obj4) { + { + arg5 = static_cast(SWIG_As_int(obj4)); + if (SWIG_arg_fail(5)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->GradientFillLinear((wxRect const &)*arg2,(wxColour const &)*arg3,(wxColour const &)*arg4,arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_DC_GetPixel(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxDC *arg1 = (wxDC *) 0 ; @@ -21800,6 +21906,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_DC", (PyCFunction) _wrap_delete_DC, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_FloodFill", (PyCFunction) _wrap_DC_FloodFill, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_FloodFillPoint", (PyCFunction) _wrap_DC_FloodFillPoint, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_GradientFillConcentric", (PyCFunction) _wrap_DC_GradientFillConcentric, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_GradientFillLinear", (PyCFunction) _wrap_DC_GradientFillLinear, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetPixel", (PyCFunction) _wrap_DC_GetPixel, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetPixelPoint", (PyCFunction) _wrap_DC_GetPixelPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_DrawLine", (PyCFunction) _wrap_DC_DrawLine, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index 87e0346b4c..16de56c74f 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -3139,7 +3138,6 @@ public: }; #endif -static int wxDisplay_GetFromWindow(wxWindow *window){ wxPyRaiseNotImplemented(); return wxNOT_FOUND; } static PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode=wxDefaultVideoMode){ PyObject* pyList = NULL; wxArrayVideoModes arr = self->GetModes(mode); @@ -32215,7 +32213,7 @@ static PyObject *_wrap_Display_GetFromWindow(PyObject *, PyObject *args, PyObjec if (SWIG_arg_fail(1)) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxDisplay_GetFromWindow(arg1); + result = (int)wxDisplay::GetFromWindow(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index c730a91735..ff1aad2f6a 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -440,6 +440,15 @@ class TopLevelWindow(_core.Window): """MacGetMetalAppearance(self) -> bool""" return _windows_.TopLevelWindow_MacGetMetalAppearance(*args, **kwargs) + def CenterOnScreen(*args, **kwargs): + """ + CenterOnScreen(self, int dir=BOTH) + + Center the window on screen + """ + return _windows_.TopLevelWindow_CenterOnScreen(*args, **kwargs) + + CentreOnScreen = CenterOnScreen class TopLevelWindowPtr(TopLevelWindow): def __init__(self, this): @@ -649,6 +658,22 @@ class Dialog(TopLevelWindow): """GetReturnCode(self) -> int""" return _windows_.Dialog_GetReturnCode(*args, **kwargs) + def SetAffirmativeId(*args, **kwargs): + """SetAffirmativeId(self, int affirmativeId)""" + return _windows_.Dialog_SetAffirmativeId(*args, **kwargs) + + def GetAffirmativeId(*args, **kwargs): + """GetAffirmativeId(self) -> int""" + return _windows_.Dialog_GetAffirmativeId(*args, **kwargs) + + def SetEscapeId(*args, **kwargs): + """SetEscapeId(self, int escapeId)""" + return _windows_.Dialog_SetEscapeId(*args, **kwargs) + + def GetEscapeId(*args, **kwargs): + """GetEscapeId(self) -> int""" + return _windows_.Dialog_GetEscapeId(*args, **kwargs) + def CreateTextSizer(*args, **kwargs): """CreateTextSizer(self, String message) -> Sizer""" return _windows_.Dialog_CreateTextSizer(*args, **kwargs) diff --git a/wxPython/src/gtk/_windows_wrap.cpp b/wxPython/src/gtk/_windows_wrap.cpp index d9388af5ca..7ac13c51cd 100644 --- a/wxPython/src/gtk/_windows_wrap.cpp +++ b/wxPython/src/gtk/_windows_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -4767,6 +4766,39 @@ static PyObject *_wrap_TopLevelWindow_MacGetMetalAppearance(PyObject *, PyObject } +static PyObject *_wrap_TopLevelWindow_CenterOnScreen(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ; + int arg2 = (int) wxBOTH ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "dir", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_CenterOnScreen",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxTopLevelWindow, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + if (obj1) { + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CenterOnScreen(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * TopLevelWindow_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -6036,6 +6068,124 @@ static PyObject *_wrap_Dialog_GetReturnCode(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_Dialog_SetAffirmativeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "affirmativeId", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetAffirmativeId",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetAffirmativeId(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_GetAffirmativeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Dialog_GetAffirmativeId",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxDialog const *)arg1)->GetAffirmativeId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_SetEscapeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "escapeId", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetEscapeId",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetEscapeId(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_GetEscapeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Dialog_GetEscapeId",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxDialog const *)arg1)->GetEscapeId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Dialog_CreateTextSizer(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxDialog *arg1 = (wxDialog *) 0 ; @@ -27526,6 +27676,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TopLevelWindow_IsActive", (PyCFunction) _wrap_TopLevelWindow_IsActive, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_MacSetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacSetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_MacGetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacGetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TopLevelWindow_CenterOnScreen", (PyCFunction) _wrap_TopLevelWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_swigregister", TopLevelWindow_swigregister, METH_VARARGS, NULL}, { (char *)"new_Frame", (PyCFunction) _wrap_new_Frame, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_PreFrame", (PyCFunction) _wrap_new_PreFrame, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -27556,6 +27707,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Dialog_Create", (PyCFunction) _wrap_Dialog_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_SetReturnCode", (PyCFunction) _wrap_Dialog_SetReturnCode, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_GetReturnCode", (PyCFunction) _wrap_Dialog_GetReturnCode, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_SetAffirmativeId", (PyCFunction) _wrap_Dialog_SetAffirmativeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_GetAffirmativeId", (PyCFunction) _wrap_Dialog_GetAffirmativeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_SetEscapeId", (PyCFunction) _wrap_Dialog_SetEscapeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_GetEscapeId", (PyCFunction) _wrap_Dialog_GetEscapeId, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateTextSizer", (PyCFunction) _wrap_Dialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateButtonSizer", (PyCFunction) _wrap_Dialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateStdDialogButtonSizer", (PyCFunction) _wrap_Dialog_CreateStdDialogButtonSizer, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/calendar_wrap.cpp b/wxPython/src/gtk/calendar_wrap.cpp index dd618991fb..cf814be14a 100644 --- a/wxPython/src/gtk/calendar_wrap.cpp +++ b/wxPython/src/gtk/calendar_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index b18e257b49..6ceee32fb7 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index c1b7e69433..a09f041017 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -831,6 +831,18 @@ class HtmlWordCell(HtmlCell): self.this = newobj.this self.thisown = 1 del newobj.thisown + def ConvertToText(*args, **kwargs): + """ConvertToText(self, HtmlSelection sel) -> String""" + return _html.HtmlWordCell_ConvertToText(*args, **kwargs) + + def IsLinebreakAllowed(*args, **kwargs): + """IsLinebreakAllowed(self) -> bool""" + return _html.HtmlWordCell_IsLinebreakAllowed(*args, **kwargs) + + def SetPreviousWord(*args, **kwargs): + """SetPreviousWord(self, HtmlWordCell cell)""" + return _html.HtmlWordCell_SetPreviousWord(*args, **kwargs) + class HtmlWordCellPtr(HtmlWordCell): def __init__(self, this): diff --git a/wxPython/src/gtk/html_wrap.cpp b/wxPython/src/gtk/html_wrap.cpp index cd994bbb9c..d92783576d 100644 --- a/wxPython/src/gtk/html_wrap.cpp +++ b/wxPython/src/gtk/html_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -4705,7 +4704,9 @@ static PyObject *_wrap_HtmlSelection_GetFromCell(PyObject *, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -4731,7 +4732,9 @@ static PyObject *_wrap_HtmlSelection_GetToCell(PyObject *, PyObject *args, PyObj wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -5896,7 +5899,9 @@ static PyObject *_wrap_HtmlCell_GetNext(PyObject *, PyObject *args, PyObject *kw wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -5948,7 +5953,9 @@ static PyObject *_wrap_HtmlCell_GetFirstChild(PyObject *, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6332,7 +6339,9 @@ static PyObject *_wrap_HtmlCell_Find(PyObject *, PyObject *args, PyObject *kwarg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6507,7 +6516,9 @@ static PyObject *_wrap_HtmlCell_FindCellByPos(PyObject *, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6563,7 +6574,9 @@ static PyObject *_wrap_HtmlCell_GetFirstTerminal(PyObject *, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6589,7 +6602,9 @@ static PyObject *_wrap_HtmlCell_GetLastTerminal(PyObject *, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6747,6 +6762,99 @@ static PyObject *_wrap_new_HtmlWordCell(PyObject *, PyObject *args, PyObject *kw } +static PyObject *_wrap_HtmlWordCell_ConvertToText(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + wxHtmlSelection *arg2 = (wxHtmlSelection *) 0 ; + wxString result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "sel", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlWordCell_ConvertToText",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxHtmlSelection, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxHtmlWordCell const *)arg1)->ConvertToText(arg2); + + 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_HtmlWordCell_IsLinebreakAllowed(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:HtmlWordCell_IsLinebreakAllowed",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxHtmlWordCell const *)arg1)->IsLinebreakAllowed(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_HtmlWordCell_SetPreviousWord(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + wxHtmlWordCell *arg2 = (wxHtmlWordCell *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "cell", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlWordCell_SetPreviousWord",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetPreviousWord(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * HtmlWordCell_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -7306,7 +7414,9 @@ static PyObject *_wrap_HtmlContainerCell_GetFirstChild(PyObject *, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -14687,6 +14797,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlCell_ConvertToText", (PyCFunction) _wrap_HtmlCell_ConvertToText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlCell_swigregister", HtmlCell_swigregister, METH_VARARGS, NULL}, { (char *)"new_HtmlWordCell", (PyCFunction) _wrap_new_HtmlWordCell, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_ConvertToText", (PyCFunction) _wrap_HtmlWordCell_ConvertToText, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_IsLinebreakAllowed", (PyCFunction) _wrap_HtmlWordCell_IsLinebreakAllowed, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_SetPreviousWord", (PyCFunction) _wrap_HtmlWordCell_SetPreviousWord, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlWordCell_swigregister", HtmlWordCell_swigregister, METH_VARARGS, NULL}, { (char *)"new_HtmlContainerCell", (PyCFunction) _wrap_new_HtmlContainerCell, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlContainerCell_InsertCell", (PyCFunction) _wrap_HtmlContainerCell_InsertCell, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/media.py b/wxPython/src/gtk/media.py index 70f4e57160..6c38e24e01 100644 --- a/wxPython/src/gtk/media.py +++ b/wxPython/src/gtk/media.py @@ -54,6 +54,10 @@ __docfilter__ = wx.__DocFilter(globals()) MEDIASTATE_STOPPED = _media.MEDIASTATE_STOPPED MEDIASTATE_PAUSED = _media.MEDIASTATE_PAUSED MEDIASTATE_PLAYING = _media.MEDIASTATE_PLAYING +MEDIACTRLPLAYERCONTROLS_NONE = _media.MEDIACTRLPLAYERCONTROLS_NONE +MEDIACTRLPLAYERCONTROLS_STEP = _media.MEDIACTRLPLAYERCONTROLS_STEP +MEDIACTRLPLAYERCONTROLS_VOLUME = _media.MEDIACTRLPLAYERCONTROLS_VOLUME +MEDIACTRLPLAYERCONTROLS_DEFAULT = _media.MEDIACTRLPLAYERCONTROLS_DEFAULT class MediaEvent(_core.NotifyEvent): """Proxy of C++ MediaEvent class""" def __repr__(self): @@ -71,6 +75,13 @@ class MediaEventPtr(MediaEvent): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MediaEvent _media.MediaEvent_swigregister(MediaEventPtr) +cvar = _media.cvar +MEDIABACKEND_DIRECTSHOW = cvar.MEDIABACKEND_DIRECTSHOW +MEDIABACKEND_MCI = cvar.MEDIABACKEND_MCI +MEDIABACKEND_QUICKTIME = cvar.MEDIABACKEND_QUICKTIME +MEDIABACKEND_GSTREAMER = cvar.MEDIABACKEND_GSTREAMER +MEDIABACKEND_REALPLAYER = cvar.MEDIABACKEND_REALPLAYER +MEDIABACKEND_WMP10 = cvar.MEDIABACKEND_WMP10 class MediaCtrl(_core.Control): """Proxy of C++ MediaCtrl class""" @@ -145,7 +156,7 @@ class MediaCtrl(_core.Control): return _media.MediaCtrl_SetVolume(*args, **kwargs) def ShowPlayerControls(*args, **kwargs): - """ShowPlayerControls(self, wxMediaCtrlPlayerControls flags=wxMEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" + """ShowPlayerControls(self, int flags=MEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" return _media.MediaCtrl_ShowPlayerControls(*args, **kwargs) def Load(*args, **kwargs): @@ -161,6 +172,14 @@ class MediaCtrl(_core.Control): return _media.MediaCtrl_LoadURIWithProxy(*args, **kwargs) LoadFromURI = LoadURI + def GetDownloadProgress(*args, **kwargs): + """GetDownloadProgress(self) -> wxFileOffset""" + return _media.MediaCtrl_GetDownloadProgress(*args, **kwargs) + + def GetDownloadTotal(*args, **kwargs): + """GetDownloadTotal(self) -> wxFileOffset""" + return _media.MediaCtrl_GetDownloadTotal(*args, **kwargs) + class MediaCtrlPtr(MediaCtrl): def __init__(self, this): @@ -168,7 +187,6 @@ class MediaCtrlPtr(MediaCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MediaCtrl _media.MediaCtrl_swigregister(MediaCtrlPtr) -cvar = _media.cvar MediaCtrlNameStr = cvar.MediaCtrlNameStr def PreMediaCtrl(*args, **kwargs): @@ -180,9 +198,15 @@ def PreMediaCtrl(*args, **kwargs): wxEVT_MEDIA_FINISHED = _media.wxEVT_MEDIA_FINISHED wxEVT_MEDIA_STOP = _media.wxEVT_MEDIA_STOP wxEVT_MEDIA_LOADED = _media.wxEVT_MEDIA_LOADED -EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) -EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) -EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) +wxEVT_MEDIA_STATECHANGED = _media.wxEVT_MEDIA_STATECHANGED +wxEVT_MEDIA_PLAY = _media.wxEVT_MEDIA_PLAY +wxEVT_MEDIA_PAUSE = _media.wxEVT_MEDIA_PAUSE +EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) +EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) +EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) +EVT_MEDIA_STATECHANGED = wx.PyEventBinder( wxEVT_MEDIA_STATECHANGED, 1) +EVT_MEDIA_PLAY = wx.PyEventBinder( wxEVT_MEDIA_PLAY, 1) +EVT_MEDIA_PAUSE = wx.PyEventBinder( wxEVT_MEDIA_PAUSE, 1) diff --git a/wxPython/src/gtk/media_wrap.cpp b/wxPython/src/gtk/media_wrap.cpp index 8c59fb530e..8cf2c62a87 100644 --- a/wxPython/src/gtk/media_wrap.cpp +++ b/wxPython/src/gtk/media_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -1478,54 +1477,53 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { #define SWIGTYPE_p_wxLayoutConstraints swig_types[43] #define SWIGTYPE_p_wxMaximizeEvent swig_types[44] #define SWIGTYPE_p_wxMediaCtrl swig_types[45] -#define SWIGTYPE_p_wxMediaCtrlPlayerControls swig_types[46] -#define SWIGTYPE_p_wxMediaEvent swig_types[47] -#define SWIGTYPE_p_wxMenu swig_types[48] -#define SWIGTYPE_p_wxMenuBar swig_types[49] -#define SWIGTYPE_p_wxMenuEvent swig_types[50] -#define SWIGTYPE_p_wxMenuItem swig_types[51] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[52] -#define SWIGTYPE_p_wxMouseEvent swig_types[53] -#define SWIGTYPE_p_wxMoveEvent swig_types[54] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[55] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[56] -#define SWIGTYPE_p_wxNotifyEvent swig_types[57] -#define SWIGTYPE_p_wxObject swig_types[58] -#define SWIGTYPE_p_wxPCXHandler swig_types[59] -#define SWIGTYPE_p_wxPNGHandler swig_types[60] -#define SWIGTYPE_p_wxPNMHandler swig_types[61] -#define SWIGTYPE_p_wxPaintEvent swig_types[62] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[63] -#define SWIGTYPE_p_wxPaperSize swig_types[64] -#define SWIGTYPE_p_wxPyApp swig_types[65] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[66] -#define SWIGTYPE_p_wxPyEvent swig_types[67] -#define SWIGTYPE_p_wxPyImageHandler swig_types[68] -#define SWIGTYPE_p_wxPySizer swig_types[69] -#define SWIGTYPE_p_wxPyValidator swig_types[70] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[71] -#define SWIGTYPE_p_wxScrollEvent swig_types[72] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[73] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[74] -#define SWIGTYPE_p_wxShowEvent swig_types[75] -#define SWIGTYPE_p_wxSizeEvent swig_types[76] -#define SWIGTYPE_p_wxSizer swig_types[77] -#define SWIGTYPE_p_wxSizerItem swig_types[78] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[79] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[80] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[81] -#define SWIGTYPE_p_wxTIFFHandler swig_types[82] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[83] -#define SWIGTYPE_p_wxValidator swig_types[84] -#define SWIGTYPE_p_wxWindow swig_types[85] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[86] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[87] -#define SWIGTYPE_p_wxXPMHandler swig_types[88] -#define SWIGTYPE_ptrdiff_t swig_types[89] -#define SWIGTYPE_std__ptrdiff_t swig_types[90] -#define SWIGTYPE_unsigned_int swig_types[91] -static swig_type_info *swig_types[93]; -static swig_module_info swig_module = {swig_types, 92, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxMediaEvent swig_types[46] +#define SWIGTYPE_p_wxMenu swig_types[47] +#define SWIGTYPE_p_wxMenuBar swig_types[48] +#define SWIGTYPE_p_wxMenuEvent swig_types[49] +#define SWIGTYPE_p_wxMenuItem swig_types[50] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[51] +#define SWIGTYPE_p_wxMouseEvent swig_types[52] +#define SWIGTYPE_p_wxMoveEvent swig_types[53] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[54] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[55] +#define SWIGTYPE_p_wxNotifyEvent swig_types[56] +#define SWIGTYPE_p_wxObject swig_types[57] +#define SWIGTYPE_p_wxPCXHandler swig_types[58] +#define SWIGTYPE_p_wxPNGHandler swig_types[59] +#define SWIGTYPE_p_wxPNMHandler swig_types[60] +#define SWIGTYPE_p_wxPaintEvent swig_types[61] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[62] +#define SWIGTYPE_p_wxPaperSize swig_types[63] +#define SWIGTYPE_p_wxPyApp swig_types[64] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[65] +#define SWIGTYPE_p_wxPyEvent swig_types[66] +#define SWIGTYPE_p_wxPyImageHandler swig_types[67] +#define SWIGTYPE_p_wxPySizer swig_types[68] +#define SWIGTYPE_p_wxPyValidator swig_types[69] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[70] +#define SWIGTYPE_p_wxScrollEvent swig_types[71] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[72] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[73] +#define SWIGTYPE_p_wxShowEvent swig_types[74] +#define SWIGTYPE_p_wxSizeEvent swig_types[75] +#define SWIGTYPE_p_wxSizer swig_types[76] +#define SWIGTYPE_p_wxSizerItem swig_types[77] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[78] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[79] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[80] +#define SWIGTYPE_p_wxTIFFHandler swig_types[81] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[82] +#define SWIGTYPE_p_wxValidator swig_types[83] +#define SWIGTYPE_p_wxWindow swig_types[84] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[85] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[86] +#define SWIGTYPE_p_wxXPMHandler swig_types[87] +#define SWIGTYPE_ptrdiff_t swig_types[88] +#define SWIGTYPE_std__ptrdiff_t swig_types[89] +#define SWIGTYPE_unsigned_int swig_types[90] +static swig_type_info *swig_types[92]; +static swig_module_info swig_module = {swig_types, 91, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1562,7 +1560,14 @@ enum wxMediaCtrlPlayerControls wxMEDIACTRLPLAYERCONTROLS_DEFAULT }; - +static wxString wxMEDIABACKEND_DIRECTSHOW(wxEmptyString); +static wxString wxMEDIABACKEND_MCI (wxEmptyString); +static wxString wxMEDIABACKEND_QUICKTIME (wxEmptyString); +static wxString wxMEDIABACKEND_GSTREAMER (wxEmptyString); +static wxString wxMEDIABACKEND_REALPLAYER(wxEmptyString); +static wxString wxMEDIABACKEND_WMP10 (wxEmptyString); + + class wxMediaEvent : public wxNotifyEvent { public: @@ -1617,11 +1622,18 @@ public: bool Load(const wxString& fileName) { return false; } bool LoadURI(const wxString& fileName) { return false; } bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy) { return false; } + + wxFileOffset GetDownloadProgress() { return 0; } + wxFileOffset GetDownloadTotal() { return 0; } + }; const wxEventType wxEVT_MEDIA_FINISHED = 0; const wxEventType wxEVT_MEDIA_STOP = 0; const wxEventType wxEVT_MEDIA_LOADED = 0; +const wxEventType wxEVT_MEDIA_STATECHANGED = 0; +const wxEventType wxEVT_MEDIA_PLAY = 0; +const wxEventType wxEVT_MEDIA_PAUSE = 0; #endif @@ -1630,6 +1642,12 @@ const wxEventType wxEVT_MEDIA_LOADED = 0; #define SWIG_From_int PyInt_FromLong /*@@*/ + static const wxString wxPyMEDIABACKEND_DIRECTSHOW(wxMEDIABACKEND_DIRECTSHOW); + static const wxString wxPyMEDIABACKEND_MCI(wxMEDIABACKEND_MCI); + static const wxString wxPyMEDIABACKEND_QUICKTIME(wxMEDIABACKEND_QUICKTIME); + static const wxString wxPyMEDIABACKEND_GSTREAMER(wxMEDIABACKEND_GSTREAMER); + static const wxString wxPyMEDIABACKEND_REALPLAYER(wxMEDIABACKEND_REALPLAYER); + static const wxString wxPyMEDIABACKEND_WMP10(wxMEDIABACKEND_WMP10); #include @@ -1787,6 +1805,126 @@ SWIG_Check_double(PyObject* obj) #ifdef __cplusplus extern "C" { #endif +static int _wrap_MEDIABACKEND_DIRECTSHOW_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_DIRECTSHOW is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_DIRECTSHOW_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_DIRECTSHOW)->c_str(), (&wxPyMEDIABACKEND_DIRECTSHOW)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_DIRECTSHOW)->c_str(), (&wxPyMEDIABACKEND_DIRECTSHOW)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_MCI_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_MCI is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_MCI_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_MCI)->c_str(), (&wxPyMEDIABACKEND_MCI)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_MCI)->c_str(), (&wxPyMEDIABACKEND_MCI)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_QUICKTIME_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_QUICKTIME is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_QUICKTIME_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_QUICKTIME)->c_str(), (&wxPyMEDIABACKEND_QUICKTIME)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_QUICKTIME)->c_str(), (&wxPyMEDIABACKEND_QUICKTIME)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_GSTREAMER_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_GSTREAMER is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_GSTREAMER_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_GSTREAMER)->c_str(), (&wxPyMEDIABACKEND_GSTREAMER)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_GSTREAMER)->c_str(), (&wxPyMEDIABACKEND_GSTREAMER)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_REALPLAYER_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_REALPLAYER is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_REALPLAYER_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_REALPLAYER)->c_str(), (&wxPyMEDIABACKEND_REALPLAYER)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_REALPLAYER)->c_str(), (&wxPyMEDIABACKEND_REALPLAYER)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_WMP10_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_WMP10 is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_WMP10_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_WMP10)->c_str(), (&wxPyMEDIABACKEND_WMP10)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_WMP10)->c_str(), (&wxPyMEDIABACKEND_WMP10)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_MediaEvent(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxEventType arg1 = (wxEventType) wxEVT_NULL ; @@ -2505,14 +2643,8 @@ static PyObject *_wrap_MediaCtrl_ShowPlayerControls(PyObject *, PyObject *args, if (SWIG_arg_fail(1)) SWIG_fail; if (obj1) { { - wxMediaCtrlPlayerControls * argp; - SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_wxMediaCtrlPlayerControls, SWIG_POINTER_EXCEPTION); - if (SWIG_arg_fail(2)) SWIG_fail; - if (argp == NULL) { - SWIG_null_ref("wxMediaCtrlPlayerControls"); - } + arg2 = static_cast(SWIG_As_int(obj1)); if (SWIG_arg_fail(2)) SWIG_fail; - arg2 = *argp; } } { @@ -2679,6 +2811,68 @@ static PyObject *_wrap_MediaCtrl_LoadURIWithProxy(PyObject *, PyObject *args, Py } +static PyObject *_wrap_MediaCtrl_GetDownloadProgress(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxMediaCtrl *arg1 = (wxMediaCtrl *) 0 ; + wxFileOffset result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MediaCtrl_GetDownloadProgress",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxMediaCtrl, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetDownloadProgress(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + if (sizeof(wxFileOffset) > sizeof(long)) + resultobj = PyLong_FromLongLong(result); + else + resultobj = PyInt_FromLong(result); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_MediaCtrl_GetDownloadTotal(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxMediaCtrl *arg1 = (wxMediaCtrl *) 0 ; + wxFileOffset result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MediaCtrl_GetDownloadTotal",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxMediaCtrl, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetDownloadTotal(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + if (sizeof(wxFileOffset) > sizeof(long)) + resultobj = PyLong_FromLongLong(result); + else + resultobj = PyInt_FromLong(result); + } + return resultobj; + fail: + return NULL; +} + + static PyObject * MediaCtrl_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -2707,6 +2901,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"MediaCtrl_Load", (PyCFunction) _wrap_MediaCtrl_Load, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MediaCtrl_LoadURI", (PyCFunction) _wrap_MediaCtrl_LoadURI, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MediaCtrl_LoadURIWithProxy", (PyCFunction) _wrap_MediaCtrl_LoadURIWithProxy, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"MediaCtrl_GetDownloadProgress", (PyCFunction) _wrap_MediaCtrl_GetDownloadProgress, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"MediaCtrl_GetDownloadTotal", (PyCFunction) _wrap_MediaCtrl_GetDownloadTotal, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MediaCtrl_swigregister", MediaCtrl_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; @@ -3192,7 +3388,6 @@ static swig_type_info _swigt__p_wxPyValidator = {"_p_wxPyValidator", 0, 0, 0, 0} static swig_type_info _swigt__p_wxMenu = {"_p_wxMenu", 0, 0, 0, 0}; static swig_type_info _swigt__p_wxFileOffset = {"_p_wxFileOffset", "wxFileOffset *", 0, 0, 0}; static swig_type_info _swigt__p_wxMediaCtrl = {"_p_wxMediaCtrl", "wxMediaCtrl *", 0, 0, 0}; -static swig_type_info _swigt__p_wxMediaCtrlPlayerControls = {"_p_wxMediaCtrlPlayerControls", "wxMediaCtrlPlayerControls *", 0, 0, 0}; static swig_type_info _swigt__p_wxMediaEvent = {"_p_wxMediaEvent", "wxMediaEvent *", 0, 0, 0}; static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", "wxNotifyEvent *", 0, 0, 0}; static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, 0}; @@ -3280,7 +3475,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxLayoutConstraints, &_swigt__p_wxMaximizeEvent, &_swigt__p_wxMediaCtrl, - &_swigt__p_wxMediaCtrlPlayerControls, &_swigt__p_wxMediaEvent, &_swigt__p_wxMenu, &_swigt__p_wxMenuBar, @@ -3380,7 +3574,6 @@ static swig_cast_info _swigc__p_wxMenu[] = {{&_swigt__p_wxMenu, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_wxEvtHandler[] = { {&_swigt__p_wxControl, _p_wxControlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxControlWithItems, _p_wxControlWithItemsTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxWindow, _p_wxWindowTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxEvtHandler, 0, 0, 0}, {&_swigt__p_wxMediaCtrl, _p_wxMediaCtrlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyApp, _p_wxPyAppTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenuBar, _p_wxMenuBarTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxValidator, _p_wxValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyValidator, _p_wxPyValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenu, _p_wxMenuTo_p_wxEvtHandler, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxFileOffset[] = { {&_swigt__p_wxFileOffset, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxMediaCtrl[] = { {&_swigt__p_wxMediaCtrl, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_wxMediaCtrlPlayerControls[] = { {&_swigt__p_wxMediaCtrlPlayerControls, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxMediaEvent[] = { {&_swigt__p_wxMediaEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxNotifyEvent[] = { {&_swigt__p_wxNotifyEvent, 0, 0, 0}, {&_swigt__p_wxMediaEvent, _p_wxMediaEventTo_p_wxNotifyEvent, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}}; @@ -3468,7 +3661,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxLayoutConstraints, _swigc__p_wxMaximizeEvent, _swigc__p_wxMediaCtrl, - _swigc__p_wxMediaCtrlPlayerControls, _swigc__p_wxMediaEvent, _swigc__p_wxMenu, _swigc__p_wxMenuBar, @@ -4020,11 +4212,32 @@ SWIGEXPORT void SWIG_init(void) { { PyDict_SetItemString(d,"MEDIASTATE_PLAYING", SWIG_From_int(static_cast(wxMEDIASTATE_PLAYING))); } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_NONE", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_NONE))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_STEP", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_STEP))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_VOLUME", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_VOLUME))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_DEFAULT", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_DEFAULT))); + } PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_DIRECTSHOW",_wrap_MEDIABACKEND_DIRECTSHOW_get, _wrap_MEDIABACKEND_DIRECTSHOW_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_MCI",_wrap_MEDIABACKEND_MCI_get, _wrap_MEDIABACKEND_MCI_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_QUICKTIME",_wrap_MEDIABACKEND_QUICKTIME_get, _wrap_MEDIABACKEND_QUICKTIME_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_GSTREAMER",_wrap_MEDIABACKEND_GSTREAMER_get, _wrap_MEDIABACKEND_GSTREAMER_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_REALPLAYER",_wrap_MEDIABACKEND_REALPLAYER_get, _wrap_MEDIABACKEND_REALPLAYER_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_WMP10",_wrap_MEDIABACKEND_WMP10_get, _wrap_MEDIABACKEND_WMP10_set); SWIG_addvarlink(SWIG_globals,(char*)"MediaCtrlNameStr",_wrap_MediaCtrlNameStr_get, _wrap_MediaCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_MEDIA_FINISHED", PyInt_FromLong(wxEVT_MEDIA_FINISHED)); PyDict_SetItemString(d, "wxEVT_MEDIA_STOP", PyInt_FromLong(wxEVT_MEDIA_STOP)); PyDict_SetItemString(d, "wxEVT_MEDIA_LOADED", PyInt_FromLong(wxEVT_MEDIA_LOADED)); + PyDict_SetItemString(d, "wxEVT_MEDIA_STATECHANGED", PyInt_FromLong(wxEVT_MEDIA_STATECHANGED)); + PyDict_SetItemString(d, "wxEVT_MEDIA_PLAY", PyInt_FromLong(wxEVT_MEDIA_PLAY)); + PyDict_SetItemString(d, "wxEVT_MEDIA_PAUSE", PyInt_FromLong(wxEVT_MEDIA_PAUSE)); } diff --git a/wxPython/src/gtk/webkit_wrap.cpp b/wxPython/src/gtk/webkit_wrap.cpp index 9ad142564b..0e189e3f8c 100644 --- a/wxPython/src/gtk/webkit_wrap.cpp +++ b/wxPython/src/gtk/webkit_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/gtk/wizard_wrap.cpp b/wxPython/src/gtk/wizard_wrap.cpp index 8b7a1fb5f4..770a85eaea 100644 --- a/wxPython/src/gtk/wizard_wrap.cpp +++ b/wxPython/src/gtk/wizard_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/gtk/xrc_wrap.cpp b/wxPython/src/gtk/xrc_wrap.cpp index 8e381a0453..91b0a0784b 100644 --- a/wxPython/src/gtk/xrc_wrap.cpp +++ b/wxPython/src/gtk/xrc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index 7eb6c35a5f..651d66b895 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -240,6 +240,14 @@ class BitmapButton(Button): """ return _controls_.BitmapButton_GetBitmapSelected(*args, **kwargs) + def GetBitmapHover(*args, **kwargs): + """ + GetBitmapHover(self) -> Bitmap + + Returns the bitmap used when the mouse is over the button, may be invalid. + """ + return _controls_.BitmapButton_GetBitmapHover(*args, **kwargs) + def SetBitmapDisabled(*args, **kwargs): """ SetBitmapDisabled(self, Bitmap bitmap) @@ -273,6 +281,16 @@ class BitmapButton(Button): """ return _controls_.BitmapButton_SetBitmapLabel(*args, **kwargs) + def SetBitmapHover(*args, **kwargs): + """ + SetBitmapHover(self, Bitmap hover) + + Sets the bitmap to be shown when the mouse is over the button. This function + is new since wxWidgets version 2.7.0 and the hover bitmap is currently only + supported in wxMSW. + """ + return _controls_.BitmapButton_SetBitmapHover(*args, **kwargs) + def SetMargins(*args, **kwargs): """SetMargins(self, int x, int y)""" return _controls_.BitmapButton_SetMargins(*args, **kwargs) diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 71c1929531..81f3fdab8b 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -3160,6 +3159,36 @@ static PyObject *_wrap_BitmapButton_GetBitmapSelected(PyObject *, PyObject *args } +static PyObject *_wrap_BitmapButton_GetBitmapHover(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; + wxBitmap result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BitmapButton_GetBitmapHover",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetBitmapHover(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxBitmap * resultptr; + resultptr = new wxBitmap(static_cast(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxBitmap, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BitmapButton_SetBitmapDisabled(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; @@ -3300,6 +3329,41 @@ static PyObject *_wrap_BitmapButton_SetBitmapLabel(PyObject *, PyObject *args, P } +static PyObject *_wrap_BitmapButton_SetBitmapHover(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; + wxBitmap *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "hover", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BitmapButton_SetBitmapHover",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + if (arg2 == NULL) { + SWIG_null_ref("wxBitmap"); + } + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBitmapHover((wxBitmap const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BitmapButton_SetMargins(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; @@ -36171,10 +36235,12 @@ static PyMethodDef SwigMethods[] = { { (char *)"BitmapButton_GetBitmapDisabled", (PyCFunction) _wrap_BitmapButton_GetBitmapDisabled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetBitmapFocus", (PyCFunction) _wrap_BitmapButton_GetBitmapFocus, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetBitmapSelected", (PyCFunction) _wrap_BitmapButton_GetBitmapSelected, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"BitmapButton_GetBitmapHover", (PyCFunction) _wrap_BitmapButton_GetBitmapHover, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapDisabled", (PyCFunction) _wrap_BitmapButton_SetBitmapDisabled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapFocus", (PyCFunction) _wrap_BitmapButton_SetBitmapFocus, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapSelected", (PyCFunction) _wrap_BitmapButton_SetBitmapSelected, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapLabel", (PyCFunction) _wrap_BitmapButton_SetBitmapLabel, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"BitmapButton_SetBitmapHover", (PyCFunction) _wrap_BitmapButton_SetBitmapHover, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetMargins", (PyCFunction) _wrap_BitmapButton_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetMarginX", (PyCFunction) _wrap_BitmapButton_GetMarginX, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetMarginY", (PyCFunction) _wrap_BitmapButton_GetMarginY, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 39847bbff4..18d204f336 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -1321,7 +1321,7 @@ class Rect(object): """ Offset(self, Point pt) - Same as OffsetXY but uses dx,dy from Point + Same as `OffsetXY` but uses dx,dy from Point """ return _core_.Rect_Offset(*args, **kwargs) @@ -1397,6 +1397,16 @@ class Rect(object): """ return _core_.Rect_Intersects(*args, **kwargs) + def CenterIn(*args, **kwargs): + """ + CenterIn(self, Rect r, int dir=BOTH) -> Rect + + Center this rectangle within the one passed to the method, which is + usually, but not necessarily, the larger one. + """ + return _core_.Rect_CenterIn(*args, **kwargs) + + CentreIn = CenterIn x = property(_core_.Rect_x_get, _core_.Rect_x_set) y = property(_core_.Rect_y_get, _core_.Rect_y_set) width = property(_core_.Rect_width_get, _core_.Rect_width_set) @@ -5098,6 +5108,21 @@ class KeyEvent(Event): self.this = newobj.this self.thisown = 1 del newobj.thisown + def GetModifiers(*args, **kwargs): + """ + GetModifiers(self) -> int + + Returns a bitmask of the current modifier settings. Can be used to + check if the key event has exactly the given modifiers without having + to explicitly check that the other modifiers are not down. For + example:: + + if event.GetModifers() == wx.MOD_CONTROL: + DoSomething() + + """ + return _core_.KeyEvent_GetModifiers(*args, **kwargs) + def ControlDown(*args, **kwargs): """ ControlDown(self) -> bool @@ -6017,6 +6042,14 @@ class UpdateUIEvent(CommandEvent): """ return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) + def GetShown(*args, **kwargs): + """ + GetShown(self) -> bool + + Returns ``True`` if the UI element should be shown. + """ + return _core_.UpdateUIEvent_GetShown(*args, **kwargs) + def GetText(*args, **kwargs): """ GetText(self) -> String @@ -6052,6 +6085,15 @@ class UpdateUIEvent(CommandEvent): """ return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) + def GetSetShown(*args, **kwargs): + """ + GetSetShown(self) -> bool + + Returns ``True`` if the application has called `Show`. For wxWidgets + internal use only. + """ + return _core_.UpdateUIEvent_GetSetShown(*args, **kwargs) + def Check(*args, **kwargs): """ Check(self, bool check) @@ -6068,6 +6110,14 @@ class UpdateUIEvent(CommandEvent): """ return _core_.UpdateUIEvent_Enable(*args, **kwargs) + def Show(*args, **kwargs): + """ + Show(self, bool show) + + Show or hide the UI element. + """ + return _core_.UpdateUIEvent_Show(*args, **kwargs) + def SetText(*args, **kwargs): """ SetText(self, String text) @@ -8525,15 +8575,6 @@ class Window(EvtHandler): return _core_.Window_Center(*args, **kwargs) Centre = Center - def CenterOnScreen(*args, **kwargs): - """ - CenterOnScreen(self, int dir=BOTH) - - Center on screen (only works for top level windows) - """ - return _core_.Window_CenterOnScreen(*args, **kwargs) - - CentreOnScreen = CenterOnScreen def CenterOnParent(*args, **kwargs): """ CenterOnParent(self, int dir=BOTH) @@ -10034,9 +10075,13 @@ class Window(EvtHandler): SetAutoLayout(self, bool autoLayout) Determines whether the Layout function will be called automatically - when the window is resized. It is called implicitly by SetSizer but - if you use SetConstraints you should call it manually or otherwise the - window layout won't be correctly updated when its size changes. + when the window is resized. lease note that this only happens for the + windows usually used to contain children, namely `wx.Panel` and + `wx.TopLevelWindow` (and the classes deriving from them). + + This method is called implicitly by `SetSizer` but if you use + `SetConstraints` you should call it manually or otherwise the window + layout won't be correctly updated when its size changes. """ return _core_.Window_SetAutoLayout(*args, **kwargs) @@ -12058,7 +12103,7 @@ class Sizer(Object): """ IsShown(self, item) - Determines if the item is currently shown. sizer. To make a sizer + Determines if the item is currently shown. To make a sizer item disappear or reappear, use Show followed by `Layout`. The *item* parameter can be either a window, a sizer, or the zero-based index of the item. diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index fdc4899512..e61d093f8a 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -1589,7 +1588,7 @@ static swig_module_info swig_module = {swig_types, 132, 0, 0, 0, 0}; // in the wrapper code. #include - WX_DECLARE_STRING_HASH_MAP( swig_type_info*, wxPyTypeInfoHashMap ); +WX_DECLARE_STRING_HASH_MAP( swig_type_info*, wxPyTypeInfoHashMap ); // Maintains a hashmap of className to swig_type_info pointers. Given the @@ -1668,6 +1667,7 @@ bool wxPyConvertSwigPtr(PyObject* obj, void **ptr, } + // Make a SWIGified pointer object suitable for a .this attribute PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { @@ -1676,7 +1676,6 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { swig_type_info* swigType = wxPyFindSwigType(className); wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyMakeSwigPtr")); -#if SWIG_VERSION < 0x010328 #ifdef SWIG_COBJECT_TYPES robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name); #else @@ -1685,14 +1684,11 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ? PyString_FromString(result) : 0; } -#endif -#else // SWIG_VERSION >= 1.3.28 - robj = PySwigObject_New(ptr, swigType, 0); #endif return robj; } - + // Python's PyInstance_Check does not return True for instances of new-style // classes. This should get close enough for both new and old classes but I // should re-evaluate the need for doing instance checks... @@ -1701,7 +1697,6 @@ bool wxPyInstance_Check(PyObject* obj) { } - // This one checks if the object is an instance of a SWIG proxy class (it has // a .this attribute, and the .this attribute is a PySwigObject.) bool wxPySwigInstance_Check(PyObject* obj) { @@ -1719,7 +1714,6 @@ bool wxPySwigInstance_Check(PyObject* obj) { PyErr_Clear(); return false; } - // Export a C API in a struct. Other modules will be able to load this from @@ -6331,6 +6325,51 @@ static PyObject *_wrap_Rect_Intersects(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Rect_CenterIn(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxRect *arg1 = (wxRect *) 0 ; + wxRect *arg2 = 0 ; + int arg3 = (int) wxBOTH ; + wxRect result; + wxRect temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "r",(char *) "dir", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Rect_CenterIn",kwnames,&obj0,&obj1,&obj2)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxRect, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + if (obj2) { + { + arg3 = static_cast(SWIG_As_int(obj2)); + if (SWIG_arg_fail(3)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->CenterIn((wxRect const &)*arg2,arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxRect * resultptr; + resultptr = new wxRect(static_cast(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Rect_x_set(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxRect *arg1 = (wxRect *) 0 ; @@ -19121,6 +19160,34 @@ static PyObject *_wrap_new_KeyEvent(PyObject *, PyObject *args, PyObject *kwargs } +static PyObject *_wrap_KeyEvent_GetModifiers(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxKeyEvent *arg1 = (wxKeyEvent *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:KeyEvent_GetModifiers",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxKeyEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxKeyEvent const *)arg1)->GetModifiers(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_KeyEvent_ControlDown(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxKeyEvent *arg1 = (wxKeyEvent *) 0 ; @@ -21641,6 +21708,34 @@ static PyObject *_wrap_UpdateUIEvent_GetEnabled(PyObject *, PyObject *args, PyOb } +static PyObject *_wrap_UpdateUIEvent_GetShown(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:UpdateUIEvent_GetShown",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxUpdateUIEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxUpdateUIEvent const *)arg1)->GetShown(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_UpdateUIEvent_GetText(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; @@ -21757,6 +21852,34 @@ static PyObject *_wrap_UpdateUIEvent_GetSetEnabled(PyObject *, PyObject *args, P } +static PyObject *_wrap_UpdateUIEvent_GetSetShown(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:UpdateUIEvent_GetSetShown",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxUpdateUIEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxUpdateUIEvent const *)arg1)->GetSetShown(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_UpdateUIEvent_Check(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; @@ -21819,6 +21942,37 @@ static PyObject *_wrap_UpdateUIEvent_Enable(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_UpdateUIEvent_Show(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "show", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:UpdateUIEvent_Show",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxUpdateUIEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_bool(obj1)); + if (SWIG_arg_fail(2)) 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_UpdateUIEvent_SetText(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxUpdateUIEvent *arg1 = (wxUpdateUIEvent *) 0 ; @@ -27416,39 +27570,6 @@ static PyObject *_wrap_Window_Center(PyObject *, PyObject *args, PyObject *kwarg } -static PyObject *_wrap_Window_CenterOnScreen(PyObject *, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = NULL; - wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 = (int) wxBOTH ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "dir", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_CenterOnScreen",kwnames,&obj0,&obj1)) goto fail; - SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0); - if (SWIG_arg_fail(1)) SWIG_fail; - if (obj1) { - { - arg2 = static_cast(SWIG_As_int(obj1)); - if (SWIG_arg_fail(2)) SWIG_fail; - } - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->CenterOnScreen(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Window_CenterOnParent(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxWindow *arg1 = (wxWindow *) 0 ; @@ -46396,6 +46517,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_InsideXY", (PyCFunction) _wrap_Rect_InsideXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_Inside", (PyCFunction) _wrap_Rect_Inside, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_Intersects", (PyCFunction) _wrap_Rect_Intersects, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_CenterIn", (PyCFunction) _wrap_Rect_CenterIn, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_x_set", (PyCFunction) _wrap_Rect_x_set, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_x_get", (PyCFunction) _wrap_Rect_x_get, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_y_set", (PyCFunction) _wrap_Rect_y_set, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -46791,6 +46913,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SetCursorEvent_HasCursor", (PyCFunction) _wrap_SetCursorEvent_HasCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SetCursorEvent_swigregister", SetCursorEvent_swigregister, METH_VARARGS, NULL}, { (char *)"new_KeyEvent", (PyCFunction) _wrap_new_KeyEvent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"KeyEvent_GetModifiers", (PyCFunction) _wrap_KeyEvent_GetModifiers, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_ControlDown", (PyCFunction) _wrap_KeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_MetaDown", (PyCFunction) _wrap_KeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_AltDown", (PyCFunction) _wrap_KeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -46890,12 +47013,15 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_UpdateUIEvent", (PyCFunction) _wrap_new_UpdateUIEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetChecked", (PyCFunction) _wrap_UpdateUIEvent_GetChecked, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetEnabled", (PyCFunction) _wrap_UpdateUIEvent_GetEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"UpdateUIEvent_GetShown", (PyCFunction) _wrap_UpdateUIEvent_GetShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetText", (PyCFunction) _wrap_UpdateUIEvent_GetText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetSetText", (PyCFunction) _wrap_UpdateUIEvent_GetSetText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetSetChecked", (PyCFunction) _wrap_UpdateUIEvent_GetSetChecked, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetSetEnabled", (PyCFunction) _wrap_UpdateUIEvent_GetSetEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"UpdateUIEvent_GetSetShown", (PyCFunction) _wrap_UpdateUIEvent_GetSetShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_Check", (PyCFunction) _wrap_UpdateUIEvent_Check, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_Enable", (PyCFunction) _wrap_UpdateUIEvent_Enable, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"UpdateUIEvent_Show", (PyCFunction) _wrap_UpdateUIEvent_Show, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_SetText", (PyCFunction) _wrap_UpdateUIEvent_SetText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_SetUpdateInterval", (PyCFunction) _wrap_UpdateUIEvent_SetUpdateInterval, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"UpdateUIEvent_GetUpdateInterval", (PyCFunction) _wrap_UpdateUIEvent_GetUpdateInterval, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -47096,7 +47222,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_GetBestFittingSize", (PyCFunction) _wrap_Window_GetBestFittingSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetAdjustedBestSize", (PyCFunction) _wrap_Window_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Center", (PyCFunction) _wrap_Window_Center, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Window_CenterOnScreen", (PyCFunction) _wrap_Window_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_CenterOnParent", (PyCFunction) _wrap_Window_CenterOnParent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Fit", (PyCFunction) _wrap_Window_Fit, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_FitInside", (PyCFunction) _wrap_Window_FitInside, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index 3980f3994a..7bac49d02b 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -2729,6 +2729,34 @@ class DC(_core.Object): """ return _gdi_.DC_FloodFillPoint(*args, **kwargs) + def GradientFillConcentric(*args, **kwargs): + """ + GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour, + Point circleCenter) + + Fill the area specified by rect with a radial gradient, starting from + initialColour in the center of the circle and fading to destColour on + the outside of the circle. The circleCenter argument is the relative + coordinants of the center of the circle in the specified rect. + + Note: Currently this function is very slow, don't use it for real-time + drawing. + """ + return _gdi_.DC_GradientFillConcentric(*args, **kwargs) + + def GradientFillLinear(*args, **kwargs): + """ + GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour, + int nDirection=EAST) + + Fill the area specified by rect with a linear gradient, starting from + initialColour and eventually fading to destColour. The nDirection + parameter specifies the direction of the colour change, default is to + use initialColour on the left part of the rectangle and destColour on + the right side. + """ + return _gdi_.DC_GradientFillLinear(*args, **kwargs) + def GetPixel(*args, **kwargs): """ GetPixel(self, int x, int y) -> Colour diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index a2112e69b3..a2ab60dc32 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -12595,6 +12594,113 @@ static PyObject *_wrap_DC_FloodFillPoint(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_DC_GradientFillConcentric(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDC *arg1 = (wxDC *) 0 ; + wxRect *arg2 = 0 ; + wxColour *arg3 = 0 ; + wxColour *arg4 = 0 ; + wxPoint *arg5 = 0 ; + wxRect temp2 ; + wxColour temp3 ; + wxColour temp4 ; + wxPoint temp5 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect",(char *) "initialColour",(char *) "destColour",(char *) "circleCenter", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:DC_GradientFillConcentric",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; + } + { + arg4 = &temp4; + if ( ! wxColour_helper(obj3, &arg4)) SWIG_fail; + } + { + arg5 = &temp5; + if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->GradientFillConcentric((wxRect const &)*arg2,(wxColour const &)*arg3,(wxColour const &)*arg4,(wxPoint const &)*arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_DC_GradientFillLinear(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDC *arg1 = (wxDC *) 0 ; + wxRect *arg2 = 0 ; + wxColour *arg3 = 0 ; + wxColour *arg4 = 0 ; + wxDirection arg5 = (wxDirection) wxEAST ; + wxRect temp2 ; + wxColour temp3 ; + wxColour temp4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect",(char *) "initialColour",(char *) "destColour",(char *) "nDirection", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:DC_GradientFillLinear",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; + } + { + arg4 = &temp4; + if ( ! wxColour_helper(obj3, &arg4)) SWIG_fail; + } + if (obj4) { + { + arg5 = static_cast(SWIG_As_int(obj4)); + if (SWIG_arg_fail(5)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->GradientFillLinear((wxRect const &)*arg2,(wxColour const &)*arg3,(wxColour const &)*arg4,arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_DC_GetPixel(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxDC *arg1 = (wxDC *) 0 ; @@ -22019,6 +22125,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_DC", (PyCFunction) _wrap_delete_DC, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_FloodFill", (PyCFunction) _wrap_DC_FloodFill, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_FloodFillPoint", (PyCFunction) _wrap_DC_FloodFillPoint, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_GradientFillConcentric", (PyCFunction) _wrap_DC_GradientFillConcentric, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_GradientFillLinear", (PyCFunction) _wrap_DC_GradientFillLinear, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetPixel", (PyCFunction) _wrap_DC_GetPixel, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetPixelPoint", (PyCFunction) _wrap_DC_GetPixelPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_DrawLine", (PyCFunction) _wrap_DC_DrawLine, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index 6893325f45..26bf682611 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -3129,7 +3128,6 @@ public: }; #endif -static int wxDisplay_GetFromWindow(wxWindow *window){ wxPyRaiseNotImplemented(); return wxNOT_FOUND; } static PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode=wxDefaultVideoMode){ PyObject* pyList = NULL; wxArrayVideoModes arr = self->GetModes(mode); @@ -32272,7 +32270,7 @@ static PyObject *_wrap_Display_GetFromWindow(PyObject *, PyObject *args, PyObjec if (SWIG_arg_fail(1)) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxDisplay_GetFromWindow(arg1); + result = (int)wxDisplay::GetFromWindow(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index 9c93834359..bdc512fee3 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -448,6 +448,15 @@ class TopLevelWindow(_core.Window): """MacGetMetalAppearance(self) -> bool""" return _windows_.TopLevelWindow_MacGetMetalAppearance(*args, **kwargs) + def CenterOnScreen(*args, **kwargs): + """ + CenterOnScreen(self, int dir=BOTH) + + Center the window on screen + """ + return _windows_.TopLevelWindow_CenterOnScreen(*args, **kwargs) + + CentreOnScreen = CenterOnScreen class TopLevelWindowPtr(TopLevelWindow): def __init__(self, this): @@ -657,6 +666,22 @@ class Dialog(TopLevelWindow): """GetReturnCode(self) -> int""" return _windows_.Dialog_GetReturnCode(*args, **kwargs) + def SetAffirmativeId(*args, **kwargs): + """SetAffirmativeId(self, int affirmativeId)""" + return _windows_.Dialog_SetAffirmativeId(*args, **kwargs) + + def GetAffirmativeId(*args, **kwargs): + """GetAffirmativeId(self) -> int""" + return _windows_.Dialog_GetAffirmativeId(*args, **kwargs) + + def SetEscapeId(*args, **kwargs): + """SetEscapeId(self, int escapeId)""" + return _windows_.Dialog_SetEscapeId(*args, **kwargs) + + def GetEscapeId(*args, **kwargs): + """GetEscapeId(self) -> int""" + return _windows_.Dialog_GetEscapeId(*args, **kwargs) + def CreateTextSizer(*args, **kwargs): """CreateTextSizer(self, String message) -> Sizer""" return _windows_.Dialog_CreateTextSizer(*args, **kwargs) diff --git a/wxPython/src/mac/_windows_wrap.cpp b/wxPython/src/mac/_windows_wrap.cpp index 50a6c97e68..f5e2f5afc2 100644 --- a/wxPython/src/mac/_windows_wrap.cpp +++ b/wxPython/src/mac/_windows_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -4822,6 +4821,39 @@ static PyObject *_wrap_TopLevelWindow_MacGetMetalAppearance(PyObject *, PyObject } +static PyObject *_wrap_TopLevelWindow_CenterOnScreen(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ; + int arg2 = (int) wxBOTH ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "dir", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_CenterOnScreen",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxTopLevelWindow, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + if (obj1) { + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CenterOnScreen(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * TopLevelWindow_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -6091,6 +6123,124 @@ static PyObject *_wrap_Dialog_GetReturnCode(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_Dialog_SetAffirmativeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "affirmativeId", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetAffirmativeId",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetAffirmativeId(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_GetAffirmativeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Dialog_GetAffirmativeId",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxDialog const *)arg1)->GetAffirmativeId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_SetEscapeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "escapeId", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetEscapeId",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetEscapeId(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_GetEscapeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Dialog_GetEscapeId",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxDialog const *)arg1)->GetEscapeId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Dialog_CreateTextSizer(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxDialog *arg1 = (wxDialog *) 0 ; @@ -27413,6 +27563,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TopLevelWindow_IsActive", (PyCFunction) _wrap_TopLevelWindow_IsActive, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_MacSetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacSetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_MacGetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacGetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TopLevelWindow_CenterOnScreen", (PyCFunction) _wrap_TopLevelWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_swigregister", TopLevelWindow_swigregister, METH_VARARGS, NULL}, { (char *)"new_Frame", (PyCFunction) _wrap_new_Frame, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_PreFrame", (PyCFunction) _wrap_new_PreFrame, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -27443,6 +27594,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Dialog_Create", (PyCFunction) _wrap_Dialog_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_SetReturnCode", (PyCFunction) _wrap_Dialog_SetReturnCode, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_GetReturnCode", (PyCFunction) _wrap_Dialog_GetReturnCode, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_SetAffirmativeId", (PyCFunction) _wrap_Dialog_SetAffirmativeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_GetAffirmativeId", (PyCFunction) _wrap_Dialog_GetAffirmativeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_SetEscapeId", (PyCFunction) _wrap_Dialog_SetEscapeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_GetEscapeId", (PyCFunction) _wrap_Dialog_GetEscapeId, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateTextSizer", (PyCFunction) _wrap_Dialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateButtonSizer", (PyCFunction) _wrap_Dialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateStdDialogButtonSizer", (PyCFunction) _wrap_Dialog_CreateStdDialogButtonSizer, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/calendar_wrap.cpp b/wxPython/src/mac/calendar_wrap.cpp index dd618991fb..cf814be14a 100644 --- a/wxPython/src/mac/calendar_wrap.cpp +++ b/wxPython/src/mac/calendar_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/mac/grid_wrap.cpp b/wxPython/src/mac/grid_wrap.cpp index 9d61e85f15..bbf2292be9 100644 --- a/wxPython/src/mac/grid_wrap.cpp +++ b/wxPython/src/mac/grid_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/mac/html.py b/wxPython/src/mac/html.py index c1b7e69433..a09f041017 100644 --- a/wxPython/src/mac/html.py +++ b/wxPython/src/mac/html.py @@ -831,6 +831,18 @@ class HtmlWordCell(HtmlCell): self.this = newobj.this self.thisown = 1 del newobj.thisown + def ConvertToText(*args, **kwargs): + """ConvertToText(self, HtmlSelection sel) -> String""" + return _html.HtmlWordCell_ConvertToText(*args, **kwargs) + + def IsLinebreakAllowed(*args, **kwargs): + """IsLinebreakAllowed(self) -> bool""" + return _html.HtmlWordCell_IsLinebreakAllowed(*args, **kwargs) + + def SetPreviousWord(*args, **kwargs): + """SetPreviousWord(self, HtmlWordCell cell)""" + return _html.HtmlWordCell_SetPreviousWord(*args, **kwargs) + class HtmlWordCellPtr(HtmlWordCell): def __init__(self, this): diff --git a/wxPython/src/mac/html_wrap.cpp b/wxPython/src/mac/html_wrap.cpp index 7aad3b7b6d..801bb51c08 100644 --- a/wxPython/src/mac/html_wrap.cpp +++ b/wxPython/src/mac/html_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -2119,7 +2118,6 @@ public: } void OnLinkClicked(const wxHtmlLinkInfo& link); -//- void base_OnLinkClicked(const wxHtmlLinkInfo& link); wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, const wxString& url, @@ -2149,9 +2147,6 @@ void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { if (! found) wxHtmlWindow::OnLinkClicked(link); } -// void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { -// wxHtmlWindow::OnLinkClicked(link); -// } wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, @@ -4709,7 +4704,9 @@ static PyObject *_wrap_HtmlSelection_GetFromCell(PyObject *, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -4735,7 +4732,9 @@ static PyObject *_wrap_HtmlSelection_GetToCell(PyObject *, PyObject *args, PyObj wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -5900,7 +5899,9 @@ static PyObject *_wrap_HtmlCell_GetNext(PyObject *, PyObject *args, PyObject *kw wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -5952,7 +5953,9 @@ static PyObject *_wrap_HtmlCell_GetFirstChild(PyObject *, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6336,7 +6339,9 @@ static PyObject *_wrap_HtmlCell_Find(PyObject *, PyObject *args, PyObject *kwarg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6511,7 +6516,9 @@ static PyObject *_wrap_HtmlCell_FindCellByPos(PyObject *, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6567,7 +6574,9 @@ static PyObject *_wrap_HtmlCell_GetFirstTerminal(PyObject *, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6593,7 +6602,9 @@ static PyObject *_wrap_HtmlCell_GetLastTerminal(PyObject *, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6751,6 +6762,99 @@ static PyObject *_wrap_new_HtmlWordCell(PyObject *, PyObject *args, PyObject *kw } +static PyObject *_wrap_HtmlWordCell_ConvertToText(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + wxHtmlSelection *arg2 = (wxHtmlSelection *) 0 ; + wxString result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "sel", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlWordCell_ConvertToText",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxHtmlSelection, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxHtmlWordCell const *)arg1)->ConvertToText(arg2); + + 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_HtmlWordCell_IsLinebreakAllowed(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:HtmlWordCell_IsLinebreakAllowed",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxHtmlWordCell const *)arg1)->IsLinebreakAllowed(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_HtmlWordCell_SetPreviousWord(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + wxHtmlWordCell *arg2 = (wxHtmlWordCell *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "cell", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlWordCell_SetPreviousWord",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetPreviousWord(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * HtmlWordCell_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -7310,7 +7414,9 @@ static PyObject *_wrap_HtmlContainerCell_GetFirstChild(PyObject *, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -14691,6 +14797,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlCell_ConvertToText", (PyCFunction) _wrap_HtmlCell_ConvertToText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlCell_swigregister", HtmlCell_swigregister, METH_VARARGS, NULL}, { (char *)"new_HtmlWordCell", (PyCFunction) _wrap_new_HtmlWordCell, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_ConvertToText", (PyCFunction) _wrap_HtmlWordCell_ConvertToText, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_IsLinebreakAllowed", (PyCFunction) _wrap_HtmlWordCell_IsLinebreakAllowed, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_SetPreviousWord", (PyCFunction) _wrap_HtmlWordCell_SetPreviousWord, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlWordCell_swigregister", HtmlWordCell_swigregister, METH_VARARGS, NULL}, { (char *)"new_HtmlContainerCell", (PyCFunction) _wrap_new_HtmlContainerCell, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlContainerCell_InsertCell", (PyCFunction) _wrap_HtmlContainerCell_InsertCell, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/media.py b/wxPython/src/mac/media.py index 70f4e57160..6c38e24e01 100644 --- a/wxPython/src/mac/media.py +++ b/wxPython/src/mac/media.py @@ -54,6 +54,10 @@ __docfilter__ = wx.__DocFilter(globals()) MEDIASTATE_STOPPED = _media.MEDIASTATE_STOPPED MEDIASTATE_PAUSED = _media.MEDIASTATE_PAUSED MEDIASTATE_PLAYING = _media.MEDIASTATE_PLAYING +MEDIACTRLPLAYERCONTROLS_NONE = _media.MEDIACTRLPLAYERCONTROLS_NONE +MEDIACTRLPLAYERCONTROLS_STEP = _media.MEDIACTRLPLAYERCONTROLS_STEP +MEDIACTRLPLAYERCONTROLS_VOLUME = _media.MEDIACTRLPLAYERCONTROLS_VOLUME +MEDIACTRLPLAYERCONTROLS_DEFAULT = _media.MEDIACTRLPLAYERCONTROLS_DEFAULT class MediaEvent(_core.NotifyEvent): """Proxy of C++ MediaEvent class""" def __repr__(self): @@ -71,6 +75,13 @@ class MediaEventPtr(MediaEvent): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MediaEvent _media.MediaEvent_swigregister(MediaEventPtr) +cvar = _media.cvar +MEDIABACKEND_DIRECTSHOW = cvar.MEDIABACKEND_DIRECTSHOW +MEDIABACKEND_MCI = cvar.MEDIABACKEND_MCI +MEDIABACKEND_QUICKTIME = cvar.MEDIABACKEND_QUICKTIME +MEDIABACKEND_GSTREAMER = cvar.MEDIABACKEND_GSTREAMER +MEDIABACKEND_REALPLAYER = cvar.MEDIABACKEND_REALPLAYER +MEDIABACKEND_WMP10 = cvar.MEDIABACKEND_WMP10 class MediaCtrl(_core.Control): """Proxy of C++ MediaCtrl class""" @@ -145,7 +156,7 @@ class MediaCtrl(_core.Control): return _media.MediaCtrl_SetVolume(*args, **kwargs) def ShowPlayerControls(*args, **kwargs): - """ShowPlayerControls(self, wxMediaCtrlPlayerControls flags=wxMEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" + """ShowPlayerControls(self, int flags=MEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" return _media.MediaCtrl_ShowPlayerControls(*args, **kwargs) def Load(*args, **kwargs): @@ -161,6 +172,14 @@ class MediaCtrl(_core.Control): return _media.MediaCtrl_LoadURIWithProxy(*args, **kwargs) LoadFromURI = LoadURI + def GetDownloadProgress(*args, **kwargs): + """GetDownloadProgress(self) -> wxFileOffset""" + return _media.MediaCtrl_GetDownloadProgress(*args, **kwargs) + + def GetDownloadTotal(*args, **kwargs): + """GetDownloadTotal(self) -> wxFileOffset""" + return _media.MediaCtrl_GetDownloadTotal(*args, **kwargs) + class MediaCtrlPtr(MediaCtrl): def __init__(self, this): @@ -168,7 +187,6 @@ class MediaCtrlPtr(MediaCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MediaCtrl _media.MediaCtrl_swigregister(MediaCtrlPtr) -cvar = _media.cvar MediaCtrlNameStr = cvar.MediaCtrlNameStr def PreMediaCtrl(*args, **kwargs): @@ -180,9 +198,15 @@ def PreMediaCtrl(*args, **kwargs): wxEVT_MEDIA_FINISHED = _media.wxEVT_MEDIA_FINISHED wxEVT_MEDIA_STOP = _media.wxEVT_MEDIA_STOP wxEVT_MEDIA_LOADED = _media.wxEVT_MEDIA_LOADED -EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) -EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) -EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) +wxEVT_MEDIA_STATECHANGED = _media.wxEVT_MEDIA_STATECHANGED +wxEVT_MEDIA_PLAY = _media.wxEVT_MEDIA_PLAY +wxEVT_MEDIA_PAUSE = _media.wxEVT_MEDIA_PAUSE +EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) +EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) +EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) +EVT_MEDIA_STATECHANGED = wx.PyEventBinder( wxEVT_MEDIA_STATECHANGED, 1) +EVT_MEDIA_PLAY = wx.PyEventBinder( wxEVT_MEDIA_PLAY, 1) +EVT_MEDIA_PAUSE = wx.PyEventBinder( wxEVT_MEDIA_PAUSE, 1) diff --git a/wxPython/src/mac/media_wrap.cpp b/wxPython/src/mac/media_wrap.cpp index 8c59fb530e..8cf2c62a87 100644 --- a/wxPython/src/mac/media_wrap.cpp +++ b/wxPython/src/mac/media_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -1478,54 +1477,53 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { #define SWIGTYPE_p_wxLayoutConstraints swig_types[43] #define SWIGTYPE_p_wxMaximizeEvent swig_types[44] #define SWIGTYPE_p_wxMediaCtrl swig_types[45] -#define SWIGTYPE_p_wxMediaCtrlPlayerControls swig_types[46] -#define SWIGTYPE_p_wxMediaEvent swig_types[47] -#define SWIGTYPE_p_wxMenu swig_types[48] -#define SWIGTYPE_p_wxMenuBar swig_types[49] -#define SWIGTYPE_p_wxMenuEvent swig_types[50] -#define SWIGTYPE_p_wxMenuItem swig_types[51] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[52] -#define SWIGTYPE_p_wxMouseEvent swig_types[53] -#define SWIGTYPE_p_wxMoveEvent swig_types[54] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[55] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[56] -#define SWIGTYPE_p_wxNotifyEvent swig_types[57] -#define SWIGTYPE_p_wxObject swig_types[58] -#define SWIGTYPE_p_wxPCXHandler swig_types[59] -#define SWIGTYPE_p_wxPNGHandler swig_types[60] -#define SWIGTYPE_p_wxPNMHandler swig_types[61] -#define SWIGTYPE_p_wxPaintEvent swig_types[62] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[63] -#define SWIGTYPE_p_wxPaperSize swig_types[64] -#define SWIGTYPE_p_wxPyApp swig_types[65] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[66] -#define SWIGTYPE_p_wxPyEvent swig_types[67] -#define SWIGTYPE_p_wxPyImageHandler swig_types[68] -#define SWIGTYPE_p_wxPySizer swig_types[69] -#define SWIGTYPE_p_wxPyValidator swig_types[70] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[71] -#define SWIGTYPE_p_wxScrollEvent swig_types[72] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[73] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[74] -#define SWIGTYPE_p_wxShowEvent swig_types[75] -#define SWIGTYPE_p_wxSizeEvent swig_types[76] -#define SWIGTYPE_p_wxSizer swig_types[77] -#define SWIGTYPE_p_wxSizerItem swig_types[78] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[79] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[80] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[81] -#define SWIGTYPE_p_wxTIFFHandler swig_types[82] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[83] -#define SWIGTYPE_p_wxValidator swig_types[84] -#define SWIGTYPE_p_wxWindow swig_types[85] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[86] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[87] -#define SWIGTYPE_p_wxXPMHandler swig_types[88] -#define SWIGTYPE_ptrdiff_t swig_types[89] -#define SWIGTYPE_std__ptrdiff_t swig_types[90] -#define SWIGTYPE_unsigned_int swig_types[91] -static swig_type_info *swig_types[93]; -static swig_module_info swig_module = {swig_types, 92, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxMediaEvent swig_types[46] +#define SWIGTYPE_p_wxMenu swig_types[47] +#define SWIGTYPE_p_wxMenuBar swig_types[48] +#define SWIGTYPE_p_wxMenuEvent swig_types[49] +#define SWIGTYPE_p_wxMenuItem swig_types[50] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[51] +#define SWIGTYPE_p_wxMouseEvent swig_types[52] +#define SWIGTYPE_p_wxMoveEvent swig_types[53] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[54] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[55] +#define SWIGTYPE_p_wxNotifyEvent swig_types[56] +#define SWIGTYPE_p_wxObject swig_types[57] +#define SWIGTYPE_p_wxPCXHandler swig_types[58] +#define SWIGTYPE_p_wxPNGHandler swig_types[59] +#define SWIGTYPE_p_wxPNMHandler swig_types[60] +#define SWIGTYPE_p_wxPaintEvent swig_types[61] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[62] +#define SWIGTYPE_p_wxPaperSize swig_types[63] +#define SWIGTYPE_p_wxPyApp swig_types[64] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[65] +#define SWIGTYPE_p_wxPyEvent swig_types[66] +#define SWIGTYPE_p_wxPyImageHandler swig_types[67] +#define SWIGTYPE_p_wxPySizer swig_types[68] +#define SWIGTYPE_p_wxPyValidator swig_types[69] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[70] +#define SWIGTYPE_p_wxScrollEvent swig_types[71] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[72] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[73] +#define SWIGTYPE_p_wxShowEvent swig_types[74] +#define SWIGTYPE_p_wxSizeEvent swig_types[75] +#define SWIGTYPE_p_wxSizer swig_types[76] +#define SWIGTYPE_p_wxSizerItem swig_types[77] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[78] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[79] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[80] +#define SWIGTYPE_p_wxTIFFHandler swig_types[81] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[82] +#define SWIGTYPE_p_wxValidator swig_types[83] +#define SWIGTYPE_p_wxWindow swig_types[84] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[85] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[86] +#define SWIGTYPE_p_wxXPMHandler swig_types[87] +#define SWIGTYPE_ptrdiff_t swig_types[88] +#define SWIGTYPE_std__ptrdiff_t swig_types[89] +#define SWIGTYPE_unsigned_int swig_types[90] +static swig_type_info *swig_types[92]; +static swig_module_info swig_module = {swig_types, 91, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1562,7 +1560,14 @@ enum wxMediaCtrlPlayerControls wxMEDIACTRLPLAYERCONTROLS_DEFAULT }; - +static wxString wxMEDIABACKEND_DIRECTSHOW(wxEmptyString); +static wxString wxMEDIABACKEND_MCI (wxEmptyString); +static wxString wxMEDIABACKEND_QUICKTIME (wxEmptyString); +static wxString wxMEDIABACKEND_GSTREAMER (wxEmptyString); +static wxString wxMEDIABACKEND_REALPLAYER(wxEmptyString); +static wxString wxMEDIABACKEND_WMP10 (wxEmptyString); + + class wxMediaEvent : public wxNotifyEvent { public: @@ -1617,11 +1622,18 @@ public: bool Load(const wxString& fileName) { return false; } bool LoadURI(const wxString& fileName) { return false; } bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy) { return false; } + + wxFileOffset GetDownloadProgress() { return 0; } + wxFileOffset GetDownloadTotal() { return 0; } + }; const wxEventType wxEVT_MEDIA_FINISHED = 0; const wxEventType wxEVT_MEDIA_STOP = 0; const wxEventType wxEVT_MEDIA_LOADED = 0; +const wxEventType wxEVT_MEDIA_STATECHANGED = 0; +const wxEventType wxEVT_MEDIA_PLAY = 0; +const wxEventType wxEVT_MEDIA_PAUSE = 0; #endif @@ -1630,6 +1642,12 @@ const wxEventType wxEVT_MEDIA_LOADED = 0; #define SWIG_From_int PyInt_FromLong /*@@*/ + static const wxString wxPyMEDIABACKEND_DIRECTSHOW(wxMEDIABACKEND_DIRECTSHOW); + static const wxString wxPyMEDIABACKEND_MCI(wxMEDIABACKEND_MCI); + static const wxString wxPyMEDIABACKEND_QUICKTIME(wxMEDIABACKEND_QUICKTIME); + static const wxString wxPyMEDIABACKEND_GSTREAMER(wxMEDIABACKEND_GSTREAMER); + static const wxString wxPyMEDIABACKEND_REALPLAYER(wxMEDIABACKEND_REALPLAYER); + static const wxString wxPyMEDIABACKEND_WMP10(wxMEDIABACKEND_WMP10); #include @@ -1787,6 +1805,126 @@ SWIG_Check_double(PyObject* obj) #ifdef __cplusplus extern "C" { #endif +static int _wrap_MEDIABACKEND_DIRECTSHOW_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_DIRECTSHOW is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_DIRECTSHOW_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_DIRECTSHOW)->c_str(), (&wxPyMEDIABACKEND_DIRECTSHOW)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_DIRECTSHOW)->c_str(), (&wxPyMEDIABACKEND_DIRECTSHOW)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_MCI_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_MCI is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_MCI_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_MCI)->c_str(), (&wxPyMEDIABACKEND_MCI)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_MCI)->c_str(), (&wxPyMEDIABACKEND_MCI)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_QUICKTIME_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_QUICKTIME is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_QUICKTIME_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_QUICKTIME)->c_str(), (&wxPyMEDIABACKEND_QUICKTIME)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_QUICKTIME)->c_str(), (&wxPyMEDIABACKEND_QUICKTIME)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_GSTREAMER_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_GSTREAMER is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_GSTREAMER_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_GSTREAMER)->c_str(), (&wxPyMEDIABACKEND_GSTREAMER)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_GSTREAMER)->c_str(), (&wxPyMEDIABACKEND_GSTREAMER)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_REALPLAYER_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_REALPLAYER is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_REALPLAYER_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_REALPLAYER)->c_str(), (&wxPyMEDIABACKEND_REALPLAYER)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_REALPLAYER)->c_str(), (&wxPyMEDIABACKEND_REALPLAYER)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_WMP10_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_WMP10 is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_WMP10_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_WMP10)->c_str(), (&wxPyMEDIABACKEND_WMP10)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_WMP10)->c_str(), (&wxPyMEDIABACKEND_WMP10)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_MediaEvent(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxEventType arg1 = (wxEventType) wxEVT_NULL ; @@ -2505,14 +2643,8 @@ static PyObject *_wrap_MediaCtrl_ShowPlayerControls(PyObject *, PyObject *args, if (SWIG_arg_fail(1)) SWIG_fail; if (obj1) { { - wxMediaCtrlPlayerControls * argp; - SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_wxMediaCtrlPlayerControls, SWIG_POINTER_EXCEPTION); - if (SWIG_arg_fail(2)) SWIG_fail; - if (argp == NULL) { - SWIG_null_ref("wxMediaCtrlPlayerControls"); - } + arg2 = static_cast(SWIG_As_int(obj1)); if (SWIG_arg_fail(2)) SWIG_fail; - arg2 = *argp; } } { @@ -2679,6 +2811,68 @@ static PyObject *_wrap_MediaCtrl_LoadURIWithProxy(PyObject *, PyObject *args, Py } +static PyObject *_wrap_MediaCtrl_GetDownloadProgress(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxMediaCtrl *arg1 = (wxMediaCtrl *) 0 ; + wxFileOffset result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MediaCtrl_GetDownloadProgress",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxMediaCtrl, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetDownloadProgress(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + if (sizeof(wxFileOffset) > sizeof(long)) + resultobj = PyLong_FromLongLong(result); + else + resultobj = PyInt_FromLong(result); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_MediaCtrl_GetDownloadTotal(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxMediaCtrl *arg1 = (wxMediaCtrl *) 0 ; + wxFileOffset result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MediaCtrl_GetDownloadTotal",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxMediaCtrl, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetDownloadTotal(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + if (sizeof(wxFileOffset) > sizeof(long)) + resultobj = PyLong_FromLongLong(result); + else + resultobj = PyInt_FromLong(result); + } + return resultobj; + fail: + return NULL; +} + + static PyObject * MediaCtrl_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -2707,6 +2901,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"MediaCtrl_Load", (PyCFunction) _wrap_MediaCtrl_Load, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MediaCtrl_LoadURI", (PyCFunction) _wrap_MediaCtrl_LoadURI, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MediaCtrl_LoadURIWithProxy", (PyCFunction) _wrap_MediaCtrl_LoadURIWithProxy, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"MediaCtrl_GetDownloadProgress", (PyCFunction) _wrap_MediaCtrl_GetDownloadProgress, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"MediaCtrl_GetDownloadTotal", (PyCFunction) _wrap_MediaCtrl_GetDownloadTotal, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MediaCtrl_swigregister", MediaCtrl_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; @@ -3192,7 +3388,6 @@ static swig_type_info _swigt__p_wxPyValidator = {"_p_wxPyValidator", 0, 0, 0, 0} static swig_type_info _swigt__p_wxMenu = {"_p_wxMenu", 0, 0, 0, 0}; static swig_type_info _swigt__p_wxFileOffset = {"_p_wxFileOffset", "wxFileOffset *", 0, 0, 0}; static swig_type_info _swigt__p_wxMediaCtrl = {"_p_wxMediaCtrl", "wxMediaCtrl *", 0, 0, 0}; -static swig_type_info _swigt__p_wxMediaCtrlPlayerControls = {"_p_wxMediaCtrlPlayerControls", "wxMediaCtrlPlayerControls *", 0, 0, 0}; static swig_type_info _swigt__p_wxMediaEvent = {"_p_wxMediaEvent", "wxMediaEvent *", 0, 0, 0}; static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", "wxNotifyEvent *", 0, 0, 0}; static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, 0}; @@ -3280,7 +3475,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxLayoutConstraints, &_swigt__p_wxMaximizeEvent, &_swigt__p_wxMediaCtrl, - &_swigt__p_wxMediaCtrlPlayerControls, &_swigt__p_wxMediaEvent, &_swigt__p_wxMenu, &_swigt__p_wxMenuBar, @@ -3380,7 +3574,6 @@ static swig_cast_info _swigc__p_wxMenu[] = {{&_swigt__p_wxMenu, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_wxEvtHandler[] = { {&_swigt__p_wxControl, _p_wxControlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxControlWithItems, _p_wxControlWithItemsTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxWindow, _p_wxWindowTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxEvtHandler, 0, 0, 0}, {&_swigt__p_wxMediaCtrl, _p_wxMediaCtrlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyApp, _p_wxPyAppTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenuBar, _p_wxMenuBarTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxValidator, _p_wxValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyValidator, _p_wxPyValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenu, _p_wxMenuTo_p_wxEvtHandler, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxFileOffset[] = { {&_swigt__p_wxFileOffset, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxMediaCtrl[] = { {&_swigt__p_wxMediaCtrl, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_wxMediaCtrlPlayerControls[] = { {&_swigt__p_wxMediaCtrlPlayerControls, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxMediaEvent[] = { {&_swigt__p_wxMediaEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxNotifyEvent[] = { {&_swigt__p_wxNotifyEvent, 0, 0, 0}, {&_swigt__p_wxMediaEvent, _p_wxMediaEventTo_p_wxNotifyEvent, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}}; @@ -3468,7 +3661,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxLayoutConstraints, _swigc__p_wxMaximizeEvent, _swigc__p_wxMediaCtrl, - _swigc__p_wxMediaCtrlPlayerControls, _swigc__p_wxMediaEvent, _swigc__p_wxMenu, _swigc__p_wxMenuBar, @@ -4020,11 +4212,32 @@ SWIGEXPORT void SWIG_init(void) { { PyDict_SetItemString(d,"MEDIASTATE_PLAYING", SWIG_From_int(static_cast(wxMEDIASTATE_PLAYING))); } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_NONE", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_NONE))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_STEP", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_STEP))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_VOLUME", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_VOLUME))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_DEFAULT", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_DEFAULT))); + } PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_DIRECTSHOW",_wrap_MEDIABACKEND_DIRECTSHOW_get, _wrap_MEDIABACKEND_DIRECTSHOW_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_MCI",_wrap_MEDIABACKEND_MCI_get, _wrap_MEDIABACKEND_MCI_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_QUICKTIME",_wrap_MEDIABACKEND_QUICKTIME_get, _wrap_MEDIABACKEND_QUICKTIME_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_GSTREAMER",_wrap_MEDIABACKEND_GSTREAMER_get, _wrap_MEDIABACKEND_GSTREAMER_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_REALPLAYER",_wrap_MEDIABACKEND_REALPLAYER_get, _wrap_MEDIABACKEND_REALPLAYER_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_WMP10",_wrap_MEDIABACKEND_WMP10_get, _wrap_MEDIABACKEND_WMP10_set); SWIG_addvarlink(SWIG_globals,(char*)"MediaCtrlNameStr",_wrap_MediaCtrlNameStr_get, _wrap_MediaCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_MEDIA_FINISHED", PyInt_FromLong(wxEVT_MEDIA_FINISHED)); PyDict_SetItemString(d, "wxEVT_MEDIA_STOP", PyInt_FromLong(wxEVT_MEDIA_STOP)); PyDict_SetItemString(d, "wxEVT_MEDIA_LOADED", PyInt_FromLong(wxEVT_MEDIA_LOADED)); + PyDict_SetItemString(d, "wxEVT_MEDIA_STATECHANGED", PyInt_FromLong(wxEVT_MEDIA_STATECHANGED)); + PyDict_SetItemString(d, "wxEVT_MEDIA_PLAY", PyInt_FromLong(wxEVT_MEDIA_PLAY)); + PyDict_SetItemString(d, "wxEVT_MEDIA_PAUSE", PyInt_FromLong(wxEVT_MEDIA_PAUSE)); } diff --git a/wxPython/src/mac/webkit_wrap.cpp b/wxPython/src/mac/webkit_wrap.cpp index 9ad142564b..0e189e3f8c 100644 --- a/wxPython/src/mac/webkit_wrap.cpp +++ b/wxPython/src/mac/webkit_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/mac/wizard_wrap.cpp b/wxPython/src/mac/wizard_wrap.cpp index 9974099896..fbbdec3a9e 100644 --- a/wxPython/src/mac/wizard_wrap.cpp +++ b/wxPython/src/mac/wizard_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/mac/xrc_wrap.cpp b/wxPython/src/mac/xrc_wrap.cpp index 8e381a0453..91b0a0784b 100644 --- a/wxPython/src/mac/xrc_wrap.cpp +++ b/wxPython/src/mac/xrc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 11fafa232b..142315c014 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -240,6 +240,14 @@ class BitmapButton(Button): """ return _controls_.BitmapButton_GetBitmapSelected(*args, **kwargs) + def GetBitmapHover(*args, **kwargs): + """ + GetBitmapHover(self) -> Bitmap + + Returns the bitmap used when the mouse is over the button, may be invalid. + """ + return _controls_.BitmapButton_GetBitmapHover(*args, **kwargs) + def SetBitmapDisabled(*args, **kwargs): """ SetBitmapDisabled(self, Bitmap bitmap) @@ -273,6 +281,16 @@ class BitmapButton(Button): """ return _controls_.BitmapButton_SetBitmapLabel(*args, **kwargs) + def SetBitmapHover(*args, **kwargs): + """ + SetBitmapHover(self, Bitmap hover) + + Sets the bitmap to be shown when the mouse is over the button. This function + is new since wxWidgets version 2.7.0 and the hover bitmap is currently only + supported in wxMSW. + """ + return _controls_.BitmapButton_SetBitmapHover(*args, **kwargs) + def SetMargins(*args, **kwargs): """SetMargins(self, int x, int y)""" return _controls_.BitmapButton_SetMargins(*args, **kwargs) diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index a10890fd24..9d5cca1787 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -3160,6 +3159,36 @@ static PyObject *_wrap_BitmapButton_GetBitmapSelected(PyObject *, PyObject *args } +static PyObject *_wrap_BitmapButton_GetBitmapHover(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; + wxBitmap result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BitmapButton_GetBitmapHover",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetBitmapHover(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxBitmap * resultptr; + resultptr = new wxBitmap(static_cast(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxBitmap, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BitmapButton_SetBitmapDisabled(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; @@ -3300,6 +3329,41 @@ static PyObject *_wrap_BitmapButton_SetBitmapLabel(PyObject *, PyObject *args, P } +static PyObject *_wrap_BitmapButton_SetBitmapHover(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; + wxBitmap *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "hover", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BitmapButton_SetBitmapHover",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + if (arg2 == NULL) { + SWIG_null_ref("wxBitmap"); + } + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBitmapHover((wxBitmap const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BitmapButton_SetMargins(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; @@ -36448,10 +36512,12 @@ static PyMethodDef SwigMethods[] = { { (char *)"BitmapButton_GetBitmapDisabled", (PyCFunction) _wrap_BitmapButton_GetBitmapDisabled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetBitmapFocus", (PyCFunction) _wrap_BitmapButton_GetBitmapFocus, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetBitmapSelected", (PyCFunction) _wrap_BitmapButton_GetBitmapSelected, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"BitmapButton_GetBitmapHover", (PyCFunction) _wrap_BitmapButton_GetBitmapHover, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapDisabled", (PyCFunction) _wrap_BitmapButton_SetBitmapDisabled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapFocus", (PyCFunction) _wrap_BitmapButton_SetBitmapFocus, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapSelected", (PyCFunction) _wrap_BitmapButton_SetBitmapSelected, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetBitmapLabel", (PyCFunction) _wrap_BitmapButton_SetBitmapLabel, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"BitmapButton_SetBitmapHover", (PyCFunction) _wrap_BitmapButton_SetBitmapHover, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_SetMargins", (PyCFunction) _wrap_BitmapButton_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetMarginX", (PyCFunction) _wrap_BitmapButton_GetMarginX, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BitmapButton_GetMarginY", (PyCFunction) _wrap_BitmapButton_GetMarginY, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 8a9960839a..9ea72ddd7d 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -1321,7 +1321,7 @@ class Rect(object): """ Offset(self, Point pt) - Same as OffsetXY but uses dx,dy from Point + Same as `OffsetXY` but uses dx,dy from Point """ return _core_.Rect_Offset(*args, **kwargs) @@ -1397,6 +1397,16 @@ class Rect(object): """ return _core_.Rect_Intersects(*args, **kwargs) + def CenterIn(*args, **kwargs): + """ + CenterIn(self, Rect r, int dir=BOTH) -> Rect + + Center this rectangle within the one passed to the method, which is + usually, but not necessarily, the larger one. + """ + return _core_.Rect_CenterIn(*args, **kwargs) + + CentreIn = CenterIn x = property(_core_.Rect_x_get, _core_.Rect_x_set) y = property(_core_.Rect_y_get, _core_.Rect_y_set) width = property(_core_.Rect_width_get, _core_.Rect_width_set) @@ -5098,6 +5108,21 @@ class KeyEvent(Event): self.this = newobj.this self.thisown = 1 del newobj.thisown + def GetModifiers(*args, **kwargs): + """ + GetModifiers(self) -> int + + Returns a bitmask of the current modifier settings. Can be used to + check if the key event has exactly the given modifiers without having + to explicitly check that the other modifiers are not down. For + example:: + + if event.GetModifers() == wx.MOD_CONTROL: + DoSomething() + + """ + return _core_.KeyEvent_GetModifiers(*args, **kwargs) + def ControlDown(*args, **kwargs): """ ControlDown(self) -> bool @@ -8525,15 +8550,6 @@ class Window(EvtHandler): return _core_.Window_Center(*args, **kwargs) Centre = Center - def CenterOnScreen(*args, **kwargs): - """ - CenterOnScreen(self, int dir=BOTH) - - Center on screen (only works for top level windows) - """ - return _core_.Window_CenterOnScreen(*args, **kwargs) - - CentreOnScreen = CenterOnScreen def CenterOnParent(*args, **kwargs): """ CenterOnParent(self, int dir=BOTH) @@ -10038,9 +10054,13 @@ class Window(EvtHandler): SetAutoLayout(self, bool autoLayout) Determines whether the Layout function will be called automatically - when the window is resized. It is called implicitly by SetSizer but - if you use SetConstraints you should call it manually or otherwise the - window layout won't be correctly updated when its size changes. + when the window is resized. lease note that this only happens for the + windows usually used to contain children, namely `wx.Panel` and + `wx.TopLevelWindow` (and the classes deriving from them). + + This method is called implicitly by `SetSizer` but if you use + `SetConstraints` you should call it manually or otherwise the window + layout won't be correctly updated when its size changes. """ return _core_.Window_SetAutoLayout(*args, **kwargs) @@ -12062,7 +12082,7 @@ class Sizer(Object): """ IsShown(self, item) - Determines if the item is currently shown. sizer. To make a sizer + Determines if the item is currently shown. To make a sizer item disappear or reappear, use Show followed by `Layout`. The *item* parameter can be either a window, a sizer, or the zero-based index of the item. diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 676f8b7c61..f83f0754f4 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -1588,8 +1587,34 @@ static swig_module_info swig_module = {swig_types, 132, 0, 0, 0, 0}; // located here so they know about the SWIG types and functions declared // in the wrapper code. +static +swig_type_info* wxPyFindSwigType(const wxChar* className); + + + +// Make a SWIGified pointer object suitable for a .this attribute +PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { + + PyObject* robj = NULL; + + swig_type_info* swigType = wxPyFindSwigType(className); + wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyMakeSwigPtr")); + +#ifdef SWIG_COBJECT_TYPES + robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name); +#else + { + char result[1024]; + robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ? + PyString_FromString(result) : 0; + } +#endif + return robj; +} + + #include - WX_DECLARE_STRING_HASH_MAP( swig_type_info*, wxPyTypeInfoHashMap ); +WX_DECLARE_STRING_HASH_MAP( swig_type_info*, wxPyTypeInfoHashMap ); // Maintains a hashmap of className to swig_type_info pointers. Given the @@ -1668,29 +1693,6 @@ bool wxPyConvertSwigPtr(PyObject* obj, void **ptr, } -// Make a SWIGified pointer object suitable for a .this attribute -PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) { - - PyObject* robj = NULL; - - swig_type_info* swigType = wxPyFindSwigType(className); - wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyMakeSwigPtr")); - -#if SWIG_VERSION < 0x010328 -#ifdef SWIG_COBJECT_TYPES - robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name); -#else - { - char result[1024]; - robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ? - PyString_FromString(result) : 0; - } -#endif -#else // SWIG_VERSION >= 1.3.28 - robj = PySwigObject_New(ptr, swigType, 0); -#endif - return robj; -} // Python's PyInstance_Check does not return True for instances of new-style @@ -6316,6 +6318,51 @@ static PyObject *_wrap_Rect_Intersects(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Rect_CenterIn(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxRect *arg1 = (wxRect *) 0 ; + wxRect *arg2 = 0 ; + int arg3 = (int) wxBOTH ; + wxRect result; + wxRect temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "r",(char *) "dir", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Rect_CenterIn",kwnames,&obj0,&obj1,&obj2)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxRect, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + if (obj2) { + { + arg3 = static_cast(SWIG_As_int(obj2)); + if (SWIG_arg_fail(3)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->CenterIn((wxRect const &)*arg2,arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxRect * resultptr; + resultptr = new wxRect(static_cast(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Rect_x_set(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxRect *arg1 = (wxRect *) 0 ; @@ -19106,6 +19153,34 @@ static PyObject *_wrap_new_KeyEvent(PyObject *, PyObject *args, PyObject *kwargs } +static PyObject *_wrap_KeyEvent_GetModifiers(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxKeyEvent *arg1 = (wxKeyEvent *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:KeyEvent_GetModifiers",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxKeyEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxKeyEvent const *)arg1)->GetModifiers(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_KeyEvent_ControlDown(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxKeyEvent *arg1 = (wxKeyEvent *) 0 ; @@ -27401,39 +27476,6 @@ static PyObject *_wrap_Window_Center(PyObject *, PyObject *args, PyObject *kwarg } -static PyObject *_wrap_Window_CenterOnScreen(PyObject *, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = NULL; - wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 = (int) wxBOTH ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "dir", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_CenterOnScreen",kwnames,&obj0,&obj1)) goto fail; - SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0); - if (SWIG_arg_fail(1)) SWIG_fail; - if (obj1) { - { - arg2 = static_cast(SWIG_As_int(obj1)); - if (SWIG_arg_fail(2)) SWIG_fail; - } - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->CenterOnScreen(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Window_CenterOnParent(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxWindow *arg1 = (wxWindow *) 0 ; @@ -46416,6 +46458,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_InsideXY", (PyCFunction) _wrap_Rect_InsideXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_Inside", (PyCFunction) _wrap_Rect_Inside, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_Intersects", (PyCFunction) _wrap_Rect_Intersects, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_CenterIn", (PyCFunction) _wrap_Rect_CenterIn, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_x_set", (PyCFunction) _wrap_Rect_x_set, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_x_get", (PyCFunction) _wrap_Rect_x_get, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_y_set", (PyCFunction) _wrap_Rect_y_set, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -46811,6 +46854,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SetCursorEvent_HasCursor", (PyCFunction) _wrap_SetCursorEvent_HasCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SetCursorEvent_swigregister", SetCursorEvent_swigregister, METH_VARARGS, NULL}, { (char *)"new_KeyEvent", (PyCFunction) _wrap_new_KeyEvent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"KeyEvent_GetModifiers", (PyCFunction) _wrap_KeyEvent_GetModifiers, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_ControlDown", (PyCFunction) _wrap_KeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_MetaDown", (PyCFunction) _wrap_KeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"KeyEvent_AltDown", (PyCFunction) _wrap_KeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -47116,7 +47160,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_GetBestFittingSize", (PyCFunction) _wrap_Window_GetBestFittingSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetAdjustedBestSize", (PyCFunction) _wrap_Window_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Center", (PyCFunction) _wrap_Window_Center, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Window_CenterOnScreen", (PyCFunction) _wrap_Window_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_CenterOnParent", (PyCFunction) _wrap_Window_CenterOnParent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_Fit", (PyCFunction) _wrap_Window_Fit, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_FitInside", (PyCFunction) _wrap_Window_FitInside, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 7889ecc179..1e10893b46 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -2817,6 +2817,34 @@ class DC(_core.Object): """ return _gdi_.DC_FloodFillPoint(*args, **kwargs) + def GradientFillConcentric(*args, **kwargs): + """ + GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour, + Point circleCenter) + + Fill the area specified by rect with a radial gradient, starting from + initialColour in the center of the circle and fading to destColour on + the outside of the circle. The circleCenter argument is the relative + coordinants of the center of the circle in the specified rect. + + Note: Currently this function is very slow, don't use it for real-time + drawing. + """ + return _gdi_.DC_GradientFillConcentric(*args, **kwargs) + + def GradientFillLinear(*args, **kwargs): + """ + GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour, + int nDirection=EAST) + + Fill the area specified by rect with a linear gradient, starting from + initialColour and eventually fading to destColour. The nDirection + parameter specifies the direction of the colour change, default is to + use initialColour on the left part of the rectangle and destColour on + the right side. + """ + return _gdi_.DC_GradientFillLinear(*args, **kwargs) + def GetPixel(*args, **kwargs): """ GetPixel(self, int x, int y) -> Colour diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index 5a8d6d3a21..65ce1135fa 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -13181,6 +13180,113 @@ static PyObject *_wrap_DC_FloodFillPoint(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_DC_GradientFillConcentric(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDC *arg1 = (wxDC *) 0 ; + wxRect *arg2 = 0 ; + wxColour *arg3 = 0 ; + wxColour *arg4 = 0 ; + wxPoint *arg5 = 0 ; + wxRect temp2 ; + wxColour temp3 ; + wxColour temp4 ; + wxPoint temp5 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect",(char *) "initialColour",(char *) "destColour",(char *) "circleCenter", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:DC_GradientFillConcentric",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; + } + { + arg4 = &temp4; + if ( ! wxColour_helper(obj3, &arg4)) SWIG_fail; + } + { + arg5 = &temp5; + if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->GradientFillConcentric((wxRect const &)*arg2,(wxColour const &)*arg3,(wxColour const &)*arg4,(wxPoint const &)*arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_DC_GradientFillLinear(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDC *arg1 = (wxDC *) 0 ; + wxRect *arg2 = 0 ; + wxColour *arg3 = 0 ; + wxColour *arg4 = 0 ; + wxDirection arg5 = (wxDirection) wxEAST ; + wxRect temp2 ; + wxColour temp3 ; + wxColour temp4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect",(char *) "initialColour",(char *) "destColour",(char *) "nDirection", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:DC_GradientFillLinear",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + arg3 = &temp3; + if ( ! wxColour_helper(obj2, &arg3)) SWIG_fail; + } + { + arg4 = &temp4; + if ( ! wxColour_helper(obj3, &arg4)) SWIG_fail; + } + if (obj4) { + { + arg5 = static_cast(SWIG_As_int(obj4)); + if (SWIG_arg_fail(5)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->GradientFillLinear((wxRect const &)*arg2,(wxColour const &)*arg3,(wxColour const &)*arg4,arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_DC_GetPixel(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxDC *arg1 = (wxDC *) 0 ; @@ -22701,6 +22807,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_DC", (PyCFunction) _wrap_delete_DC, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_FloodFill", (PyCFunction) _wrap_DC_FloodFill, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_FloodFillPoint", (PyCFunction) _wrap_DC_FloodFillPoint, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_GradientFillConcentric", (PyCFunction) _wrap_DC_GradientFillConcentric, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_GradientFillLinear", (PyCFunction) _wrap_DC_GradientFillLinear, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetPixel", (PyCFunction) _wrap_DC_GetPixel, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_GetPixelPoint", (PyCFunction) _wrap_DC_GetPixelPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"DC_DrawLine", (PyCFunction) _wrap_DC_DrawLine, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 13086b69a2..017f88fea9 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index 2b296e0063..6a874520dc 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -448,6 +448,15 @@ class TopLevelWindow(_core.Window): """MacGetMetalAppearance(self) -> bool""" return _windows_.TopLevelWindow_MacGetMetalAppearance(*args, **kwargs) + def CenterOnScreen(*args, **kwargs): + """ + CenterOnScreen(self, int dir=BOTH) + + Center the window on screen + """ + return _windows_.TopLevelWindow_CenterOnScreen(*args, **kwargs) + + CentreOnScreen = CenterOnScreen class TopLevelWindowPtr(TopLevelWindow): def __init__(self, this): @@ -657,6 +666,22 @@ class Dialog(TopLevelWindow): """GetReturnCode(self) -> int""" return _windows_.Dialog_GetReturnCode(*args, **kwargs) + def SetAffirmativeId(*args, **kwargs): + """SetAffirmativeId(self, int affirmativeId)""" + return _windows_.Dialog_SetAffirmativeId(*args, **kwargs) + + def GetAffirmativeId(*args, **kwargs): + """GetAffirmativeId(self) -> int""" + return _windows_.Dialog_GetAffirmativeId(*args, **kwargs) + + def SetEscapeId(*args, **kwargs): + """SetEscapeId(self, int escapeId)""" + return _windows_.Dialog_SetEscapeId(*args, **kwargs) + + def GetEscapeId(*args, **kwargs): + """GetEscapeId(self) -> int""" + return _windows_.Dialog_GetEscapeId(*args, **kwargs) + def CreateTextSizer(*args, **kwargs): """CreateTextSizer(self, String message) -> Sizer""" return _windows_.Dialog_CreateTextSizer(*args, **kwargs) diff --git a/wxPython/src/msw/_windows_wrap.cpp b/wxPython/src/msw/_windows_wrap.cpp index c235d5b4c2..b2c52997ab 100644 --- a/wxPython/src/msw/_windows_wrap.cpp +++ b/wxPython/src/msw/_windows_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -4829,6 +4828,39 @@ static PyObject *_wrap_TopLevelWindow_MacGetMetalAppearance(PyObject *, PyObject } +static PyObject *_wrap_TopLevelWindow_CenterOnScreen(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ; + int arg2 = (int) wxBOTH ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "dir", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_CenterOnScreen",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxTopLevelWindow, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + if (obj1) { + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CenterOnScreen(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * TopLevelWindow_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -6098,6 +6130,124 @@ static PyObject *_wrap_Dialog_GetReturnCode(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_Dialog_SetAffirmativeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "affirmativeId", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetAffirmativeId",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetAffirmativeId(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_GetAffirmativeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Dialog_GetAffirmativeId",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxDialog const *)arg1)->GetAffirmativeId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_SetEscapeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "escapeId", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetEscapeId",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + arg2 = static_cast(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetEscapeId(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Dialog_GetEscapeId(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxDialog *arg1 = (wxDialog *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Dialog_GetEscapeId",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxDialog const *)arg1)->GetEscapeId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = SWIG_From_int(static_cast(result)); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Dialog_CreateTextSizer(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxDialog *arg1 = (wxDialog *) 0 ; @@ -27676,6 +27826,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TopLevelWindow_IsActive", (PyCFunction) _wrap_TopLevelWindow_IsActive, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_MacSetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacSetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_MacGetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacGetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TopLevelWindow_CenterOnScreen", (PyCFunction) _wrap_TopLevelWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TopLevelWindow_swigregister", TopLevelWindow_swigregister, METH_VARARGS, NULL}, { (char *)"new_Frame", (PyCFunction) _wrap_new_Frame, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_PreFrame", (PyCFunction) _wrap_new_PreFrame, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -27706,6 +27857,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Dialog_Create", (PyCFunction) _wrap_Dialog_Create, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_SetReturnCode", (PyCFunction) _wrap_Dialog_SetReturnCode, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_GetReturnCode", (PyCFunction) _wrap_Dialog_GetReturnCode, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_SetAffirmativeId", (PyCFunction) _wrap_Dialog_SetAffirmativeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_GetAffirmativeId", (PyCFunction) _wrap_Dialog_GetAffirmativeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_SetEscapeId", (PyCFunction) _wrap_Dialog_SetEscapeId, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Dialog_GetEscapeId", (PyCFunction) _wrap_Dialog_GetEscapeId, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateTextSizer", (PyCFunction) _wrap_Dialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateButtonSizer", (PyCFunction) _wrap_Dialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Dialog_CreateStdDialogButtonSizer", (PyCFunction) _wrap_Dialog_CreateStdDialogButtonSizer, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/calendar_wrap.cpp b/wxPython/src/msw/calendar_wrap.cpp index 0eb37b96a6..c7782491a7 100644 --- a/wxPython/src/msw/calendar_wrap.cpp +++ b/wxPython/src/msw/calendar_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/msw/grid_wrap.cpp b/wxPython/src/msw/grid_wrap.cpp index 29f5171825..cb18d0bf50 100644 --- a/wxPython/src/msw/grid_wrap.cpp +++ b/wxPython/src/msw/grid_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index c1b7e69433..a09f041017 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -831,6 +831,18 @@ class HtmlWordCell(HtmlCell): self.this = newobj.this self.thisown = 1 del newobj.thisown + def ConvertToText(*args, **kwargs): + """ConvertToText(self, HtmlSelection sel) -> String""" + return _html.HtmlWordCell_ConvertToText(*args, **kwargs) + + def IsLinebreakAllowed(*args, **kwargs): + """IsLinebreakAllowed(self) -> bool""" + return _html.HtmlWordCell_IsLinebreakAllowed(*args, **kwargs) + + def SetPreviousWord(*args, **kwargs): + """SetPreviousWord(self, HtmlWordCell cell)""" + return _html.HtmlWordCell_SetPreviousWord(*args, **kwargs) + class HtmlWordCellPtr(HtmlWordCell): def __init__(self, this): diff --git a/wxPython/src/msw/html_wrap.cpp b/wxPython/src/msw/html_wrap.cpp index 5bf212f650..e1db50f49b 100644 --- a/wxPython/src/msw/html_wrap.cpp +++ b/wxPython/src/msw/html_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -4705,7 +4704,9 @@ static PyObject *_wrap_HtmlSelection_GetFromCell(PyObject *, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -4731,7 +4732,9 @@ static PyObject *_wrap_HtmlSelection_GetToCell(PyObject *, PyObject *args, PyObj wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -5896,7 +5899,9 @@ static PyObject *_wrap_HtmlCell_GetNext(PyObject *, PyObject *args, PyObject *kw wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -5948,7 +5953,9 @@ static PyObject *_wrap_HtmlCell_GetFirstChild(PyObject *, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6332,7 +6339,9 @@ static PyObject *_wrap_HtmlCell_Find(PyObject *, PyObject *args, PyObject *kwarg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6507,7 +6516,9 @@ static PyObject *_wrap_HtmlCell_FindCellByPos(PyObject *, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6563,7 +6574,9 @@ static PyObject *_wrap_HtmlCell_GetFirstTerminal(PyObject *, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6589,7 +6602,9 @@ static PyObject *_wrap_HtmlCell_GetLastTerminal(PyObject *, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -6747,6 +6762,99 @@ static PyObject *_wrap_new_HtmlWordCell(PyObject *, PyObject *args, PyObject *kw } +static PyObject *_wrap_HtmlWordCell_ConvertToText(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + wxHtmlSelection *arg2 = (wxHtmlSelection *) 0 ; + wxString result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "sel", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlWordCell_ConvertToText",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxHtmlSelection, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxHtmlWordCell const *)arg1)->ConvertToText(arg2); + + 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_HtmlWordCell_IsLinebreakAllowed(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:HtmlWordCell_IsLinebreakAllowed",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxHtmlWordCell const *)arg1)->IsLinebreakAllowed(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_HtmlWordCell_SetPreviousWord(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = NULL; + wxHtmlWordCell *arg1 = (wxHtmlWordCell *) 0 ; + wxHtmlWordCell *arg2 = (wxHtmlWordCell *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "cell", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlWordCell_SetPreviousWord",kwnames,&obj0,&obj1)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxHtmlWordCell, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(2)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetPreviousWord(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * HtmlWordCell_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -7306,7 +7414,9 @@ static PyObject *_wrap_HtmlContainerCell_GetFirstChild(PyObject *, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxHtmlCell, 0); + { + resultobj = wxPyMake_wxObject(result, 0); + } return resultobj; fail: return NULL; @@ -14687,6 +14797,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlCell_ConvertToText", (PyCFunction) _wrap_HtmlCell_ConvertToText, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlCell_swigregister", HtmlCell_swigregister, METH_VARARGS, NULL}, { (char *)"new_HtmlWordCell", (PyCFunction) _wrap_new_HtmlWordCell, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_ConvertToText", (PyCFunction) _wrap_HtmlWordCell_ConvertToText, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_IsLinebreakAllowed", (PyCFunction) _wrap_HtmlWordCell_IsLinebreakAllowed, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"HtmlWordCell_SetPreviousWord", (PyCFunction) _wrap_HtmlWordCell_SetPreviousWord, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlWordCell_swigregister", HtmlWordCell_swigregister, METH_VARARGS, NULL}, { (char *)"new_HtmlContainerCell", (PyCFunction) _wrap_new_HtmlContainerCell, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"HtmlContainerCell_InsertCell", (PyCFunction) _wrap_HtmlContainerCell_InsertCell, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/media.py b/wxPython/src/msw/media.py index 70f4e57160..15318575e1 100644 --- a/wxPython/src/msw/media.py +++ b/wxPython/src/msw/media.py @@ -54,6 +54,10 @@ __docfilter__ = wx.__DocFilter(globals()) MEDIASTATE_STOPPED = _media.MEDIASTATE_STOPPED MEDIASTATE_PAUSED = _media.MEDIASTATE_PAUSED MEDIASTATE_PLAYING = _media.MEDIASTATE_PLAYING +MEDIACTRLPLAYERCONTROLS_NONE = _media.MEDIACTRLPLAYERCONTROLS_NONE +MEDIACTRLPLAYERCONTROLS_STEP = _media.MEDIACTRLPLAYERCONTROLS_STEP +MEDIACTRLPLAYERCONTROLS_VOLUME = _media.MEDIACTRLPLAYERCONTROLS_VOLUME +MEDIACTRLPLAYERCONTROLS_DEFAULT = _media.MEDIACTRLPLAYERCONTROLS_DEFAULT class MediaEvent(_core.NotifyEvent): """Proxy of C++ MediaEvent class""" def __repr__(self): @@ -71,6 +75,11 @@ class MediaEventPtr(MediaEvent): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MediaEvent _media.MediaEvent_swigregister(MediaEventPtr) +cvar = _media.cvar +MEDIABACKEND_DIRECTSHOW = cvar.MEDIABACKEND_DIRECTSHOW +MEDIABACKEND_MCI = cvar.MEDIABACKEND_MCI +MEDIABACKEND_QUICKTIME = cvar.MEDIABACKEND_QUICKTIME +MEDIABACKEND_GSTREAMER = cvar.MEDIABACKEND_GSTREAMER class MediaCtrl(_core.Control): """Proxy of C++ MediaCtrl class""" @@ -145,7 +154,7 @@ class MediaCtrl(_core.Control): return _media.MediaCtrl_SetVolume(*args, **kwargs) def ShowPlayerControls(*args, **kwargs): - """ShowPlayerControls(self, wxMediaCtrlPlayerControls flags=wxMEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" + """ShowPlayerControls(self, int flags=MEDIACTRLPLAYERCONTROLS_DEFAULT) -> bool""" return _media.MediaCtrl_ShowPlayerControls(*args, **kwargs) def Load(*args, **kwargs): @@ -168,7 +177,6 @@ class MediaCtrlPtr(MediaCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MediaCtrl _media.MediaCtrl_swigregister(MediaCtrlPtr) -cvar = _media.cvar MediaCtrlNameStr = cvar.MediaCtrlNameStr def PreMediaCtrl(*args, **kwargs): diff --git a/wxPython/src/msw/media_wrap.cpp b/wxPython/src/msw/media_wrap.cpp index 21dca6e1cd..5420bc66fe 100644 --- a/wxPython/src/msw/media_wrap.cpp +++ b/wxPython/src/msw/media_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { @@ -1478,54 +1477,53 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { #define SWIGTYPE_p_wxLayoutConstraints swig_types[43] #define SWIGTYPE_p_wxMaximizeEvent swig_types[44] #define SWIGTYPE_p_wxMediaCtrl swig_types[45] -#define SWIGTYPE_p_wxMediaCtrlPlayerControls swig_types[46] -#define SWIGTYPE_p_wxMediaEvent swig_types[47] -#define SWIGTYPE_p_wxMenu swig_types[48] -#define SWIGTYPE_p_wxMenuBar swig_types[49] -#define SWIGTYPE_p_wxMenuEvent swig_types[50] -#define SWIGTYPE_p_wxMenuItem swig_types[51] -#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[52] -#define SWIGTYPE_p_wxMouseEvent swig_types[53] -#define SWIGTYPE_p_wxMoveEvent swig_types[54] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[55] -#define SWIGTYPE_p_wxNcPaintEvent swig_types[56] -#define SWIGTYPE_p_wxNotifyEvent swig_types[57] -#define SWIGTYPE_p_wxObject swig_types[58] -#define SWIGTYPE_p_wxPCXHandler swig_types[59] -#define SWIGTYPE_p_wxPNGHandler swig_types[60] -#define SWIGTYPE_p_wxPNMHandler swig_types[61] -#define SWIGTYPE_p_wxPaintEvent swig_types[62] -#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[63] -#define SWIGTYPE_p_wxPaperSize swig_types[64] -#define SWIGTYPE_p_wxPyApp swig_types[65] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[66] -#define SWIGTYPE_p_wxPyEvent swig_types[67] -#define SWIGTYPE_p_wxPyImageHandler swig_types[68] -#define SWIGTYPE_p_wxPySizer swig_types[69] -#define SWIGTYPE_p_wxPyValidator swig_types[70] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[71] -#define SWIGTYPE_p_wxScrollEvent swig_types[72] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[73] -#define SWIGTYPE_p_wxSetCursorEvent swig_types[74] -#define SWIGTYPE_p_wxShowEvent swig_types[75] -#define SWIGTYPE_p_wxSizeEvent swig_types[76] -#define SWIGTYPE_p_wxSizer swig_types[77] -#define SWIGTYPE_p_wxSizerItem swig_types[78] -#define SWIGTYPE_p_wxStaticBoxSizer swig_types[79] -#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[80] -#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[81] -#define SWIGTYPE_p_wxTIFFHandler swig_types[82] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[83] -#define SWIGTYPE_p_wxValidator swig_types[84] -#define SWIGTYPE_p_wxWindow swig_types[85] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[86] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[87] -#define SWIGTYPE_p_wxXPMHandler swig_types[88] -#define SWIGTYPE_ptrdiff_t swig_types[89] -#define SWIGTYPE_std__ptrdiff_t swig_types[90] -#define SWIGTYPE_unsigned_int swig_types[91] -static swig_type_info *swig_types[93]; -static swig_module_info swig_module = {swig_types, 92, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxMediaEvent swig_types[46] +#define SWIGTYPE_p_wxMenu swig_types[47] +#define SWIGTYPE_p_wxMenuBar swig_types[48] +#define SWIGTYPE_p_wxMenuEvent swig_types[49] +#define SWIGTYPE_p_wxMenuItem swig_types[50] +#define SWIGTYPE_p_wxMouseCaptureChangedEvent swig_types[51] +#define SWIGTYPE_p_wxMouseEvent swig_types[52] +#define SWIGTYPE_p_wxMoveEvent swig_types[53] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[54] +#define SWIGTYPE_p_wxNcPaintEvent swig_types[55] +#define SWIGTYPE_p_wxNotifyEvent swig_types[56] +#define SWIGTYPE_p_wxObject swig_types[57] +#define SWIGTYPE_p_wxPCXHandler swig_types[58] +#define SWIGTYPE_p_wxPNGHandler swig_types[59] +#define SWIGTYPE_p_wxPNMHandler swig_types[60] +#define SWIGTYPE_p_wxPaintEvent swig_types[61] +#define SWIGTYPE_p_wxPaletteChangedEvent swig_types[62] +#define SWIGTYPE_p_wxPaperSize swig_types[63] +#define SWIGTYPE_p_wxPyApp swig_types[64] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[65] +#define SWIGTYPE_p_wxPyEvent swig_types[66] +#define SWIGTYPE_p_wxPyImageHandler swig_types[67] +#define SWIGTYPE_p_wxPySizer swig_types[68] +#define SWIGTYPE_p_wxPyValidator swig_types[69] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[70] +#define SWIGTYPE_p_wxScrollEvent swig_types[71] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[72] +#define SWIGTYPE_p_wxSetCursorEvent swig_types[73] +#define SWIGTYPE_p_wxShowEvent swig_types[74] +#define SWIGTYPE_p_wxSizeEvent swig_types[75] +#define SWIGTYPE_p_wxSizer swig_types[76] +#define SWIGTYPE_p_wxSizerItem swig_types[77] +#define SWIGTYPE_p_wxStaticBoxSizer swig_types[78] +#define SWIGTYPE_p_wxStdDialogButtonSizer swig_types[79] +#define SWIGTYPE_p_wxSysColourChangedEvent swig_types[80] +#define SWIGTYPE_p_wxTIFFHandler swig_types[81] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[82] +#define SWIGTYPE_p_wxValidator swig_types[83] +#define SWIGTYPE_p_wxWindow swig_types[84] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[85] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[86] +#define SWIGTYPE_p_wxXPMHandler swig_types[87] +#define SWIGTYPE_ptrdiff_t swig_types[88] +#define SWIGTYPE_std__ptrdiff_t swig_types[89] +#define SWIGTYPE_unsigned_int swig_types[90] +static swig_type_info *swig_types[92]; +static swig_module_info swig_module = {swig_types, 91, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1562,7 +1560,12 @@ enum wxMediaCtrlPlayerControls wxMEDIACTRLPLAYERCONTROLS_DEFAULT }; - +static wxString wxMEDIABACKEND_DIRECTSHOW(wxEmptyString); +static wxString wxMEDIABACKEND_MCI (wxEmptyString); +static wxString wxMEDIABACKEND_QUICKTIME (wxEmptyString); +static wxString wxMEDIABACKEND_GSTREAMER (wxEmptyString); + + class wxMediaEvent : public wxNotifyEvent { public: @@ -1630,6 +1633,10 @@ const wxEventType wxEVT_MEDIA_LOADED = 0; #define SWIG_From_int PyInt_FromLong /*@@*/ + static const wxString wxPyMEDIABACKEND_DIRECTSHOW(wxMEDIABACKEND_DIRECTSHOW); + static const wxString wxPyMEDIABACKEND_MCI(wxMEDIABACKEND_MCI); + static const wxString wxPyMEDIABACKEND_QUICKTIME(wxMEDIABACKEND_QUICKTIME); + static const wxString wxPyMEDIABACKEND_GSTREAMER(wxMEDIABACKEND_GSTREAMER); #include @@ -1787,6 +1794,86 @@ SWIG_Check_double(PyObject* obj) #ifdef __cplusplus extern "C" { #endif +static int _wrap_MEDIABACKEND_DIRECTSHOW_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_DIRECTSHOW is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_DIRECTSHOW_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_DIRECTSHOW)->c_str(), (&wxPyMEDIABACKEND_DIRECTSHOW)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_DIRECTSHOW)->c_str(), (&wxPyMEDIABACKEND_DIRECTSHOW)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_MCI_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_MCI is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_MCI_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_MCI)->c_str(), (&wxPyMEDIABACKEND_MCI)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_MCI)->c_str(), (&wxPyMEDIABACKEND_MCI)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_QUICKTIME_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_QUICKTIME is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_QUICKTIME_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_QUICKTIME)->c_str(), (&wxPyMEDIABACKEND_QUICKTIME)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_QUICKTIME)->c_str(), (&wxPyMEDIABACKEND_QUICKTIME)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MEDIABACKEND_GSTREAMER_set(PyObject *) { + PyErr_SetString(PyExc_TypeError,"Variable MEDIABACKEND_GSTREAMER is read-only."); + return 1; +} + + +static PyObject *_wrap_MEDIABACKEND_GSTREAMER_get(void) { + PyObject *pyobj = NULL; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMEDIABACKEND_GSTREAMER)->c_str(), (&wxPyMEDIABACKEND_GSTREAMER)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMEDIABACKEND_GSTREAMER)->c_str(), (&wxPyMEDIABACKEND_GSTREAMER)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_MediaEvent(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj = NULL; wxEventType arg1 = (wxEventType) wxEVT_NULL ; @@ -2505,14 +2592,8 @@ static PyObject *_wrap_MediaCtrl_ShowPlayerControls(PyObject *, PyObject *args, if (SWIG_arg_fail(1)) SWIG_fail; if (obj1) { { - wxMediaCtrlPlayerControls * argp; - SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_wxMediaCtrlPlayerControls, SWIG_POINTER_EXCEPTION); - if (SWIG_arg_fail(2)) SWIG_fail; - if (argp == NULL) { - SWIG_null_ref("wxMediaCtrlPlayerControls"); - } + arg2 = static_cast(SWIG_As_int(obj1)); if (SWIG_arg_fail(2)) SWIG_fail; - arg2 = *argp; } } { @@ -3192,7 +3273,6 @@ static swig_type_info _swigt__p_wxPyValidator = {"_p_wxPyValidator", 0, 0, 0, 0} static swig_type_info _swigt__p_wxMenu = {"_p_wxMenu", 0, 0, 0, 0}; static swig_type_info _swigt__p_wxFileOffset = {"_p_wxFileOffset", "wxFileOffset *", 0, 0, 0}; static swig_type_info _swigt__p_wxMediaCtrl = {"_p_wxMediaCtrl", "wxMediaCtrl *", 0, 0, 0}; -static swig_type_info _swigt__p_wxMediaCtrlPlayerControls = {"_p_wxMediaCtrlPlayerControls", "wxMediaCtrlPlayerControls *", 0, 0, 0}; static swig_type_info _swigt__p_wxMediaEvent = {"_p_wxMediaEvent", "wxMediaEvent *", 0, 0, 0}; static swig_type_info _swigt__p_wxNotifyEvent = {"_p_wxNotifyEvent", "wxNotifyEvent *", 0, 0, 0}; static swig_type_info _swigt__p_wxObject = {"_p_wxObject", "wxObject *", 0, 0, 0}; @@ -3280,7 +3360,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxLayoutConstraints, &_swigt__p_wxMaximizeEvent, &_swigt__p_wxMediaCtrl, - &_swigt__p_wxMediaCtrlPlayerControls, &_swigt__p_wxMediaEvent, &_swigt__p_wxMenu, &_swigt__p_wxMenuBar, @@ -3380,7 +3459,6 @@ static swig_cast_info _swigc__p_wxMenu[] = {{&_swigt__p_wxMenu, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_wxEvtHandler[] = { {&_swigt__p_wxControl, _p_wxControlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxControlWithItems, _p_wxControlWithItemsTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxWindow, _p_wxWindowTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxEvtHandler, 0, 0, 0}, {&_swigt__p_wxMediaCtrl, _p_wxMediaCtrlTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyApp, _p_wxPyAppTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenuBar, _p_wxMenuBarTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxValidator, _p_wxValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxPyValidator, _p_wxPyValidatorTo_p_wxEvtHandler, 0, 0}, {&_swigt__p_wxMenu, _p_wxMenuTo_p_wxEvtHandler, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxFileOffset[] = { {&_swigt__p_wxFileOffset, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxMediaCtrl[] = { {&_swigt__p_wxMediaCtrl, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_wxMediaCtrlPlayerControls[] = { {&_swigt__p_wxMediaCtrlPlayerControls, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxMediaEvent[] = { {&_swigt__p_wxMediaEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxNotifyEvent[] = { {&_swigt__p_wxNotifyEvent, 0, 0, 0}, {&_swigt__p_wxMediaEvent, _p_wxMediaEventTo_p_wxNotifyEvent, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxLayoutConstraints[] = {{&_swigt__p_wxLayoutConstraints, 0, 0, 0},{0, 0, 0, 0}}; @@ -3468,7 +3546,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxLayoutConstraints, _swigc__p_wxMaximizeEvent, _swigc__p_wxMediaCtrl, - _swigc__p_wxMediaCtrlPlayerControls, _swigc__p_wxMediaEvent, _swigc__p_wxMenu, _swigc__p_wxMenuBar, @@ -4020,7 +4097,23 @@ SWIGEXPORT void SWIG_init(void) { { PyDict_SetItemString(d,"MEDIASTATE_PLAYING", SWIG_From_int(static_cast(wxMEDIASTATE_PLAYING))); } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_NONE", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_NONE))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_STEP", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_STEP))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_VOLUME", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_VOLUME))); + } + { + PyDict_SetItemString(d,"MEDIACTRLPLAYERCONTROLS_DEFAULT", SWIG_From_int(static_cast(wxMEDIACTRLPLAYERCONTROLS_DEFAULT))); + } PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_DIRECTSHOW",_wrap_MEDIABACKEND_DIRECTSHOW_get, _wrap_MEDIABACKEND_DIRECTSHOW_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_MCI",_wrap_MEDIABACKEND_MCI_get, _wrap_MEDIABACKEND_MCI_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_QUICKTIME",_wrap_MEDIABACKEND_QUICKTIME_get, _wrap_MEDIABACKEND_QUICKTIME_set); + SWIG_addvarlink(SWIG_globals,(char*)"MEDIABACKEND_GSTREAMER",_wrap_MEDIABACKEND_GSTREAMER_get, _wrap_MEDIABACKEND_GSTREAMER_set); SWIG_addvarlink(SWIG_globals,(char*)"MediaCtrlNameStr",_wrap_MediaCtrlNameStr_get, _wrap_MediaCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_MEDIA_FINISHED", PyInt_FromLong(wxEVT_MEDIA_FINISHED)); PyDict_SetItemString(d, "wxEVT_MEDIA_STOP", PyInt_FromLong(wxEVT_MEDIA_STOP)); diff --git a/wxPython/src/msw/webkit_wrap.cpp b/wxPython/src/msw/webkit_wrap.cpp index 4bdad3b0db..7790e8a0fa 100644 --- a/wxPython/src/msw/webkit_wrap.cpp +++ b/wxPython/src/msw/webkit_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/msw/wizard_wrap.cpp b/wxPython/src/msw/wizard_wrap.cpp index 4c95408e5e..6fc84ccb5c 100644 --- a/wxPython/src/msw/wizard_wrap.cpp +++ b/wxPython/src/msw/wizard_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { diff --git a/wxPython/src/msw/xrc_wrap.cpp b/wxPython/src/msw/xrc_wrap.cpp index c6705ff150..a3ad67a549 100644 --- a/wxPython/src/msw/xrc_wrap.cpp +++ b/wxPython/src/msw/xrc_wrap.cpp @@ -9,7 +9,6 @@ * ----------------------------------------------------------------------------- */ #define SWIGPYTHON -#define SWIG_VERSION 0x010327 #ifdef __cplusplus template class SwigValueWrapper { -- 2.45.2