GtkSource.Language¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| get_globs() | |
| get_hidden() | |
| get_id() | |
| get_metadata(name) | |
| get_mime_types() | |
| get_name() | |
| get_section() | |
| get_style_fallback(style_id) | |
| get_style_ids() | |
| get_style_name(style_id) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| hidden | bool | r | Whether the language should be hidden from the user | 
| id | str | r | Language id | 
| name | str | r | Language name | 
| section | str | r | Language section | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class GtkSource.Language(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - GtkSource.LanguageClass- 
get_globs()¶
- Returns: - a newly-allocated - Noneterminated array containing the globs or- Noneif no globs are found. The returned array must be freed with- GLib.strfreev().- Return type: - [ - str] or- None- Returns the globs associated to this language. This is just an utility wrapper around - GtkSource.Language.get_metadata() to retrieve the “globs” metadata property and split it into an array.
 - Returns: - Trueif the language should be hidden,- Falseotherwise.- Return type: - bool- Returns whether the language should be hidden from the user. 
 - 
get_id()¶
- Returns: - the ID of self. - Return type: - str- 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. 
 - 
get_metadata(name)¶
- Parameters: - name ( - str) – metadata property name.- Returns: - value of property name stored in the metadata of self or - Noneif language does not contain the specified metadata property. The returned string is owned by self and should not be freed or modified.- Return type: - stror- None
 - 
get_mime_types()¶
- Returns: - a newly-allocated - Noneterminated array containing the mime types or- Noneif no mime types are found. The returned array must be freed with- GLib.strfreev().- Return type: - [ - str] or- None- Returns the mime types associated to this language. This is just an utility wrapper around - GtkSource.Language.get_metadata() to retrieve the “mimetypes” metadata property and split it into an array.
 - 
get_name()¶
- Returns: - the name of self. - Return type: - str- Returns the localized name of the language. The returned string is owned by self and should not be freed or modified. 
 - 
get_section()¶
- Returns: - the section of self. - Return type: - str- Returns the localized section of the language. Each language belong to a section (ex. HTML belogs to the Markup section). The returned string is owned by self and should not be freed or modified. 
 - 
get_style_fallback(style_id)¶
- Parameters: - style_id ( - str) – 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 - Noneif the style has no fallback defined. The returned string is owned by the self and must not be modified.- Return type: - stror- None- Returns the ID of the style to use if the specified style_id is not present in the current style scheme. - New in version 3.4. 
 - 
get_style_ids()¶
- Returns: - a newly-allocated - Noneterminated array containing ids of the styles defined by this self or- Noneif no style is defined. The returned array must be freed with- GLib.strfreev().- Return type: - [ - str] or- None- Returns the ids of the styles defined by this self. 
 - 
get_style_name(style_id)¶
- Parameters: - style_id ( - str) – a style ID.- Returns: - the name of the style with ID style_id defined by this self or - Noneif 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.- Return type: - stror- None- Returns the name of the style with ID style_id defined by this self. 
 
-