wxGTK version of generated code for recent changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-03-15 00:52:30 +00:00
parent 5e40f9dd0d
commit c9482eba5c
4 changed files with 76 additions and 127 deletions

View File

@@ -27,19 +27,21 @@
# define SWIGEXPORT(a) __declspec(dllexport) a
# else
# if defined(__BORLANDC__)
# define SWIGEXPORT(a) a _export
# define SWIGEXPORT(a) a _export
# else
# define SWIGEXPORT(a) a
# define SWIGEXPORT(a) a
# endif
# endif
#else
# define SWIGEXPORT(a) a
# define SWIGEXPORT(a) a
#endif
#include "Python.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "Python.h"
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
@@ -57,12 +59,12 @@ extern PyObject *SWIG_newvarlink(void);
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
if (!target) {
if (!target) {
target = o;
} else if (target == Py_None) {
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} else {
} else {
if (!PyList_Check(target)) {
o2 = target;
target = PyList_New(0);
@@ -79,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
if (!target) {
target = o;
} else if (target == Py_None) {
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} else {
} else {
if (!PyTuple_Check(target)) {
o2 = target;
target = PyTuple_New(1);
PyTuple_SetItem(target, 0, o2);
}
o3 = PyTuple_New(1);
PyTuple_SetItem(o3, 0, o);
o3 = PyTuple_New(1);
PyTuple_SetItem(o3, 0, o);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
@@ -1783,6 +1785,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxDataObject","_class_wxDataObject",0},
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
{ "_wxStaticBox","_class_wxStaticBox",0},
{ "_wxColourDatabase","_class_wxColourDatabase",0},
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
{ "_wxPyDropSource","_class_wxPyDropSource",0},
{ "_wxChoice","_class_wxChoice",0},
@@ -1896,6 +1899,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
{ "_char","_wxChar",0},
{ "_wxBitmap","_class_wxBitmap",0},
{ "_wxPenList","_class_wxPenList",0},
{ "_wxPrintDialog","_class_wxPrintDialog",0},
{ "_wxWindowDC","_class_wxWindowDC",0},
{ "_wxTimerEvent","_class_wxTimerEvent",0},
@@ -1922,6 +1926,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxToolBar","_wxToolBar",0},
{ "_wxDropTarget","_class_wxDropTarget",0},
{ "_class_wxStaticLine","_wxStaticLine",0},
{ "_class_wxColourDatabase","_wxColourDatabase",0},
{ "_wxScrollEvent","_class_wxScrollEvent",0},
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
@@ -1950,9 +1955,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
{ "_class_wxProgressDialog","_wxProgressDialog",0},
{ "_class_wxBrushList","_wxBrushList",0},
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
{ "_wxPyInputStream","_class_wxPyInputStream",0},
{ "_wxPyApp","_class_wxPyApp",0},
{ "_class_wxPenList","_wxPenList",0},
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
{ "_class_wxOutputStream","_wxOutputStream",0},
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
@@ -2011,6 +2018,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_wxFontList","_class_wxFontList",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
@@ -2189,10 +2197,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
{ "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxFontList","_wxFontList",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxListCtrl","_wxListCtrl",0},
{ "_wxBrushList","_class_wxBrushList",0},
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
{ "_class_wxLogNull","_wxLogNull",0},
{ "_class_wxSize","_wxSize",0},
@@ -2894,6 +2904,7 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxEVT_COMMAND_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_ENTER));
PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY));
PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER));
PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY));
PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0"));
PyDict_SetItemString(d,"cvar", SWIG_globals);
SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set);

View File

