[Fxruby-commits] CVS: FXRuby/swig-interfaces FXStream.i,1.10,1.10.2.1 freefuncs.i,1.2,1.2.2.1 markfu
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-04-25 16:48:37
|
Update of /cvsroot/fxruby/FXRuby/swig-interfaces In directory usw-pr-cvs1:/tmp/cvs-serv32716/swig-interfaces Modified Files: Tag: release10 FXStream.i freefuncs.i markfuncs.i renames.i stubs.i Log Message: Fixes related to SF Bug #535955. FXStream, FXFileStream and FXMemoryStream were not implemented properly w.r.t. virtual functions and GC. Index: FXStream.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXStream.i,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** FXStream.i 19 Mar 2002 23:18:40 -0000 1.10 --- FXStream.i 25 Apr 2002 16:48:34 -0000 1.10.2.1 *************** *** 47,50 **** --- 47,55 ---- %exception FXStream::FXStream "$action FXRbRegisterRubyObj(self, result);"; + %rename(getPosition) FXStream::position() const; + %rename(setPosition) FXStream::position(unsigned long p); + %rename(setSwapBytes) FXStream::swapBytes(FXbool s); + %rename(getSwapBytes) FXStream::swapBytes() const; + /// Persistent store definition class FXStream { *************** *** 86,99 **** /// Get position ! %name(getPosition) unsigned long position() const; /// Move to position ! %name(setPosition) virtual FXbool position(unsigned long p); /// Change swap bytes flag ! %name(setSwapBytes) void swapBytes(FXbool s); /// Get swap bytes flag ! %name(getSwapBytes) FXbool swapBytes() const; /// Return implementation's endianness --- 91,104 ---- /// Get position ! unsigned long position() const; /// Move to position ! virtual FXbool position(unsigned long p); /// Change swap bytes flag ! void swapBytes(FXbool s); /// Get swap bytes flag ! FXbool swapBytes() const; /// Return implementation's endianness *************** *** 105,108 **** --- 110,127 ---- + %exception FXRbStream::FXRbStream "$action FXRbRegisterRubyObj(self, result);"; + + class FXRbStream : public FXStream { + public: + // Constructor + FXRbStream(const FXObject* cont=NULL); + + // Destructor + virtual ~FXRbStream(); + + public: + DECLARE_FXSTREAM_VIRTUALS + }; + /*************************** File Store Definition ***************************/ *************** *** 124,134 **** FXbool open(const FXString& filename,FXStreamDirection save_or_load); - /// Move to position - %name(setPosition) virtual FXbool position(unsigned long p); - /// Destructor virtual ~FXFileStream(); }; /************************** Memory Store Definition **************************/ --- 143,165 ---- FXbool open(const FXString& filename,FXStreamDirection save_or_load); /// Destructor virtual ~FXFileStream(); }; + + %exception FXRbFileStream::FXRbFileStream "$action FXRbRegisterRubyObj(self, result);"; + + class FXRbFileStream : public FXFileStream { + public: + // Create file store + FXRbFileStream(const FXObject* cont=NULL); + + // Destructor + virtual ~FXRbFileStream(); + + public: + DECLARE_FXSTREAM_VIRTUALS + }; + /************************** Memory Store Definition **************************/ *************** *** 156,160 **** /// Get available space ! FXuint getSpace() const { return space; } /// Set available space --- 187,191 ---- /// Get available space ! FXuint getSpace() const; /// Set available space *************** *** 178,185 **** void giveBuffer(FXuchar *buffer,FXuint sp); - /// Move to position - %name(setPosition) virtual FXbool position(unsigned long p); - /// Destructor virtual ~FXMemoryStream(); }; --- 209,228 ---- void giveBuffer(FXuchar *buffer,FXuint sp); /// Destructor virtual ~FXMemoryStream(); + }; + + + %exception FXRbMemoryStream::FXRbMemoryStream "$action FXRbRegisterRubyObj(self, result);"; + + class FXRbMemoryStream : public FXMemoryStream { + public: + // Create memory store + FXRbMemoryStream(const FXObject* cont=NULL); + + // Destructor + virtual ~FXRbMemoryStream(); + + public: + DECLARE_FXSTREAM_VIRTUALS }; Index: freefuncs.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/freefuncs.i,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** freefuncs.i 2 Apr 2002 04:10:16 -0000 1.2 --- freefuncs.i 25 Apr 2002 16:48:34 -0000 1.2.2.1 *************** *** 32,35 **** --- 32,36 ---- %freefunc FXFileAssoc "FXRbUnregisterRubyObj"; %freefunc FXFileDict "FXRbUnregisterRubyObj"; + %freefunc FXFileStream "FXRbUnregisterRubyObj"; %freefunc FXFont "FXRbUnregisterRubyObj"; %freefunc FXFontDesc "FXRbUnregisterRubyObj"; *************** *** 47,50 **** --- 48,52 ---- %freefunc FXListItem "FXRbUnregisterRubyObj"; %freefunc FXMaterial "FXRbUnregisterRubyObj"; + %freefunc FXMemoryStream "FXRbUnregisterRubyObj"; %freefunc FXMDIChild "FXRbUnregisterRubyObj"; %freefunc FXObject "FXRbUnregisterRubyObj"; Index: markfuncs.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/markfuncs.i,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** markfuncs.i 26 Mar 2002 22:44:03 -0000 1.4 --- markfuncs.i 25 Apr 2002 16:48:34 -0000 1.4.2.1 *************** *** 63,66 **** --- 63,67 ---- %markfunc FXFileList "FXRbFileList::markfunc"; %markfunc FXFileSelector "FXRbFileSelector::markfunc"; + %markfunc FXFileStream "FXRbFileStream::markfunc"; %markfunc FXFont "FXRbFont::markfunc"; %markfunc FXFontDialog "FXRbFontDialog::markfunc"; *************** *** 108,111 **** --- 109,113 ---- %markfunc FXMainWindow "FXRbMainWindow::markfunc"; %markfunc FXMatrix "FXRbMatrix::markfunc"; + %markfunc FXMemoryStream "FXRbMemoryStream::markfunc"; %markfunc FXMenuButton "FXRbMenuButton::markfunc"; %markfunc FXMenuCaption "FXRbMenuCaption::markfunc"; *************** *** 149,152 **** --- 151,155 ---- %markfunc FXStatusbar "FXRbStatusbar::markfunc"; %markfunc FXStatusline "FXRbStatusline::markfunc"; + %markfunc FXStream "FXRbStream::markfunc"; %markfunc FXStringDict "FXRbStringDict::markfunc"; %markfunc FXSwitcher "FXRbSwitcher::markfunc"; *************** *** 219,222 **** --- 222,226 ---- %markfunc FXRbFileList "FXRbFileList::markfunc"; %markfunc FXRbFileSelector "FXRbFileSelector::markfunc"; + %markfunc FXRbFileStream "FXRbFileStream::markfunc"; %markfunc FXRbFont "FXRbFont::markfunc"; %markfunc FXRbFontDialog "FXRbFontDialog::markfunc"; *************** *** 264,267 **** --- 268,272 ---- %markfunc FXRbMainWindow "FXRbMainWindow::markfunc"; %markfunc FXRbMatrix "FXRbMatrix::markfunc"; + %markfunc FXRbMemoryStream "FXRbMemoryStream::markfunc"; %markfunc FXRbMenuButton "FXRbMenuButton::markfunc"; %markfunc FXRbMenuCaption "FXRbMenuCaption::markfunc"; *************** *** 305,308 **** --- 310,314 ---- %markfunc FXRbStatusbar "FXRbStatusbar::markfunc"; %markfunc FXRbStatusline "FXRbStatusline::markfunc"; + %markfunc FXRbStream "FXRbStream::markfunc"; %markfunc FXRbStringDict "FXRbStringDict::markfunc"; %markfunc FXRbSwitcher "FXRbSwitcher::markfunc"; Index: renames.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/renames.i,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** renames.i 25 Feb 2002 22:49:49 -0000 1.14 --- renames.i 25 Apr 2002 16:48:34 -0000 1.14.2.1 *************** *** 63,66 **** --- 63,67 ---- %rename FXFileList FX_FileList; %rename FXFileSelector FX_FileSelector; + %rename FXFileStream FX_FileStream; %rename FXFont FX_Font; %rename FXFontDialog FX_FontDialog; *************** *** 108,111 **** --- 109,113 ---- %rename FXMainWindow FX_MainWindow; %rename FXMatrix FX_Matrix; + %rename FXMemoryStream FX_MemoryStream; %rename FXMenuButton FX_MenuButton; %rename FXMenuCaption FX_MenuCaption; *************** *** 149,152 **** --- 151,155 ---- %rename FXStatusbar FX_Statusbar; %rename FXStatusline FX_Statusline; + %rename FXStream FX_Stream; %rename FXStringDict FX_StringDict; %rename FXSwitcher FX_Switcher; *************** *** 219,222 **** --- 222,226 ---- %rename FXRbFileList FXFileList; %rename FXRbFileSelector FXFileSelector; + %rename FXRbFileStream FXFileStream; %rename FXRbFont FXFont; %rename FXRbFontDialog FXFontDialog; *************** *** 264,267 **** --- 268,272 ---- %rename FXRbMainWindow FXMainWindow; %rename FXRbMatrix FXMatrix; + %rename FXRbMemoryStream FXMemoryStream; %rename FXRbMenuButton FXMenuButton; %rename FXRbMenuCaption FXMenuCaption; *************** *** 305,308 **** --- 310,314 ---- %rename FXRbStatusbar FXStatusbar; %rename FXRbStatusline FXStatusline; + %rename FXRbStream FXStream; %rename FXRbStringDict FXStringDict; %rename FXRbSwitcher FXSwitcher; Index: stubs.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/stubs.i,v retrieving revision 1.23 retrieving revision 1.23.2.1 diff -C2 -d -r1.23 -r1.23.2.1 *** stubs.i 3 Apr 2002 17:36:27 -0000 1.23 --- stubs.i 25 Apr 2002 16:48:34 -0000 1.23.2.1 *************** *** 209,212 **** --- 209,215 ---- %name(setCurrent) void _setCurrent(FXint panel); + #define DECLARE_FXSTREAM_VIRTUALS \ + %name(setPosition) FXbool _position(unsigned long p); + #define DECLARE_FXTABBAR_VIRTUALS \ %name(setCurrent) void _setCurrent(FXint panel,FXbool notify=FALSE); |