[Fxruby-commits] CVS: FXRuby/ext/fox core_wrap.cpp,1.62.2.25,1.62.2.26
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-07-11 13:06:18
|
Update of /cvsroot/fxruby/FXRuby/ext/fox In directory usw-pr-cvs1:/tmp/cvs-serv17708/ext/fox Modified Files: Tag: release10 core_wrap.cpp Log Message: Index: core_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/core_wrap.cpp,v retrieving revision 1.62.2.25 retrieving revision 1.62.2.26 diff -C2 -d -r1.62.2.25 -r1.62.2.26 *** core_wrap.cpp 8 Jul 2002 18:42:09 -0000 1.62.2.25 --- core_wrap.cpp 11 Jul 2002 13:06:05 -0000 1.62.2.26 *************** *** 711,719 **** swig_class cFX_GIFCursor; static void free_FXGIFCursor(FXGIFCursor *); swig_class cFXGIFCursor; static void free_FXRbGIFCursor(FXRbGIFCursor *); ! /// Load a gif file from a stream VALUE fxloadGIF(FXStream& store){ FXuchar* data; --- 711,720 ---- swig_class cFX_GIFCursor; static void free_FXGIFCursor(FXGIFCursor *); + extern FXbool fxsaveGIF(FXStream &,FXuchar const *,FXColor,FXint,FXint); swig_class cFXGIFCursor; static void free_FXRbGIFCursor(FXRbGIFCursor *); ! /// Load a GIF file from a stream VALUE fxloadGIF(FXStream& store){ FXuchar* data; *************** *** 9411,9420 **** FXApp *arg1 ; void *arg2 ; ! FXint arg3 ; ! FXint arg4 ; FXGIFCursor *result; ! if ((argc < 4) || (argc > 4)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXApp, 1); { --- 9412,9421 ---- FXApp *arg1 ; void *arg2 ; ! FXint arg3 = -1 ; ! FXint arg4 = -1 ; FXGIFCursor *result; ! if ((argc < 2) || (argc > 4)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXApp, 1); { *************** *** 9426,9431 **** } } ! arg3 = NUM2INT(argv[2]); ! arg4 = NUM2INT(argv[3]); result = (FXGIFCursor *)new FXGIFCursor(arg1,(void const *)arg2,arg3,arg4); FXRbRegisterRubyObj(self, result); --- 9427,9436 ---- } } ! if (argc > 2) { ! arg3 = NUM2INT(argv[2]); ! } ! if (argc > 3) { ! arg4 = NUM2INT(argv[3]); ! } result = (FXGIFCursor *)new FXGIFCursor(arg1,(void const *)arg2,arg3,arg4); FXRbRegisterRubyObj(self, result); *************** *** 9440,9443 **** --- 9445,9479 ---- } static VALUE + _wrap_fxsaveGIF(int argc, VALUE *argv, VALUE self) { + FXStream *arg1 ; + FXuchar *arg2 ; + FXColor arg3 ; + FXint arg4 ; + FXint arg5 ; + FXbool result; + VALUE vresult = Qnil; + + if ((argc < 5) || (argc > 5)) + rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); + SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXStream, 1); + { + if (argv[1] != Qnil) { + Check_Type(argv[1], T_STRING); + arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); + }else { + arg2 = NULL; + } + } + arg3 = NUM2UINT(argv[2]); + arg4 = NUM2INT(argv[3]); + arg5 = NUM2INT(argv[4]); + result = (FXbool)fxsaveGIF(*arg1,(FXuchar const *)arg2,arg3,arg4,arg5); + + vresult = result ? Qtrue : Qfalse; + return vresult; + } + + + static VALUE _wrap_FXGIFCursor_allocate(int argc, VALUE *argv, VALUE self) { VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXRbGIFCursor); *************** *** 9617,9651 **** static VALUE - _wrap_fxsaveGIF(int argc, VALUE *argv, VALUE self) { - FXStream *arg1 ; - FXuchar *arg2 ; - FXColor arg3 ; - FXint arg4 ; - FXint arg5 ; - FXbool result; - VALUE vresult = Qnil; - - if ((argc < 5) || (argc > 5)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXStream, 1); - { - if (argv[1] != Qnil) { - Check_Type(argv[1], T_STRING); - arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); - }else { - arg2 = NULL; - } - } - arg3 = NUM2UINT(argv[2]); - arg4 = NUM2INT(argv[3]); - arg5 = NUM2INT(argv[4]); - result = (FXbool)fxsaveGIF(*arg1,(FXuchar const *)arg2,arg3,arg4,arg5); - - vresult = result ? Qtrue : Qfalse; - return vresult; - } - - - static VALUE _wrap_FX_Drawable_getWidth(int argc, VALUE *argv, VALUE self) { FXDrawable *arg1 ; --- 9653,9656 ---- *************** *** 20046,20049 **** --- 20051,20055 ---- cFX_GIFCursor.mark = (void (*)(void *)) FXRbGIFCursor::markfunc; cFX_GIFCursor.destroy = (void (*)(void *)) free_FXGIFCursor; + rb_define_module_function(mFox, "fxsaveGIF", VALUEFUNC(_wrap_fxsaveGIF), -1); cFXGIFCursor.klass = rb_define_class_under(mFox, "FXGIFCursor", ((swig_class *) SWIGTYPE_p_FXGIFCursor->clientdata)->klass); *************** *** 20062,20066 **** cFXGIFCursor.destroy = (void (*)(void *)) free_FXRbGIFCursor; rb_define_module_function(mFox, "fxloadGIF", VALUEFUNC(_wrap_fxloadGIF), -1); - rb_define_module_function(mFox, "fxsaveGIF", VALUEFUNC(_wrap_fxsaveGIF), -1); cFX_Drawable.klass = rb_define_class_under(mFox, "FX_Drawable", ((swig_class *) SWIGTYPE_p_FXId->clientdata)->klass); --- 20068,20071 ---- |