class Fox::FXVisual
Public Class Methods
new(*args)
click to toggle source
SWIGINTERN VALUE _wrap_new_FXVisual(int argc, VALUE *argv, VALUE self) { FXApp *arg1 = (FXApp *) 0 ; FXuint arg2 ; FXuint arg3 = (FXuint) 32 ; void *argp1 = 0 ; int res1 = 0 ; FXVisual *result = 0 ; if ((argc < 2) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FXApp, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","FXVisual", 1, argv[0] )); } arg1 = reinterpret_cast< FXApp * >(argp1); arg2 = NUM2UINT(argv[1]); if (argc > 2) { arg3 = NUM2UINT(argv[2]); } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { result = (FXVisual *)new_FXVisual(arg1,arg2,arg3); DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result); if(rb_block_given_p()){ rb_yield(self); } } return self; fail: return Qnil; }
new(a, flgs, *args, &blk)
click to toggle source
# File lib/fox16/kwargs.rb, line 741 def initialize(a, flgs, *args, &blk) argument_names = %w{d} default_params = { :d => 32 } params = {} params = args.pop if args.last.is_a? Hash args.each_with_index { |e, i| params[argument_names[i].intern] = e } params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) } params = default_params.merge(params) old_initialize(a, flgs, params[:d], &blk) end
Also aliased as: old_initialize
Public Instance Methods
create(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_create(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","create", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); FXVisual_create(arg1); return Qnil; fail: return Qnil; }
destroy(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_destroy(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","destroy", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); FXVisual_destroy(arg1); return Qnil; fail: return Qnil; }
detach(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_detach(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","detach", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); FXVisual_detach(arg1); return Qnil; fail: return Qnil; }
getColor(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getColor(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; FXPixel arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long val2 ; int ecode2 = 0 ; FXColor result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","getColor", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXPixel","getColor", 2, argv[0] )); } arg2 = static_cast< FXPixel >(val2); result = (FXColor)(arg1)->getColor(arg2); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getDepth(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getDepth(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getDepth", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getDepth(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getFlags(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getFlags(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getFlags", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getFlags(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getMaxColors(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getMaxColors(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getMaxColors", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getMaxColors(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getNumBlue(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getNumBlue(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getNumBlue", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getNumBlue(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getNumColors(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getNumColors(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getNumColors", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getNumColors(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getNumGreen(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getNumGreen(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getNumGreen", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getNumGreen(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getNumRed(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getNumRed(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getNumRed", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXuint)((FXVisual const *)arg1)->getNumRed(); vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; }
getPixel(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_getPixel(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; FXColor arg2 ; void *argp1 = 0 ; int res1 = 0 ; FXPixel result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","getPixel", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); arg2 = to_FXColor(argv[0]); result = (FXPixel)(arg1)->getPixel(arg2); vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); return vresult; fail: return Qnil; }
load(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_load(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; FXStream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","load", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","load", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","load", 2, argv[0])); } arg2 = reinterpret_cast< FXStream * >(argp2); FXVisual_load(arg1,*arg2); return Qnil; fail: return Qnil; }
save(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_save(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; FXStream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","save", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","save", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","save", 2, argv[0])); } arg2 = reinterpret_cast< FXStream * >(argp2); FXVisual_save((FXVisual const *)arg1,*arg2); return Qnil; fail: return Qnil; }
setMaxColors(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_setMaxColors(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; FXuint arg2 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual *","setMaxColors", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); arg2 = NUM2UINT(argv[0]); (arg1)->setMaxColors(arg2); return Qnil; fail: return Qnil; }
visualType(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVisual_visualType(int argc, VALUE *argv, VALUE self) { FXVisual *arg1 = (FXVisual *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXVisualType result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVisual, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVisual const *","getType", 1, self )); } arg1 = reinterpret_cast< FXVisual * >(argp1); result = (FXVisualType)((FXVisual const *)arg1)->getType(); vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; }