| 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);
const char * gtk_source_language_get_style_name (GtkSourceLanguage *language,
const char *style_id);
gchar ** gtk_source_language_get_style_ids (GtkSourceLanguage *language);
GtkSourceLanguage encapsulates syntax and highlighting styles for a
particular language. Use GtkSourceLanguageManager to obtain a
GtkSourceLanguage instance, and gtk_source_buffer_set_language()
to apply it to a GtkSourceBuffer.
typedef struct _GtkSourceLanguage GtkSourceLanguage;
GtkSourceLanguage structure contains only private members and should not be accessed directly.
constgchar * gtk_source_language_get_id (GtkSourceLanguage *language);
Returns the ID of the language. The ID is not locale-dependent.
|
a GtkSourceLanguage. |
Returns : |
the ID of language.
The returned string is owned by language and should not be freed
or modified.
|
constgchar * gtk_source_language_get_name (GtkSourceLanguage *language);
Returns the localized name of the language.
|
a GtkSourceLanguage. |
Returns : |
the name of language.
The returned string is owned by language and should not be freed
or modified.
|
constgchar * 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).
|
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.
|
a GtkSourceLanguage |
Returns : |
TRUE if the language should be hidden, FALSE otherwise. |
constgchar * gtk_source_language_get_metadata (GtkSourceLanguage *language, constgchar *name);
|
a GtkSourceLanguage. |
|
metadata property name. |
Returns : |
value of property name stored in the metadata of language
or NULLlanguage and should not be freed
or modified.
|
gchar ** gtk_source_language_get_mime_types (GtkSourceLanguage *language);
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.
|
a GtkSourceLanguage. |
Returns : |
a newly-allocated NULLNULLg_strfreev() |
gchar ** gtk_source_language_get_globs (GtkSourceLanguage *language);
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.
|
a GtkSourceLanguage. |
Returns : |
a newly-allocated NULLNULLg_strfreev() |
constchar * gtk_source_language_get_style_name (GtkSourceLanguage *language, constchar *style_id);
Returns the name of the style with ID style_id defined by this language.
|
a GtkSourceLanguage |
|
a style ID |
Returns : |
the name of the style with ID style_id defined by this language or
NULLstyle_id defined
by this language. The returned string is owned by the language and must
not be modified.
|
gchar ** gtk_source_language_get_style_ids (GtkSourceLanguage *language);
Returns the ids of the styles defined by this language.
|
a GtkSourceLanguage |
Returns : |
a NULLlanguage or NULLg_strfreev() |