| GtkSourceView Reference Manual | ||||
|---|---|---|---|---|
#include <gtksourceview/gtksourcestyle.h> enum GtkSourceStyleMask; GtkSourceStyle; GtkSourceStyle* gtk_source_style_new (GtkSourceStyleMask mask); GtkSourceStyle* gtk_source_style_copy (const GtkSourceStyle *style); void gtk_source_style_free (GtkSourceStyle *style);
typedef enum {
GTK_SOURCE_STYLE_USE_BACKGROUND = 1 << 0, /*< nick=use_background >*/
GTK_SOURCE_STYLE_USE_FOREGROUND = 1 << 1, /*< nick=use_foreground >*/
GTK_SOURCE_STYLE_USE_ITALIC = 1 << 2, /*< nick=use_italic >*/
GTK_SOURCE_STYLE_USE_BOLD = 1 << 3, /*< nick=use_bold >*/
GTK_SOURCE_STYLE_USE_UNDERLINE = 1 << 4, /*< nick=use_underline >*/
GTK_SOURCE_STYLE_USE_STRIKETHROUGH = 1 << 5 /*< nick=use_strikethrough >*/
} GtkSourceStyleMask;
typedef struct {
GtkSourceStyleMask mask;
GdkColor foreground;
GdkColor background;
guint italic : 1;
guint bold : 1;
guint underline : 1;
guint strikethrough : 1;
} GtkSourceStyle;
GtkSourceStyle* gtk_source_style_new (GtkSourceStyleMask mask);
mask : |
a GtkSourceStyleMask which defines what fields will be used. |
| Returns : | newly allocated GtkSourceStyle structure, free with
gtk_source_style_free().
|
Since 2.0
GtkSourceStyle* gtk_source_style_copy (const GtkSourceStyle *style);
style : |
a GtkSourceStyle structure to copy. |
| Returns : | copy of style, free it with gtk_source_style_free().
|
Since 2.0
void gtk_source_style_free (GtkSourceStyle *style);
Frees GtkSourceStyle structure allocated with gtk_source_style_new() or
gtk_source_style_copy().
style : |
a GtkSourceStyle structure to free. |
Since 2.0