2008-08-19 11:01:28 -04:00
|
|
|
/************************************************************
|
|
|
|
|
|
|
|
trackbar.h -
|
|
|
|
|
|
|
|
$Author: lsxi $
|
|
|
|
|
|
|
|
Copyright (C) 2005 Masakazu Yonekura
|
|
|
|
|
|
|
|
************************************************************/
|
|
|
|
#ifndef RUBY_OPENCV_GUI_H
|
|
|
|
#include "gui.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef RUBY_OPENCV_GUI_TRACKBAR_H
|
|
|
|
#define RUBY_OPENCV_GUI_TRACKBAR_H
|
|
|
|
|
|
|
|
#include"opencv.h"
|
|
|
|
|
|
|
|
#define __NAMESPACE_BEGIN_TRACKBAR namespace cTrackbar{
|
|
|
|
#define __NAMESPACE_END_TRACKBAR }
|
|
|
|
|
|
|
|
__NAMESPACE_BEGIN_OPENCV
|
|
|
|
__NAMESPACE_BEGIN_GUI
|
|
|
|
|
2011-05-04 11:45:42 -04:00
|
|
|
typedef struct Trackbar {
|
2008-08-19 11:01:28 -04:00
|
|
|
char *name;
|
|
|
|
int maxval;
|
|
|
|
int val;
|
|
|
|
VALUE block;
|
2011-05-04 11:45:42 -04:00
|
|
|
} Trackbar;
|
2008-08-19 11:01:28 -04:00
|
|
|
|
|
|
|
__NAMESPACE_BEGIN_TRACKBAR
|
|
|
|
|
|
|
|
VALUE rb_class();
|
|
|
|
|
|
|
|
void define_ruby_class();
|
|
|
|
VALUE rb_allocate(VALUE klass);
|
|
|
|
|
2011-05-04 11:45:42 -04:00
|
|
|
void trackbar_mark(void *ptr);
|
2008-08-19 11:01:28 -04:00
|
|
|
|
|
|
|
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
|
|
|
VALUE rb_name(VALUE self);
|
|
|
|
VALUE rb_max(VALUE self);
|
|
|
|
VALUE rb_value(VALUE self);
|
|
|
|
VALUE rb_set_value(VALUE self, VALUE val);
|
|
|
|
|
|
|
|
__NAMESPACE_END_TRACKBAR
|
|
|
|
|
|
|
|
|
2011-05-04 11:45:42 -04:00
|
|
|
inline Trackbar *TRACKBAR(VALUE object) {
|
2008-08-19 11:01:28 -04:00
|
|
|
Trackbar *ptr;
|
|
|
|
Data_Get_Struct(object, Trackbar, ptr);
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
__NAMESPACE_END_GUI
|
|
|
|
|
|
|
|
__NAMESPACE_END_OPENCV
|
|
|
|
|
|
|
|
#endif // RUBY_OPENCV_GUI_TRACKBAR_H
|
|
|
|
|