| GtkSourceView Reference Manual | ||||
|---|---|---|---|---|
#include <gtksourceview/gtksourcelanguage.h>
GtkSourceLanguage;
gchar* gtk_source_language_get_name (GtkSourceLanguage *language);
gchar* gtk_source_language_get_section (GtkSourceLanguage *language);
GSList* gtk_source_language_get_tags (GtkSourceLanguage *language);
gunichar gtk_source_language_get_escape_char (GtkSourceLanguage *language);
GSList* gtk_source_language_get_mime_types (GtkSourceLanguage *language);
void gtk_source_language_set_mime_types (GtkSourceLanguage *language,
const GSList *mime_types);
GtkSourceStyleScheme* gtk_source_language_get_style_scheme
(GtkSourceLanguage *language);
void gtk_source_language_set_style_scheme
(GtkSourceLanguage *language,
GtkSourceStyleScheme *scheme);
GtkSourceTagStyle* gtk_source_language_get_tag_style (GtkSourceLanguage *language,
const gchar *tag_id);
void gtk_source_language_set_tag_style (GtkSourceLanguage *language,
const gchar *tag_id,
const GtkSourceTagStyle *style);
GtkSourceTagStyle* gtk_source_language_get_tag_default_style
(GtkSourceLanguage *language,
const gchar *tag_id);
gchar* gtk_source_language_get_name (GtkSourceLanguage *language);
Returns the localized name of the language.
language : |
a GtkSourceLanguage. |
| Returns : | the name of language.
|
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.
|
GSList* gtk_source_language_get_tags (GtkSourceLanguage *language);
Returns a list of tags for the given language. You should unref the tags
and free the list after usage.
language : |
a GtkSourceLanguage. |
| Returns : | a list of GtkSourceTag objects. |
gunichar gtk_source_language_get_escape_char (GtkSourceLanguage *language);
Gets the value of the ESC character in the given language.
language : |
a GtkSourceLanguage. |
| Returns : | the value of the ESC character. |
GSList* gtk_source_language_get_mime_types (GtkSourceLanguage *language);
Returns a list of mime types for the given language. After usage you should
free each element of the list as well as the list itself.
language : |
a GtkSourceLanguage. |
| Returns : | a list of mime types (strings). |
void gtk_source_language_set_mime_types (GtkSourceLanguage *language, const GSList *mime_types);
Sets a list of mime_types for the given language.
If mime_types is NULL this function will use the default mime
types from the language file.
language : |
a GtkSourceLanguage |
mime_types : |
a list of mime types (strings). |
GtkSourceStyleScheme* gtk_source_language_get_style_scheme (GtkSourceLanguage *language);
Gets the style scheme associated with the given language.
language : |
a GtkSourceLanguage. |
| Returns : | a GtkSourceStyleScheme. |
void gtk_source_language_set_style_scheme
(GtkSourceLanguage *language,
GtkSourceStyleScheme *scheme);
Sets the style scheme of the given language.
language : |
a GtkSourceLanguage. |
scheme : |
a GtkSourceStyleScheme. |
GtkSourceTagStyle* gtk_source_language_get_tag_style (GtkSourceLanguage *language, const gchar *tag_id);
Gets the style of the tag whose ID is tag_id. If the style is
not defined then returns the default style.
language : |
a GtkSourceLanguage. |
tag_id : |
the ID of a GtkSourceTag. |
| Returns : | a GtkSourceTagStyle. |
void gtk_source_language_set_tag_style (GtkSourceLanguage *language, const gchar *tag_id, const GtkSourceTagStyle *style);
Sets the style of the tag whose ID is tag_id. If style is NULL
restore the default style.
language : |
a GtkSourceLanguage. |
tag_id : |
the ID of a GtkSourceTag. |
style : |
a GtkSourceTagStyle. |
GtkSourceTagStyle* gtk_source_language_get_tag_default_style (GtkSourceLanguage *language, const gchar *tag_id);
Gets the default style of the tag whose ID is tag_id.
language : |
a GtkSourceLanguage. |
tag_id : |
the ID of a GtkSourceTag. |
| Returns : | a GtkSourceTagStyle. |
void user_function (GtkSourceLanguage *sourcelanguage, gchar *arg1, gpointer user_data) : Run Last
sourcelanguage : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |