// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.EventControllerMotion.html).
pub type EventControllerMotion

///|
pub(open) trait IEventControllerMotion {
  fn as_event_controller_motion(Self) -> EventControllerMotion
  fn contains_pointer(Self) -> Bool = _
  fn is_pointer(Self) -> Bool = _
  fn connect_enter(Self, (EventControllerMotion, Double, Double) -> Unit) -> UInt64 = _
  fn connect_leave(Self, (EventControllerMotion) -> Unit) -> UInt64 = _
  fn connect_motion(Self, (EventControllerMotion, Double, Double) -> Unit) -> UInt64 = _
}

///|
pub impl IEventControllerMotion for EventControllerMotion with fn as_event_controller_motion(
  self,
) {
  self
}

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.EventControllerMotion.new.html).
pub extern "c" fn EventControllerMotion::new() -> EventControllerMotion = "moonbit_gtk_event_controller_motion_new"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.EventControllerMotion.contains_pointer.html).
#borrow(self)
pub extern "c" fn EventControllerMotion::contains_pointer(
  self : EventControllerMotion,
) -> Bool = "moonbit_gtk_event_controller_motion_contains_pointer"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.EventControllerMotion.is_pointer.html).
#borrow(self)
pub extern "c" fn EventControllerMotion::is_pointer(
  self : EventControllerMotion,
) -> Bool = "moonbit_gtk_event_controller_motion_is_pointer"

///|
#borrow(instance)
extern "c" fn gtk_event_controller_motion_connect_enter(
  instance : EventControllerMotion,
  function : FuncRef[
    (
      EventControllerMotion,
      Double,
      Double,
      (EventControllerMotion, Double, Double) -> Unit,
    ) -> Unit,
  ],
  closure : (EventControllerMotion, Double, Double) -> Unit,
) -> UInt64 = "moonbit_gtk_event_controller_motion_connect_enter"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.EventControllerMotion.enter.html).
pub fn EventControllerMotion::connect_enter(
  self : EventControllerMotion,
  f : (EventControllerMotion, Double, Double) -> Unit,
) -> UInt64 {
  gtk_event_controller_motion_connect_enter(
    self,
    fn(instance_, x, y, f) { f(instance_, x, y) },
    f,
  )
}

///|
#borrow(instance)
extern "c" fn gtk_event_controller_motion_connect_leave(
  instance : EventControllerMotion,
  function : FuncRef[
    (EventControllerMotion, (EventControllerMotion) -> Unit) -> Unit,
  ],
  closure : (EventControllerMotion) -> Unit,
) -> UInt64 = "moonbit_gtk_event_controller_motion_connect_leave"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.EventControllerMotion.leave.html).
pub fn EventControllerMotion::connect_leave(
  self : EventControllerMotion,
  f : (EventControllerMotion) -> Unit,
) -> UInt64 {
  gtk_event_controller_motion_connect_leave(
    self,
    fn(instance_, f) { f(instance_) },
    f,
  )
}

///|
#borrow(instance)
extern "c" fn gtk_event_controller_motion_connect_motion(
  instance : EventControllerMotion,
  function : FuncRef[
    (
      EventControllerMotion,
      Double,
      Double,
      (EventControllerMotion, Double, Double) -> Unit,
    ) -> Unit,
  ],
  closure : (EventControllerMotion, Double, Double) -> Unit,
) -> UInt64 = "moonbit_gtk_event_controller_motion_connect_motion"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.EventControllerMotion.motion.html).
pub fn EventControllerMotion::connect_motion(
  self : EventControllerMotion,
  f : (EventControllerMotion, Double, Double) -> Unit,
) -> UInt64 {
  gtk_event_controller_motion_connect_motion(
    self,
    fn(instance_, x, y, f) { f(instance_, x, y) },
    f,
  )
}

///|
impl IEventControllerMotion with fn contains_pointer(self) -> Bool {
  self.as_event_controller_motion().contains_pointer()
}

///|
impl IEventControllerMotion with fn is_pointer(self) -> Bool {
  self.as_event_controller_motion().is_pointer()
}

///|
impl IEventControllerMotion with fn connect_enter(self, f) -> UInt64 {
  self.as_event_controller_motion().connect_enter(f)
}

///|
impl IEventControllerMotion with fn connect_leave(self, f) -> UInt64 {
  self.as_event_controller_motion().connect_leave(f)
}

///|
impl IEventControllerMotion with fn connect_motion(self, f) -> UInt64 {
  self.as_event_controller_motion().connect_motion(f)
}

///|
pub fn EventControllerMotion::as_event_controller(
  self : EventControllerMotion,
) -> EventController = "%identity"

///|
pub impl IEventController for EventControllerMotion with fn as_event_controller(
  self,
) {
  self.as_event_controller()
}

///|
pub fn EventControllerMotion::as_gobject_object(
  self : EventControllerMotion,
) -> @gobject.Object = "%identity"

///|
pub impl @gobject.IObject for EventControllerMotion with fn as_object(self) {
  self.as_gobject_object()
}