vivalib library
Concurrent C++11 OpenCV library for Computer Vision applications
listener.h
1 /**************************************************************************************************
2  **************************************************************************************************
3 
4  BSD 3-Clause License (https://www.tldrlegal.com/l/bsd3)
5 
6  Copyright (c) 2015 Andrés Solís Montero <http://www.solism.ca>, All rights reserved.
7 
8 
9  Redistribution and use in source and binary forms, with or without modification,
10  are permitted provided that the following conditions are met:
11 
12  1. Redistributions of source code must retain the above copyright notice,
13  this list of conditions and the following disclaimer.
14  2. Redistributions in binary form must reproduce the above copyright notice,
15  this list of conditions and the following disclaimer in the documentation
16  and/or other materials provided with the distribution.
17  3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30  OF THE POSSIBILITY OF SUCH DAMAGE.
31 
32  **************************************************************************************************
33  **************************************************************************************************/
34 
35 #ifndef __viva__listener__
36 #define __viva__listener__
37 
38 #include <iostream>
39 #include <string>
40 #include "opencv2/opencv.hpp"
41 
42 namespace viva
43 {
48  {
49  public:
54  virtual void keyboardInput(int key) {};
55  };
56 
61  {
62  public:
72  virtual void mouseInput(int event, int x, int y, int flags){};
73 
77  virtual void leftButtonDown(int x, int y, int flags){};
81  virtual void rightButtonDown(int x, int y, int flags){};
85  virtual void middleButtonDown(int x, int y, int flags){};
89  virtual void mouseMove(int x, int y, int flags){};
90  };
91 }
92 #endif /* defined(__h7__listener__) */
virtual void keyboardInput(int key)
Definition: listener.h:54
virtual void middleButtonDown(int x, int y, int flags)
Definition: listener.h:85
Definition: listener.h:47
virtual void leftButtonDown(int x, int y, int flags)
Definition: listener.h:77
Definition: channel.h:45
virtual void mouseInput(int event, int x, int y, int flags)
Definition: listener.h:72
Definition: listener.h:60
virtual void rightButtonDown(int x, int y, int flags)
Definition: listener.h:81
virtual void mouseMove(int x, int y, int flags)
Definition: listener.h:89