]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/ogl.i
test wxString's char<->wchar_t ctors
[wxWidgets.git] / wxPython / contrib / ogl / ogl.i
index f821f35b9c9548ab241f5a4ee929219b14aed357..fff16bd5a4df1ae6967ab5d3f0190115bce801ca 100644 (file)
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
+%define DOCSTRING
+"The Object Graphics Library provides for simple drawing and manipulation
+of 2D objects.  (This version is deprecated, please use wx.lib.ogl instead.)"
+%enddef
 
-%module ogl
+%module(package="wx", docstring=DOCSTRING) ogl
 
 %{
 #include "wx/wxPython/wxPython.h"
 %pythoncode { wx = _core }
 %pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
 
+%pythoncode {
+    import warnings
+    warnings.warn("This module is deprecated.  Please use the wx.lib.ogl package instead.",    
+                  DeprecationWarning, stacklevel=2)
+}
+
 
 MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
 
@@ -147,7 +157,10 @@ enum {
 
 //---------------------------------------------------------------------------
 
+MustHaveApp(wxOGLInitialize);
 void wxOGLInitialize();
+
+MustHaveApp(wxOGLCleanUp);
 void wxOGLCleanUp();
 
 
@@ -256,22 +269,23 @@ PyObject*  wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
 
 //---------------------------------------------------------------------------
 
-PyObject* wxPy_ConvertRealPointList(wxListBase* list) {
-      PyObject*   pyList;
-      PyObject*   pyObj;
-      wxObject*   wxObj;
-      wxNode*     node = list->GetFirst();
-
-      bool blocked = wxPyBeginBlockThreads();
-      pyList = PyList_New(0);
-      while (node) {
-          wxObj = node->GetData();
-          pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
-          PyList_Append(pyList, pyObj);
-          node = node->GetNext();
-      }
-      wxPyEndBlockThreads(blocked);
-      return pyList;
+PyObject* wxPy_ConvertRealPointList(wxListBase* listbase) {
+    wxList*     list = (wxList*)listbase;
+    PyObject*   pyList;
+    PyObject*   pyObj;
+    wxObject*   wxObj;
+    wxNode*     node = list->GetFirst();
+    
+    bool blocked = wxPyBeginBlockThreads();
+    pyList = PyList_New(0);
+    while (node) {
+        wxObj = node->GetData();
+        pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
+        PyList_Append(pyList, pyObj);
+        node = node->GetNext();
+    } 
+    wxPyEndBlockThreads(blocked);
+    return pyList;
 }
 
 //---------------------------------------------------------------------------