39#include <visp3/core/vpConfig.h>
41#if (defined(VISP_HAVE_GTK))
50#include <visp3/core/vpDisplay.h>
51#include <visp3/gui/vpDisplayGTK.h>
54#include <visp3/core/vpDisplayException.h>
55#include <visp3/core/vpImageConvert.h>
56#include <visp3/core/vpImageTools.h>
57#include <visp3/core/vpMath.h>
59#ifndef DOXYGEN_SHOULD_SKIP_THIS
62#include <gdk/gdkrgb.h>
67class vpDisplayGTK::Impl
71 : m_widget(nullptr), m_background(nullptr), m_gc(nullptr), m_blue(), m_red(), m_yellow(), m_green(), m_cyan(), m_orange(),
72 m_white(), m_black(), m_gdkcolor(), m_lightBlue(), m_darkBlue(), m_lightRed(), m_darkRed(), m_lightGreen(),
73 m_darkGreen(), m_purple(), m_lightGray(), m_gray(), m_darkGray(), m_colormap(nullptr), m_font(nullptr),
79 void init(
unsigned int win_width,
unsigned int win_height,
int win_x,
int win_y,
const std::string &title)
81 gint
width =
static_cast<gint
>(win_width);
82 gint
height =
static_cast<gint
>(win_height);
88 gtk_init(argc, &argv);
91 m_widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
93 gtk_widget_add_events(m_widget, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK);
95 gtk_window_set_default_size(GTK_WINDOW(m_widget), width, height);
97 gtk_window_move(GTK_WINDOW(m_widget), win_x, win_y);
99 gtk_widget_show(m_widget);
104 m_background = gdk_pixmap_new(m_widget->window, width, height, -1);
107 m_gc = gdk_gc_new(m_widget->window);
110 m_colormap = gdk_window_get_colormap(m_widget->window);
115 gdk_color_parse(
"light blue", &m_lightBlue);
116 gdk_colormap_alloc_color(m_colormap, &m_lightBlue, FALSE, TRUE);
119 gdk_color_parse(
"blue", &m_blue);
120 gdk_colormap_alloc_color(m_colormap, &m_blue, FALSE, TRUE);
123 gdk_color_parse(
"dark blue", &m_darkBlue);
124 gdk_colormap_alloc_color(m_colormap, &m_darkBlue, FALSE, TRUE);
127 gdk_color_parse(
"#FF8C8C", &m_lightRed);
128 gdk_colormap_alloc_color(m_colormap, &m_lightRed, FALSE, TRUE);
131 gdk_color_parse(
"red", &m_red);
132 gdk_colormap_alloc_color(m_colormap, &m_red, FALSE, TRUE);
135 gdk_color_parse(
"dark red", &m_darkRed);
136 gdk_colormap_alloc_color(m_colormap, &m_darkRed, FALSE, TRUE);
139 gdk_color_parse(
"light green", &m_lightGreen);
140 gdk_colormap_alloc_color(m_colormap, &m_lightGreen, FALSE, TRUE);
143 gdk_color_parse(
"green", &m_green);
144 gdk_colormap_alloc_color(m_colormap, &m_green, FALSE, TRUE);
147 gdk_color_parse(
"dark green", &m_darkGreen);
148 gdk_colormap_alloc_color(m_colormap, &m_darkGreen, FALSE, TRUE);
151 gdk_color_parse(
"yellow", &m_yellow);
152 gdk_colormap_alloc_color(m_colormap, &m_yellow, FALSE, TRUE);
155 gdk_color_parse(
"cyan", &m_cyan);
156 gdk_colormap_alloc_color(m_colormap, &m_cyan, FALSE, TRUE);
159 gdk_color_parse(
"orange", &m_orange);
160 gdk_colormap_alloc_color(m_colormap, &m_orange, FALSE, TRUE);
163 gdk_color_parse(
"purple", &m_purple);
164 gdk_colormap_alloc_color(m_colormap, &m_purple, FALSE, TRUE);
167 gdk_color_parse(
"white", &m_white);
168 gdk_colormap_alloc_color(m_colormap, &m_white, FALSE, TRUE);
171 gdk_color_parse(
"black", &m_black);
172 gdk_colormap_alloc_color(m_colormap, &m_black, FALSE, TRUE);
175 gdk_color_parse(
"#C0C0C0", &m_lightGray);
176 gdk_colormap_alloc_color(m_colormap, &m_lightGray, FALSE, TRUE);
179 gdk_color_parse(
"#808080", &m_gray);
180 gdk_colormap_alloc_color(m_colormap, &m_gray, FALSE, TRUE);
183 gdk_color_parse(
"#404040", &m_darkGray);
184 gdk_colormap_alloc_color(m_colormap, &m_darkGray, FALSE, TRUE);
188 m_font = gdk_font_load(
"-*-times-medium-r-normal-*-16-*-*-*-*-*-*-*");
189 if (m_font ==
nullptr)
190 m_font = gdk_font_load(
"-*-courier-bold-r-normal-*-*-140-*-*-*-*-*-*");
191 if (m_font ==
nullptr)
192 m_font = gdk_font_load(
"-*-courier 10 pitch-medium-r-normal-*-16-*-*-*-*-*-*-*");
195 gdk_window_set_title(m_widget->window, title.c_str());
198 void setFont(
const std::string &fontname) { m_font = gdk_font_load((
const gchar *)fontname.c_str()); }
200 void setTitle(
const std::string &title) { gdk_window_set_title(m_widget->window, title.c_str()); }
202 void setWindowPosition(
int win_x,
int win_y) { gtk_window_move(GTK_WINDOW(m_widget), win_x, win_y); }
204 void displayImage(
const vpImage<unsigned char> &I,
unsigned int scale, gint width, gint height)
208 gdk_draw_gray_image(m_background, m_gc, 0, 0, width, height, GDK_RGB_DITHER_NONE, I.
bitmap, width);
211 vpImage<unsigned char> sampled;
213 gdk_draw_gray_image(m_background, m_gc, 0, 0, width, height, GDK_RGB_DITHER_NONE, sampled.
bitmap, width);
217 gdk_window_set_back_pixmap(m_widget->window, m_background, FALSE);
220 void displayImage(
const vpImage<vpRGBa> &I,
unsigned int scale, gint width, gint height)
224 gdk_draw_rgb_32_image(m_background, m_gc, 0, 0, width, height, GDK_RGB_DITHER_NONE, (
unsigned char *)I.
bitmap,
228 vpImage<vpRGBa> sampled;
230 gdk_draw_rgb_32_image(m_background, m_gc, 0, 0, width, height, GDK_RGB_DITHER_NONE,
231 (
unsigned char *)sampled.
bitmap, 4 * width);
235 gdk_window_set_back_pixmap(m_widget->window, m_background, FALSE);
238 void displayImageROI(
const vpImage<unsigned char> &I, gint j_min, gint i_min, gint width, gint height)
240 gdk_draw_gray_image(m_background, m_gc, j_min, i_min, width, height, GDK_RGB_DITHER_NONE, I.
bitmap, width);
242 gdk_window_set_back_pixmap(m_widget->window, m_background, FALSE);
245 void displayImageROI(
const vpImage<vpRGBa> &I, gint j_min, gint i_min, gint width, gint height)
247 gdk_draw_rgb_32_image(m_background, m_gc, j_min, i_min, width, height, GDK_RGB_DITHER_NONE,
248 (
unsigned char *)I.
bitmap, width * 4);
251 gdk_window_set_back_pixmap(m_widget->window, m_background, FALSE);
256 if (m_col !=
nullptr) {
261 if (m_widget !=
nullptr) {
262 gdk_window_hide(m_widget->window);
263 gdk_window_destroy(m_widget->window);
264 gtk_widget_destroy(m_widget);
271 gdk_window_clear(m_widget->window);
275 void displayText(
const vpImagePoint &ip,
const std::string &text,
const vpColor &color,
unsigned int scale)
278 gdk_gc_set_foreground(m_gc, m_col[
color.id]);
280 m_gdkcolor.red = 256 *
color.R;
281 m_gdkcolor.green = 256 *
color.G;
282 m_gdkcolor.blue = 256 *
color.B;
283 gdk_colormap_alloc_color(m_colormap, &m_gdkcolor, FALSE, TRUE);
284 gdk_gc_set_foreground(m_gc, &m_gdkcolor);
286 if (m_font !=
nullptr)
288 (
const gchar *)text.c_str());
290 std::cout <<
"Cannot draw string: no font is selected" << std::endl;
293 void displayCircle(
const vpImagePoint ¢er,
unsigned int radius,
const vpColor &color,
bool fill,
294 unsigned int thickness,
unsigned int scale)
297 gdk_gc_set_foreground(m_gc, m_col[
color.id]);
299 m_gdkcolor.red = 256 *
color.R;
300 m_gdkcolor.green = 256 *
color.G;
301 m_gdkcolor.blue = 256 *
color.B;
302 gdk_colormap_alloc_color(m_colormap, &m_gdkcolor, FALSE, TRUE);
303 gdk_gc_set_foreground(m_gc, &m_gdkcolor);
306 gdk_gc_set_line_attributes(m_gc,
static_cast<gint
>(thickness), GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_BEVEL);
309 gdk_draw_arc(m_background, m_gc, FALSE,
vpMath::round((center.
get_u() - radius) / scale),
310 vpMath::round((center.
get_v() - radius) / scale),
static_cast<gint
>(2. * radius / scale),
311 static_cast<gint
>(2. * radius / scale), 23040, 23040);
313 gdk_draw_arc(m_background, m_gc, TRUE,
vpMath::round((center.
get_u() - radius) / scale),
314 vpMath::round((center.
get_v() - radius) / scale),
static_cast<gint
>(2. * radius / scale),
315 static_cast<gint
>(2. * radius / scale), 23040, 23040);
318 void displayDotLine(
const vpImagePoint &ip1,
const vpImagePoint &ip2,
const vpColor &color,
unsigned int thickness,
322 gdk_gc_set_foreground(m_gc, m_col[
color.id]);
324 m_gdkcolor.red = 256 *
color.R;
325 m_gdkcolor.green = 256 *
color.G;
326 m_gdkcolor.blue = 256 *
color.B;
327 gdk_colormap_alloc_color(m_colormap, &m_gdkcolor, FALSE, TRUE);
328 gdk_gc_set_foreground(m_gc, &m_gdkcolor);
331 gdk_gc_set_line_attributes(m_gc,
static_cast<gint
>(thickness), GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_BEVEL);
334 gdk_gc_set_line_attributes(m_gc, 0, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_BEVEL);
337 void displayLine(
const vpImagePoint &ip1,
const vpImagePoint &ip2,
const vpColor &color,
unsigned int thickness,
341 gdk_gc_set_foreground(m_gc, m_col[
color.id]);
343 m_gdkcolor.red = 256 *
color.R;
344 m_gdkcolor.green = 256 *
color.G;
345 m_gdkcolor.blue = 256 *
color.B;
346 gdk_colormap_alloc_color(m_colormap, &m_gdkcolor, FALSE, TRUE);
347 gdk_gc_set_foreground(m_gc, &m_gdkcolor);
350 gdk_gc_set_line_attributes(m_gc,
static_cast<gint
>(thickness), GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_BEVEL);
355 void displayPoint(
const vpImagePoint &ip,
const vpColor &color,
unsigned int thickness,
unsigned int scale)
358 gdk_gc_set_foreground(m_gc, m_col[
color.id]);
360 m_gdkcolor.red = 256 *
color.R;
361 m_gdkcolor.green = 256 *
color.G;
362 m_gdkcolor.blue = 256 *
color.B;
363 gdk_colormap_alloc_color(m_colormap, &m_gdkcolor, FALSE, TRUE);
364 gdk_gc_set_foreground(m_gc, &m_gdkcolor);
367 if (thickness == 1) {
372 static_cast<gint
>(thickness),
static_cast<gint
>(thickness));
376 void displayRectangle(
const vpImagePoint &topLeft,
unsigned int w,
unsigned int h,
const vpColor &color,
bool fill,
377 unsigned int thickness,
unsigned int scale)
380 gdk_gc_set_foreground(m_gc, m_col[
color.id]);
382 m_gdkcolor.red = 256 *
color.R;
383 m_gdkcolor.green = 256 *
color.G;
384 m_gdkcolor.blue = 256 *
color.B;
385 gdk_colormap_alloc_color(m_colormap, &m_gdkcolor, FALSE, TRUE);
386 gdk_gc_set_foreground(m_gc, &m_gdkcolor);
388 gdk_gc_set_line_attributes(m_gc,
static_cast<gint
>(thickness), GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_BEVEL);
393 static_cast<gint
>(h / scale));
397 static_cast<gint
>(h / scale));
400 gdk_gc_set_line_attributes(m_gc, 0, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_BEVEL);
404 const GdkEventType &event_type)
408 GdkEvent *ev =
nullptr;
409 while ((ev = gdk_event_get())) {
410 if (ev->any.window == m_widget->window && ev->type == event_type) {
411 double u = ((GdkEventButton *)ev)->x;
412 double v = ((GdkEventButton *)ev)->y;
416 switch (
static_cast<int>(((GdkEventButton *)ev)->button)) {
436 }
while (ret ==
false && blocking ==
true);
440 void getImage(vpImage<vpRGBa> &I, gint width, gint height)
443 ImageGtk = gdk_image_get(m_background, 0, 0, width, height);
448 guchar OctetRouge, OctetVert, OctetBleu, mask;
452 for (gint x = 0;
x <
width; ++
x) {
453 pixel = gdk_image_get_pixel(ImageGtk, x, y);
454 OctetBleu =
static_cast<guchar
>(pixel) & mask;
455 OctetVert =
static_cast<guchar
>(pixel >> 8) & mask;
456 OctetRouge =
static_cast<guchar
>(pixel >> 16) & mask;
457 I[
y][
x].R = OctetRouge;
458 I[
y][
x].G = OctetVert;
459 I[
y][
x].B = OctetBleu;
465 unsigned int getScreenDepth() {
return static_cast<unsigned int>(gdk_window_get_visual(m_widget->window)->depth); }
467 bool getKeyboardEvent(std::string &key,
bool blocking)
471 GdkEvent *ev =
nullptr;
472 while ((ev = gdk_event_get()) !=
nullptr) {
473 if (ev->any.window == m_widget->window && ev->type == GDK_KEY_PRESS) {
474 key = gdk_keyval_name(ev->key.keyval);
483 }
while (ret ==
false && blocking ==
true);
487 bool getPointerMotionEvent(vpImagePoint &ip,
unsigned int scale)
490 GdkEvent *ev =
nullptr;
491 if ((ev = gdk_event_get())) {
492 if (ev->any.window == m_widget->window && ev->type == GDK_MOTION_NOTIFY) {
493 double u = ((GdkEventMotion *)ev)->x;
494 double v = ((GdkEventMotion *)ev)->y;
505 void getPointerPosition(vpImagePoint &ip,
unsigned int scale)
508 gdk_window_get_pointer(m_widget->window, &u, &v,
nullptr);
509 ip.
set_u(
static_cast<double>(u) * scale);
510 ip.
set_v(
static_cast<double>(v) * scale);
513 void getScreenSize(
bool is_init,
unsigned int &w,
unsigned int &h)
519 gtk_init(argc, &argv);
521 GtkWidget *widget_ = gtk_window_new(GTK_WINDOW_TOPLEVEL);
522 gtk_window_set_default_size(GTK_WINDOW(widget_), 100, 100);
523 gtk_widget_show(widget_);
525 GdkScreen *screen_ = gdk_window_get_screen(widget_->window);
526 w =
static_cast<unsigned int>(gdk_screen_get_width(screen_));
527 h =
static_cast<unsigned int>(gdk_screen_get_height(screen_));
528 gtk_widget_destroy(widget_);
531 GdkScreen *screen_ = gdk_window_get_screen(m_widget->window);
532 w =
static_cast<unsigned int>(gdk_screen_get_width(screen_));
533 h =
static_cast<unsigned int>(gdk_screen_get_height(screen_));
539 GdkPixmap *m_background;
541 GdkColor m_blue, m_red, m_yellow, m_green, m_cyan, m_orange, m_white, m_black, m_gdkcolor;
542 GdkColor m_lightBlue, m_darkBlue, m_lightRed, m_darkRed, m_lightGreen, m_darkGreen, m_purple;
543 GdkColor m_lightGray, m_gray, m_darkGray;
544 GdkColormap *m_colormap;
575 setScale(scaleType, I.getWidth(), I.getHeight());
606 setScale(scaleType, I.getWidth(), I.getHeight());
607 init(I, win_x, win_y, win_title);
631 setScale(scaleType, I.getWidth(), I.getHeight());
660 setScale(scaleType, I.getWidth(), I.getHeight());
661 init(I, win_x, win_y, win_title);
741 if ((I.getHeight() == 0) || (I.getWidth() == 0)) {
750 if (!win_title.empty())
771 if ((I.getHeight() == 0) || (I.getWidth() == 0)) {
780 if (!win_title.empty())
799 const std::string &win_title)
840 if (!title.empty()) {
841 m_impl->setTitle(title);
861 m_impl->setWindowPosition(win_x, win_y);
914 int i_min = std::max<int>(
static_cast<int>(ceil(iP.
get_i() /
m_scale)), 0);
915 int j_min = std::max<int>(
static_cast<int>(ceil(iP.
get_j() /
m_scale)), 0);
917 m_impl->displayImageROI(Itemp,
static_cast<gint
>(j_min),
static_cast<gint
>(i_min),
970 int i_min = std::max<int>(
static_cast<int>(ceil(iP.
get_i() /
m_scale)), 0);
971 int j_min = std::max<int>(
static_cast<int>(ceil(iP.
get_j() /
m_scale)), 0);
973 m_impl->displayImageROI(Itemp,
static_cast<gint
>(j_min),
static_cast<gint
>(i_min),
999 m_impl->closeDisplay();
1012 m_impl->flushDisplay();
1024 const unsigned int )
1027 m_impl->flushDisplay();
1052 unsigned int h,
unsigned int thickness)
1059 if ((std::fabs(a) > std::numeric_limits<double>::epsilon()) &&
1060 (std::fabs(b) > std::numeric_limits<double>::epsilon())) {
1103 m_impl->displayText(ip, text, color,
m_scale);
1120 unsigned int thickness)
1126 m_impl->displayCircle(center, radius, color, fill, thickness,
m_scale);
1142 double i = ip.
get_i();
1143 double j = ip.
get_j();
1146 ip1.
set_i(i - size / 2);
1148 ip2.
set_i(i + size / 2);
1153 ip1.
set_j(j - size / 2);
1155 ip2.
set_j(j + size / 2);
1172 unsigned int thickness)
1179 m_impl->displayDotLine(ip1, ip2, color, thickness,
m_scale);
1194 unsigned int thickness)
1200 m_impl->displayLine(ip1, ip2, color, thickness,
m_scale);
1216 m_impl->displayPoint(ip, color, thickness,
m_scale);
1238 bool fill,
unsigned int thickness)
1244 m_impl->displayRectangle(topLeft, w, h, color, fill, thickness,
m_scale);
1264 bool fill,
unsigned int thickness)
1273 m_impl->displayRectangle(topLeft, w, h, color, fill, thickness,
m_scale);
1301 m_impl->displayRectangle(topLeft, w, h, color, fill, thickness,
m_scale);
1330 ret = m_impl->getClick(ip, button, blocking,
m_scale, GDK_BUTTON_PRESS);
1360 ret = m_impl->getClick(ip, button, blocking,
m_scale, GDK_BUTTON_PRESS);
1392 ret = m_impl->getClick(ip, button, blocking,
m_scale, GDK_BUTTON_PRESS);
1428 ret = m_impl->getClick(ip, button, blocking,
m_scale, GDK_BUTTON_RELEASE);
1444 m_impl->getImage(I,
static_cast<gint
>(
m_width),
static_cast<gint
>(
m_height));
1458 unsigned int depth = m_impl->getScreenDepth();
1484 ret = m_impl->getKeyboardEvent(key, blocking);
1516 ret = m_impl->getKeyboardEvent(key, blocking);
1541 ret = m_impl->getPointerMotionEvent(ip,
m_scale);
1562 m_impl->getPointerPosition(ip,
m_scale);
1588 unsigned int width, height;
1598 unsigned int width, height;
1605#elif !defined(VISP_BUILD_SHARED_LIBS)
1607void dummy_vpDisplayGTK() { }
Class to define RGB colors available for display functionalities.
Error that can be emitted by the vpDisplay class and its derivatives.
@ notInitializedError
Display not initialized.
void displayRectangle(const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1) VP_OVERRIDE
virtual ~vpDisplayGTK() VP_OVERRIDE
void displayCircle(const vpImagePoint ¢er, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1) VP_OVERRIDE
void getScreenSize(unsigned int &screen_width, unsigned int &screen_height) VP_OVERRIDE
void getImage(vpImage< vpRGBa > &I) VP_OVERRIDE
Get the window pixmap and put it in vpRGBa image.
unsigned int getScreenWidth() VP_OVERRIDE
bool getClick(bool blocking=true) VP_OVERRIDE
unsigned int getScreenHeight() VP_OVERRIDE
void displayImageROI(const vpImage< unsigned char > &I, const vpImagePoint &iP, unsigned int width, unsigned int height) VP_OVERRIDE
void setFont(const std::string &fontname) VP_OVERRIDE
void displayImage(const vpImage< vpRGBa > &I) VP_OVERRIDE
void flushDisplay() VP_OVERRIDE
void displayLine(const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1) VP_OVERRIDE
void setTitle(const std::string &win_title) VP_OVERRIDE
void displayArrow(const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1) VP_OVERRIDE
bool getPointerMotionEvent(vpImagePoint &ip) VP_OVERRIDE
void setWindowPosition(int win_x, int win_y) VP_OVERRIDE
unsigned int getScreenDepth()
get the window depth (8,16,24,32)
void closeDisplay() VP_OVERRIDE
void init(vpImage< unsigned char > &I, int win_x=-1, int win_y=-1, const std::string &win_title="") VP_OVERRIDE
bool getPointerPosition(vpImagePoint &ip) VP_OVERRIDE
void displayCross(const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1) VP_OVERRIDE
bool getKeyboardEvent(bool blocking=true) VP_OVERRIDE
bool getClickUp(vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true) VP_OVERRIDE
void displayDotLine(const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1) VP_OVERRIDE
void displayPoint(const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1) VP_OVERRIDE
void clearDisplay(const vpColor &color=vpColor::white) VP_OVERRIDE
void displayText(const vpImagePoint &ip, const std::string &text, const vpColor &color=vpColor::green) VP_OVERRIDE
void flushDisplayROI(const vpImagePoint &iP, unsigned int width, unsigned int height) VP_OVERRIDE
int m_windowXPosition
display position
int m_windowYPosition
display position
bool m_displayHasBeenInitialized
display has been initialized
void setScale(vpScaleType scaleType, unsigned int width, unsigned int height)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)
Definition of the vpImage class member functions.
void subsample(unsigned int v_scale, unsigned int h_scale, vpImage< Type > &sampled) const
unsigned int getWidth() const
void resize(unsigned int h, unsigned int w)
resize the image : Image initialization
Type * bitmap
points toward the bitmap
unsigned int getHeight() const
static double sqr(double x)
static int round(double x)
Defines a rectangle in the plane.
vpImagePoint getTopLeft() const
VISP_EXPORT int wait(double t0, double t)