Moved declaratrions of wxPyInputStream and etc. into it's own header

file.

SWIGged updates for wxGTK


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-02-28 16:59:20 +00:00
parent 0a68bc6908
commit 4152e8b9fd
11 changed files with 51 additions and 8 deletions

View 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 },

View 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):

View 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>

View File

@ -56,6 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
#define SWIG_name "imagec"
#include "helpers.h"
#include "pyistream.h"
#include <wx/image.h>

View 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>

View 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>

View 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));

View 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)

View 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

View File

@ -15,6 +15,7 @@
%{
#include "helpers.h"
#include "pyistream.h"
#include <wx/image.h>
%}

View File

@ -16,6 +16,7 @@
%{
#include "helpers.h"
#include "pyistream.h"
#include <wx/resource.h>
#include <wx/tooltip.h>
#include <wx/caret.h>