]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved declaratrions of wxPyInputStream and etc. into it's own header
authorRobin Dunn <robin@alldunn.com>
Thu, 28 Feb 2002 16:59:20 +0000 (16:59 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 28 Feb 2002 16:59:20 +0000 (16:59 +0000)
file.

SWIGged updates for wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/gtk/events.cpp
wxPython/src/gtk/events.py
wxPython/src/gtk/filesys.cpp
wxPython/src/gtk/image.cpp
wxPython/src/gtk/misc2.cpp
wxPython/src/gtk/streams.cpp
wxPython/src/gtk/wx.cpp
wxPython/src/gtk/wx.py
wxPython/src/helpers.cpp
wxPython/src/image.i
wxPython/src/misc2.i

index 84d6c249fb4935df982ce979fdcb3c103b6d4e55..b5fca3d48c5c55778d7ee83e7ab160cdae4bbe90 100644 (file)
@@ -4734,6 +4734,34 @@ static PyObject *_wrap_wxMenuEvent_GetMenuId(PyObject *self, PyObject *args, PyO
     return _resultobj;
 }
 
+#define wxMenuEvent_IsPopup(_swigobj)  (_swigobj->IsPopup())
+static PyObject *_wrap_wxMenuEvent_IsPopup(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    bool  _result;
+    wxMenuEvent * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuEvent_IsPopup",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuEvent_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuEvent_IsPopup. Expected _wxMenuEvent_p.");
+        return NULL;
+        }
+    }
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+        _result = (bool )wxMenuEvent_IsPopup(_arg0);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    _resultobj = Py_BuildValue("i",_result);
+    return _resultobj;
+}
+
 static void *SwigwxShowEventTowxEvent(void *ptr) {
     wxShowEvent *src;
     wxEvent *dest;
@@ -7184,6 +7212,7 @@ static PyMethodDef eventscMethods[] = {
         { "wxShowEvent_GetShow", (PyCFunction) _wrap_wxShowEvent_GetShow, METH_VARARGS | METH_KEYWORDS },
         { "wxShowEvent_SetShow", (PyCFunction) _wrap_wxShowEvent_SetShow, METH_VARARGS | METH_KEYWORDS },
         { "new_wxShowEvent", (PyCFunction) _wrap_new_wxShowEvent, METH_VARARGS | METH_KEYWORDS },
+        { "wxMenuEvent_IsPopup", (PyCFunction) _wrap_wxMenuEvent_IsPopup, METH_VARARGS | METH_KEYWORDS },
         { "wxMenuEvent_GetMenuId", (PyCFunction) _wrap_wxMenuEvent_GetMenuId, METH_VARARGS | METH_KEYWORDS },
         { "new_wxMenuEvent", (PyCFunction) _wrap_new_wxMenuEvent, METH_VARARGS | METH_KEYWORDS },
         { "new_wxInitDialogEvent", (PyCFunction) _wrap_new_wxInitDialogEvent, METH_VARARGS | METH_KEYWORDS },
index d6ba0941e71b83c443fce8ef2c5044bfe3cc3800..38be62abe4a4ac9aea892e06721777945409d150 100644 (file)
@@ -629,6 +629,9 @@ class wxMenuEventPtr(wxEventPtr):
     def GetMenuId(self, *_args, **_kwargs):
         val = apply(eventsc.wxMenuEvent_GetMenuId,(self,) + _args, _kwargs)
         return val
+    def IsPopup(self, *_args, **_kwargs):
+        val = apply(eventsc.wxMenuEvent_IsPopup,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxMenuEvent instance at %s>" % (self.this,)
 class wxMenuEvent(wxMenuEventPtr):
index 0b2186bfbe7e474c67da08fec85b3805ac5c5c45..8c9f53633ecd5b330f25ca7debccc27e6778bf64 100644 (file)
@@ -56,6 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
 #define SWIG_name    "filesysc"
 
 #include "helpers.h"
+#include "pyistream.h"
 #include <wx/filesys.h>
 #include <wx/fs_inet.h>
 #include <wx/fs_mem.h>
index 2b4d773e637befd4aeba9e4e5cf29ac9ab2e5bf6..0796f706fe47727c9363473b8684674108762d79 100644 (file)
@@ -56,6 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
 #define SWIG_name    "imagec"
 
 #include "helpers.h"
+#include "pyistream.h"
 #include <wx/image.h>
 
 
index 0c5016b3fba289aac0bbcaf5504fb1df53f1cd44..fab3942670e0221293ecaf1fa3b039cf102f1e0b 100644 (file)
@@ -56,6 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
 #define SWIG_name    "misc2c"
 
 #include "helpers.h"
+#include "pyistream.h"
 #include <wx/resource.h>
 #include <wx/tooltip.h>
 #include <wx/caret.h>
index 3e628fd98f4e14c23a511514b5f5356438c118c6..2822bd02f3d75b8cf1bc5ce4c468a2387bab2ab0 100644 (file)
@@ -56,6 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
 #define SWIG_name    "streamsc"
 
 #include "helpers.h"
+#include "pyistream.h"
 #include <wx/stream.h>
 #include <wx/list.h>
 
index ca356122f546daef7b6542629724531fa62cf363..e10bc1d09d060ec75bab44d84c3195a90873aea0 100644 (file)
@@ -2561,10 +2561,9 @@ SWIGEXPORT(void) initwxc() {
         PyDict_SetItemString(d,"wxEVT_ERASE_BACKGROUND", PyInt_FromLong((long) wxEVT_ERASE_BACKGROUND));
         PyDict_SetItemString(d,"wxEVT_NC_PAINT", PyInt_FromLong((long) wxEVT_NC_PAINT));
         PyDict_SetItemString(d,"wxEVT_PAINT_ICON", PyInt_FromLong((long) wxEVT_PAINT_ICON));
-        PyDict_SetItemString(d,"wxEVT_MENU_CHAR", PyInt_FromLong((long) wxEVT_MENU_CHAR));
-        PyDict_SetItemString(d,"wxEVT_MENU_INIT", PyInt_FromLong((long) wxEVT_MENU_INIT));
+        PyDict_SetItemString(d,"wxEVT_MENU_OPEN", PyInt_FromLong((long) wxEVT_MENU_OPEN));
+        PyDict_SetItemString(d,"wxEVT_MENU_CLOSE", PyInt_FromLong((long) wxEVT_MENU_CLOSE));
         PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT));
-        PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT));
         PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED));
         PyDict_SetItemString(d,"wxEVT_DISPLAY_CHANGED", PyInt_FromLong((long) wxEVT_DISPLAY_CHANGED));
         PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED));
