// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.LayoutIter.html).
pub type LayoutIter

///|
pub(open) trait ILayoutIter {
  fn as_layout_iter(Self) -> LayoutIter
  fn at_last_line(Self) -> Bool = _
  fn get_baseline(Self) -> Int = _
  fn get_char_extents(Self) -> Rectangle = _
  fn get_cluster_extents(Self) -> (Rectangle, Rectangle) = _
  fn get_index(Self) -> Int = _
  fn get_layout(Self) -> Layout? = _
  fn get_layout_extents(Self) -> (Rectangle, Rectangle) = _
  fn get_line(Self) -> LayoutLine? = _
  fn get_line_extents(Self) -> (Rectangle, Rectangle) = _
  fn get_line_readonly(Self) -> LayoutLine? = _
  fn get_line_yrange(Self) -> (Int, Int) = _
  fn get_run(Self) -> LayoutRun? = _
  fn get_run_baseline(Self) -> Int = _
  fn get_run_extents(Self) -> (Rectangle, Rectangle) = _
  fn get_run_readonly(Self) -> LayoutRun? = _
  fn next_char(Self) -> Bool = _
  fn next_cluster(Self) -> Bool = _
  fn next_line(Self) -> Bool = _
  fn next_run(Self) -> Bool = _
}

///|
pub impl ILayoutIter for LayoutIter with fn as_layout_iter(self) {
  self
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.at_last_line.html).
#borrow(self)
pub extern "c" fn LayoutIter::at_last_line(self : LayoutIter) -> Bool = "moonbit_pango_layout_iter_at_last_line"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_baseline.html).
#borrow(self)
pub extern "c" fn LayoutIter::get_baseline(self : LayoutIter) -> Int = "moonbit_pango_layout_iter_get_baseline"

///|
#borrow(self_)
extern "c" fn moonbit_pango_layout_iter_get_char_extents(
  self_ : LayoutIter,
) -> Rectangle = "moonbit_pango_layout_iter_get_char_extents"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_char_extents.html).
pub fn LayoutIter::get_char_extents(self : LayoutIter) -> Rectangle {
  let __result = moonbit_pango_layout_iter_get_char_extents(self)
  __result
}

///|
#borrow(self_, __out_logical_rect)
extern "c" fn moonbit_pango_layout_iter_get_cluster_extents(
  self_ : LayoutIter,
  __out_logical_rect : Ref[Rectangle],
) -> Rectangle = "moonbit_pango_layout_iter_get_cluster_extents"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_cluster_extents.html).
pub fn LayoutIter::get_cluster_extents(
  self : LayoutIter,
) -> (Rectangle, Rectangle) {
  let __out_logical_rect = Ref(Rectangle::_zero())
  let __result = moonbit_pango_layout_iter_get_cluster_extents(
    self, __out_logical_rect,
  )
  (__result, __out_logical_rect.val)
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_index.html).
#borrow(self)
pub extern "c" fn LayoutIter::get_index(self : LayoutIter) -> Int = "moonbit_pango_layout_iter_get_index"

///|
#borrow(self_)
extern "c" fn moonbit_pango_layout_iter_get_layout(
  self_ : LayoutIter,
) -> @glib.Nullable[Layout] = "moonbit_pango_layout_iter_get_layout"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_layout.html).
pub fn LayoutIter::get_layout(self : LayoutIter) -> Layout? {
  let raw_result = moonbit_pango_layout_iter_get_layout(self)
  raw_result.to_option()
}

///|
#borrow(self_, __out_logical_rect)
extern "c" fn moonbit_pango_layout_iter_get_layout_extents(
  self_ : LayoutIter,
  __out_logical_rect : Ref[Rectangle],
) -> Rectangle = "moonbit_pango_layout_iter_get_layout_extents"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_layout_extents.html).
pub fn LayoutIter::get_layout_extents(
  self : LayoutIter,
) -> (Rectangle, Rectangle) {
  let __out_logical_rect = Ref(Rectangle::_zero())
  let __result = moonbit_pango_layout_iter_get_layout_extents(
    self, __out_logical_rect,
  )
  (__result, __out_logical_rect.val)
}

///|
#borrow(self_)
extern "c" fn moonbit_pango_layout_iter_get_line(
  self_ : LayoutIter,
) -> @glib.Nullable[LayoutLine] = "moonbit_pango_layout_iter_get_line"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_line.html).
pub fn LayoutIter::get_line(self : LayoutIter) -> LayoutLine? {
  let raw_result = moonbit_pango_layout_iter_get_line(self)
  raw_result.to_option()
}

///|
#borrow(self_, __out_logical_rect)
extern "c" fn moonbit_pango_layout_iter_get_line_extents(
  self_ : LayoutIter,
  __out_logical_rect : Ref[Rectangle],
) -> Rectangle = "moonbit_pango_layout_iter_get_line_extents"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_line_extents.html).
pub fn LayoutIter::get_line_extents(
  self : LayoutIter,
) -> (Rectangle, Rectangle) {
  let __out_logical_rect = Ref(Rectangle::_zero())
  let __result = moonbit_pango_layout_iter_get_line_extents(
    self, __out_logical_rect,
  )
  (__result, __out_logical_rect.val)
}

///|
#borrow(self_)
extern "c" fn moonbit_pango_layout_iter_get_line_readonly(
  self_ : LayoutIter,
) -> @glib.Nullable[LayoutLine] = "moonbit_pango_layout_iter_get_line_readonly"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_line_readonly.html).
pub fn LayoutIter::get_line_readonly(self : LayoutIter) -> LayoutLine? {
  let raw_result = moonbit_pango_layout_iter_get_line_readonly(self)
  raw_result.to_option()
}

