Class: Notcurses::Nccell
- Inherits:
-
Object
- Object
- Notcurses::Nccell
- Defined in:
- ext/notcurses/src/notcurses_wrap.c,
ext/notcurses/src/notcurses_wrap.c
Overview
Proxy of C Notcurses::Nccell struct
Instance Method Summary collapse
-
#channels(*args) ⇒ Object
call-seq: channels -> uint64_t.
-
#channels=(*args) ⇒ Object
call-seq: channels=(x) -> uint64_t.
-
#gcluster(*args) ⇒ Object
call-seq: gcluster -> uint32_t.
-
#gcluster=(*args) ⇒ Object
call-seq: gcluster=(x) -> uint32_t.
-
#gcluster_backstop(*args) ⇒ Object
call-seq: gcluster_backstop -> uint8_t.
-
#gcluster_backstop=(*args) ⇒ Object
call-seq: gcluster_backstop=(x) -> uint8_t.
-
#initialize(*args) ⇒ Object
constructor
call-seq: Nccell.new.
-
#stylemask(*args) ⇒ Object
call-seq: stylemask -> uint16_t.
-
#stylemask=(*args) ⇒ Object
call-seq: stylemask=(x) -> uint16_t.
-
#width(*args) ⇒ Object
call-seq: width -> uint8_t.
-
#width=(*args) ⇒ Object
call-seq: width=(x) -> uint8_t.
Constructor Details
#initialize(*args) ⇒ Object
9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9340
SWIGINTERN VALUE
_wrap_new_Nccell(int argc, VALUE *argv, VALUE self) {
struct nccell *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (struct nccell *)calloc(1, sizeof(struct nccell));
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Instance Method Details
#channels(*args) ⇒ Object
call-seq:
channels -> uint64_t
Get value of attribute.
9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9276
SWIGINTERN VALUE
_wrap_Nccell_channels_get(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","channels", 1, self ));
}
arg1 = (struct nccell *)(argp1);
result = (uint64_t) ((arg1)->channels);
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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#channels=(*args) ⇒ Object
call-seq:
channels=(x) -> uint64_t
Set new value for attribute.
9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9230
SWIGINTERN VALUE
_wrap_Nccell_channels_set(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","channels", 1, self ));
}
arg1 = (struct nccell *)(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","channels", 2, argv[0] ));
}
arg2 = (uint64_t)(val2);
if (arg1) (arg1)->channels = 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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#gcluster(*args) ⇒ Object
call-seq:
gcluster -> uint32_t
Get value of attribute.
8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 8860
SWIGINTERN VALUE
_wrap_Nccell_gcluster_get(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","gcluster", 1, self ));
}
arg1 = (struct nccell *)(argp1);
result = (uint32_t) ((arg1)->gcluster);
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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#gcluster=(*args) ⇒ Object
call-seq:
gcluster=(x) -> uint32_t
Set new value for attribute.
8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 8814
SWIGINTERN VALUE
_wrap_Nccell_gcluster_set(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","gcluster", 1, self ));
}
arg1 = (struct nccell *)(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","gcluster", 2, argv[0] ));
}
arg2 = (uint32_t)(val2);
if (arg1) (arg1)->gcluster = 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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#gcluster_backstop(*args) ⇒ Object
call-seq:
gcluster_backstop -> uint8_t
Get value of attribute.
8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 8964
SWIGINTERN VALUE
_wrap_Nccell_gcluster_backstop_get(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
uint8_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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","gcluster_backstop", 1, self ));
}
arg1 = (struct nccell *)(argp1);
result = (uint8_t) ((arg1)->gcluster_backstop);
vresult = SWIG_From_unsigned_SS_char((unsigned char)(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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#gcluster_backstop=(*args) ⇒ Object
call-seq:
gcluster_backstop=(x) -> uint8_t
Set new value for attribute.
8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 8918
SWIGINTERN VALUE
_wrap_Nccell_gcluster_backstop_set(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 0 ;
uint8_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned char 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","gcluster_backstop", 1, self ));
}
arg1 = (struct nccell *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","gcluster_backstop", 2, argv[0] ));
}
arg2 = (uint8_t)(val2);
if (arg1) (arg1)->gcluster_backstop = 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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#stylemask(*args) ⇒ Object
call-seq:
stylemask -> uint16_t
Get value of attribute.
9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9172
SWIGINTERN VALUE
_wrap_Nccell_stylemask_get(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
uint16_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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","stylemask", 1, self ));
}
arg1 = (struct nccell *)(argp1);
result = (uint16_t) ((arg1)->stylemask);
vresult = SWIG_From_unsigned_SS_short((unsigned short)(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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#stylemask=(*args) ⇒ Object
call-seq:
stylemask=(x) -> uint16_t
Set new value for attribute.
9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9126
SWIGINTERN VALUE
_wrap_Nccell_stylemask_set(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 0 ;
uint16_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned short 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","stylemask", 1, self ));
}
arg1 = (struct nccell *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_short(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint16_t","stylemask", 2, argv[0] ));
}
arg2 = (uint16_t)(val2);
if (arg1) (arg1)->stylemask = 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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#width(*args) ⇒ Object
call-seq:
width -> uint8_t
Get value of attribute.
9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9068
SWIGINTERN VALUE
_wrap_Nccell_width_get(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
uint8_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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","width", 1, self ));
}
arg1 = (struct nccell *)(argp1);
result = (uint8_t) ((arg1)->width);
vresult = SWIG_From_unsigned_SS_char((unsigned char)(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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|
#width=(*args) ⇒ Object
call-seq:
width=(x) -> uint8_t
Set new value for attribute.
9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 |
# File 'ext/notcurses/src/notcurses_wrap.c', line 9022
SWIGINTERN VALUE
_wrap_Nccell_width_set(int argc, VALUE *argv, VALUE self) {
struct nccell *arg1 = (struct nccell *) 0 ;
uint8_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned char 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_nccell, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nccell *","width", 1, self ));
}
arg1 = (struct nccell *)(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","width", 2, argv[0] ));
}
arg2 = (uint8_t)(val2);
if (arg1) (arg1)->width = 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 nccell *");
if (!ty) ty = SWIGTYPE_p_nccell;
VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
}
return vresult;
fail:
return Qnil;
}
|