// GENERATED — DO NOT EDIT

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

///|
pub(open) trait IFontMetrics {
  fn as_font_metrics(Self) -> FontMetrics
  fn get_approximate_char_width(Self) -> Int = _
  fn get_approximate_digit_width(Self) -> Int = _
  fn get_ascent(Self) -> Int = _
  fn get_descent(Self) -> Int = _
  fn get_height(Self) -> Int = _
  fn get_strikethrough_position(Self) -> Int = _
  fn get_strikethrough_thickness(Self) -> Int = _
  fn get_underline_position(Self) -> Int = _
  fn get_underline_thickness(Self) -> Int = _
  fn ref_(Self) -> FontMetrics? = _
}

///|
pub impl IFontMetrics for FontMetrics with fn as_font_metrics(self) {
  self
}

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

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

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

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

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

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

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

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

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

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

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.FontMetrics.ref.html).
pub fn FontMetrics::ref_(self : FontMetrics) -> FontMetrics? {
  let raw_result = moonbit_pango_font_metrics_ref(self)
  raw_result.to_option()
}

///|
impl IFontMetrics with fn get_approximate_char_width(self) -> Int {
  self.as_font_metrics().get_approximate_char_width()
}

///|
impl IFontMetrics with fn get_approximate_digit_width(self) -> Int {
  self.as_font_metrics().get_approximate_digit_width()
}

///|
impl IFontMetrics with fn get_ascent(self) -> Int {
  self.as_font_metrics().get_ascent()
}

///|
impl IFontMetrics with fn get_descent(self) -> Int {
  self.as_font_metrics().get_descent()
}

///|
impl IFontMetrics with fn get_height(self) -> Int {
  self.as_font_metrics().get_height()
}

///|
impl IFontMetrics with fn get_strikethrough_position(self) -> Int {
  self.as_font_metrics().get_strikethrough_position()
}

///|
impl IFontMetrics with fn get_strikethrough_thickness(self) -> Int {
  self.as_font_metrics().get_strikethrough_thickness()
}

///|
impl IFontMetrics with fn get_underline_position(self) -> Int {
  self.as_font_metrics().get_underline_position()
}

///|
impl IFontMetrics with fn get_underline_thickness(self) -> Int {
  self.as_font_metrics().get_underline_thickness()
}

///|
impl IFontMetrics with fn ref_(self) -> FontMetrics? {
  self.as_font_metrics().ref_()
}