Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #135 from sdroege/gnome-3.14
Browse files Browse the repository at this point in the history
Update to GNOME 3.14 versions
  • Loading branch information
GuillaumeGomez committed Feb 6, 2019
2 parents 64275c9 + 49ad146 commit fd037fe
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 33 deletions.
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ appveyor = { repository = "GuillaumeGomez/pango", service = "github" }
travis-ci = { repository = "gtk-rs/pango" }

[features]
v1_31 = ["pango-sys/v1_31"]
v1_32 = ["v1_31", "pango-sys/v1_32"]
v1_32_4 = ["v1_32", "pango-sys/v1_32_4"]
v1_34 = ["v1_32_4", "pango-sys/v1_34"]
v1_36_7 = ["v1_34", "pango-sys/v1_36_7"]
v1_36_7 = ["pango-sys/v1_36_7"]
v1_38 = ["v1_36_7", "pango-sys/v1_38"]
v1_40 = ["v1_38"]
v1_42 = ["v1_40", "pango-sys/v1_42"]
Expand Down
3 changes: 2 additions & 1 deletion Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ version = "1.0"
target_path = "."
work_mode = "normal"
generate_safety_asserts = false
min_cfg_version = "1.30"
min_cfg_version = "1.36"
single_version_file = true
deprecate_by_min_version = true

generate = [
# "Pango.AttrColor",
Expand Down
2 changes: 1 addition & 1 deletion gir
Submodule gir updated 2 files
+150 −138 Cargo.lock
+3 −3 Cargo.toml
4 changes: 0 additions & 4 deletions src/auto/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ impl Default for Context {
pub const NONE_CONTEXT: Option<&Context> = None;

pub trait ContextExt: 'static {
#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn changed(&self);

fn get_base_dir(&self) -> Direction;
Expand All @@ -66,7 +65,6 @@ pub trait ContextExt: 'static {

fn get_metrics<'a, 'b, P: Into<Option<&'a FontDescription>>, Q: Into<Option<&'b Language>>>(&self, desc: P, language: Q) -> Option<FontMetrics>;

#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn get_serial(&self) -> u32;

fn list_families(&self) -> Vec<FontFamily>;
Expand All @@ -91,7 +89,6 @@ pub trait ContextExt: 'static {
}

impl<O: IsA<Context>> ContextExt for O {
#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn changed(&self) {
unsafe {
ffi::pango_context_changed(self.as_ref().to_glib_none().0);
Expand Down Expand Up @@ -154,7 +151,6 @@ impl<O: IsA<Context>> ContextExt for O {
}
}

#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn get_serial(&self) -> u32 {
unsafe {
ffi::pango_context_get_serial(self.as_ref().to_glib_none().0)
Expand Down
4 changes: 0 additions & 4 deletions src/auto/font_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ glib_wrapper! {
pub const NONE_FONT_MAP: Option<&FontMap> = None;

pub trait FontMapExt: 'static {
#[cfg(any(feature = "v1_34", feature = "dox"))]
fn changed(&self);

fn create_context(&self) -> Option<Context>;

#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn get_serial(&self) -> u32;

#[cfg_attr(feature = "v1_38", deprecated)]
Expand All @@ -46,7 +44,6 @@ pub trait FontMapExt: 'static {
}

impl<O: IsA<FontMap>> FontMapExt for O {
#[cfg(any(feature = "v1_34", feature = "dox"))]
fn changed(&self) {
unsafe {
ffi::pango_font_map_changed(self.as_ref().to_glib_none().0);
Expand All @@ -59,7 +56,6 @@ impl<O: IsA<FontMap>> FontMapExt for O {
}
}

#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn get_serial(&self) -> u32 {
unsafe {
ffi::pango_font_map_get_serial(self.as_ref().to_glib_none().0)
Expand Down
12 changes: 0 additions & 12 deletions src/auto/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,10 @@ pub fn itemize_with_base_dir<'a, P: IsA<Context>, Q: Into<Option<&'a AttrIterato
}
}

#[cfg_attr(feature = "v1_32", deprecated)]
pub fn lookup_aliases(fontname: &str) -> Vec<GString> {
unsafe {
let mut families = ptr::null_mut();
let mut n_families = mem::uninitialized();
ffi::pango_lookup_aliases(fontname.to_glib_none().0, &mut families, &mut n_families);
FromGlibContainer::from_glib_full_num(families, n_families as usize)
}
}

//#[cfg(any(feature = "v1_31", feature = "dox"))]
//pub fn markup_parser_finish(context: /*Ignored*/&glib::MarkupParseContext) -> Result<(AttrList, GString, char), Error> {
// unsafe { TODO: call ffi::pango_markup_parser_finish() }
//}

//#[cfg(any(feature = "v1_31", feature = "dox"))]
//pub fn markup_parser_new(accel_marker: char) -> /*Ignored*/Option<glib::MarkupParseContext> {
// unsafe { TODO: call ffi::pango_markup_parser_new() }
//}
Expand Down
2 changes: 0 additions & 2 deletions src/auto/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ pub trait LayoutExt: 'static {

fn get_pixel_size(&self) -> (i32, i32);

#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn get_serial(&self) -> u32;

fn get_single_paragraph_mode(&self) -> bool;
Expand Down Expand Up @@ -311,7 +310,6 @@ impl<O: IsA<Layout>> LayoutExt for O {
}
}

#[cfg(any(feature = "v1_32_4", feature = "dox"))]
fn get_serial(&self) -> u32 {
unsafe {
ffi::pango_layout_get_serial(self.as_ref().to_glib_none().0)
Expand Down
2 changes: 1 addition & 1 deletion src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ f5d3eab)
Generated by gir (https://github.com/gtk-rs/gir @ 4a198d9)
from gir-files (https://github.com/gtk-rs/gir-files @ 02dfee2)
3 changes: 0 additions & 3 deletions src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ use std::ptr;

use glib::translate::*;

#[cfg(any(feature = "v1_32", feature = "dox"))]
use Analysis;
#[cfg(any(feature = "v1_32", feature = "dox"))]
use GlyphString;

pub fn reorder_items(logical_items: &[&Item]) -> Vec<Item> {
Expand All @@ -27,7 +25,6 @@ pub fn reorder_items(logical_items: &[&Item]) -> Vec<Item> {
}
}

#[cfg(any(feature = "v1_32", feature = "dox"))]
pub fn shape_full<'a, P: Into<Option<&'a str>>>(item_text: &str, paragraph_text: P, analysis: &Analysis, glyphs: &mut GlyphString) {
let paragraph_text = paragraph_text.into();
let paragraph_length = match paragraph_text {
Expand Down

0 comments on commit fd037fe

Please sign in to comment.