// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ApplicationWindow.html).
pub type ApplicationWindow

///|
pub(open) trait IApplicationWindow {
  fn as_application_window(Self) -> ApplicationWindow
  fn get_adaptive_preview(Self) -> Bool = _
  fn get_content(Self) -> @gtk.Widget? = _
  fn set_adaptive_preview(Self, Bool) -> Unit = _
  fn set_content(Self, &@gtk.IWidget?) -> Unit = _
}

///|
pub impl IApplicationWindow for ApplicationWindow with fn as_application_window(
  self,
) {
  self
}

///|
#borrow(app)
extern "c" fn moonbit_adw_application_window_new(
  app : @gtk.Application,
) -> ApplicationWindow = "moonbit_adw_application_window_new"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/ctor.ApplicationWindow.new.html).
pub fn ApplicationWindow::new(app : &@gtk.IApplication) -> ApplicationWindow {
  moonbit_adw_application_window_new(app.as_application())
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.ApplicationWindow.get_adaptive_preview.html).
#borrow(self)
pub extern "c" fn ApplicationWindow::get_adaptive_preview(
  self : ApplicationWindow,
) -> Bool = "moonbit_adw_application_window_get_adaptive_preview"

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

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.ApplicationWindow.get_content.html).
pub fn ApplicationWindow::get_content(self : ApplicationWindow) -> @gtk.Widget? {
  let raw_result = moonbit_adw_application_window_get_content(self)
  raw_result.to_option()
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.ApplicationWindow.set_adaptive_preview.html).
#borrow(self)
pub extern "c" fn ApplicationWindow::set_adaptive_preview(
  self : ApplicationWindow,
  adaptive_preview : Bool,
) = "moonbit_adw_application_window_set_adaptive_preview"

///|
#borrow(self_, content)
extern "c" fn moonbit_adw_application_window_set_content(
  self_ : ApplicationWindow,
  content : @glib.Nullable[@gtk.Widget],
) = "moonbit_adw_application_window_set_content"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.ApplicationWindow.set_content.html).
pub fn ApplicationWindow::set_content(
  self : ApplicationWindow,
  content : &@gtk.IWidget?,
) -> Unit {
  moonbit_adw_application_window_set_content(
    self,
    match content {
      Some(v) => @glib.Nullable::some(v.as_widget())
      None => @glib.Nullable::null()
    },
  )
}

///|
impl IApplicationWindow with fn get_adaptive_preview(self) -> Bool {
  self.as_application_window().get_adaptive_preview()
}

///|
impl IApplicationWindow with fn get_content(self) -> @gtk.Widget? {
  self.as_application_window().get_content()
}

///|
impl IApplicationWindow with fn set_adaptive_preview(self, adaptive_preview) -> Unit {
  self.as_application_window().set_adaptive_preview(adaptive_preview)
}

///|
impl IApplicationWindow with fn set_content(self, content) -> Unit {
  self.as_application_window().set_content(content)
}

///|
pub fn ApplicationWindow::as_gtk_application_window(
  self : ApplicationWindow,
) -> @gtk.ApplicationWindow = "%identity"

///|
pub impl @gtk.IApplicationWindow for ApplicationWindow with fn as_application_window(
  self,
) {
  self.as_gtk_application_window()
}

///|
pub fn ApplicationWindow::as_gtk_window(
  self : ApplicationWindow,
) -> @gtk.Window = "%identity"

///|
pub impl @gtk.IWindow for ApplicationWindow with fn as_window(self) {
  self.as_gtk_window()
}

///|
pub fn ApplicationWindow::as_gtk_widget(
  self : ApplicationWindow,
) -> @gtk.Widget = "%identity"

///|
pub impl @gtk.IWidget for ApplicationWindow with fn as_widget(self) {
  self.as_gtk_widget()
}

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

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

///|
pub fn ApplicationWindow::as_gio_action_group(
  self : ApplicationWindow,
) -> @gio.ActionGroup = "%identity"

///|
pub impl @gio.IActionGroup for ApplicationWindow with fn as_action_group(self) {
  self.as_gio_action_group()
}

///|
pub fn ApplicationWindow::as_gtk_native(
  self : ApplicationWindow,
) -> @gtk.Native = "%identity"

///|
pub impl @gtk.INative for ApplicationWindow with fn as_native(self) {
  self.as_gtk_native()
}

///|
pub fn ApplicationWindow::as_gtk_root(self : ApplicationWindow) -> @gtk.Root = "%identity"

///|
pub impl @gtk.IRoot for ApplicationWindow with fn as_root(self) {
  self.as_gtk_root()
}