Sha256: 76607dd07f65627d841fc227ee0fc5292753703bfb3c9179cf42daf803c273d7
Contents?: true
Size: 1.39 KB
Versions: 7
Compression:
Stored size: 1.39 KB
Contents
#include "reflex/ruby/event.h" #include "rays/ruby/point.h" #include "defs.h" RUCY_DEFINE_VALUE_FROM_TO(Reflex::CaptureEvent) #define THIS to<Reflex::CaptureEvent*>(self) #define CHECK RUCY_CHECK_OBJ(Reflex::CaptureEvent, self) static VALUE alloc(VALUE klass) { return new_type<Reflex::CaptureEvent>(klass); } static VALUE initialize(VALUE self, VALUE begin, VALUE end) { CHECK; THIS->begin = to<uint>(begin); THIS->end = to<uint>(end); return rb_call_super(0, NULL); } static VALUE initialize_copy(VALUE self, VALUE obj) { CHECK; *THIS = to<Reflex::CaptureEvent&>(obj); return self; } static VALUE begin(VALUE self) { CHECK; return value(THIS->begin); } static VALUE end(VALUE self) { CHECK; return value(THIS->end); } static Class cCaptureEvent; void Init_capture_event () { Module mReflex = rb_define_module("Reflex"); cCaptureEvent = mReflex.define_class("CaptureEvent", Reflex::event_class()); rb_define_alloc_func(cCaptureEvent, alloc); rb_define_private_method(cCaptureEvent, "initialize", RUBY_METHOD_FUNC(initialize), 2); rb_define_private_method(cCaptureEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1); rb_define_private_method(cCaptureEvent, "get_begin", RUBY_METHOD_FUNC(begin), 0); rb_define_private_method(cCaptureEvent, "get_end", RUBY_METHOD_FUNC(end), 0); } namespace Reflex { Class capture_event_class () { return cCaptureEvent; } }// Reflex
Version data entries
7 entries across 7 versions & 1 rubygems