:right-sidebar: True EventControllerMotion =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: EventControllerMotion(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.EventController`, :class:`~gi.repository.GObject.Object` ``GtkEventControllerMotion`` is an event controller tracking the pointer position. The event controller offers :obj:`~gi.repository.Gtk.EventControllerMotion.signals.enter` and :obj:`~gi.repository.Gtk.EventControllerMotion.signals.leave` signals, as well as :obj:`~gi.repository.Gtk.EventControllerMotion.props.is_pointer` and :obj:`~gi.repository.Gtk.EventControllerMotion.props.contains_pointer` properties which are updated to reflect changes in the pointer position as it moves over the widget. Constructors ------------ .. rst-class:: interim-class .. class:: EventControllerMotion :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.EventController Creates a new event controller that will handle motion events. Methods ------- .. rst-class:: interim-class .. class:: EventControllerMotion :no-index: .. method:: contains_pointer() -> bool Returns if a pointer is within ``self`` or one of its children. .. method:: is_pointer() -> bool Returns if a pointer is within ``self``\, but not one of its children. Properties ---------- .. rst-class:: interim-class .. class:: EventControllerMotion :no-index: .. attribute:: props.contains_pointer :type: bool The type of the None singleton. .. attribute:: props.is_pointer :type: bool The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: EventControllerMotion.signals :no-index: .. method:: enter(x: float, y: float) -> None The type of the None singleton. :param x: coordinates of pointer location :param y: coordinates of pointer location .. method:: leave() -> None The type of the None singleton. .. method:: motion(x: float, y: float) -> None The type of the None singleton. :param x: the x coordinate :param y: the y coordinate