gtksourceview2.LanguageManager — Languages Manager object for gtksourceview2.View
gtksourceview2.LanguageManager extends, gobject.GObject {gtksourceview2.LanguageManager();
get_language(id);
get_language_ids();
get_search_path();
guess_language(filename= None,
content_type= None);set_search_path();
}
Functions
gtksourceview2.language_manager_get_default();
"language-ids" Read List of the ids of the available languages. "search-path" Read-Write List of directories where the language specification files (.lang) are located.
gtksourceview2.LanguageManager();
Returns : | a new gtksourceview2.LanguageManager . |
Creates a new gtksourceview2.LanguageManager
object.
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.
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.
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.
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.
gtksourceview2.language_manager_get_default();
Returns : | a gtksourceview2.LanguageManager . |
The language_manager_get_default
() function Returns the default
gtksourceview2.LanguageManager
instance.