Update gtk-rs version

This commit is contained in:
daa
2018-03-19 00:15:58 +03:00
parent e286c1d95a
commit fdaff9748a
3 changed files with 265 additions and 299 deletions

View File

@@ -10,7 +10,6 @@ use std::ptr;
use pango;
use pango_sys;
use glib_ffi;
use glib::translate::*;
@@ -23,8 +22,7 @@ pub fn pango_itemize(
cached_iter: Option<&mut AttrIterator>,
) -> Vec<Item> {
unsafe {
//FromGlibPtrContainer::from_glib_full(pango_sys::pango_itemize(
from_glib_full_as_vec(pango_sys::pango_itemize(
FromGlibPtrContainer::from_glib_full(pango_sys::pango_itemize(
context.to_glib_none().0,
text.as_ptr() as *const i8,
start_index as i32,
@@ -37,12 +35,6 @@ pub fn pango_itemize(
}
}
unsafe fn from_glib_full_as_vec(ptr: *mut glib_ffi::GList) -> Vec<Item> {
let num = glib_ffi::g_list_length(ptr) as usize;
FromGlibContainer::from_glib_full_num(ptr, num)
}
pub fn pango_shape(
text: &str,
offset: usize,