@@ -804,6 +804,7 @@ wxEVT_COMMAND_KILL_FOCUS = wxc.wxEVT_COMMAND_KILL_FOCUS
wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER
wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY
wxEVT_TIMER = wxc.wxEVT_TIMER
wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
__version__ = wxc.__version__
cvar = wxc.cvar
wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition)
@@ -843,38 +844,6 @@ def _checkForCallback(obj, name, event, theID=-1):
except: pass
else: obj.Connect(theID, -1, event, cb)
## def _StdWindowCallbacks(win):
## _checkForCallback(win, "OnChar", wxEVT_CHAR)
## _checkForCallback(win, "OnSize", wxEVT_SIZE)
## _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND)
## _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED)
## _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG)
## _checkForCallback(win, "OnPaint", wxEVT_PAINT)
## _checkForCallback(win, "OnIdle", wxEVT_IDLE)
## def _StdFrameCallbacks(win):
## _StdWindowCallbacks(win)
## _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE)
## _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT)
## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
## def _StdDialogCallbacks(win):
## _StdWindowCallbacks(win)
## _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK)
## _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY)
## _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL)
## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
## _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK)
## def _StdOnScrollCallbacks(win):
## try: cb = getattr(win, "OnScroll")
## except: pass
## else: EVT_SCROLL(win, cb)
#----------------------------------------------------------------------
#----------------------------------------------------------------------
@@ -1371,35 +1340,6 @@ def EVT_TASKBAR_RIGHT_DCLICK(win, func):
win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func)
## # wxGrid *** THE OLD ONE ***
## def EVT_GRID_SELECT_CELL(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn)
## def EVT_GRID_CREATE_CELL(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn)
## def EVT_GRID_CHANGE_LABELS(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn)
## def EVT_GRID_CHANGE_SEL_LABEL(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn)
## def EVT_GRID_CELL_CHANGE(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn)
## def EVT_GRID_CELL_LCLICK(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn)
## def EVT_GRID_CELL_RCLICK(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn)
## def EVT_GRID_LABEL_LCLICK(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn)
## def EVT_GRID_LABEL_RCLICK(win, fn):
## win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn)
# wxSashWindow
def EVT_SASH_DRAGGED(win, id, func):
win.Connect(id, -1, wxEVT_SASH_DRAGGED, func)
@@ -1539,10 +1479,6 @@ NULL = _NullObj()
wxColor = wxColour
wxNamedColor = wxNamedColour
# aliases so that C++ documentation applies:
#wxDefaultPosition = wxPyDefaultPosition
#wxDefaultSize = wxPyDefaultSize
# backwards compatibility
wxNoRefBitmap = wxBitmap
@@ -1571,6 +1507,8 @@ wxPyDefaultSize = wxDefaultSize
#
def wxPyTypeCast(obj, typeStr):
if obj is None:
return None
if hasattr(obj, "this"):
newPtr = ptrcast(obj.this, typeStr+"_p")
else:
@@ -1582,12 +1520,14 @@ def wxPyTypeCast(obj, typeStr):
return theObj
#----------------------------------------------------------------------
#----------------------------------------------------------------------
class wxPyOnDemandOutputWindow:
def __init__(self, title = "wxPython: stdout/stderr"):
self.frame = None
self.title = title
self.parent = None
def SetParent(self, parent):
@@ -1601,7 +1541,7 @@ class wxPyOnDemandOutputWindow:
self.text = None
# this provides the file-like behaviour
# this provides the file-like output behaviour
def write(self, str):
if not self.frame:
self.frame = wxFrame(self.parent, -1, self.title)
@@ -1615,9 +1555,7 @@ class wxPyOnDemandOutputWindow:
def close(self):
if self.frame != None:
self.frame.Destroy()
self.frame = None
self.text = None
self.frame.Close()
@@ -1651,7 +1589,6 @@ class wxApp(wxPyApp):
def SetTopWindow(self, frame):
if self.stdioWin:
self.stdioWin.SetParent(frame)
sys.stderr = sys.stdout = self.stdioWin
wxPyApp.SetTopWindow(self, frame)
@@ -1665,18 +1602,18 @@ class wxApp(wxPyApp):
sys.stdout = sys.stderr = open(filename, 'a')
else:
self.stdioWin = self.outputWindowClass() # wxPyOnDemandOutputWindow
sys.stdout = sys.stderr = self.stdioWin
def RestoreStdio(self):
sys.stdout, sys.stderr = self.saveStdio
if self.stdioWin != None:
self.stdioWin.close()
#----------------------------------------------------------------------------
class wxPySimpleApp(wxApp):
def __init__(self):
wxApp.__init__(self, 0)
def __init__(self, flag=0):
wxApp.__init__(self, flag)
def OnInit(self):
return true
@@ -1709,6 +1646,3 @@ class __wxPyCleanup:
__cleanMeUp = __wxPyCleanup()
#----------------------------------------------------------------------------