Class: Notcurses::NcreaderOptions

Inherits:
Object
  • Object
show all
Defined in:
ext/notcurses/src/notcurses_wrap.c,
ext/notcurses/src/notcurses_wrap.c

Overview

Proxy of C Notcurses::NcreaderOptions struct

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object

call-seq:

NcreaderOptions.new

Class constructor.



67194
67195
67196
67197
67198
67199
67200
67201
67202
67203
67204
67205
67206
# File 'ext/notcurses/src/notcurses_wrap.c', line 67194

SWIGINTERN VALUE
_wrap_new_NcreaderOptions(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (struct ncreader_options *)calloc(1, sizeof(struct ncreader_options));
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Instance Method Details

#flags(*args) ⇒ Object

call-seq:

flags -> uint64_t

Get value of attribute.



67130
67131
67132
67133
67134
67135
67136
67137
67138
67139
67140
67141
67142
67143
67144
67145
67146
67147
67148
67149
67150
67151
67152
67153
67154
67155
67156
67157
67158
67159
67160
67161
67162
67163
67164
67165
67166
67167
# File 'ext/notcurses/src/notcurses_wrap.c', line 67130

SWIGINTERN VALUE
_wrap_NcreaderOptions_flags_get(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *arg1 = (struct ncreader_options *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  uint64_t 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_ncreader_options, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ncreader_options *","flags", 1, self )); 
  }
  arg1 = (struct ncreader_options *)(argp1);
  result = (uint64_t) ((arg1)->flags);
  vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct ncreader_options *");
    if (!ty) ty = SWIGTYPE_p_ncreader_options;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#flags=(*args) ⇒ Object

call-seq:

flags=(x) -> uint64_t

Set new value for attribute.



67084
67085
67086
67087
67088
67089
67090
67091
67092
67093
67094
67095
67096
67097
67098
67099
67100
67101
67102
67103
67104
67105
67106
67107
67108
67109
67110
67111
67112
67113
67114
67115
67116
67117
67118
67119
67120
67121
67122
67123
67124
67125
67126
67127
# File 'ext/notcurses/src/notcurses_wrap.c', line 67084

SWIGINTERN VALUE
_wrap_NcreaderOptions_flags_set(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *arg1 = (struct ncreader_options *) 0 ;
  uint64_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned long val2 ;
  int ecode2 = 0 ;
  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_ncreader_options, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ncreader_options *","flags", 1, self )); 
  }
  arg1 = (struct ncreader_options *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","flags", 2, argv[0] ));
  } 
  arg2 = (uint64_t)(val2);
  if (arg1) (arg1)->flags = arg2;
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct ncreader_options *");
    if (!ty) ty = SWIGTYPE_p_ncreader_options;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#tattrword(*args) ⇒ Object

call-seq:

tattrword -> uint32_t

Get value of attribute.



67026
67027
67028
67029
67030
67031
67032
67033
67034
67035
67036
67037
67038
67039
67040
67041
67042
67043
67044
67045
67046
67047
67048
67049
67050
67051
67052
67053
67054
67055
67056
67057
67058
67059
67060
67061
67062
67063
# File 'ext/notcurses/src/notcurses_wrap.c', line 67026

SWIGINTERN VALUE
_wrap_NcreaderOptions_tattrword_get(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *arg1 = (struct ncreader_options *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  uint32_t 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_ncreader_options, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ncreader_options *","tattrword", 1, self )); 
  }
  arg1 = (struct ncreader_options *)(argp1);
  result = (uint32_t) ((arg1)->tattrword);
  vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct ncreader_options *");
    if (!ty) ty = SWIGTYPE_p_ncreader_options;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#tattrword=(*args) ⇒ Object

call-seq:

tattrword=(x) -> uint32_t

Set new value for attribute.



66980
66981
66982
66983
66984
66985
66986
66987
66988
66989
66990
66991
66992
66993
66994
66995
66996
66997
66998
66999
67000
67001
67002
67003
67004
67005
67006
67007
67008
67009
67010
67011
67012
67013
67014
67015
67016
67017
67018
67019
67020
67021
67022
67023
# File 'ext/notcurses/src/notcurses_wrap.c', line 66980

SWIGINTERN VALUE
_wrap_NcreaderOptions_tattrword_set(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *arg1 = (struct ncreader_options *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  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_ncreader_options, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ncreader_options *","tattrword", 1, self )); 
  }
  arg1 = (struct ncreader_options *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","tattrword", 2, argv[0] ));
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->tattrword = arg2;
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct ncreader_options *");
    if (!ty) ty = SWIGTYPE_p_ncreader_options;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#tchannels(*args) ⇒ Object

call-seq:

tchannels -> uint64_t

Get value of attribute.



66922
66923
66924
66925
66926
66927
66928
66929
66930
66931
66932
66933
66934
66935
66936
66937
66938
66939
66940
66941
66942
66943
66944
66945
66946
66947
66948
66949
66950
66951
66952
66953
66954
66955
66956
66957
66958
66959
# File 'ext/notcurses/src/notcurses_wrap.c', line 66922

SWIGINTERN VALUE
_wrap_NcreaderOptions_tchannels_get(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *arg1 = (struct ncreader_options *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  uint64_t 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_ncreader_options, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ncreader_options *","tchannels", 1, self )); 
  }
  arg1 = (struct ncreader_options *)(argp1);
  result = (uint64_t) ((arg1)->tchannels);
  vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct ncreader_options *");
    if (!ty) ty = SWIGTYPE_p_ncreader_options;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#tchannels=(*args) ⇒ Object

call-seq:

tchannels=(x) -> uint64_t

Set new value for attribute.



66876
66877
66878
66879
66880
66881
66882
66883
66884
66885
66886
66887
66888
66889
66890
66891
66892
66893
66894
66895
66896
66897
66898
66899
66900
66901
66902
66903
66904
66905
66906
66907
66908
66909
66910
66911
66912
66913
66914
66915
66916
66917
66918
66919
# File 'ext/notcurses/src/notcurses_wrap.c', line 66876

SWIGINTERN VALUE
_wrap_NcreaderOptions_tchannels_set(int argc, VALUE *argv, VALUE self) {
  struct ncreader_options *arg1 = (struct ncreader_options *) 0 ;
  uint64_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned long val2 ;
  int ecode2 = 0 ;
  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_ncreader_options, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ncreader_options *","tchannels", 1, self )); 
  }
  arg1 = (struct ncreader_options *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","tchannels", 2, argv[0] ));
  } 
  arg2 = (uint64_t)(val2);
  if (arg1) (arg1)->tchannels = arg2;
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct ncreader_options *");
    if (!ty) ty = SWIGTYPE_p_ncreader_options;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}