// GENERATED — DO NOT EDIT

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

///|
pub(open) trait IAspectFrame {
  fn as_aspect_frame(Self) -> AspectFrame
  fn get_child(Self) -> Widget? = _
  fn get_obey_child(Self) -> Bool = _
  fn get_ratio(Self) -> Float = _
  fn get_xalign(Self) -> Float = _
  fn get_yalign(Self) -> Float = _
  fn set_child(Self, &IWidget?) -> Unit = _
  fn set_obey_child(Self, Bool) -> Unit = _
  fn set_ratio(Self, Float) -> Unit = _
  fn set_xalign(Self, Float) -> Unit = _
  fn set_yalign(Self, Float) -> Unit = _
}

///|
pub impl IAspectFrame for AspectFrame with fn as_aspect_frame(self) {
  self
}

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.AspectFrame.new.html).
pub extern "c" fn AspectFrame::new(
  xalign : Float,
  yalign : Float,
  ratio : Float,
  obey_child : Bool,
) -> AspectFrame = "moonbit_gtk_aspect_frame_new"

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

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

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

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.get_ratio.html).
#borrow(self)
pub extern "c" fn AspectFrame::get_ratio(self : AspectFrame) -> Float = "moonbit_gtk_aspect_frame_get_ratio"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.get_xalign.html).
#borrow(self)
pub extern "c" fn AspectFrame::get_xalign(self : AspectFrame) -> Float = "moonbit_gtk_aspect_frame_get_xalign"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.get_yalign.html).
#borrow(self)
pub extern "c" fn AspectFrame::get_yalign(self : AspectFrame) -> Float = "moonbit_gtk_aspect_frame_get_yalign"

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

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

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.set_obey_child.html).
#borrow(self)
pub extern "c" fn AspectFrame::set_obey_child(
  self : AspectFrame,
  obey_child : Bool,
) = "moonbit_gtk_aspect_frame_set_obey_child"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.set_ratio.html).
#borrow(self)
pub extern "c" fn AspectFrame::set_ratio(self : AspectFrame, ratio : Float) = "moonbit_gtk_aspect_frame_set_ratio"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.set_xalign.html).
#borrow(self)
pub extern "c" fn AspectFrame::set_xalign(self : AspectFrame, xalign : Float) = "moonbit_gtk_aspect_frame_set_xalign"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.AspectFrame.set_yalign.html).
#borrow(self)
pub extern "c" fn AspectFrame::set_yalign(self : AspectFrame, yalign : Float) = "moonbit_gtk_aspect_frame_set_yalign"

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

///|
impl IAspectFrame with fn get_obey_child(self) -> Bool {
  self.as_aspect_frame().get_obey_child()
}

///|
impl IAspectFrame with fn get_ratio(self) -> Float {
  self.as_aspect_frame().get_ratio()
}

///|
impl IAspectFrame with fn get_xalign(self) -> Float {
  self.as_aspect_frame().get_xalign()
}

///|
impl IAspectFrame with fn get_yalign(self) -> Float {
  self.as_aspect_frame().get_yalign()
}

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

///|
impl IAspectFrame with fn set_obey_child(self, obey_child) -> Unit {
  self.as_aspect_frame().set_obey_child(obey_child)
}

///|
impl IAspectFrame with fn set_ratio(self, ratio) -> Unit {
  self.as_aspect_frame().set_ratio(ratio)
}

///|
impl IAspectFrame with fn set_xalign(self, xalign) -> Unit {
  self.as_aspect_frame().set_xalign(xalign)
}

///|
impl IAspectFrame with fn set_yalign(self, yalign) -> Unit {
  self.as_aspect_frame().set_yalign(yalign)
}

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

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

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

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