Struct sourceview5::Language[][src]

pub struct Language(_);

Implementations

impl Language[src]

pub fn get_globs(&self) -> Vec<GString>[src]

Returns the globs associated to this language. This is just an utility wrapper around Language::get_metadata to retrieve the “globs” metadata property and split it into an array.

Returns

a newly-allocated None terminated array containing the globs or None if no globs are found. The returned array must be freed with g_strfreev.

pub fn get_hidden(&self) -> bool[src]

Returns whether the language should be hidden from the user.

Returns

true if the language should be hidden, false otherwise.

pub fn get_id(&self) -> Option<GString>[src]

Returns the ID of the language. The ID is not locale-dependent. The returned string is owned by self and should not be freed or modified.

Returns

the ID of self.

pub fn get_metadata(&self, name: &str) -> Option<GString>[src]

name

metadata property name.

Returns

value of property name stored in the metadata of self or None if language does not contain the specified metadata property. The returned string is owned by self and should not be freed or modified.

pub fn get_mime_types(&self) -> Vec<GString>[src]

Returns the mime types associated to this language. This is just an utility wrapper around Language::get_metadata to retrieve the “mimetypes” metadata property and split it into an array.

Returns

a newly-allocated None terminated array containing the mime types or None if no mime types are found. The returned array must be freed with g_strfreev.

pub fn get_name(&self) -> Option<GString>[src]

Returns the localized name of the language. The returned string is owned by self and should not be freed or modified.

Returns

the name of self.

pub fn get_section(&self) -> Option<GString>[src]

Returns the localized section of the language. Each language belong to a section (ex. HTML belongs to the Markup section). The returned string is owned by self and should not be freed or modified.

Returns

the section of self.

pub fn get_style_fallback(&self, style_id: &str) -> Option<GString>[src]

Returns the ID of the style to use if the specified style_id is not present in the current style scheme.

style_id

a style ID.

Returns

the ID of the style to use if the specified style_id is not present in the current style scheme or None if the style has no fallback defined. The returned string is owned by the self and must not be modified.

pub fn get_style_ids(&self) -> Vec<GString>[src]

Returns the ids of the styles defined by this self.

Returns

a newly-allocated None terminated array containing ids of the styles defined by this self or None if no style is defined. The returned array must be freed with g_strfreev.

pub fn get_style_name(&self, style_id: &str) -> Option<GString>[src]

Returns the name of the style with ID style_id defined by this self.

style_id

a style ID.

Returns

the name of the style with ID style_id defined by this self or None if the style has no name or there is no style with ID style_id defined by this self. The returned string is owned by the self and must not be modified.

pub fn connect_property_hidden_notify<F: Fn(&Language) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_id_notify<F: Fn(&Language) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_name_notify<F: Fn(&Language) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_section_notify<F: Fn(&Language) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for Language[src]

impl Debug for Language[src]

impl Display for Language[src]

impl Eq for Language[src]

impl Hash for Language[src]

impl Ord for Language[src]

impl ParentClassIs for Language[src]

type Parent = Object

impl<T: ObjectType> PartialEq<T> for Language[src]

impl<T: ObjectType> PartialOrd<T> for Language[src]

impl StaticType for Language[src]

impl StructuralEq for Language[src]

Auto Trait Implementations

impl RefUnwindSafe for Language

impl !Send for Language

impl !Sync for Language

impl Unpin for Language

impl UnwindSafe for Language

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.