index 81aec65c68c0a6c4832ef0635bcdfd080d76f04d..679823cd895e04b06d1b707a1fb32698c2dd9994 100644 (file)
@@ -848,10 +848,9 @@ wxEVT_PAINT = wxc.wxEVT_PAINT
 wxEVT_ERASE_BACKGROUND = wxc.wxEVT_ERASE_BACKGROUND
 wxEVT_NC_PAINT = wxc.wxEVT_NC_PAINT
 wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON
-wxEVT_MENU_CHAR = wxc.wxEVT_MENU_CHAR
-wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT
+wxEVT_MENU_OPEN = wxc.wxEVT_MENU_OPEN
+wxEVT_MENU_CLOSE = wxc.wxEVT_MENU_CLOSE
 wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT
-wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT
 wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED
 wxEVT_DISPLAY_CHANGED = wxc.wxEVT_DISPLAY_CHANGED
 wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED
@@ -949,6 +948,12 @@ def EVT_KEY_DOWN(win, func):
 def EVT_KEY_UP(win, func):
     win.Connect(-1, -1, wxEVT_KEY_UP, func)
 
+def EVT_MENU_OPEN(win, func):
+    win.Connect(-1, -1, wxEVT_MENU_OPEN, func)
+
+def EVT_MENU_CLOSE(win, func):
+    win.Connect(-1, -1, wxEVT_MENU_CLOSE, func)
+
 def EVT_MENU_HIGHLIGHT(win, id, func):
     win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
 
index f653ed1c417440f5e844318dda13919b4fa9d4d6..bf1d3402f31995eb63c6605e65c36ac01facbd82 100644 (file)
@@ -906,11 +906,11 @@ void wxPyCallbackHelper::setSelf(PyObject* self, PyObject* klass, int incref) {
 // Prior to Python 2.2 PyMethod_GetClass returned the class object
 // in which the method was defined.  Starting with 2.2 it returns
 // "class that asked for the method" which seems totally bogus to me
-// but apprently if fixes some obscure problem waiting to happen in
+// but apprently it fixes some obscure problem waiting to happen in
 // Python.  Since the API was not documented Guido and the gang felt
 // safe in changing it.  Needless to say that totally screwed up the
 // logic below in wxPyCallbackHelper::findCallback, hence this icky
-// code to find the class where the method is actuallt defined...
+// code to find the class where the method is actually defined...
 
 static
 PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name)
@@ -958,6 +958,7 @@ PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name)
         }
         return NULL;
     }
+    return NULL;
 }
 #endif
 
index 457887f7f128eb8fe90239abd9756d0815b3399b..ba3f7ecb154078e24c4f592b74af7264c99e1d87 100644 (file)
@@ -15,6 +15,7 @@
 
 %{
 #include "helpers.h"
+#include "pyistream.h"
 #include <wx/image.h>
 %}
 
index 3c5fe21590a4b1410a63cc63931adaf2cbc06e25..1e01336806459e854fce5dca1f1a3726ed78fe39 100644 (file)
@@ -16,6 +16,7 @@
 
 %{
 #include "helpers.h"
+#include "pyistream.h"
 #include <wx/resource.h>
 #include <wx/tooltip.h>
 #include <wx/caret.h>