void etcBindingInit() { VALUE klass; INIT_BIND(Color); RB_ATTR_RW(Color, Red, red); RB_ATTR_RW(Color, Green, green); RB_ATTR_RW(Color, Blue, blue); RB_ATTR_RW(Color, Alpha, alpha); INIT_BIND(Tone); RB_ATTR_RW(Tone, Red, red); RB_ATTR_RW(Tone, Green, green); RB_ATTR_RW(Tone, Blue, blue); RB_ATTR_RW(Tone, Gray, gray); INIT_BIND(Rect); RB_ATTR_RW(Rect, X, x); RB_ATTR_RW(Rect, Y, y); RB_ATTR_RW(Rect, Width, width); RB_ATTR_RW(Rect, Height, height); _rb_define_method(klass, "empty", rectEmpty); }
void etcBindingInit(mrb_state *mrb) { RClass *klass; INIT_BIND(Color); MRB_ATTR_RW(Color, Red, "red" ); MRB_ATTR_RW(Color, Green, "green"); MRB_ATTR_RW(Color, Blue, "blue" ); MRB_ATTR_RW(Color, Alpha, "alpha"); INIT_BIND(Tone); MRB_ATTR_RW(Tone, Red, "red" ); MRB_ATTR_RW(Tone, Green, "green"); MRB_ATTR_RW(Tone, Blue, "blue" ); MRB_ATTR_RW(Tone, Gray, "gray" ); INIT_BIND(Rect); MRB_ATTR_RW(Rect, X, "x" ); MRB_ATTR_RW(Rect, Y, "y" ); MRB_ATTR_RW(Rect, Width, "width" ); MRB_ATTR_RW(Rect, Height, "height"); mrb_define_method(mrb, klass, "empty", RectEmpty, MRB_ARGS_NONE()); }
void etcBindingInit(mrb_state *mrb) { RClass *klass; INIT_BIND(Color); MRB_ATTR_RW(Color, red); MRB_ATTR_RW(Color, green); MRB_ATTR_RW(Color, blue); MRB_ATTR_RW(Color, alpha); INIT_BIND(Tone); MRB_ATTR_RW(Tone, red); MRB_ATTR_RW(Tone, green); MRB_ATTR_RW(Tone, blue); MRB_ATTR_RW(Tone, gray); INIT_BIND(Rect); MRB_ATTR_RW(Rect, x); MRB_ATTR_RW(Rect, y); MRB_ATTR_RW(Rect, width); MRB_ATTR_RW(Rect, height); mrb_define_method(mrb, klass, "empty", RectEmpty, MRB_ARGS_NONE()); }