/*
  Copyright (C) 2012 Stuffomatic Ltd. <contact@stuff-o-matic.com>

  All rights reserved.

  See the accompanying license file for details about usage, modification and
  distribution of this file.
*/
/**
 * \file
 * \brief A class representing a finger.
 * \author Julien Jorge
 */
#ifndef __INPUT_FINGER_HPP__
#define __INPUT_FINGER_HPP__

#include "input/display_projection.hpp"
#include "input/finger_event.hpp"

#include <vector>

#include "input/class_export.hpp"

namespace bear
{
  namespace input
  {
    /**
     * \brief A class representing a finger.
     */
    class INPUT_EXPORT finger
    {
    public:
      /** \brief The type of the lists of finger events. */
      typedef std::vector<finger_event> event_list;

    public:
      void set_display( const display_projection& display );
      const event_list& get_events() const;

      // only for input::system
      void refresh();

    private:
      position_type convert_position( double x, double y ) const;
      position_type convert_delta( double x, double y ) const;

    private:
      display_projection m_display;

      /** \brief The events generated by the finger. */
      event_list m_events;

    }; // class finger
  } // namespace input
} // namespace bear

#endif // __INPUT_FINGER_HPP__
