// GENERATED — DO NOT EDIT

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

///|
pub(open) trait IFlowBoxChild {
  fn as_flow_box_child(Self) -> FlowBoxChild
  fn changed(Self) -> Unit = _
  fn get_child(Self) -> Widget? = _
  fn get_index(Self) -> Int = _
  fn is_selected(Self) -> Bool = _
  fn set_child(Self, &IWidget?) -> Unit = _
  fn connect_activate(Self, (FlowBoxChild) -> Unit) -> UInt64 = _
}

///|
pub impl IFlowBoxChild for FlowBoxChild with fn as_flow_box_child(self) {
  self
}

///|
/// Implementation contract for FlowBoxChild.activate. Self is the retained MoonBit state; the second parameter is the invoked FlowBoxChild object.
pub(open) trait VFlowBoxChildActivate {
  fn activate(Self, FlowBoxChild) -> Unit
}

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

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.FlowBoxChild.changed.html).
#borrow(self)
pub extern "c" fn FlowBoxChild::changed(self : FlowBoxChild) = "moonbit_gtk_flow_box_child_changed"

///|
#borrow(self_)
extern "c" fn moonbit_gtk_flow_box_child_get_child(
  self_ : FlowBoxChild,
) -> @glib.Nullable[Widget] = "moonbit_gtk_flow_box_child_get_child"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.FlowBoxChild.get_child.html).
pub fn FlowBoxChild::get_child(self : FlowBoxChild) -> Widget? {
  let raw_result = moonbit_gtk_flow_box_child_get_child(self)
  raw_result.to_option()
}

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.FlowBoxChild.get_index.html).
#borrow(self)
pub extern "c" fn FlowBoxChild::get_index(self : FlowBoxChild) -> Int = "moonbit_gtk_flow_box_child_get_index"

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

///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_flow_box_child_set_child(
  self_ : FlowBoxChild,
  child : @glib.Nullable[Widget],
) = "moonbit_gtk_flow_box_child_set_child"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.FlowBoxChild.set_child.html).
pub fn FlowBoxChild::set_child(self : FlowBoxChild, child : &IWidget?) -> Unit {
  moonbit_gtk_flow_box_child_set_child(
    self,
    match child {
      Some(v) => @glib.Nullable::some(v.as_widget())
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(instance)
extern "c" fn gtk_flow_box_child_connect_activate(
  instance : FlowBoxChild,
  function : FuncRef[(FlowBoxChild, (FlowBoxChild) -> Unit) -> Unit],
  closure : (FlowBoxChild) -> Unit,
) -> UInt64 = "moonbit_gtk_flow_box_child_connect_activate"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.FlowBoxChild.activate.html).
pub fn FlowBoxChild::connect_activate(
  self : FlowBoxChild,
  f : (FlowBoxChild) -> Unit,
) -> UInt64 {
  gtk_flow_box_child_connect_activate(
    self,
    fn(instance_, f) { f(instance_) },
    f,
  )
}

///|
impl IFlowBoxChild with fn changed(self) -> Unit {
  self.as_flow_box_child().changed()
}

///|
impl IFlowBoxChild with fn get_child(self) -> Widget? {
  self.as_flow_box_child().get_child()
}

///|
impl IFlowBoxChild with fn get_index(self) -> Int {
  self.as_flow_box_child().get_index()
}

///|
impl IFlowBoxChild with fn is_selected(self) -> Bool {
  self.as_flow_box_child().is_selected()
}

///|
impl IFlowBoxChild with fn set_child(self, child) -> Unit {
  self.as_flow_box_child().set_child(child)
}

///|
impl IFlowBoxChild with fn connect_activate(self, f) -> UInt64 {
  self.as_flow_box_child().connect_activate(f)
}

///|
pub fn FlowBoxChild::as_widget(self : FlowBoxChild) -> Widget = "%identity"

///|
pub impl IWidget for FlowBoxChild with fn as_widget(self) {
  self.as_widget()
}

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

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