GtkSource.Language¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Whether the language should be hidden from the user |
||
r |
Language id |
||
r |
Language name |
||
r |
Language section |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GtkSource.Language(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- get_globs()¶
- Returns:
a newly-allocated
None
terminated array containing the globs orNone
if no globs are found. The returned array must be freed withGLib.strfreev
().- Return type:
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 whether the language should be hidden from the user.
- get_id()¶
- Returns:
the ID of self.
- Return type:
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)¶
- get_mime_types()¶
- Returns:
a newly-allocated
None
terminated array containing the mime types orNone
if no mime types are found. The returned array must be freed withGLib.strfreev
().- Return type:
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:
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:
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
None
if the style has no fallback defined. The returned string is owned by the self and must not be modified.- Return type:
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
None
terminated array containing ids of the styles defined by this self orNone
if no style is defined. The returned array must be freed withGLib.strfreev
().- Return type:
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
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.- Return type:
Returns the name of the style with ID style_id defined by this self.
Property Details¶
-
Whether the language should be hidden from the user
- GtkSource.Language.props.name¶
-
Language name