gtksourceview.SourceLanguage — Source language object for gtksourceview.SourceView
class gtksourceview.SourceLanguage(gobject.GObject): |
gtksourceview.SourceLanguage(
)
Returns : | a new gtksourceview.SourceLanguage . |
Creates a new gtksourceview.SourceLanguage
object.
def get_name()
Returns : | the name of language . |
The get_name
() method returns the localized name of the language.
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)
def get_tags()
Returns : | a list of gtksourceview.SourceTagStyle
objects. |
The get_tags
() method Returns a list of tags for the given language
.
You should unref the tags and free the list after usage.
def get_escape_char()
Returns : | the value of the ESC character. |
The get_escape_char
() method gets the value of the ESC character in the given language
.
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
.
After usage you should free each element of the list as well as the list itself.
def set_mime_types(mime_types
)
| a list of mime types (strings). |
The set_mime_types
() method sets a list of mime_types
for the given
language
. If mime_types
is None
this function
will use the default mime types from the language file.
def get_style_scheme()
Returns : | a gtksourceview.SourceStyleScheme . |
The get_style_scheme
() method gets the style scheme associated with the given language
.
def set_style_scheme(style_scheme
)
| a gtksourceview.SourceStyleScheme . |
The set_style_scheme
() method Sets the style scheme of the given language
.
def get_tag_style(tag_id
)
| the ID of a gtksourceview.SourceTag . |
Returns : | a gtksourceview.SourceTagStyle . |
The get_tag_style
() method gets the style of the tag whose ID is tag_id
.
If the style is not defined then returns the default style.
def set_tag_style(tag_id
, style
)
| the ID of a gtksourceview.SourceTag . |
| a gtksourceview.SourceTagStyle . |
The set_tag_style
() method sets the style
of the tag whose
ID is tag_id
. If style is None
restore the default style
.
def get_tag_default_style(tag_id
)
| the ID of a gtksourceview.SourceTag . |
Returns : | a gtksourceview.SourceTagStyle . |
The get_tag_default_style
() method gets the default style of the tag whose ID is tag_id
.
def callback(sourcelanguage
, arg1
, user_param1
, ...
)
| the sourcelanguage that received the signal |
| |
| the first user parameter (if any) specified with the
connect () method |
| additional user parameters (if any) |
The "tag-style-changed" signal is emitted when ....