Thread: [Fxruby-commits] CVS: FXRuby/ext/fox/include FXRbDC.h,1.2,1.3 FXRbDCVirtuals.h,1.2,1.3 FXRuby.h,1.20
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-04-03 21:41:04
|
Update of /cvsroot/fxruby/FXRuby/ext/fox/include In directory usw-pr-cvs1:/tmp/cvs-serv13377/ext/fox/include Modified Files: FXRbDC.h FXRbDCVirtuals.h FXRuby.h Log Message: Added typemaps and supporting code to get FXDC#setDashes working properly. Fixed other bugs in the FXDC test case. Index: FXRbDC.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbDC.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FXRbDC.h 2 Jan 2002 22:23:55 -0000 1.2 --- FXRbDC.h 3 Apr 2002 21:40:57 -0000 1.3 *************** *** 45,49 **** } \ void cls::drawPoints(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"drawPoints",points,npoints); \ } \ void cls::_drawPointsRel(const FXPoint* points,FXuint npoints){ \ --- 45,49 ---- } \ void cls::drawPoints(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawPoints"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_drawPointsRel(const FXPoint* points,FXuint npoints){ \ *************** *** 51,55 **** } \ void cls::drawPointsRel(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"drawPointsRel",points,npoints); \ } \ void cls::_drawLine(FXint x1,FXint y1,FXint x2,FXint y2){ \ --- 51,55 ---- } \ void cls::drawPointsRel(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawPointsRel"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_drawLine(FXint x1,FXint y1,FXint x2,FXint y2){ \ *************** *** 63,67 **** } \ void cls::drawLines(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"drawLines",points,npoints); \ } \ void cls::_drawLinesRel(const FXPoint* points,FXuint npoints){ \ --- 63,67 ---- } \ void cls::drawLines(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawLines"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_drawLinesRel(const FXPoint* points,FXuint npoints){ \ *************** *** 69,73 **** } \ void cls::drawLinesRel(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"drawLinesRel",points,npoints); \ } \ void cls::_drawLineSegments(const FXSegment* segments,FXuint nsegments){ \ --- 69,73 ---- } \ void cls::drawLinesRel(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawLinesRel"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_drawLineSegments(const FXSegment* segments,FXuint nsegments){ \ *************** *** 75,79 **** } \ void cls::drawLineSegments(const FXSegment* segments,FXuint nsegments){ \ ! FXRbCallVoidMethod(this,"drawLineSegments",segments,nsegments); \ } \ void cls::_drawRectangle(FXint x,FXint y,FXint w,FXint h){ \ --- 75,79 ---- } \ void cls::drawLineSegments(const FXSegment* segments,FXuint nsegments){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawLineSegments"),1,FXRbMakeArray(segments,nsegments)); \ } \ void cls::_drawRectangle(FXint x,FXint y,FXint w,FXint h){ \ *************** *** 87,91 **** } \ void cls::drawRectangles(const FXRectangle* rectangles,FXuint nrectangles){ \ ! FXRbCallVoidMethod(this,"drawRectangles",rectangles,nrectangles); \ } \ void cls::_drawArc(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2){ \ --- 87,91 ---- } \ void cls::drawRectangles(const FXRectangle* rectangles,FXuint nrectangles){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawRectangles"),1,FXRbMakeArray(rectangles,nrectangles)); \ } \ void cls::_drawArc(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2){ \ *************** *** 99,103 **** } \ void cls::drawArcs(const FXArc* arcs,FXuint narcs){ \ ! FXRbCallVoidMethod(this,"drawArcs",arcs,narcs); \ } \ void cls::_fillRectangle(FXint x,FXint y,FXint w,FXint h){ \ --- 99,103 ---- } \ void cls::drawArcs(const FXArc* arcs,FXuint narcs){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawArcs"),1,FXRbMakeArray(arcs,narcs)); \ } \ void cls::_fillRectangle(FXint x,FXint y,FXint w,FXint h){ \ *************** *** 111,115 **** } \ void cls::fillRectangles(const FXRectangle* rectangles,FXuint nrectangles){ \ ! FXRbCallVoidMethod(this,"fillRectangles",rectangles,nrectangles); \ } \ void cls::_fillArc(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2){ \ --- 111,115 ---- } \ void cls::fillRectangles(const FXRectangle* rectangles,FXuint nrectangles){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillRectangles"),1,FXRbMakeArray(rectangles,nrectangles)); \ } \ void cls::_fillArc(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2){ \ *************** *** 123,127 **** } \ void cls::fillArcs(const FXArc* arcs,FXuint narcs){ \ ! FXRbCallVoidMethod(this,"fillArcs",arcs,narcs); \ } \ void cls::_fillPolygon(const FXPoint* points,FXuint npoints){ \ --- 123,127 ---- } \ void cls::fillArcs(const FXArc* arcs,FXuint narcs){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillArcs"),1,FXRbMakeArray(arcs,narcs)); \ } \ void cls::_fillPolygon(const FXPoint* points,FXuint npoints){ \ *************** *** 129,133 **** } \ void cls::fillPolygon(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"fillPolygon",points,npoints); \ } \ void cls::_fillConcavePolygon(const FXPoint* points,FXuint npoints){ \ --- 129,133 ---- } \ void cls::fillPolygon(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillPolygon"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_fillConcavePolygon(const FXPoint* points,FXuint npoints){ \ *************** *** 135,139 **** } \ void cls::fillConcavePolygon(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"fillConcavePolygon",points,npoints); \ } \ void cls::_fillComplexPolygon(const FXPoint* points,FXuint npoints){ \ --- 135,139 ---- } \ void cls::fillConcavePolygon(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillConcavePolygon"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_fillComplexPolygon(const FXPoint* points,FXuint npoints){ \ *************** *** 141,145 **** } \ void cls::fillComplexPolygon(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"fillComplexPolygon",points,npoints); \ } \ void cls::_fillPolygonRel(const FXPoint* points,FXuint npoints){ \ --- 141,145 ---- } \ void cls::fillComplexPolygon(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillComplexPolygon"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_fillPolygonRel(const FXPoint* points,FXuint npoints){ \ *************** *** 147,151 **** } \ void cls::fillPolygonRel(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"fillPolygonRel",points,npoints); \ } \ void cls::_fillConcavePolygonRel(const FXPoint* points,FXuint npoints){ \ --- 147,151 ---- } \ void cls::fillPolygonRel(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillPolygonRel"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_fillConcavePolygonRel(const FXPoint* points,FXuint npoints){ \ *************** *** 153,157 **** } \ void cls::fillConcavePolygonRel(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"fillConcavePolygonRel",points,npoints); \ } \ void cls::_fillComplexPolygonRel(const FXPoint* points,FXuint npoints){ \ --- 153,157 ---- } \ void cls::fillConcavePolygonRel(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillConcavePolygonRel"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_fillComplexPolygonRel(const FXPoint* points,FXuint npoints){ \ *************** *** 159,163 **** } \ void cls::fillComplexPolygonRel(const FXPoint* points,FXuint npoints){ \ ! FXRbCallVoidMethod(this,"fillComplexPolygonRel",points,npoints); \ } \ void cls::_drawHashBox(FXint x,FXint y,FXint w,FXint h,FXint b){ \ --- 159,163 ---- } \ void cls::fillComplexPolygonRel(const FXPoint* points,FXuint npoints){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("fillComplexPolygonRel"),1,FXRbMakeArray(points,npoints)); \ } \ void cls::_drawHashBox(FXint x,FXint y,FXint w,FXint h,FXint b){ \ *************** *** 213,217 **** } \ void cls::drawText(FXint x,FXint y,const FXchar* string,FXuint length){ \ ! FXRbCallVoidMethod(this,"drawText",x,y,string,length); \ } \ void cls::_drawImageText(FXint x,FXint y,const FXchar* string,FXuint length){ \ --- 213,217 ---- } \ void cls::drawText(FXint x,FXint y,const FXchar* string,FXuint length){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawText"),3,to_ruby(x),to_ruby(y),rb_str_new(string,length)); \ } \ void cls::_drawImageText(FXint x,FXint y,const FXchar* string,FXuint length){ \ *************** *** 219,223 **** } \ void cls::drawImageText(FXint x,FXint y,const FXchar* string,FXuint length){ \ ! FXRbCallVoidMethod(this,"drawImageText",x,y,string,length); \ } \ void cls::_setForeground(FXColor clr){ \ --- 219,223 ---- } \ void cls::drawImageText(FXint x,FXint y,const FXchar* string,FXuint length){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("drawImageText"),3,to_ruby(x),to_ruby(y),rb_str_new(string,length)); \ } \ void cls::_setForeground(FXColor clr){ \ *************** *** 233,241 **** FXRbCallVoidMethod(this,"setBackground",clr); \ } \ ! void cls::_setDashes(FXuint dashoffset,const FXchar *dashlist,FXuint n){ \ ! baseclass::setDashes(dashoffset,dashlist,n); \ } \ ! void cls::setDashes(FXuint dashoffset,const FXchar *dashlist,FXuint n){ \ ! FXRbCallVoidMethod(this,"setDashes",dashoffset,dashlist,n); \ } \ void cls::_setLineWidth(FXuint linewidth){ \ --- 233,241 ---- FXRbCallVoidMethod(this,"setBackground",clr); \ } \ ! void cls::_setDashes(FXuint dashoffset,const FXchar *dashpattern,FXuint dashlength){ \ ! baseclass::setDashes(dashoffset,dashpattern,dashlength); \ } \ ! void cls::setDashes(FXuint dashoffset,const FXchar *dashpattern,FXuint dashlength){ \ ! rb_funcall(FXRbGetRubyObj(this),rb_intern("setDashes"),2,to_ruby(dashoffset),FXRbMakeArray(dashpattern,dashlength)); \ } \ void cls::_setLineWidth(FXuint linewidth){ \ Index: FXRbDCVirtuals.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRbDCVirtuals.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FXRbDCVirtuals.h 2 Jan 2002 22:23:55 -0000 1.2 --- FXRbDCVirtuals.h 3 Apr 2002 21:40:57 -0000 1.3 *************** *** 205,212 **** // Calls the base class version of setDashes() ! void _setDashes(FXuint dashoffset,const FXchar *dashlist,FXuint n); // Overrides the base class version of setDashes() ! virtual void setDashes(FXuint dashoffset,const FXchar *dashlist,FXuint n); // Calls the base class version of setLineWidth() --- 205,212 ---- // Calls the base class version of setDashes() ! void _setDashes(FXuint dashoffset,const FXchar *dashpattern,FXuint dashlength); // Overrides the base class version of setDashes() ! virtual void setDashes(FXuint dashoffset,const FXchar *dashpattern,FXuint dashlength); // Calls the base class version of setLineWidth() Index: FXRuby.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRuby.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** FXRuby.h 1 Apr 2002 23:15:39 -0000 1.20 --- FXRuby.h 3 Apr 2002 21:40:57 -0000 1.21 *************** *** 101,104 **** --- 101,119 ---- extern VALUE FXRbMakeArray(const FXint* values,FXint size); + // Returns a Ruby array of integers + extern VALUE FXRbMakeArray(const FXchar* dashpattern,FXuint dashlength); + + // Returns a Ruby array of FXArcs + extern VALUE FXRbMakeArray(const FXArc* arcs,FXuint narcs); + + // Returns a Ruby array of FXPoints + extern VALUE FXRbMakeArray(const FXPoint* points,FXuint npoints); + + // Returns a Ruby array of FXRectangles + extern VALUE FXRbMakeArray(const FXRectangle* rectangles,FXuint nrectangles); + + // Returns a Ruby array of FXSegments + extern VALUE FXRbMakeArray(const FXSegment* segments,FXuint nsegments); + extern void* FXRbGetExpectedData(VALUE recv,FXSelector key,VALUE data); |