class Fox::FXPoint

Public Class Methods

new(*args) click to toggle source
SWIGINTERN VALUE _wrap_new_FXPoint(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[2];
  int ii;
  
  argc = nargs;
  if (argc > 2) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if ((argc >= 0) && (argc <= 2)) {
    int _v;
    if (argc <= 0) {
      return _wrap_new_FXPoint__SWIG_2(nargs, args, self);
    }
    {
      _v = (TYPE(argv[0]) == T_FIXNUM || TYPE(argv[0]) == T_BIGNUM) ? 1 : 0;
    }
    if (_v) {
      if (argc <= 1) {
        return _wrap_new_FXPoint__SWIG_2(nargs, args, self);
      }
      {
        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
      }
      if (_v) {
        return _wrap_new_FXPoint__SWIG_2(nargs, args, self);
      }
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_FXPoint__SWIG_1(nargs, args, self);
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_FXPoint__SWIG_0(nargs, args, self);
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "FXPoint.new", 
    "    FXPoint.new(FXSize const &s)\n"
    "    FXPoint.new(FXPoint const &p)\n"
    "    FXPoint.new(FXshort xx, FXshort yy)\n");
  
  return Qnil;
}

Public Instance Methods

*(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXPoint___mul__(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  FXshort arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXPoint 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator *", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  arg2 = NUM2INT(argv[0]);
  result = FXPoint_operator_Sm_((FXPoint const *)arg1,arg2);
  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}
+(*args) click to toggle source
SWIGINTERN VALUE _wrap_FXPoint___add__(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_FXPoint___add____SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXSize, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_FXPoint___add____SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "__add__", 
    "    FXPoint __add__(FXPoint const &p)\n"
    "    FXPoint __add__(FXSize const &s)\n");
  
  return Qnil;
}
-(*args) click to toggle source
SWIGINTERN VALUE _wrap_FXPoint___sub__(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_FXPoint___sub____SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXSize, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_FXPoint___sub____SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "__sub__", 
    "    FXPoint __sub__(FXPoint const &p)\n"
    "    FXPoint __sub__(FXSize const &s)\n");
  
  return Qnil;
}
-@ → FXPoint click to toggle source

Negation operator.

SWIGINTERN VALUE
_wrap_FXPoint___neg__(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXPoint 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","operator -", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  result = (arg1)->operator -();
  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}
/(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXPoint___div__(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  FXshort arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXPoint 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator /", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  arg2 = NUM2INT(argv[0]);
  result = FXPoint_operator_Sd_((FXPoint const *)arg1,arg2);
  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}
==(p) → bool click to toggle source

Equality comparison operator.

SWIGINTERN VALUE
_wrap_FXPoint___eq__(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  FXPoint *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator ==", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXPoint,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","operator ==", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","operator ==", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FXPoint * >(argp2);
  result = (bool)FXPoint_operator_Se__Se_((FXPoint const *)arg1,(FXPoint const &)*arg2);
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}
x(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXPoint_x_get(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXshort 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","x", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  result = (FXshort) ((arg1)->x);
  vresult = SWIG_From_short(static_cast< short >(result));
  return vresult;
fail:
  return Qnil;
}
x=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXPoint_x_set(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  FXshort 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","x", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  arg2 = NUM2INT(argv[0]);
  if (arg1) (arg1)->x = arg2;
  return Qnil;
fail:
  return Qnil;
}
y(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXPoint_y_get(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXshort 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","y", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  result = (FXshort) ((arg1)->y);
  vresult = SWIG_From_short(static_cast< short >(result));
  return vresult;
fail:
  return Qnil;
}
y=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXPoint_y_set(int argc, VALUE *argv, VALUE self) {
  FXPoint *arg1 = (FXPoint *) 0 ;
  FXshort 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_FXPoint, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","y", 1, self )); 
  }
  arg1 = reinterpret_cast< FXPoint * >(argp1);
  arg2 = NUM2INT(argv[0]);
  if (arg1) (arg1)->y = arg2;
  return Qnil;
fail:
  return Qnil;
}