![]() |
![]() |
![]() |
GtkSourceView 2 Reference Manual | ![]() |
---|---|---|---|---|
#include <gtksourceview/gtksourcelanguage.h> GtkSourceLanguage; const gchar* gtk_source_language_get_id (GtkSourceLanguage *language); const gchar* gtk_source_language_get_name (GtkSourceLanguage *language); const gchar* gtk_source_language_get_section (GtkSourceLanguage *language); gboolean gtk_source_language_get_hidden (GtkSourceLanguage *language); const gchar* gtk_source_language_get_metadata (GtkSourceLanguage *language, const gchar *name); gchar** gtk_source_language_get_mime_types (GtkSourceLanguage *language); gchar** gtk_source_language_get_globs (GtkSourceLanguage *language);
"hidden" gboolean : Read "id" gchararray : Read "name" gchararray : Read "section" gchararray : Read
typedef struct _GtkSourceLanguage GtkSourceLanguage;
GtkSourceLanguage structure contains only private members and should not be accessed directly.
const gchar* gtk_source_language_get_id (GtkSourceLanguage *language);
Returns the ID of the language. The ID is not locale-dependent.
language : |
a GtkSourceLanguage. |
Returns : | the ID of language .
The returned string is owned by language and should not be freed
or modified.
|
const gchar* gtk_source_language_get_name (GtkSourceLanguage *language);
Returns the localized name of the language.
language : |
a GtkSourceLanguage. |
Returns : | the name of language .
The returned string is owned by language and should not be freed
or modified.
|
const gchar* gtk_source_language_get_section (GtkSourceLanguage *language);
Returns the localized section of the language. Each language belong to a section (ex. HTML belogs to the Markup section).
language : |
a GtkSourceLanguage. |
Returns : | the section of language .
The returned string is owned by language and should not be freed
or modified.
|
gboolean gtk_source_language_get_hidden (GtkSourceLanguage *language);
Returns whether the language should be hidden from the user.
language : |
a GtkSourceLanguage |
Returns : | TRUE if the language should be hidden, FALSE otherwise. |
const gchar* gtk_source_language_get_metadata (GtkSourceLanguage *language, const gchar *name);
language : |
a GtkSourceLanguage. |
name : |
metadata property name. |
Returns : | value of property name stored in the metadata of language
or NULL if language doesn't contain that metadata property.
The returned string is owned by language and should not be freed
or modified.
|
gchar** gtk_source_language_get_mime_types (GtkSourceLanguage *language);
language
: a GtkSourceLanguage.
Returns the mime types associated to this language. This is just
an utility wrapper around gtk_source_language_get_metadata()
to
retrieve the "mimetypes" metadata property and split it into an
array.
language : |
|
Returns : | a newly-allocated NULL terminated array containing
the mime types or NULL if no mime types are found.
The returned array must be freed with g_strfreev() .
|
gchar** gtk_source_language_get_globs (GtkSourceLanguage *language);
language
: a GtkSourceLanguage.
Returns the globs associated to this language. This is just
an utility wrapper around gtk_source_language_get_metadata()
to
retrieve the "globs" metadata property and split it into an array.
language : |
|
Returns : | a newly-allocated NULL terminated array containing
the globs or NULL if no globs are found.
The returned array must be freed with g_strfreev() .
|