Class: Notcurses::NotcursesOptions
- Inherits:
-
Object
- Object
- Notcurses::NotcursesOptions
- Defined in:
- ext/notcurses/src/notcurses_wrap.c,
ext/notcurses/src/notcurses_wrap.c
Overview
Proxy of C Notcurses::NotcursesOptions struct
Instance Method Summary collapse
-
#flags(*args) ⇒ Object
call-seq: flags -> uint64_t.
-
#flags=(*args) ⇒ Object
call-seq: flags=(x) -> uint64_t.
-
#initialize(*args) ⇒ Object
constructor
call-seq: NotcursesOptions.new.
-
#loglevel(*args) ⇒ Object
call-seq: loglevel -> int.
-
#loglevel=(*args) ⇒ Object
call-seq: loglevel=(x) -> int.
-
#margin_b(*args) ⇒ Object
call-seq: margin_b -> unsigned int.
-
#margin_b=(*args) ⇒ Object
call-seq: margin_b=(x) -> unsigned int.
-
#margin_l(*args) ⇒ Object
call-seq: margin_l -> unsigned int.
-
#margin_l=(*args) ⇒ Object
call-seq: margin_l=(x) -> unsigned int.
-
#margin_r(*args) ⇒ Object
call-seq: margin_r -> unsigned int.
-
#margin_r=(*args) ⇒ Object
call-seq: margin_r=(x) -> unsigned int.
-
#margin_t(*args) ⇒ Object
call-seq: margin_t -> unsigned int.
-
#margin_t=(*args) ⇒ Object
call-seq: margin_t=(x) -> unsigned int.
-
#termtype(*args) ⇒ Object
call-seq: termtype -> char const *.
-
#termtype=(*args) ⇒ Object
call-seq: termtype=(x) -> char const *.
Constructor Details
#initialize(*args) ⇒ Object
12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 12247
SWIGINTERN VALUE
_wrap_new_NotcursesOptions(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (struct notcurses_options *)calloc(1, sizeof(struct notcurses_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.
12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 12183
SWIGINTERN VALUE
_wrap_NotcursesOptions_flags_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","flags", 1, self ));
}
arg1 = (struct notcurses_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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_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.
12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 12137
SWIGINTERN VALUE
_wrap_NotcursesOptions_flags_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","flags", 1, self ));
}
arg1 = (struct notcurses_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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#loglevel(*args) ⇒ Object
call-seq:
loglevel -> int
Get value of attribute.
11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11663
SWIGINTERN VALUE
_wrap_NotcursesOptions_loglevel_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
ncloglevel_e 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","loglevel", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
result = (ncloglevel_e) ((arg1)->loglevel);
vresult = SWIG_From_int((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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#loglevel=(*args) ⇒ Object
call-seq:
loglevel=(x) -> int
Set new value for attribute.
11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11617
SWIGINTERN VALUE
_wrap_NotcursesOptions_loglevel_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
ncloglevel_e arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","loglevel", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
ecode2 = SWIG_AsVal_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ncloglevel_e","loglevel", 2, argv[0] ));
}
arg2 = (ncloglevel_e)(val2);
if (arg1) (arg1)->loglevel = 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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_b(*args) ⇒ Object
call-seq:
margin_b -> unsigned int
Get value of attribute.
11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11975
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_b_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_b", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
result = (unsigned int) ((arg1)->margin_b);
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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_b=(*args) ⇒ Object
call-seq:
margin_b=(x) -> unsigned int
Set new value for attribute.
11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11929
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_b_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_b", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","margin_b", 2, argv[0] ));
}
arg2 = (unsigned int)(val2);
if (arg1) (arg1)->margin_b = 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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_l(*args) ⇒ Object
call-seq:
margin_l -> unsigned int
Get value of attribute.
12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 12079
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_l_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_l", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
result = (unsigned int) ((arg1)->margin_l);
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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_l=(*args) ⇒ Object
call-seq:
margin_l=(x) -> unsigned int
Set new value for attribute.
12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 12033
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_l_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_l", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","margin_l", 2, argv[0] ));
}
arg2 = (unsigned int)(val2);
if (arg1) (arg1)->margin_l = 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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_r(*args) ⇒ Object
call-seq:
margin_r -> unsigned int
Get value of attribute.
11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11871
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_r_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_r", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
result = (unsigned int) ((arg1)->margin_r);
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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_r=(*args) ⇒ Object
call-seq:
margin_r=(x) -> unsigned int
Set new value for attribute.
11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11825
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_r_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_r", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","margin_r", 2, argv[0] ));
}
arg2 = (unsigned int)(val2);
if (arg1) (arg1)->margin_r = 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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_t(*args) ⇒ Object
call-seq:
margin_t -> unsigned int
Get value of attribute.
11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11767
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_t_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_t", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
result = (unsigned int) ((arg1)->margin_t);
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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#margin_t=(*args) ⇒ Object
call-seq:
margin_t=(x) -> unsigned int
Set new value for attribute.
11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11721
SWIGINTERN VALUE
_wrap_NotcursesOptions_margin_t_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
unsigned int 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","margin_t", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","margin_t", 2, argv[0] ));
}
arg2 = (unsigned int)(val2);
if (arg1) (arg1)->margin_t = 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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#termtype(*args) ⇒ Object
call-seq:
termtype -> char const *
Get value of attribute.
11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11546
SWIGINTERN VALUE
_wrap_NotcursesOptions_termtype_get(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
char *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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","termtype", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
result = (char *) ((arg1)->termtype);
{
VALUE hash = rb_hash_new();
VALUE obj;
if (result == NULL) {
obj = Qnil;
} else {
// Convert C string to Ruby string
obj = rb_str_new2(result);
}
rb_hash_aset(hash, ID2SYM(rb_intern("return")), obj);
vresult = hash;
}
{
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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#termtype=(*args) ⇒ Object
call-seq:
termtype=(x) -> char const *
Set new value for attribute.
11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 11478
SWIGINTERN VALUE
_wrap_NotcursesOptions_termtype_set(int argc, VALUE *argv, VALUE self) {
struct notcurses_options *arg1 = (struct notcurses_options *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 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_notcurses_options, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct notcurses_options *","termtype", 1, self ));
}
arg1 = (struct notcurses_options *)(argp1);
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","termtype", 2, argv[0] ));
}
arg2 = (char *)(buf2);
if (arg2) {
size_t size = strlen((const char *)((const char *)(arg2))) + 1;
arg1->termtype = (char const *)(char *)memcpy(malloc((size)*sizeof(char)), arg2, sizeof(char)*(size));
} else {
arg1->termtype = 0;
}
vresult = rb_ary_new();
{
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 notcurses_options *");
if (!ty) ty = SWIGTYPE_p_notcurses_options;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
{
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;
}
VALUE obj = arg2 ? rb_str_new2(arg2) : Qnil;
rb_hash_aset(vresult, ID2SYM(rb_intern("termtype")), obj);
}
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
return vresult;
fail:
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
return Qnil;
}
|