From fb5e0af035b25afec4bebf8585c1f32766636599 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 18 Aug 1998 19:48:20 +0000 Subject: [PATCH] more wxGTK compatibility things. It builds now but there are serious runtime problems... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/src/Setup.in | 5 ++- utils/wxPython/src/_defs.i | 7 +++++ utils/wxPython/src/_extras.py | 53 ++++++++++++++++++-------------- utils/wxPython/src/cmndlgs.i | 17 ++++++++++- utils/wxPython/src/controls.i | 24 +++++++++++++-- utils/wxPython/src/controls2.i | 56 ++++++++++++++++++++++++++++++++++ utils/wxPython/src/gdi.i | 56 +++++++++++++++++++++++++--------- utils/wxPython/src/helpers.cpp | 29 ++++++++++++++---- utils/wxPython/src/mdi.i | 12 ++++++++ utils/wxPython/src/misc.i | 12 ++++++-- utils/wxPython/src/windows2.i | 7 +++++ utils/wxPython/src/wxp.i | 8 +++-- 12 files changed, 232 insertions(+), 54 deletions(-) diff --git a/utils/wxPython/src/Setup.in b/utils/wxPython/src/Setup.in index 914c321396..b0bae45f64 100644 --- a/utils/wxPython/src/Setup.in +++ b/utils/wxPython/src/Setup.in @@ -6,6 +6,7 @@ CCC=c++ WXWIN=../../.. + ## Pick one of these, or set your own #TARGETDIR=$(BINLIBDEST)/site-packages/wxPython TARGETDIR=.. @@ -13,6 +14,8 @@ TARGETDIR=.. wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \ mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \ -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \ - -DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk +# -D__WXDEBUG__ -ldmalloc \ + -DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk \ + -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 diff --git a/utils/wxPython/src/_defs.i b/utils/wxPython/src/_defs.i index 90c3fc176c..5218ae9a7d 100644 --- a/utils/wxPython/src/_defs.i +++ b/utils/wxPython/src/_defs.i @@ -113,7 +113,9 @@ enum { wxMINOR_VERSION, wxRELEASE_NUMBER, +#ifdef __WXMSW__ UNKNOWN, +#endif NOT_FOUND, wxVSCROLL, @@ -695,6 +697,11 @@ enum wxEventType { ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.4 1998/08/18 19:48:11 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.3 1998/08/14 23:36:33 RD // Beginings of wxGTK compatibility // diff --git a/utils/wxPython/src/_extras.py b/utils/wxPython/src/_extras.py index 21bde533fb..1e87311f07 100644 --- a/utils/wxPython/src/_extras.py +++ b/utils/wxPython/src/_extras.py @@ -370,17 +370,18 @@ class wxFrame(wxFramePtr): _StdFrameCallbacks(self) -class wxMiniFrame(wxMiniFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) +if wxPlatform == '__WXMSW__': + class wxMiniFrame(wxMiniFramePtr): + def __init__(self,arg0,arg1,arg2,*args) : + argl = map(None,args) + try: argl[0] = argl[0].this + except: pass + try: argl[1] = argl[1].this + except: pass + args = tuple(argl) + self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) + self.thisown = 1 + _StdFrameCallbacks(self) class wxPanel(wxPanelPtr): @@ -603,17 +604,18 @@ class wxScrollBar(wxScrollBarPtr): self.thisown = 1 _StdWindowCallbacks(self) -class wxSpinButton(wxSpinButtonPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) +if wxPlatform == '__WXMSW__': + class wxSpinButton(wxSpinButtonPtr): + def __init__(self,arg0,*args) : + argl = map(None,args) + try: argl[1] = argl[1].this + except: pass + try: argl[2] = argl[2].this + except: pass + args = tuple(argl) + self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args) + self.thisown = 1 + _StdWindowCallbacks(self) class wxStaticBitmap(wxStaticBitmapPtr): def __init__(self,arg0,arg1,arg2,*args) : @@ -716,7 +718,7 @@ wxPyDefaultSize.Set(-1,-1) ## self.isShown = false -_defRedirect = (wxPlatform == '__WIN32__') +_defRedirect = (wxPlatform == '__WXMSW__') #---------------------------------------------------------------------- # The main application class. Derive from this and implement an OnInit @@ -760,6 +762,11 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.2 1998/08/18 19:48:12 RD +# more wxGTK compatibility things. +# +# It builds now but there are serious runtime problems... +# # Revision 1.1 1998/08/09 08:25:49 RD # Initial version # diff --git a/utils/wxPython/src/cmndlgs.i b/utils/wxPython/src/cmndlgs.i index ed5ec6bf65..dc6dae7be1 100644 --- a/utils/wxPython/src/cmndlgs.i +++ b/utils/wxPython/src/cmndlgs.i @@ -41,7 +41,7 @@ public: bool GetChooseFull(); wxColour& GetColour(); - wxColour& GetCustomColour(int i); + wxColour GetCustomColour(int i); void SetChooseFull(int flag); void SetColour(const wxColour& colour); void SetCustomColour(int i, const wxColour& colour); @@ -52,13 +52,18 @@ class wxColourDialog : public wxDialog { public: wxColourDialog(wxWindow* parent, wxColourData* data = NULL); +#ifdef __WXMSW__ wxColourData& GetColourData(); +#else + wxColourData GetColourData(); +#endif int ShowModal(); }; //---------------------------------------------------------------------- +#ifdef __WXMSW__ class wxDirDialog : public wxDialog { public: wxDirDialog(wxWindow* parent, @@ -74,6 +79,7 @@ public: void SetPath(const wxString& path); int ShowModal(); }; +#endif //---------------------------------------------------------------------- @@ -185,6 +191,7 @@ public: //---------------------------------------------------------------------- +#ifdef __WXMSW__ class wxPageSetupData { public: wxPageSetupData(); @@ -226,9 +233,11 @@ public: wxPageSetupData& GetPageSetupData(); int ShowModal(); }; +#endif //---------------------------------------------------------------------- +#ifdef __WXMSW__ class wxPrintData { public: wxPrintData(); @@ -266,6 +275,7 @@ public: wxDC* GetPrintDC(); int ShowModal(); }; +#endif //---------------------------------------------------------------------- @@ -286,6 +296,11 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/08/18 19:48:13 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.2 1998/08/15 07:36:25 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being diff --git a/utils/wxPython/src/controls.i b/utils/wxPython/src/controls.i index 1d6c728b27..c3121d24e5 100644 --- a/utils/wxPython/src/controls.i +++ b/utils/wxPython/src/controls.i @@ -15,7 +15,10 @@ %{ #include "helpers.h" #include + +#ifdef __WXMSW__ #include +#endif %} //---------------------------------------------------------------------- @@ -41,7 +44,7 @@ wxValidator wxPyDefaultValidator; // Non-const default because of SWIG class wxControl : public wxWindow { public: void Command(wxCommandEvent& event); - wxString& GetLabel(); + wxString GetLabel(); void SetLabel(const wxString& label); }; @@ -69,14 +72,16 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "button"); + wxBitmap& GetBitmapLabel(); +#ifdef __WXMSW__ wxBitmap& GetBitmapDisabled(); wxBitmap& GetBitmapFocus(); - wxBitmap& GetBitmapLabel(); wxBitmap& GetBitmapSelected(); void SetBitmapDisabled(const wxBitmap& bitmap); void SetBitmapFocus(const wxBitmap& bitmap); - void SetBitmapLabel(const wxBitmap& bitmap); void SetBitmapSelected(const wxBitmap& bitmap); +#endif + void SetBitmapLabel(const wxBitmap& bitmap); }; @@ -258,14 +263,18 @@ public: void DiscardEdits(); long GetInsertionPoint(); long GetLastPosition(); +#ifdef __WXMSW__ int GetLineLength(long lineNo); wxString GetLineText(long lineNo); int GetNumberOfLines(); +#endif wxString GetValue(); bool IsModified(); bool LoadFile(const wxString& filename); void Paste(); +#ifdef __WXMSW__ void PositionToXY(long pos, long *OUTPUT, long *OUTPUT); +#endif void Remove(long from, long to); void Replace(long from, long to, const wxString& value); bool SaveFile(const wxString& filename); @@ -276,7 +285,9 @@ public: void SetValue(const wxString& value); void ShowPosition(long pos); void WriteText(const wxString& text); +#ifdef __WXMSW__ long XYToPosition(long x, long y); +#endif }; //---------------------------------------------------------------------- @@ -302,6 +313,7 @@ public: //---------------------------------------------------------------------- +#ifdef __WXMSW__ class wxSpinButton : public wxControl { public: wxSpinButton(wxWindow* parent, wxWindowID id = -1, @@ -316,6 +328,7 @@ public: void SetRange(int min, int max); void SetValue(int value); }; +#endif //---------------------------------------------------------------------- @@ -419,6 +432,11 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/08/18 19:48:14 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.2 1998/08/15 07:36:28 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being diff --git a/utils/wxPython/src/controls2.i b/utils/wxPython/src/controls2.i index 185592d1d4..65ea561ecf 100644 --- a/utils/wxPython/src/controls2.i +++ b/utils/wxPython/src/controls2.i @@ -76,21 +76,31 @@ public: class wxListCtrl : public wxControl { public: +#ifdef __WXMSW__ wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxPyDefaultPosition, const wxSize& size = wxPyDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxPyDefaultValidator, char* name = "listCtrl"); +#else + wxListCtrl(wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxPyDefaultPosition, + const wxSize& size = wxPyDefaultSize, + long style = wxLC_ICON, + char* name = "listctrl"); +#endif bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); bool DeleteItem(long item); bool DeleteAllItems(); bool DeleteColumn(int col); +#ifdef __WXMSW__ bool DeleteAllColumns(void); void ClearAll(void); wxTextCtrl* EditLabel(long item); bool EndEditLabel(bool cancel); +#endif bool EnsureVisible(long item); long FindItem(long start, const wxString& str, bool partial = FALSE); %name(FindItemData)long FindItem(long start, long data); @@ -99,7 +109,9 @@ public: bool GetColumn(int col, wxListItem& item); int GetColumnWidth(int col); int GetCountPerPage(); +#ifdef __WXMSW wxTextCtrl* GetEditControl(); +#endif wxImageList* GetImageList(int which); long GetItemData(long item); @@ -129,7 +141,9 @@ public: int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE); int GetSelectedItemCount(); +#ifdef __WXMSW__ wxColour GetTextColour(); +#endif long GetTopItem(); long HitTest(const wxPoint& point, int& OUTPUT); %name(InsertColumnWithInfo)long InsertColumn(long col, wxListItem& info); @@ -157,7 +171,9 @@ public: bool SetItemState(long item, long state, long stateMask); void SetItemText(long item, const wxString& text); void SetSingleStyle(long style, bool add = TRUE); +#ifdef __WXMSW__ void SetTextColour(const wxColour& col); +#endif void SetWindowStyleFlag(long style); // TODO: bool SortItems(wxListCtrlCompare fn, long data); }; @@ -262,22 +278,38 @@ public: class wxTreeCtrl : public wxControl { public: +#ifdef __WXMSW__ wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxPyDefaultPosition, const wxSize& size = wxPyDefaultSize, long style = wxTR_HAS_BUTTONS, const wxValidator& validator = wxPyDefaultValidator, char* name = "wxTreeCtrl"); +#else + wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, + const wxPoint& pos = wxPyDefaultPosition, + const wxSize& size = wxPyDefaultSize, + long style = wxTR_HAS_BUTTONS, + char* name = "wxTreeCtrl"); +#endif bool DeleteAllItems(); +#ifdef __WXMSW__ bool DeleteItem(long item); +#else + void DeleteItem(long item); +#endif +#ifdef __WXMSW__ wxTextCtrl* EditLabel(long item); bool EnsureVisible(long item); bool ExpandItem(long item, int action); long GetChild(long item); +#endif int GetCount(); +#ifdef __WXMSW__ wxTextCtrl* GetEditControl(); long GetFirstVisibleItem(); +#endif wxImageList* GetImageList(int which = wxIMAGE_LIST_NORMAL); int GetIndent(); long GetItemData(long item); @@ -288,17 +320,23 @@ public: self->GetItem(*info); return info; } +#ifdef __WXMSW__ %new wxRect* GetItemRect(long item, int textOnly = FALSE) { wxRect* rect = new wxRect; self->GetItemRect(item, *rect, textOnly); return rect; } +#endif } +#ifdef __WXMSW__ int GetItemState(long item, long stateMask); +#endif wxString GetItemText(long item); +#ifdef __WXMSW__ long GetNextItem(long item, int code); long GetNextVisibleItem(long item); +#endif long GetParent(long item); long GetRootItem(); long GetSelection(); @@ -310,20 +348,31 @@ public: int image = -1, int selImage = -1, long insertAfter = wxTREE_INSERT_LAST); bool ItemHasChildren(long item); +#ifdef __WXMSW__ bool ScrollTo(long item); +#endif bool SelectItem(long item); void SetIndent(int indent); void SetImageList(wxImageList* imageList, int which = wxIMAGE_LIST_NORMAL); bool SetItem(wxTreeItem& info); +#ifdef __WXMSW__ bool SetItemImage(long item, int image, int selImage); +#else + void SetItemImage(long item, int image, int selImage); +#endif +#ifdef __WXMSW__ bool SetItemState(long item, long state, long stateMask); +#endif void SetItemText(long item, const wxString& text); bool SetItemData(long item, long data); +#ifdef __WXMSW__ bool SortChildren(long item); +#endif }; //---------------------------------------------------------------------- +#ifdef __WXMSW__ class wxTabEvent : public wxCommandEvent { public: }; @@ -369,12 +418,19 @@ public: }; +#endif + //---------------------------------------------------------------------- ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/08/18 19:48:15 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.2 1998/08/15 07:36:30 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being diff --git a/utils/wxPython/src/gdi.i b/utils/wxPython/src/gdi.i index 93c43a5e7e..6784b6eba3 100644 --- a/utils/wxPython/src/gdi.i +++ b/utils/wxPython/src/gdi.i @@ -15,7 +15,6 @@ %{ #include "helpers.h" - #include %} @@ -35,7 +34,9 @@ public: wxBitmap(const wxString& name, long type); ~wxBitmap(); +#ifdef __WXMSW__ void Create(int width, int height, int depth = -1); +#endif int GetDepth(); int GetHeight(); wxPalette* GetPalette(); @@ -47,8 +48,9 @@ public: void SetDepth(int depth); void SetHeight(int height); void SetMask(wxMask* mask); - void SetOk(int isOk); +#ifdef __WXMSW__ void SetPalette(wxPalette* palette); +#endif void SetWidth(int width); }; @@ -88,7 +90,10 @@ public: class wxIcon : public wxBitmap { public: - wxIcon(char *name, long flags); +#ifdef __WXMSW__ + wxIcon(const wxString& name, long flags, + int desiredWidth = -1, int desiredHeight = -1); +#endif ~wxIcon(); int GetDepth(); @@ -98,7 +103,6 @@ public: bool Ok(); void SetDepth(int depth); void SetHeight(int height); - void SetOk(int isOk); void SetWidth(int width); }; @@ -106,7 +110,9 @@ public: class wxCursor : public wxBitmap { public: +#ifdef __WXMSW__ wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0); +#endif ~wxCursor(); bool Ok(); }; @@ -142,12 +148,14 @@ public: int GetStyle(); bool GetUnderlined(); int GetWeight(); +#ifdef __WXMSW__ void SetFaceName(const wxString& faceName); void SetFamily(int family); void SetPointSize(int pointSize); void SetStyle(int style); void SetUnderlined(bool underlined); void SetWeight(int weight); +#endif }; //---------------------------------------------------------------------- @@ -198,18 +206,22 @@ public: int GetCap(); wxColour& GetColour(); +#ifdef __WXMSW__ // **** This one needs to return a list of ints (wxDash) int GetDashes(wxDash **dashes); - int GetJoin(); wxBitmap* GetStipple(); +#endif + int GetJoin(); int GetStyle(); int GetWidth(); bool Ok(); void SetCap(int cap_style); void SetColour(wxColour& colour); +#ifdef __WXMSW__ void SetDashes(int LCOUNT, wxDash* LIST); - void SetJoin(int join_style); void SetStipple(wxBitmap * stipple); +#endif + void SetJoin(int join_style); void SetStyle(int style); void SetWidth(int width); }; @@ -231,9 +243,11 @@ public: wxBitmap * GetStipple(); int GetStyle(); bool Ok(); +#ifdef __WXMSW__ void SetColour(wxColour &colour); void SetStipple(wxBitmap *bitmap); void SetStyle(int style); +#endif }; //---------------------------------------------------------------------- @@ -242,7 +256,7 @@ public: class wxDC { public: - wxDC(); +// wxDC(); **** abstract base class, can't instantiate. ~wxDC(); void BeginDrawing(); @@ -271,7 +285,12 @@ public: void EndDoc(); void EndDrawing(); void EndPage(); +#ifdef __WXWIN__ void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE); +#endif +#ifdef __WXGTK__ + void FloodFill(long x, long y, wxColour* colour, int style=wxFLOOD_SURFACE); +#endif wxBrush * GetBackground(); wxBrush * GetBrush(); long GetCharHeight(); @@ -283,7 +302,13 @@ public: int GetMapMode(); bool GetOptimization(); wxPen * GetPen(); - //bool GetPixel(int x, int y, wxColour *T_OUTPUT); **** See below. + %addmethods { + %new wxColour* GetPixel(long x, long y) { + wxColour* wc = new wxColour(); + self->GetPixel(x, y, wc); + return wc; + } + } void GetSize(int* OUTPUT, int* OUTPUT); //void GetSize(long* OUTPUT, long* OUTPUT); wxColour& GetTextBackground(); void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT, @@ -317,12 +342,6 @@ public: %addmethods { - %new wxColour* GetPixel(long x, long y) { - wxColor* wc = new wxColor(); - self->GetPixel(x, y, wc); - return wc; - } - // This one is my own creation... void DrawBitmap(wxBitmap* bitmap, long x, long y, bool swapPalette=TRUE) { wxMemoryDC* memDC = new wxMemoryDC; @@ -389,19 +408,23 @@ public: //--------------------------------------------------------------------------- +#ifdef __WXMSW__ class wxPrinterDC : public wxDC { public: wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT); }; +#endif //--------------------------------------------------------------------------- +#ifdef __WXMSW__ class wxMetaFileDC : public wxDC { public: wxMetaFileDC(const wxString& filename = wxPyEmptyStr); wxMetaFile* Close(); }; +#endif //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- @@ -461,6 +484,11 @@ extern wxColour wxNullColour; ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/08/18 19:48:16 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.2 1998/08/15 07:36:35 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being diff --git a/utils/wxPython/src/helpers.cpp b/utils/wxPython/src/helpers.cpp index c7612e140c..c2c02f94ab 100644 --- a/utils/wxPython/src/helpers.cpp +++ b/utils/wxPython/src/helpers.cpp @@ -76,7 +76,7 @@ void wxPyApp::AfterMainLoop(void) { } -//---------------------------------------------------------------------- +//--------------------------------------------------------------------- // a few native methods to add to the module //---------------------------------------------------------------------- @@ -100,8 +100,18 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) wxPythonApp->OnInitGui(); #endif #ifdef __WXGTK__ - wxTheApp->argc = 0; - wxTheApp->argv = NULL; + wxClassInfo::InitializeClasses(); + PyObject* sysargv = PySys_GetObject("argv"); + int argc = PyList_Size(sysargv); + char** argv = new char*[argc+1]; + int x; + for(x=0; xargc = argc; + wxTheApp->argv = argv; gtk_init( &wxTheApp->argc, &wxTheApp->argv ); @@ -139,15 +149,17 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) wxPythonApp->DeletePendingObjects(); wxPythonApp->OnExit(); #ifdef __WXMSW__ - wxApp::CleanUp(); + wxApp::CleanUp(); #endif #ifdef __WXGTK__ - wxApp::CommonCleanUp(); + wxApp::CommonCleanUp(); #endif PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting..."); return NULL; } + wxTheApp->m_initialized = (wxTopLevelWindows.Number() > 0); + Py_INCREF(Py_None); return Py_None; } @@ -274,7 +286,7 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) #define wxPlatform "__GTK__" #endif #if defined(__WIN32__) || defined(__WXMSW__) -#define wxPlatform "__WIN32__" +#define wxPlatform "__WXMSW__" #endif #ifdef __WXMAC__ #define wxPlatform "__MAC__" @@ -1059,6 +1071,11 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) { ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.5 1998/08/18 19:48:17 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.4 1998/08/16 04:31:06 RD // More wxGTK work. // diff --git a/utils/wxPython/src/mdi.i b/utils/wxPython/src/mdi.i index 1eb539eb83..5cc56043b3 100644 --- a/utils/wxPython/src/mdi.i +++ b/utils/wxPython/src/mdi.i @@ -51,7 +51,9 @@ public: // TODO: This isn't handled by the standard event-table system... //wxMDIClientWindow* OnCreateClient(); +#ifdef __WXMSW__ void SetToolBar(wxToolBar* toolbar); +#endif void Tile(); }; @@ -70,6 +72,11 @@ public: void Activate(); void Maximize(); void Restore(); + + void SetMenuBar(wxMenuBar *menu_bar); + void SetClientSize(int width, int height); + void GetPosition(int* OUTPUT, int* OUTPUT) const ; + }; @@ -84,6 +91,11 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/08/18 19:48:18 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.2 1998/08/15 07:36:39 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being diff --git a/utils/wxPython/src/misc.i b/utils/wxPython/src/misc.i index 713d1a80a2..7b96bac70a 100644 --- a/utils/wxPython/src/misc.i +++ b/utils/wxPython/src/misc.i @@ -182,18 +182,19 @@ wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL); #ifdef __WXMSW__ wxWindow * wxGetActiveWindow(); long wxGetElapsedTime(bool resetTimer = TRUE); -#endif long wxGetFreeMemory(); +#endif void wxGetMousePosition(int* OUTPUT, int* OUTPUT); bool wxIsBusy(); wxString wxNow(); -bool wxShell(const wxString& command = wxPyEmptyStr); #ifdef __WXMSW__ +bool wxShell(const wxString& command = wxPyEmptyStr); void wxStartTimer(); +int wxGetOsVersion(int *OUTPUT, int *OUTPUT); #endif + bool wxYield(); -int wxGetOsVersion(int *OUTPUT, int *OUTPUT); %inline %{ char* wxGetResource(char *section, char *entry, char *file = NULL) { char * retval; @@ -306,6 +307,11 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.4 1998/08/18 19:48:19 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.3 1998/08/16 04:31:10 RD // More wxGTK work. // diff --git a/utils/wxPython/src/windows2.i b/utils/wxPython/src/windows2.i index c3826b6265..fa978be58a 100644 --- a/utils/wxPython/src/windows2.i +++ b/utils/wxPython/src/windows2.i @@ -209,11 +209,13 @@ public: const wxString& strText, bool bSelect = FALSE, int imageId = -1); +#ifdef __WXMSW__ bool InsertPage(int nPage, /*wxNotebookPage*/ wxWindow *pPage, const wxString& strText, bool bSelect = FALSE, int imageId = -1); +#endif wxNotebookPage *GetPage(int nPage); }; @@ -222,6 +224,11 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/08/18 19:48:20 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.2 1998/08/15 07:36:50 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being diff --git a/utils/wxPython/src/wxp.i b/utils/wxPython/src/wxp.i index 48ed93cbdf..29513bcc28 100644 --- a/utils/wxPython/src/wxp.i +++ b/utils/wxPython/src/wxp.i @@ -149,9 +149,6 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)(); #ifdef __WXMSW__ wxApp::Initialize((WXHINSTANCE)wxhInstance); #endif -#ifdef __WXGTK__ - wxApp::CommonInit(); -#endif // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); @@ -180,6 +177,11 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)(); ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.4 1998/08/18 19:48:20 RD +// more wxGTK compatibility things. +// +// It builds now but there are serious runtime problems... +// // Revision 1.3 1998/08/15 07:36:53 RD // - Moved the header in the .i files out of the code that gets put into // the .cpp files. It caused CVS conflicts because of the RCS ID being -- 2.45.2