class Fox::FXGLContext
Public Class Methods
new(*args)
click to toggle source
SWIGINTERN VALUE _wrap_new_FXGLContext(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs; if (argc > 3) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXApp, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXGLVisual, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FXGLContext__SWIG_0(nargs, args, self); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXApp, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXGLVisual, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_FXGLContext, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FXGLContext__SWIG_1(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 3, "FXGLContext.new", " FXGLContext.new(FXApp *a, FXGLVisual *vis)\n" " FXGLContext.new(FXApp *a, FXGLVisual *vis, FXGLContext *shared)\n"); return Qnil; }
new(app, visual, *args, &blk)
click to toggle source
# File lib/fox16/kwargs.rb, line 1457 def initialize(app, visual, *args, &blk) argument_names = %w{other} default_params = { :other => nil } 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(app, visual, params[:other], &blk) end
Also aliased as: old_initialize
Public Instance Methods
begin(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_begin(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 0 ; FXDrawable *arg2 = (FXDrawable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; FXbool 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","begin", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXDrawable, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXDrawable *","begin", 2, argv[0] )); } arg2 = reinterpret_cast< FXDrawable * >(argp2); result = (FXbool)(arg1)->begin(arg2); vresult = result ? Qtrue : Qfalse; return vresult; fail: return Qnil; }
create(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_create(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","create", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); FXGLContext_create(arg1); return Qnil; fail: return Qnil; }
destroy(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_destroy(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","destroy", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); FXGLContext_destroy(arg1); return Qnil; fail: return Qnil; }
detach(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_detach(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","detach", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); FXGLContext_detach(arg1); return Qnil; fail: return Qnil; }
end(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_end(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXbool 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","end", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); result = (FXbool)(arg1)->end(); vresult = result ? Qtrue : Qfalse; return vresult; fail: return Qnil; }
getVisual(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_getVisual(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXGLVisual *result = 0 ; 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext const *","getVisual", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); result = (FXGLVisual *)((FXGLContext const *)arg1)->getVisual(); { swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXGLVisual, (void **) &result); vresult = FXRbGetRubyObj(result, ty); } return vresult; fail: return Qnil; }
load(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_load(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","load", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(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); FXGLContext_load(arg1,*arg2); return Qnil; fail: return Qnil; }
save(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_save(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext const *","save", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(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); FXGLContext_save((FXGLContext const *)arg1,*arg2); return Qnil; fail: return Qnil; }
swapBuffers(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_swapBuffers(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 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_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","swapBuffers", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); (arg1)->swapBuffers(); return Qnil; fail: return Qnil; }
swapSubBuffers(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXGLContext_swapSubBuffers(int argc, VALUE *argv, VALUE self) { FXGLContext *arg1 = (FXGLContext *) 0 ; FXint arg2 ; FXint arg3 ; FXint arg4 ; FXint arg5 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXGLContext, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXGLContext *","swapSubBuffers", 1, self )); } arg1 = reinterpret_cast< FXGLContext * >(argp1); arg2 = NUM2INT(argv[0]); arg3 = NUM2INT(argv[1]); arg4 = NUM2INT(argv[2]); arg5 = NUM2INT(argv[3]); (arg1)->swapSubBuffers(arg2,arg3,arg4,arg5); return Qnil; fail: return Qnil; }