LCOV - code coverage report
Current view: top level - eq - eventHandler.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 4 4 100.0 %
Date: 2017-12-16 05:07:20 Functions: 2 3 66.7 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2006-2016, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                          Daniel Nachbaur <danielnachbaur@gmail.com>
       4             :  *
       5             :  * This library is free software; you can redistribute it and/or modify it under
       6             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       7             :  * by the Free Software Foundation.
       8             :  *
       9             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      10             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      11             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      12             :  * details.
      13             :  *
      14             :  * You should have received a copy of the GNU Lesser General Public License
      15             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      16             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      17             :  */
      18             : 
      19             : #ifndef EQ_EVENTHANDLER_H
      20             : #define EQ_EVENTHANDLER_H
      21             : 
      22             : #include <eq/api.h>
      23             : #include <eq/fabric/pointerEvent.h> // member
      24             : #include <eq/types.h>
      25             : 
      26             : namespace eq
      27             : {
      28             : /** Base class for window system-specific event handlers */
      29             : class EventHandler
      30             : {
      31             : protected:
      32             :     /** Construct a new event handler. @version 1.0 */
      33           2 :     EventHandler()
      34           2 :         : _lastEventType(EVENT_UNKNOWN)
      35             :     {
      36           2 :     }
      37             : 
      38             :     /** Destruct the event handler. @version 1.0 */
      39           2 :     virtual ~EventHandler() {}
      40             :     /**
      41             :      * @internal
      42             :      * Compute the mouse move delta from the previous pointer event.
      43             :      */
      44             :     EQ_API void _computePointerDelta(EventType type, PointerEvent& event);
      45             : 
      46             : private:
      47             :     /** Previous (pointer) event type */
      48             :     EventType _lastEventType;
      49             : 
      50             :     /** The previous pointer event to compute mouse movement deltas. */
      51             :     PointerEvent _lastPointerEvent;
      52             : };
      53             : }
      54             : 
      55             : #endif // EQ_EVENTHANDLER_H

Generated by: LCOV version 1.11