mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
fix some documents
This commit is contained in:
parent
8a4bdbfa9b
commit
bd9af2dbe1
26 changed files with 937 additions and 739 deletions
|
@ -25,25 +25,6 @@ VALUE rb_class() {
|
|||
return rb_klass;
|
||||
}
|
||||
|
||||
void init_ruby_class() {
|
||||
if (rb_klass)
|
||||
return;
|
||||
/*
|
||||
* opencv = rb_define_module("OpenCV");
|
||||
* GUI = rb_define_module_under(opencv, "GUI");
|
||||
*
|
||||
* note: this comment is used by rdoc.
|
||||
*/
|
||||
VALUE GUI = rb_module_GUI();
|
||||
rb_klass = rb_define_class_under(GUI, "Trackbar", rb_cObject);
|
||||
rb_define_alloc_func(rb_klass, rb_allocate);
|
||||
rb_define_method(rb_klass, "initialize", RUBY_METHOD_FUNC(rb_initialize), -1);
|
||||
rb_define_method(rb_klass, "name", RUBY_METHOD_FUNC(rb_name), 0);
|
||||
rb_define_method(rb_klass, "max", RUBY_METHOD_FUNC(rb_max), 0);
|
||||
rb_define_method(rb_klass, "value", RUBY_METHOD_FUNC(rb_value), 0);
|
||||
rb_define_method(rb_klass, "value=", RUBY_METHOD_FUNC(rb_set_value), 1);
|
||||
}
|
||||
|
||||
VALUE rb_allocate(VALUE klass) {
|
||||
Trackbar *ptr;
|
||||
return Data_Make_Struct(klass, Trackbar, trackbar_mark, trackbar_free, ptr);
|
||||
|
@ -114,6 +95,31 @@ VALUE rb_set_value(VALUE self, VALUE val) {
|
|||
TRACKBAR(self)->val = NUM2INT(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
void init_ruby_class() {
|
||||
#if 0
|
||||
// For documentation using YARD
|
||||
VALUE opencv = rb_define_module("OpenCV");
|
||||
VALUE GUI = rb_define_module_under(opencv, "GUI");
|
||||
#endif
|
||||
|
||||
if (rb_klass)
|
||||
return;
|
||||
/*
|
||||
* opencv = rb_define_module("OpenCV");
|
||||
* GUI = rb_define_module_under(opencv, "GUI");
|
||||
*
|
||||
* note: this comment is used by rdoc.
|
||||
*/
|
||||
VALUE GUI = rb_module_GUI();
|
||||
rb_klass = rb_define_class_under(GUI, "Trackbar", rb_cObject);
|
||||
rb_define_alloc_func(rb_klass, rb_allocate);
|
||||
rb_define_method(rb_klass, "initialize", RUBY_METHOD_FUNC(rb_initialize), -1);
|
||||
rb_define_method(rb_klass, "name", RUBY_METHOD_FUNC(rb_name), 0);
|
||||
rb_define_method(rb_klass, "max", RUBY_METHOD_FUNC(rb_max), 0);
|
||||
rb_define_method(rb_klass, "value", RUBY_METHOD_FUNC(rb_value), 0);
|
||||
rb_define_method(rb_klass, "value=", RUBY_METHOD_FUNC(rb_set_value), 1);
|
||||
}
|
||||
|
||||
__NAMESPACE_END_TRACKBAR
|
||||
__NAMESPACE_END_GUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue