Skip to content

Commit 74c7415

Browse files
authored
Merge pull request #1639 from sdroege/pango-font-get-langs
pango: Add bindings for `Font::languages()`
2 parents 35e15b7 + c50af66 commit 74c7415

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

pango/Gir.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,6 @@ status = "generate"
253253
[[object.function.parameter]]
254254
name = "language"
255255
const = true
256-
[[object.function]]
257-
name = "get_languages"
258-
# TODO: requires FromGlibPtrArrayContainerAsVec implementation
259-
ignore = true
260256

261257
[[object]]
262258
name = "Pango.FontDescription"

pango/src/auto/font.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ pub trait FontExt: IsA<Font> + 'static {
118118
// unsafe { TODO: call ffi:pango_font_get_hb_font() }
119119
//}
120120

121+
#[cfg(feature = "v1_50")]
122+
#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))]
123+
#[doc(alias = "pango_font_get_languages")]
124+
#[doc(alias = "get_languages")]
125+
fn languages(&self) -> Vec<Language> {
126+
unsafe {
127+
FromGlibPtrContainer::from_glib_none(ffi::pango_font_get_languages(
128+
self.as_ref().to_glib_none().0,
129+
))
130+
}
131+
}
132+
121133
#[doc(alias = "pango_font_get_metrics")]
122134
#[doc(alias = "get_metrics")]
123135
fn metrics(&self, language: Option<&Language>) -> FontMetrics {

0 commit comments

Comments
 (0)