gtksourceview2.Language
Prev |  | Next

## gtksourceview2.Language

gtksourceview2.Language — Source language object for gtksourceview2.View

## Synopsis

    class gtksourceview2.Language(gobject.GObject):
        def get_globs()
        def get_hidden()
        def get_id()
        def get_metadata(name)
        def get_mime_types()
        def get_name()
        def get_section()
        def get_style_ids()
        def get_style_name(style_id)

## Ancestry

    +-- gobject.GObject
        +-- gtksourceview2.Language

## Description

A source code language description.

## Methods

### gtksourceview2.Language.get_globs

        def get_globs()

Returns : | a list containing the globs or `None` if no globs are found.

The `get_globs`() method returns the globs associated to this language. This is just an utility wrapper around `gtksourceview2.Language.get_metadata`() to retrieve the "globs" metadata property and split it into an array.

### gtksourceview2.Language.get_hidden

        def get_hidden()

Returns : | `True` if the language should be hidden, `False` otherwise.

The `get_hidden`() method returns whether the language should be hidden from the user.

### gtksourceview2.Language.get_id

        def get_id()

Returns : | the ID of language.

The `get_id`() method returns the ID of the language. The ID is not locale-dependent.

### gtksourceview2.Language.get_metadata

        def get_metadata(name)

`name` : | metadata property name.
Returns : | value of property name stored in the metadata of language or `None` if language doesn't contain that metadata property.

The `get_metadata`() method returns the value of property name stored in the metadata of language.

### gtksourceview2.Language.get_mime_types

        def get_mime_types()

Returns : | a list of mime types (strings).

The `get_mime_types`() method returns a list of mime types for the given `language`. This is just an utility wrapper around `get_metadata` to retrieve the "mimetypes" metadata property and split it into a list.

### gtksourceview2.Language.get_name

        def get_name()

Returns : | the name of `language`.

The `get_name`() method returns the localized name of the language.

### gtksourceview2.Language.get_section

        def get_section()

Returns : | the section of `language`.

The `get_section`() method returns the localized section of the language. Each language belong to a section (ex. HTML belogs to the Markup section)

### gtksourceview2.Language.get_style_ids

        def get_style_ids()

Returns : | a list containing ids of the styles defined by this language or `None` if no style is defined.

The `get_style_ids`() method returns the ids of the styles defined by this language.

### gtksourceview2.Language.get_style_name

        def get_style_name(style_id)

`style_id` : | a style ID.
Returns : | the name of the style with ID style_id defined by this language or `None` if the style has no name or there is no style with ID defined by this language

The `get_style_name`() method returns the name of the style with ID `style_id` defined by this language.

Prev |  | Next
gtksourceview2.Buffer | Home | gtksourceview2.LanguageManager