// GENERATED — DO NOT EDIT

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

///|
pub(open) trait IItem {
  fn as_item(Self) -> Item
  fn apply_attrs(Self, AttrIterator) -> Unit = _
  fn get_char_offset(Self) -> Int = _
  fn split(Self, Int, Int) -> Item = _
}

///|
pub impl IItem for Item with fn as_item(self) {
  self
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/ctor.Item.new.html).
pub extern "c" fn Item::new() -> Item = "moonbit_pango_item_new"

///|
#borrow(self_, iter)
extern "c" fn moonbit_pango_item_apply_attrs(self_ : Item, iter : AttrIterator) = "moonbit_pango_item_apply_attrs"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Item.apply_attrs.html).
pub fn Item::apply_attrs(self : Item, iter : AttrIterator) -> Unit {
  moonbit_pango_item_apply_attrs(self, iter)
}

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

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Item.split.html).
#borrow(self)
pub extern "c" fn Item::split(
  self : Item,
  split_index : Int,
  split_offset : Int,
) -> Item = "moonbit_pango_item_split"

///|
impl IItem with fn apply_attrs(self, iter) -> Unit {
  self.as_item().apply_attrs(iter)
}

///|
impl IItem with fn get_char_offset(self) -> Int {
  self.as_item().get_char_offset()
}

///|
impl IItem with fn split(self, split_index, split_offset) -> Item {
  self.as_item().split(split_index, split_offset)
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::get_offset(self_ : Item) -> Int = "moonbit_pango_item_offset_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::set_offset(self_ : Item, value : Int) = "moonbit_pango_item_offset_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::get_length(self_ : Item) -> Int = "moonbit_pango_item_length_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::set_length(self_ : Item, value : Int) = "moonbit_pango_item_length_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::get_num_chars(self_ : Item) -> Int = "moonbit_pango_item_num_chars_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::set_num_chars(self_ : Item, value : Int) = "moonbit_pango_item_num_chars_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Item.html).
#borrow(self_)
pub extern "c" fn Item::get_analysis(self_ : Item) -> Analysis = "moonbit_pango_item_analysis_get"