SourceLanguageManager.guessLanguage

Picks a GtkSourceLanguage for given file name and content type, according to the information in lang files. Either filename or Since 2.4

class SourceLanguageManager
guessLanguage
(
string filename
,)

Parameters

filename string

a filename in Glib filename encoding, or NULL. [allow-none]

contentType string

a content type (as in GIO API), or NULL. [allow-none]

Return Value

a GtkSourceLanguage, or NULL if there is no suitable language for given filename and/or content_type. Return value is owned by lm and should not be freed. [transfer none]

Meta