///|
#borrow(self_, y0_, y1_)
extern "c" fn moonbit_pango_layout_iter_get_line_yrange(
  self_ : LayoutIter,
  y0_ : Ref[Int],
  y1_ : Ref[Int],
) = "moonbit_pango_layout_iter_get_line_yrange"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_line_yrange.html).
pub fn LayoutIter::get_line_yrange(self : LayoutIter) -> (Int, Int) {
  let y0_ = Ref(0)
  let y1_ = Ref(0)
  moonbit_pango_layout_iter_get_line_yrange(self, y0_, y1_)
  (y0_.val, y1_.val)
}

///|
#borrow(self_)
extern "c" fn moonbit_pango_layout_iter_get_run(
  self_ : LayoutIter,
) -> @glib.Nullable[GlyphItem] = "moonbit_pango_layout_iter_get_run"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_run.html).
pub fn LayoutIter::get_run(self : LayoutIter) -> LayoutRun? {
  let raw_result = moonbit_pango_layout_iter_get_run(self)
  raw_result.to_option()
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_run_baseline.html).
#borrow(self)
pub extern "c" fn LayoutIter::get_run_baseline(self : LayoutIter) -> Int = "moonbit_pango_layout_iter_get_run_baseline"

///|
#borrow(self_, __out_logical_rect)
extern "c" fn moonbit_pango_layout_iter_get_run_extents(
  self_ : LayoutIter,
  __out_logical_rect : Ref[Rectangle],
) -> Rectangle = "moonbit_pango_layout_iter_get_run_extents"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_run_extents.html).
pub fn LayoutIter::get_run_extents(self : LayoutIter) -> (Rectangle, Rectangle) {
  let __out_logical_rect = Ref(Rectangle::_zero())
  let __result = moonbit_pango_layout_iter_get_run_extents(
    self, __out_logical_rect,
  )
  (__result, __out_logical_rect.val)
}

///|
#borrow(self_)
extern "c" fn moonbit_pango_layout_iter_get_run_readonly(
  self_ : LayoutIter,
) -> @glib.Nullable[GlyphItem] = "moonbit_pango_layout_iter_get_run_readonly"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.get_run_readonly.html).
pub fn LayoutIter::get_run_readonly(self : LayoutIter) -> LayoutRun? {
  let raw_result = moonbit_pango_layout_iter_get_run_readonly(self)
  raw_result.to_option()
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.next_char.html).
#borrow(self)
pub extern "c" fn LayoutIter::next_char(self : LayoutIter) -> Bool = "moonbit_pango_layout_iter_next_char"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.next_cluster.html).
#borrow(self)
pub extern "c" fn LayoutIter::next_cluster(self : LayoutIter) -> Bool = "moonbit_pango_layout_iter_next_cluster"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.next_line.html).
#borrow(self)
pub extern "c" fn LayoutIter::next_line(self : LayoutIter) -> Bool = "moonbit_pango_layout_iter_next_line"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.LayoutIter.next_run.html).
#borrow(self)
pub extern "c" fn LayoutIter::next_run(self : LayoutIter) -> Bool = "moonbit_pango_layout_iter_next_run"

///|
impl ILayoutIter with fn at_last_line(self) -> Bool {
  self.as_layout_iter().at_last_line()
}

///|
impl ILayoutIter with fn get_baseline(self) -> Int {
  self.as_layout_iter().get_baseline()
}

///|
impl ILayoutIter with fn get_char_extents(self) -> Rectangle {
  self.as_layout_iter().get_char_extents()
}

///|
impl ILayoutIter with fn get_cluster_extents(self) -> (Rectangle, Rectangle) {
  self.as_layout_iter().get_cluster_extents()
}

///|
impl ILayoutIter with fn get_index(self) -> Int {
  self.as_layout_iter().get_index()
}

///|
impl ILayoutIter with fn get_layout(self) -> Layout? {
  self.as_layout_iter().get_layout()
}

///|
impl ILayoutIter with fn get_layout_extents(self) -> (Rectangle, Rectangle) {
  self.as_layout_iter().get_layout_extents()
}

///|
impl ILayoutIter with fn get_line(self) -> LayoutLine? {
  self.as_layout_iter().get_line()
}

///|
impl ILayoutIter with fn get_line_extents(self) -> (Rectangle, Rectangle) {
  self.as_layout_iter().get_line_extents()
}

///|
impl ILayoutIter with fn get_line_readonly(self) -> LayoutLine? {
  self.as_layout_iter().get_line_readonly()
}

///|
impl ILayoutIter with fn get_line_yrange(self) -> (Int, Int) {
  self.as_layout_iter().get_line_yrange()
}

///|
impl ILayoutIter with fn get_run(self) -> LayoutRun? {
  self.as_layout_iter().get_run()
}

///|
impl ILayoutIter with fn get_run_baseline(self) -> Int {
  self.as_layout_iter().get_run_baseline()
}

///|
impl ILayoutIter with fn get_run_extents(self) -> (Rectangle, Rectangle) {
  self.as_layout_iter().get_run_extents()
}

///|
impl ILayoutIter with fn get_run_readonly(self) -> LayoutRun? {
  self.as_layout_iter().get_run_readonly()
}

///|
impl ILayoutIter with fn next_char(self) -> Bool {
  self.as_layout_iter().next_char()
}

///|
impl ILayoutIter with fn next_cluster(self) -> Bool {
  self.as_layout_iter().next_cluster()
}

///|
impl ILayoutIter with fn next_line(self) -> Bool {
  self.as_layout_iter().next_line()
}

///|
impl ILayoutIter with fn next_run(self) -> Bool {
  self.as_layout_iter().next_run()
}