GtkSourceStyle: GtkSourceView 3 Reference Manual

## GtkSourceStyle GtkSourceStyle — Represents a style |

## Functions

GtkSourceStyle * | gtk_source_style_copy ()
void | gtk_source_style_apply ()

## Properties

gchar * | background | Read / Write / Construct Only
gboolean | background-set | Read / Write / Construct Only
gboolean | bold | Read / Write / Construct Only
gboolean | bold-set | Read / Write / Construct Only
gchar * | foreground | Read / Write / Construct Only
gboolean | foreground-set | Read / Write / Construct Only
gboolean | italic | Read / Write / Construct Only
gboolean | italic-set | Read / Write / Construct Only
gchar * | line-background | Read / Write / Construct Only
gboolean | line-background-set | Read / Write / Construct Only
PangoUnderline | pango-underline | Read / Write / Construct Only
gchar * | scale | Read / Write / Construct Only
gboolean | scale-set | Read / Write / Construct Only
gboolean | strikethrough | Read / Write / Construct Only
gboolean | strikethrough-set | Read / Write / Construct Only
gboolean | underline | Read / Write / Construct Only
gchar * | underline-color | Read / Write / Construct Only
gboolean | underline-color-set | Read / Write / Construct Only
gboolean | underline-set | Read / Write / Construct Only

## Types and Values

| GtkSourceStyle

## Object Hierarchy

        GObject
        ╰── GtkSourceStyle

## Includes

    #include <gtksourceview/gtksource.h>

## Description

The GtkSourceStyle structure is used to describe text attributes which are set when given style is used.

## Functions

### gtk_source_style_copy ()

    GtkSourceStyle *
    gtk_source_style_copy (const GtkSourceStyle *style);

Creates a copy of `style` , that is a new GtkSourceStyle instance which has the same attributes set.

#### Parameters

style | a GtkSourceStyle structure to copy. |

#### Returns

copy of `style` , call `g_object_unref()` when you are done with it.

[transfer full]

Since: 2.0

### gtk_source_style_apply ()

    void
    gtk_source_style_apply (const GtkSourceStyle *style,
                            GtkTextTag *tag);

This function modifies the GtkTextTag properties that are related to the GtkSourceStyle properties. Other GtkTextTag properties are left untouched.

If `style` is non-`NULL`, applies `style` to `tag` .

If `style` is `NULL`, the related *-set properties of GtkTextTag are set to `FALSE`.

#### Parameters

style | a GtkSourceStyle to apply, or `NULL`. | [nullable]
tag | a GtkTextTag to apply styles to. |

Since: 3.22

## Types and Values

### GtkSourceStyle

    typedef struct _GtkSourceStyle GtkSourceStyle;

## Property Details

### The `“background”` property

      “background”               gchar *

Background color.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“background-set”` property

      “background-set”           gboolean

Whether background color is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“bold”` property

      “bold”                     gboolean

Bold.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“bold-set”` property

      “bold-set”                 gboolean

Whether bold attribute is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“foreground”` property

      “foreground”               gchar *

Foreground color.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“foreground-set”` property

      “foreground-set”           gboolean

Whether foreground color is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“italic”` property

      “italic”                   gboolean

Italic.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“italic-set”` property

      “italic-set”               gboolean

Whether italic attribute is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“line-background”` property

      “line-background”          gchar *

Line background color.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“line-background-set”` property

      “line-background-set”      gboolean

Whether line background color is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“pango-underline”` property

      “pango-underline”          PangoUnderline

Pango Underline.

Flags: Read / Write / Construct Only

Default value: PANGO_UNDERLINE_NONE

### The `“scale”` property

      “scale”                    gchar *

Text scale factor.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“scale-set”` property

      “scale-set”                gboolean

Whether scale attribute is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“strikethrough”` property

      “strikethrough”            gboolean

Strikethrough.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“strikethrough-set”` property

      “strikethrough-set”        gboolean

Whether strikethrough attribute is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“underline”` property

      “underline”                gboolean

Underline.

`GtkSourceStyle:underline` has been deprecated since version 3.18 and should not be used in newly-written code.

Use pango-underline.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“underline-color”` property

      “underline-color”          gchar *

Underline color.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“underline-color-set”` property

      “underline-color-set”      gboolean

Whether underline color attribute is set.

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“underline-set”` property

      “underline-set”            gboolean

Whether underline attribute is set.

Flags: Read / Write / Construct Only

Default value: FALSE

## See Also

GtkSourceStyleScheme, GtkSourceStyleSchemeManager