gtksource.language_manager

Module for [LanguageManager] class

Types 3

Provides access to class@Languages.

[gtksource.language_manager.LanguageManager] is an object which processes language description files and creates and stores class@Language objects, and provides API to access them.

Use [gtksource.language_manager.LanguageManager.getDefault] to retrieve the default instance of [gtksource.language_manager.LanguageManager], and [gtksource.language_manager.LanguageManager.guessLanguage] to get a class@Language for given file name and content type.

Methods
GType _gType() @property
LanguageManager self()Returns `this`, for use in `with` statements.
LanguageManagerGidBuilder builder()Get builder for [gtksource.language_manager.LanguageManager] Returns: New builder object
gtksource.language_manager.LanguageManager getDefault()Returns the default #GtkSourceLanguageManager instance. Returns: a #GtkSourceLanguageManager. Return value is owned by GtkSourceView library and must not be unref'ed.
void appendSearchPath(string path)Appends path to the list of directories where the manager looks for language files.
gtksource.language.Language getLanguage(string id)Gets the `classLanguage` identified by the given id in the language manager.
string[] getLanguageIds()Returns the ids of the available languages. Returns: a null-terminated array of strings containing the ids of the available languages or null if no language is available. The array is sorted alphab...
string[] getSearchPath()Gets the list directories where lm looks for language files. Returns: null-terminated array containing a list of language files directories. The array is owned by lm and must not be modified.
gtksource.language.Language guessLanguage(string filename = null, string contentType = null)Picks a `classLanguage` for given file name and content type, according to the information in lang files.
void prependSearchPath(string path)Prepends path to the list of directories where the manager looks for language files.
void setSearchPath(string[] dirs = null)Sets the list of directories where the lm looks for language files.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new language manager.

Fluent builder for [gtksource.language_manager.LanguageManager]