1 // This file was generated by gir (https://github.com/gtk-rs/gir)
2 // from gir-files (https://github.com/gtk-rs/gir-files)
3 // DO NOT EDIT
4 
5 use glib::translate::*;
6 use pango_sys;
7 use GlyphItem;
8 
9 glib_wrapper! {
10     #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
11     pub struct GlyphItemIter(Boxed<pango_sys::PangoGlyphItemIter>);
12 
13     match fn {
14         copy => |ptr| pango_sys::pango_glyph_item_iter_copy(mut_override(ptr)),
15         free => |ptr| pango_sys::pango_glyph_item_iter_free(ptr),
16         get_type => || pango_sys::pango_glyph_item_iter_get_type(),
17     }
18 }
19 
20 impl GlyphItemIter {
init_end(&mut self, glyph_item: &mut GlyphItem, text: &str) -> bool21     pub fn init_end(&mut self, glyph_item: &mut GlyphItem, text: &str) -> bool {
22         unsafe {
23             from_glib(pango_sys::pango_glyph_item_iter_init_end(
24                 self.to_glib_none_mut().0,
25                 glyph_item.to_glib_none_mut().0,
26                 text.to_glib_none().0,
27             ))
28         }
29     }
30 
init_start(&mut self, glyph_item: &mut GlyphItem, text: &str) -> bool31     pub fn init_start(&mut self, glyph_item: &mut GlyphItem, text: &str) -> bool {
32         unsafe {
33             from_glib(pango_sys::pango_glyph_item_iter_init_start(
34                 self.to_glib_none_mut().0,
35                 glyph_item.to_glib_none_mut().0,
36                 text.to_glib_none().0,
37             ))
38         }
39     }
40 
next_cluster(&mut self) -> bool41     pub fn next_cluster(&mut self) -> bool {
42         unsafe {
43             from_glib(pango_sys::pango_glyph_item_iter_next_cluster(
44                 self.to_glib_none_mut().0,
45             ))
46         }
47     }
48 
prev_cluster(&mut self) -> bool49     pub fn prev_cluster(&mut self) -> bool {
50         unsafe {
51             from_glib(pango_sys::pango_glyph_item_iter_prev_cluster(
52                 self.to_glib_none_mut().0,
53             ))
54         }
55     }
56 }
57