GtkSourceTag

GtkSourceTag

Functions

GtkSourceTagStyle * gtk_source_tag_get_style ()
void gtk_source_tag_set_style ()
GtkTextTag * gtk_syntax_tag_new ()
GtkTextTag * gtk_pattern_tag_new ()
GtkTextTag * gtk_keyword_list_tag_new ()
GtkTextTag * gtk_line_comment_tag_new ()
GtkTextTag * gtk_string_tag_new ()

Properties

gchar * id Read / Write / Construct Only
GtkSourceTagStyle * tag-style Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GtkTextTag
        ╰── GtkSourceTag
            ├── GtkSyntaxTag
            ╰── GtkPatternTag

Includes

#include <gtksourceview/gtksourcetag.h>

Description

Functions

gtk_source_tag_get_style ()

GtkSourceTagStyle *
gtk_source_tag_get_style (GtkSourceTag *tag);

Gets the style associated with the given tag .

Parameters

tag

a GtkSourceTag.

 

Returns

a GtkSourceTagStyle if found, or NULL if not found.


gtk_source_tag_set_style ()

void
gtk_source_tag_set_style (GtkSourceTag *tag,
                          const GtkSourceTagStyle *style);

Associates a given style with the given tag .

Parameters

tag

a GtkSourceTag.

 

style

a GtkSourceTagStyle.

 

gtk_syntax_tag_new ()

GtkTextTag *
gtk_syntax_tag_new (const gchar *id,
                    const gchar *name,
                    const gchar *pattern_start,
                    const gchar *pattern_end);

Creates a new syntax tag object with the provided arguments.

Parameters

id

the ID for the tag.

 

name

the name of the tag.

 

pattern_start

the starting pattern.

 

pattern_end

the ending pattern.

 

Returns

a new syntax tag, as a GtkTextTag.


gtk_pattern_tag_new ()

GtkTextTag *
gtk_pattern_tag_new (const gchar *id,
                     const gchar *name,
                     const gchar *pattern);

Creates a new pattern tag object with the provided arguments.

Parameters

id

the ID for the tag.

 

name

the name of the tag.

 

pattern

the pattern.

 

Returns

a new pattern tag, as a GtkTextTag.


gtk_keyword_list_tag_new ()

GtkTextTag *
gtk_keyword_list_tag_new (const gchar *id,
                          const gchar *name,
                          const GSList *keywords,
                          gboolean case_sensitive,
                          gboolean match_empty_string_at_beginning,
                          gboolean match_empty_string_at_end,
                          const gchar *beginning_regex,
                          const gchar *end_regex);

Creates a new keyword list tag object with the provided arguments.

Parameters

id

the ID for the tag.

 

name

the name of the tag.

 

keywords

a list of keywords.

 

case_sensitive

whether the tag should be case sensitive.

 

match_empty_string_at_beginning

whether the tag should match empty string at the beginning.

 

match_empty_string_at_end

whether the tag should match empty string at the end.

 

beginning_regex

the beginning regular expression.

 

end_regex

the ending regular expression.

 

Returns

a new keyword list tag, as a GtkTextTag.


gtk_line_comment_tag_new ()

GtkTextTag *
gtk_line_comment_tag_new (const gchar *id,
                          const gchar *name,
                          const gchar *pattern_start);

Creates a new line comment tag object with the provided arguments.

Parameters

id

the ID for the tag.

 

name

the name of the tag.

 

pattern_start

the starting pattern.

 

Returns

a new line comment tag, as a GtkTextTag.


gtk_string_tag_new ()

GtkTextTag *
gtk_string_tag_new (const gchar *id,
                    const gchar *name,
                    const gchar *pattern_start,
                    const gchar *pattern_end,
                    gboolean end_at_line_end);

Creates a new string tag object with the provided arguments.

Parameters

id

the ID for the tag.

 

name

the name of the tag.

 

pattern_start

the starting pattern.

 

pattern_end

the ending pattern.

 

end_at_line_end

whether the ending pattern should be suffixed by an end-of-line character.

 

Returns

a new string tag, as a GtkTextTag.

Types and Values

GtkSourceTag

typedef struct _GtkSourceTag GtkSourceTag;


GtkSourceTagClass

typedef struct _GtkSourceTagClass GtkSourceTagClass;


GtkSyntaxTag

typedef struct _GtkSyntaxTag GtkSyntaxTag;


GtkSyntaxTagClass

typedef struct _GtkSyntaxTagClass GtkSyntaxTagClass;


GtkPatternTag

typedef struct _GtkPatternTag GtkPatternTag;


GtkPatternTagClass

typedef struct _GtkPatternTagClass GtkPatternTagClass;


gtk_block_comment_tag_new

#define gtk_block_comment_tag_new gtk_syntax_tag_new

Property Details

The “id” property

  “id”                       gchar *

ID used to refer to the source tag.

Flags: Read / Write / Construct Only

Default value: NULL


The “tag-style” property

  “tag-style”                GtkSourceTagStyle *

The style associated with the source tag.

Flags: Read / Write