Thread: [Fxruby-commits] CVS: FXRuby/ext/fox/include FXMemoryBuffer.h,1.1,1.2 FXRbApp.h,1.3,1.4 FXRbDrawable
Status: Inactive
Brought to you by:
lyle
Update of /cvsroot/fxruby/FXRuby/ext/fox/include In directory usw-pr-cvs1:/tmp/cvs-serv26972/ext/fox/include Modified Files: FXRbApp.h FXRbDrawable.h FXRbGIFCursor.h FXRbShell.h FXRbStream.h FXRbTopWindow.h FXRbWindow.h FXRuby.h Added Files: FXMemoryBuffer.h Log Message: Merged changes from the release10 branch back onto the main trunk. Index: FXRbApp.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbApp.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FXRbApp.h 7 Feb 2002 16:53:50 -0000 1.3 --- FXRbApp.h 11 Jul 2002 13:33:12 -0000 1.4 *************** *** 89,93 **** FXDECLARE(FXRbApp) protected: ! FXbool threadsEnabled; FXuint sleepTime; FXChore* threadsChore; --- 89,93 ---- FXDECLARE(FXRbApp) protected: ! FXbool m_bThreadsEnabled; FXuint sleepTime; FXChore* threadsChore; *************** *** 107,115 **** FXRbApp(const FXchar* name,const FXchar* vendor); ! // Enable support for multithreaded applications ! void enableThreads(); ! // Disable support for multithreaded applications ! void disableThreads(); // Set sleep time (in milliseconds) --- 107,115 ---- FXRbApp(const FXchar* name,const FXchar* vendor); ! // Enable (or disable) support for multithreaded applications ! void setThreadsEnabled(FXbool enabled); ! // Are threads enabled? ! FXbool threadsEnabled() const { return m_bThreadsEnabled; } // Set sleep time (in milliseconds) Index: FXRbDrawable.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbDrawable.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FXRbDrawable.h 12 Jul 2001 19:44:17 -0000 1.1 --- FXRbDrawable.h 11 Jul 2002 13:33:12 -0000 1.2 *************** *** 46,53 **** FXRbDrawable(){} // Construct with specified width and height FXRbDrawable(FXApp* a,FXint w,FXint h) : FXDrawable(a,w,h){} - public: // Mark dependencies for the GC static void markfunc(FXDrawable* drawable); --- 46,53 ---- FXRbDrawable(){} + public: // Construct with specified width and height FXRbDrawable(FXApp* a,FXint w,FXint h) : FXDrawable(a,w,h){} // Mark dependencies for the GC static void markfunc(FXDrawable* drawable); Index: FXRbGIFCursor.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbGIFCursor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FXRbGIFCursor.h 12 Jul 2001 19:44:17 -0000 1.1 --- FXRbGIFCursor.h 11 Jul 2002 13:33:12 -0000 1.2 *************** *** 37,41 **** public: /// Construct a cursor from memory stream formatted as CompuServe GIF format ! FXRbGIFCursor(FXApp* a,const void* pix,FXint hx=-1,FXint hy=-1):FXGIFCursor(a,pix,hx,hy){ FXRbRegisterAppSensitiveObject(this); } --- 37,41 ---- public: /// Construct a cursor from memory stream formatted as CompuServe GIF format ! FXRbGIFCursor(FXApp* a,const void* pix,FXint hx,FXint hy):FXGIFCursor(a,pix,hx,hy){ FXRbRegisterAppSensitiveObject(this); } Index: FXRbShell.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbShell.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FXRbShell.h 12 Jul 2001 19:44:18 -0000 1.1 --- FXRbShell.h 11 Jul 2002 13:33:12 -0000 1.2 *************** *** 38,41 **** --- 38,42 ---- FXRbShell(){} + public: // Construct shell with specified application FXRbShell(FXApp* a,FXuint opts,FXint x,FXint y,FXint w,FXint h) : FXShell(a,opts,x,y,w,h){} *************** *** 44,48 **** FXRbShell(FXWindow* own,FXuint opts,FXint x,FXint y,FXint w,FXint h) : FXShell(own,opts,x,y,w,h){} - public: // Mark dependencies for the GC static void markfunc(FXShell* shell); --- 45,48 ---- Index: FXRbStream.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbStream.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FXRbStream.h 12 Jul 2001 19:44:18 -0000 1.1 --- FXRbStream.h 11 Jul 2002 13:33:12 -0000 1.2 *************** *** 33,37 **** } \ FXbool cls::position(unsigned long p){ \ ! return FXRbCallBoolMethod(this,"position",p); \ } --- 33,37 ---- } \ FXbool cls::position(unsigned long p){ \ ! return FXRbCallBoolMethod(this,"setPosition",p); \ } Index: FXRbTopWindow.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbTopWindow.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FXRbTopWindow.h 12 Jul 2001 19:44:19 -0000 1.1 --- FXRbTopWindow.h 11 Jul 2002 13:33:12 -0000 1.2 *************** *** 58,62 **** #include "FXRbWindowVirtuals.h" #include "FXRbTopWindowVirtuals.h" ! protected: // Construct unowned top-level window FXRbTopWindow(FXApp* a,const FXString& name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXTopWindow(a,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs){} --- 58,62 ---- #include "FXRbWindowVirtuals.h" #include "FXRbTopWindowVirtuals.h" ! public: // Construct unowned top-level window FXRbTopWindow(FXApp* a,const FXString& name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXTopWindow(a,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs){} *************** *** 64,68 **** // Construct owned top-level window FXRbTopWindow(FXWindow* owner,const FXString& name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXTopWindow(owner,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs){} ! public: // Mark dependencies for the GC static void markfunc(FXTopWindow* top); --- 64,68 ---- // Construct owned top-level window FXRbTopWindow(FXWindow* owner,const FXString& name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXTopWindow(owner,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs){} ! // Mark dependencies for the GC static void markfunc(FXTopWindow* top); Index: FXRbWindow.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbWindow.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FXRbWindow.h 26 Nov 2001 17:47:45 -0000 1.3 --- FXRbWindow.h 11 Jul 2002 13:33:12 -0000 1.4 *************** *** 177,185 **** protected: FXRbWindow(){} - FXRbWindow(FXApp* a,FXVisual *vis):FXWindow(a,vis){} - FXRbWindow(FXApp* a,FXWindow* own,FXuint opts,FXint x,FXint y,FXint w,FXint h):FXWindow(a,own,opts,x,y,w,h){} public: // Constructor FXRbWindow(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0) : FXWindow(p,opts,x,y,w,h){} // Mark dependencies for the GC --- 177,189 ---- protected: FXRbWindow(){} public: // Constructor FXRbWindow(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0) : FXWindow(p,opts,x,y,w,h){} + + // Another constructor + FXRbWindow(FXApp* a,FXVisual *vis):FXWindow(a,vis){} + + // Yet another constructor + FXRbWindow(FXApp* a,FXWindow* own,FXuint opts,FXint x,FXint y,FXint w,FXint h):FXWindow(a,own,opts,x,y,w,h){} // Mark dependencies for the GC Index: FXRuby.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRuby.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** FXRuby.h 4 Apr 2002 02:10:48 -0000 1.22 --- FXRuby.h 11 Jul 2002 13:33:12 -0000 1.23 *************** *** 31,38 **** struct swig_type_info; // Helper for overloaded show() functions template <class TYPE> VALUE showHelper(VALUE self, int argc, VALUE *argv, TYPE *p, swig_type_info *typeinfo) { ! TYPE *win = static_cast<TYPE *>(SWIG_ConvertPtr(self, typeinfo)); if (argc == 0) { win->_show(); --- 31,46 ---- struct swig_type_info; + // SWIG runtime functions we need + extern "C" { + swig_type_info * SWIG_TypeQuery(const char *); + VALUE SWIG_NewPointerObj(void *ptr, swig_type_info *type, int own); + int SWIG_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags); + } + // Helper for overloaded show() functions template <class TYPE> VALUE showHelper(VALUE self, int argc, VALUE *argv, TYPE *p, swig_type_info *typeinfo) { ! TYPE *win; ! SWIG_ConvertPtr(self,(void**)&win,typeinfo,1); if (argc == 0) { win->_show(); *************** *** 76,85 **** void FXRbDestroyAppSensitiveObjects(); - /** * Return the registered Ruby class instance associated with this ! * FOX object, or Qnil if no mapping was found. */ ! VALUE FXRbGetRubyObj(const void *foxObj); /** --- 84,93 ---- void FXRbDestroyAppSensitiveObjects(); /** * Return the registered Ruby class instance associated with this ! * FOX object (if any). If searchBoth is FALSE, only considers the ! * Ruby-owned objects; otherwise considers all outstanding references. */ ! VALUE FXRbGetRubyObj(const void *foxObj, FXbool searchBoth=FALSE); /** *************** *** 176,188 **** inline VALUE to_ruby(FXObject* obj){ ! char type[64]; ! sprintf(type,"%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type); } inline VALUE to_ruby(const FXObject* obj){ ! char type[64]; ! sprintf(type,"%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type); } --- 184,204 ---- inline VALUE to_ruby(FXObject* obj){ ! if(obj){ ! FXString type=FXStringFormat("%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type.text()); ! } ! else{ ! return Qnil; ! } } inline VALUE to_ruby(const FXObject* obj){ ! if(obj){ ! FXString type=FXStringFormat("%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type.text()); ! } ! else{ ! return Qnil; ! } } *************** *** 224,232 **** inline VALUE to_ruby(FXTablePos* p){ ! return FXRbNewPointerObj(static_cast<void*>(p),FXRbTypeQuery("FXTablePos *")); } inline VALUE to_ruby(FXTableRange* r){ ! return FXRbNewPointerObj(static_cast<void*>(r),FXRbTypeQuery("FXTableRange *")); } --- 240,250 ---- inline VALUE to_ruby(FXTablePos* p){ ! // return FXRbNewPointerObj(static_cast<void*>(p),FXRbTypeQuery("FXTablePos *")); ! return SWIG_NewPointerObj(static_cast<void*>(p),FXRbTypeQuery("FXTablePos *"),0); } inline VALUE to_ruby(FXTableRange* r){ ! // return FXRbNewPointerObj(static_cast<void*>(r),FXRbTypeQuery("FXTableRange *")); ! return SWIG_NewPointerObj(static_cast<void*>(r),FXRbTypeQuery("FXTableRange *"),0); } *************** *** 239,242 **** --- 257,263 ---- } + // Returns the beginning and ending values (inclusive) for a Range object + void FXRbRange2LoHi(VALUE range,FXint& lo,FXint& hi); + // Call function with "void" return value void FXRbCallVoidMethod(FXObject* recv, *************** *** 431,434 **** --- 452,456 ---- #include "FXRbDrawable.h" #include "FXRbBitmap.h" + #include "FXMemoryBuffer.h" #include "FXRbImage.h" #include "FXRbBMPImage.h" |