1 #ifndef GTK_TEXT_TAG_PRIVATE_H
2 #define GTK_TEXT_TAG_PRIVATE_H
4 #include <gtk/gtktexttag.h>
6 /* values should already have desired defaults; this function will override
7 * the defaults with settings in the given tags, which should be sorted in
8 * ascending order of priority
10 void gtk_text_style_values_fill_from_tags (GtkTextStyleValues *values,
13 void gtk_text_tag_array_sort (GtkTextTag **tag_array_p,
17 * Style object created by folding a set of tags together
20 typedef struct _GtkTextAppearance GtkTextAppearance;
22 struct _GtkTextAppearance
26 GdkBitmap *bg_stipple;
27 GdkBitmap *fg_stipple;
29 guint underline : 4; /* PangoUnderline */
32 /* Whether to use background-related values; this is irrelevant for
33 * the values struct when in a tag, but is used for the composite
34 * values struct; it's true if any of the tags being composited
35 * had background stuff set. */
38 /* This is only used when we are actually laying out and rendering
39 * a paragraph; not when a GtkTextAppearance is part of a
42 guint inside_selection : 1;
45 struct _GtkTextStyleValues
49 GtkTextAppearance appearance;
53 GtkJustification justify;
54 GtkTextDirection direction;
56 PangoFontDescription *font_desc;
62 gint left_wrapped_line_margin;
64 /* super/subscript offset, can be negative */
69 gint pixels_above_lines;
71 gint pixels_below_lines;
73 gint pixels_inside_wrap;
75 GtkTextTabArray *tab_array;
77 GtkWrapMode wrap_mode; /* How to handle wrap-around for this tag.
78 * Must be GTK_WRAPMODE_CHAR,
79 * GTK_WRAPMODE_NONE, GTK_WRAPMODE_WORD
87 /* Background is fit to full line height rather than
88 * baseline +/- ascent/descent (font height) */
89 guint bg_full_height : 1;
91 /* can edit this text */
94 /* colors are allocated etc. */
103 GtkTextStyleValues *gtk_text_style_values_new (void);
104 void gtk_text_style_values_copy (GtkTextStyleValues *src,
105 GtkTextStyleValues *dest);
106 void gtk_text_style_values_unref (GtkTextStyleValues *values);
107 void gtk_text_style_values_ref (GtkTextStyleValues *values);
109 /* ensure colors are allocated, etc. for drawing */
110 void gtk_text_style_values_realize (GtkTextStyleValues *values,
114 /* free the stuff again */
115 void gtk_text_style_values_unrealize (GtkTextStyleValues *values,