GtkSourceLanguage

GtkSourceLanguage

Functions

Signals

void tag-style-changed Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GtkSourceLanguage

Includes

#include <gtksourceview/gtksourcelanguage.h>

Description

Functions

gtk_source_language_get_name ()

gchar *
gtk_source_language_get_name (GtkSourceLanguage *language);

Returns the localized name of the language.

Parameters

language

a GtkSourceLanguage.

 

Returns

the name of language .


gtk_source_language_get_section ()

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).

Parameters

language

a GtkSourceLanguage.

 

Returns

the section of language .


gtk_source_language_get_tags ()

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.

Parameters

language

a GtkSourceLanguage.

 

Returns

a list of GtkSourceTag objects.


gtk_source_language_get_escape_char ()

gunichar
gtk_source_language_get_escape_char (GtkSourceLanguage *language);

Gets the value of the ESC character in the given language .

Parameters

language

a GtkSourceLanguage.

 

Returns

the value of the ESC character.


gtk_source_language_get_mime_types ()

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.

Parameters

language

a GtkSourceLanguage.

 

Returns

a list of mime types (strings).


gtk_source_language_set_mime_types ()

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.

Parameters

language

a GtkSourceLanguage

 

mime_types

a list of mime types (strings).

 

gtk_source_language_get_style_scheme ()

GtkSourceStyleScheme *
gtk_source_language_get_style_scheme (GtkSourceLanguage *language);

Gets the style scheme associated with the given language .

Parameters

language

a GtkSourceLanguage.

 

gtk_source_language_set_style_scheme ()

void
gtk_source_language_set_style_scheme (GtkSourceLanguage *language,
                                      GtkSourceStyleScheme *scheme);

Sets the style scheme of the given language .

Parameters

language

a GtkSourceLanguage.

 

scheme

a GtkSourceStyleScheme.

 

gtk_source_language_get_tag_style ()

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.

Parameters

language

a GtkSourceLanguage.

 

tag_id

the ID of a GtkSourceTag.

 

Returns

a GtkSourceTagStyle.


gtk_source_language_set_tag_style ()

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.

Parameters

language

a GtkSourceLanguage.

 

tag_id

the ID of a GtkSourceTag.

 

style

a GtkSourceTagStyle.

 

gtk_source_language_get_tag_default_style ()

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 .

Parameters

language

a GtkSourceLanguage.

 

tag_id

the ID of a GtkSourceTag.

 

Returns

a GtkSourceTagStyle.

Types and Values

struct GtkSourceLanguage

struct GtkSourceLanguage;

Signal Details

The “tag-style-changed” signal

void
user_function (GtkSourceLanguage *sourcelanguage,
               gchar             *arg1,
               gpointer           user_data)

Parameters

sourcelanguage

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last