From 262e41eb554a10d7cd1a2f0bb13592f3d7faae32 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 20 Nov 2001 02:52:07 +0000 Subject: [PATCH] SWIGged code updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/glcanvas/gtk/glcanvas.cpp | 16 ++++++++++++++++ wxPython/contrib/glcanvas/gtk/glcanvas.py | 16 ++++++++++++++++ wxPython/src/gtk/controls2.cpp | 1 + wxPython/src/gtk/controls2.py | 4 ++++ wxPython/src/msw/grid.cpp | 10 +++++----- 5 files changed, 42 insertions(+), 5 deletions(-) diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index edec9393d2..7b1f7656c4 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -870,6 +870,22 @@ SWIGEXPORT(void) initglcanvasc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("glcanvasc", glcanvascMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA)); + PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE)); + PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL)); + PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER)); + PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO)); + PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS)); + PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED)); + PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN)); + PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE)); + PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA)); + PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE)); + PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE)); + PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED)); + PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN)); + PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE)); + PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA)); wxClassInfo::CleanUpClasses(); diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.py b/wxPython/contrib/glcanvas/gtk/glcanvas.py index 5290ba4bfd..8b5f9eabad 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.py +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.py @@ -126,3 +126,19 @@ def wxGLCanvasWithContext(*_args,**_kwargs): #-------------- VARIABLE WRAPPERS ------------------ +WX_GL_RGBA = glcanvasc.WX_GL_RGBA +WX_GL_BUFFER_SIZE = glcanvasc.WX_GL_BUFFER_SIZE +WX_GL_LEVEL = glcanvasc.WX_GL_LEVEL +WX_GL_DOUBLEBUFFER = glcanvasc.WX_GL_DOUBLEBUFFER +WX_GL_STEREO = glcanvasc.WX_GL_STEREO +WX_GL_AUX_BUFFERS = glcanvasc.WX_GL_AUX_BUFFERS +WX_GL_MIN_RED = glcanvasc.WX_GL_MIN_RED +WX_GL_MIN_GREEN = glcanvasc.WX_GL_MIN_GREEN +WX_GL_MIN_BLUE = glcanvasc.WX_GL_MIN_BLUE +WX_GL_MIN_ALPHA = glcanvasc.WX_GL_MIN_ALPHA +WX_GL_DEPTH_SIZE = glcanvasc.WX_GL_DEPTH_SIZE +WX_GL_STENCIL_SIZE = glcanvasc.WX_GL_STENCIL_SIZE +WX_GL_MIN_ACCUM_RED = glcanvasc.WX_GL_MIN_ACCUM_RED +WX_GL_MIN_ACCUM_GREEN = glcanvasc.WX_GL_MIN_ACCUM_GREEN +WX_GL_MIN_ACCUM_BLUE = glcanvasc.WX_GL_MIN_ACCUM_BLUE +WX_GL_MIN_ACCUM_ALPHA = glcanvasc.WX_GL_MIN_ACCUM_ALPHA diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index 4fefa0b6df..5a6b056a00 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -9736,6 +9736,7 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_BEGIN_DRAG)); PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_DRAGGING", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_DRAGGING)); PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_END_DRAG)); + PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_FOCUSED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_FOCUSED)); PyDict_SetItemString(d,"wxLC_VRULES", PyInt_FromLong((long) wxLC_VRULES)); PyDict_SetItemString(d,"wxLC_HRULES", PyInt_FromLong((long) wxLC_HRULES)); PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON)); diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index bed6003602..ca5244477f 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -77,6 +77,9 @@ def EVT_LIST_ITEM_ACTIVATED(win, id, func): def EVT_LIST_CACHE_HINT(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_CACHE_HINT, func) +def EVT_LIST_ITEM_FOCUSED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_FOCUSED, func) + # wxTreeCtrl events def EVT_TREE_BEGIN_DRAG(win, id, func): @@ -1126,6 +1129,7 @@ wxEVT_COMMAND_LIST_COL_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_RIGHT_CLI wxEVT_COMMAND_LIST_COL_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_BEGIN_DRAG wxEVT_COMMAND_LIST_COL_DRAGGING = controls2c.wxEVT_COMMAND_LIST_COL_DRAGGING wxEVT_COMMAND_LIST_COL_END_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_END_DRAG +wxEVT_COMMAND_LIST_ITEM_FOCUSED = controls2c.wxEVT_COMMAND_LIST_ITEM_FOCUSED wxLC_VRULES = controls2c.wxLC_VRULES wxLC_HRULES = controls2c.wxLC_HRULES wxLC_ICON = controls2c.wxLC_ICON diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index f1fd50ca23..85077f9918 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -235,7 +235,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ bool CBNAME(int a, int b, const wxString& c) { \ - bool rval; \ + bool rval = 0; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ @@ -272,7 +272,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \ bool CBNAME(int a, int b) { \ - bool rval; \ + bool rval = 0; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ @@ -332,7 +332,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \ bool CBNAME(size_t a, size_t b) { \ - bool rval; \ + bool rval = 0; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ @@ -350,7 +350,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \ bool CBNAME(size_t a) { \ - bool rval; \ + bool rval = 0; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ @@ -410,7 +410,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #define PYCALLBACK_BOOL_(PCLASS, CBNAME) \ bool CBNAME() { \ - bool rval; \ + bool rval = 0; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ -- 2.45.2