gtksourceview2.LanguageManager — Languages Manager object for gtksourceview2.View
class gtksourceview2.LanguageManager(gobject.GObject): |
Functions
def gtksourceview2.language_manager_get_default()
|
gtksourceview2.LanguageManager(
)
Returns: | a new gtksourceview2.LanguageManager . |
Creates a new gtksourceview2.LanguageManager
object.
def get_language(id
)
id: | an ID. |
Returns: | a gtksourceview2.Language ,
or None if there is no language identified by the given id. |
The get_language
() method gets the
gtksourceview2.Language
identified by the given id in the language manager.
def get_language_ids()
Returns: | a list containing the ids of the available languages or
None if no language is available. |
The get_language_ids
() method
returns the ids of the available languages.
def get_search_path()
Returns: | a list of language files directories (as string). |
The get_search_path
() method
gets the list directories where @lm looks for language files.
def guess_language(filename
=None, content_type
=None)
filename: | a filename in Glib filename encoding, or
None . |
content_type: | a content type (as in GIO API), or
None . |
Returns: | a
gtksourceview2.Language
or None if there is no suitable language for given filename
and/or content_type. |
The set_search_path
() method sets the list of directories
where the lm looks for language files.
If dirs is None
, the search path is reset to default.