/* Copyright (C) 2018 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#include <gtkmm/eventcontroller.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/eventcontroller_p.h)

namespace Gtk
{
class GTKMM_API Widget;

/** Event controller for motion events.
 *
 * %Gtk::EventControllerMotion is an event controller meant for situations
 * where you need to track the position of the pointer.
 * 
 * @newin{3,94}
 *
 * @ingroup Gestures
 */
class GTKMM_API EventControllerMotion : public EventController
{
  _CLASS_GOBJECT(EventControllerMotion, GtkEventControllerMotion, GTK_EVENT_CONTROLLER_MOTION, EventController, GtkEventController, , , GTKMM_API)

protected:
  _CTOR_DEFAULT

public:
  _WRAP_CREATE()

  _WRAP_METHOD(bool contains_pointer() const, gtk_event_controller_motion_contains_pointer)
  _WRAP_METHOD(bool is_pointer() const, gtk_event_controller_motion_is_pointer)

  // no_default_handler because GtkEventControllerMotionClass is private.
  _WRAP_SIGNAL(void enter(double x, double y), "enter", no_default_handler)
  _WRAP_SIGNAL(void leave(), "leave", no_default_handler)
  _WRAP_SIGNAL(void motion(double x, double y), "motion", no_default_handler)

  _WRAP_PROPERTY("is-pointer", bool)
  _WRAP_PROPERTY("contains-pointer", bool)
};

} // namespace Gtk
