1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
// Copyright 2013-2016, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT> use glib::translate::*; use gtk_sys; use TextAttributes; use TextIter; impl TextIter { /// Computes the effect of any tags applied to this spot in the /// text. The `values` parameter should be initialized to the default /// settings you wish to use if no tags are in effect. You’d typically /// obtain the defaults from `TextViewExt::get_default_attributes`. /// /// `TextIter::get_attributes` will modify `values`, applying the /// effects of any tags present at `self`. If any tags affected `values`, /// the function returns `true`. /// ## `values` /// a `TextAttributes` to be filled in /// /// # Returns /// /// `true` if `values` was modified pub fn get_attributes(&self, values: &TextAttributes) -> bool { unsafe { from_glib(gtk_sys::gtk_text_iter_get_attributes( self.to_glib_none().0, mut_override(values.to_glib_none().0), )) } } }