forked from AuroraMiddleware/gtk
Rename GtkTextStyleValues to GtkTextAttributes
2000-08-31 Havoc Pennington <hp@redhat.com> * gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h, gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c, gtk/gtktexttagprivate.h, gtk/gtktextview.c: Rename GtkTextStyleValues to GtkTextAttributes
This commit is contained in:
parent
41b5d5d26d
commit
78500e9045
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-08-31 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
|
||||
gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
|
||||
gtk/gtktexttagprivate.h, gtk/gtktextview.c:
|
||||
Rename GtkTextStyleValues to GtkTextAttributes
|
||||
|
||||
2000-08-31 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
|
||||
|
@ -1126,7 +1126,7 @@ gtk_text_iter_has_tag (const GtkTextIter *iter,
|
||||
* Returns whether @iter is within an editable region of text.
|
||||
* Non-editable text is "locked" and can't be changed by the user via
|
||||
* #GtkTextView. This function is simply a convenience wrapper around
|
||||
* gtk_text_iter_get_style_values(). If no tags applied to this text
|
||||
* gtk_text_iter_get_attributes(). If no tags applied to this text
|
||||
* affect editability, @default_setting will be returned.
|
||||
*
|
||||
* Return value: whether @iter is inside an editable range
|
||||
@ -1135,18 +1135,18 @@ gboolean
|
||||
gtk_text_iter_editable (const GtkTextIter *iter,
|
||||
gboolean default_setting)
|
||||
{
|
||||
GtkTextStyleValues *values;
|
||||
GtkTextAttributes *values;
|
||||
gboolean retval;
|
||||
|
||||
values = gtk_text_style_values_new ();
|
||||
values = gtk_text_attributes_new ();
|
||||
|
||||
values->editable = default_setting;
|
||||
|
||||
gtk_text_iter_get_style_values (iter, values);
|
||||
gtk_text_iter_get_attributes (iter, values);
|
||||
|
||||
retval = values->editable;
|
||||
|
||||
gtk_text_style_values_unref (values);
|
||||
gtk_text_attributes_unref (values);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -1155,7 +1155,7 @@ gtk_text_iter_editable (const GtkTextIter *iter,
|
||||
* gtk_text_iter_get_language:
|
||||
* @iter: an iterator
|
||||
*
|
||||
* A convenience wrapper around gtk_text_iter_get_style_values(),
|
||||
* A convenience wrapper around gtk_text_iter_get_attributes(),
|
||||
* which returns the language in effect at @iter. If no tags affecting
|
||||
* language * apply to @iter, the return value is identical to that of
|
||||
* gtk_get_default_language().
|
||||
@ -1165,16 +1165,16 @@ gtk_text_iter_editable (const GtkTextIter *iter,
|
||||
static gchar*
|
||||
gtk_text_iter_get_language (const GtkTextIter *iter)
|
||||
{
|
||||
GtkTextStyleValues *values;
|
||||
GtkTextAttributes *values;
|
||||
gchar *retval;
|
||||
|
||||
values = gtk_text_style_values_new ();
|
||||
values = gtk_text_attributes_new ();
|
||||
|
||||
gtk_text_iter_get_style_values (iter, values);
|
||||
gtk_text_iter_get_attributes (iter, values);
|
||||
|
||||
retval = g_strdup (values->language);
|
||||
|
||||
gtk_text_style_values_unref (values);
|
||||
gtk_text_attributes_unref (values);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -1327,22 +1327,22 @@ gtk_text_iter_get_chars_in_line (const GtkTextIter *iter)
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_text_iter_get_style_values:
|
||||
* gtk_text_iter_get_attributes:
|
||||
* @iter: an iterator
|
||||
* @values: a #GtkTextStyleValues to be filled in
|
||||
* @values: a #GtkTextAttributes to be filled in
|
||||
*
|
||||
* Computes the effect of any tags applied to this spot in the
|
||||
* text. The @values parameter should be initialized to the default
|
||||
* settings you wish to use if no tags are in effect.
|
||||
* gtk_text_iter_get_style_values() will modify @values, applying the
|
||||
* gtk_text_iter_get_attributes() will modify @values, applying the
|
||||
* effects of any tags present at @iter. If any tags affected @values,
|
||||
* the function returns TRUE.
|
||||
*
|
||||
* Return value: TRUE if @values was modified
|
||||
**/
|
||||
gboolean
|
||||
gtk_text_iter_get_style_values (const GtkTextIter *iter,
|
||||
GtkTextStyleValues *values)
|
||||
gtk_text_iter_get_attributes (const GtkTextIter *iter,
|
||||
GtkTextAttributes *values)
|
||||
{
|
||||
GtkTextTag** tags;
|
||||
gint tag_count = 0;
|
||||
@ -1362,7 +1362,7 @@ gtk_text_iter_get_style_values (const GtkTextIter *iter,
|
||||
/* Sort tags in ascending order of priority */
|
||||
gtk_text_tag_array_sort (tags, tag_count);
|
||||
|
||||
gtk_text_style_values_fill_from_tags (values,
|
||||
gtk_text_attributes_fill_from_tags (values,
|
||||
tags,
|
||||
tag_count);
|
||||
|
||||
|
@ -104,8 +104,8 @@ gboolean gtk_text_iter_ends_line (const GtkTextIter *iter);
|
||||
|
||||
gint gtk_text_iter_get_chars_in_line (const GtkTextIter *iter);
|
||||
|
||||
gboolean gtk_text_iter_get_style_values (const GtkTextIter *iter,
|
||||
GtkTextStyleValues *values);
|
||||
gboolean gtk_text_iter_get_attributes (const GtkTextIter *iter,
|
||||
GtkTextAttributes *values);
|
||||
|
||||
gboolean gtk_text_iter_is_last (const GtkTextIter *iter);
|
||||
gboolean gtk_text_iter_is_first (const GtkTextIter *iter);
|
||||
|
@ -190,7 +190,7 @@ free_style_cache (GtkTextLayout *text_layout)
|
||||
{
|
||||
if (text_layout->one_style_cache)
|
||||
{
|
||||
gtk_text_style_values_unref (text_layout->one_style_cache);
|
||||
gtk_text_attributes_unref (text_layout->one_style_cache);
|
||||
text_layout->one_style_cache = NULL;
|
||||
}
|
||||
}
|
||||
@ -205,7 +205,7 @@ gtk_text_layout_destroy (GtkObject *object)
|
||||
gtk_text_layout_set_buffer (layout, NULL);
|
||||
|
||||
if (layout->default_style)
|
||||
gtk_text_style_values_unref (layout->default_style);
|
||||
gtk_text_attributes_unref (layout->default_style);
|
||||
layout->default_style = NULL;
|
||||
|
||||
if (layout->ltr_context)
|
||||
@ -274,7 +274,7 @@ gtk_text_layout_default_style_changed (GtkTextLayout *layout)
|
||||
|
||||
void
|
||||
gtk_text_layout_set_default_style (GtkTextLayout *layout,
|
||||
GtkTextStyleValues *values)
|
||||
GtkTextAttributes *values)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout));
|
||||
g_return_if_fail (values != NULL);
|
||||
@ -282,10 +282,10 @@ gtk_text_layout_set_default_style (GtkTextLayout *layout,
|
||||
if (values == layout->default_style)
|
||||
return;
|
||||
|
||||
gtk_text_style_values_ref (values);
|
||||
gtk_text_attributes_ref (values);
|
||||
|
||||
if (layout->default_style)
|
||||
gtk_text_style_values_unref (layout->default_style);
|
||||
gtk_text_attributes_unref (layout->default_style);
|
||||
|
||||
layout->default_style = values;
|
||||
|
||||
@ -785,13 +785,13 @@ gtk_text_layout_real_get_log_attrs (GtkTextLayout *layout,
|
||||
|
||||
/* If you get the style with get_style () you need to call
|
||||
release_style () to free it. */
|
||||
static GtkTextStyleValues*
|
||||
static GtkTextAttributes*
|
||||
get_style (GtkTextLayout *layout,
|
||||
const GtkTextIter *iter)
|
||||
{
|
||||
GtkTextTag** tags;
|
||||
gint tag_count = 0;
|
||||
GtkTextStyleValues *style;
|
||||
GtkTextAttributes *style;
|
||||
|
||||
/* If we have the one-style cache, then it means
|
||||
that we haven't seen a toggle since we filled in the
|
||||
@ -799,7 +799,7 @@ get_style (GtkTextLayout *layout,
|
||||
*/
|
||||
if (layout->one_style_cache != NULL)
|
||||
{
|
||||
gtk_text_style_values_ref (layout->one_style_cache);
|
||||
gtk_text_attributes_ref (layout->one_style_cache);
|
||||
return layout->one_style_cache;
|
||||
}
|
||||
|
||||
@ -813,8 +813,8 @@ get_style (GtkTextLayout *layout,
|
||||
{
|
||||
/* One ref for the return value, one ref for the
|
||||
layout->one_style_cache reference */
|
||||
gtk_text_style_values_ref (layout->default_style);
|
||||
gtk_text_style_values_ref (layout->default_style);
|
||||
gtk_text_attributes_ref (layout->default_style);
|
||||
gtk_text_attributes_ref (layout->default_style);
|
||||
layout->one_style_cache = layout->default_style;
|
||||
|
||||
if (tags)
|
||||
@ -826,12 +826,12 @@ get_style (GtkTextLayout *layout,
|
||||
/* Sort tags in ascending order of priority */
|
||||
gtk_text_tag_array_sort (tags, tag_count);
|
||||
|
||||
style = gtk_text_style_values_new ();
|
||||
style = gtk_text_attributes_new ();
|
||||
|
||||
gtk_text_style_values_copy (layout->default_style,
|
||||
gtk_text_attributes_copy (layout->default_style,
|
||||
style);
|
||||
|
||||
gtk_text_style_values_fill_from_tags (style,
|
||||
gtk_text_attributes_fill_from_tags (style,
|
||||
tags,
|
||||
tag_count);
|
||||
|
||||
@ -841,7 +841,7 @@ get_style (GtkTextLayout *layout,
|
||||
|
||||
/* Leave this style as the last one seen */
|
||||
g_assert (layout->one_style_cache == NULL);
|
||||
gtk_text_style_values_ref (style); /* ref held by layout->one_style_cache */
|
||||
gtk_text_attributes_ref (style); /* ref held by layout->one_style_cache */
|
||||
layout->one_style_cache = style;
|
||||
|
||||
/* Returning yet another refcount */
|
||||
@ -850,12 +850,12 @@ get_style (GtkTextLayout *layout,
|
||||
|
||||
static void
|
||||
release_style (GtkTextLayout *layout,
|
||||
GtkTextStyleValues *style)
|
||||
GtkTextAttributes *style)
|
||||
{
|
||||
g_return_if_fail (style != NULL);
|
||||
g_return_if_fail (style->refcount > 0);
|
||||
|
||||
gtk_text_style_values_unref (style);
|
||||
gtk_text_attributes_unref (style);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -934,7 +934,7 @@ totally_invisible_line (GtkTextLayout *layout,
|
||||
|
||||
static void
|
||||
set_para_values (GtkTextLayout *layout,
|
||||
GtkTextStyleValues *style,
|
||||
GtkTextAttributes *style,
|
||||
GtkTextLineDisplay *display,
|
||||
gdouble *align)
|
||||
{
|
||||
@ -1085,7 +1085,7 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance)
|
||||
|
||||
static void
|
||||
add_text_attrs (GtkTextLayout *layout,
|
||||
GtkTextStyleValues *style,
|
||||
GtkTextAttributes *style,
|
||||
gint byte_count,
|
||||
PangoAttrList *attrs,
|
||||
gint start,
|
||||
@ -1113,7 +1113,7 @@ add_text_attrs (GtkTextLayout *layout,
|
||||
static void
|
||||
add_pixmap_attrs (GtkTextLayout *layout,
|
||||
GtkTextLineDisplay *display,
|
||||
GtkTextStyleValues *style,
|
||||
GtkTextAttributes *style,
|
||||
GtkTextLineSegment *seg,
|
||||
PangoAttrList *attrs,
|
||||
gint start)
|
||||
@ -1190,7 +1190,7 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
|
||||
GtkTextLineDisplay *display;
|
||||
GtkTextLineSegment *seg;
|
||||
GtkTextIter iter;
|
||||
GtkTextStyleValues *style;
|
||||
GtkTextAttributes *style;
|
||||
gchar *text;
|
||||
PangoAttrList *attrs;
|
||||
gint byte_count, byte_offset;
|
||||
|
@ -49,7 +49,7 @@ struct _GtkTextLayout
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
/* Default style used if no tags override it */
|
||||
GtkTextStyleValues *default_style;
|
||||
GtkTextAttributes *default_style;
|
||||
|
||||
/* Pango contexts used for creating layouts */
|
||||
PangoContext *ltr_context;
|
||||
@ -58,7 +58,7 @@ struct _GtkTextLayout
|
||||
/* A cache of one style; this is used to ensure
|
||||
* we don't constantly regenerate the style
|
||||
* over long runs with the same style. */
|
||||
GtkTextStyleValues *one_style_cache;
|
||||
GtkTextAttributes *one_style_cache;
|
||||
|
||||
/* A cache of one line display. Getting the same line
|
||||
* many times in a row is the most common case.
|
||||
@ -146,7 +146,7 @@ GtkTextLayout *gtk_text_layout_new (void);
|
||||
void gtk_text_layout_set_buffer (GtkTextLayout *layout,
|
||||
GtkTextBuffer *buffer);
|
||||
void gtk_text_layout_set_default_style (GtkTextLayout *layout,
|
||||
GtkTextStyleValues *values);
|
||||
GtkTextAttributes *values);
|
||||
void gtk_text_layout_set_contexts (GtkTextLayout *layout,
|
||||
PangoContext *ltr_context,
|
||||
PangoContext *rtl_context);
|
||||
|
@ -317,7 +317,7 @@ gtk_text_tag_new (const gchar *name)
|
||||
|
||||
tag->name = g_strdup(name);
|
||||
|
||||
tag->values = gtk_text_style_values_new();
|
||||
tag->values = gtk_text_attributes_new();
|
||||
|
||||
return tag;
|
||||
}
|
||||
@ -336,7 +336,7 @@ gtk_text_tag_destroy (GtkObject *object)
|
||||
|
||||
g_assert(tkxt_tag->table == NULL);
|
||||
|
||||
gtk_text_style_values_unref(tkxt_tag->values);
|
||||
gtk_text_attributes_unref(tkxt_tag->values);
|
||||
tkxt_tag->values = NULL;
|
||||
|
||||
(* GTK_OBJECT_CLASS(parent_class)->destroy) (object);
|
||||
@ -1045,15 +1045,15 @@ gtk_text_tag_array_sort(GtkTextTag** tag_array_p,
|
||||
}
|
||||
|
||||
/*
|
||||
* StyleValues
|
||||
* Attributes
|
||||
*/
|
||||
|
||||
GtkTextStyleValues*
|
||||
gtk_text_style_values_new(void)
|
||||
GtkTextAttributes*
|
||||
gtk_text_attributes_new(void)
|
||||
{
|
||||
GtkTextStyleValues *values;
|
||||
GtkTextAttributes *values;
|
||||
|
||||
values = g_new0(GtkTextStyleValues, 1);
|
||||
values = g_new0(GtkTextAttributes, 1);
|
||||
|
||||
/* 0 is a valid value for most of the struct */
|
||||
|
||||
@ -1065,8 +1065,8 @@ gtk_text_style_values_new(void)
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_style_values_copy(GtkTextStyleValues *src,
|
||||
GtkTextStyleValues *dest)
|
||||
gtk_text_attributes_copy(GtkTextAttributes *src,
|
||||
GtkTextAttributes *dest)
|
||||
{
|
||||
guint orig_refcount;
|
||||
|
||||
@ -1110,7 +1110,7 @@ gtk_text_style_values_copy(GtkTextStyleValues *src,
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_style_values_ref(GtkTextStyleValues *values)
|
||||
gtk_text_attributes_ref(GtkTextAttributes *values)
|
||||
{
|
||||
g_return_if_fail(values != NULL);
|
||||
|
||||
@ -1118,7 +1118,7 @@ gtk_text_style_values_ref(GtkTextStyleValues *values)
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_style_values_unref(GtkTextStyleValues *values)
|
||||
gtk_text_attributes_unref(GtkTextAttributes *values)
|
||||
{
|
||||
g_return_if_fail(values != NULL);
|
||||
g_return_if_fail(values->refcount > 0);
|
||||
@ -1149,7 +1149,7 @@ gtk_text_style_values_unref(GtkTextStyleValues *values)
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_style_values_realize(GtkTextStyleValues *values,
|
||||
gtk_text_attributes_realize(GtkTextAttributes *values,
|
||||
GdkColormap *cmap,
|
||||
GdkVisual *visual)
|
||||
{
|
||||
@ -1170,7 +1170,7 @@ gtk_text_style_values_realize(GtkTextStyleValues *values,
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_style_values_unrealize(GtkTextStyleValues *values,
|
||||
gtk_text_attributes_unrealize(GtkTextAttributes *values,
|
||||
GdkColormap *cmap,
|
||||
GdkVisual *visual)
|
||||
{
|
||||
@ -1192,7 +1192,7 @@ gtk_text_style_values_unrealize(GtkTextStyleValues *values,
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_style_values_fill_from_tags(GtkTextStyleValues *dest,
|
||||
gtk_text_attributes_fill_from_tags(GtkTextAttributes *dest,
|
||||
GtkTextTag** tags,
|
||||
guint n_tags)
|
||||
{
|
||||
@ -1203,7 +1203,7 @@ gtk_text_style_values_fill_from_tags(GtkTextStyleValues *dest,
|
||||
while (n < n_tags)
|
||||
{
|
||||
GtkTextTag *tag = tags[n];
|
||||
GtkTextStyleValues *vals = tag->values;
|
||||
GtkTextAttributes *vals = tag->values;
|
||||
|
||||
if (n > 0)
|
||||
g_assert(tags[n]->priority > tags[n-1]->priority);
|
||||
|
@ -19,7 +19,7 @@ typedef enum {
|
||||
GTK_WRAPMODE_WORD
|
||||
} GtkWrapMode;
|
||||
|
||||
typedef struct _GtkTextStyleValues GtkTextStyleValues;
|
||||
typedef struct _GtkTextAttributes GtkTextAttributes;
|
||||
|
||||
#define GTK_TYPE_TEXT_TAG (gtk_text_tag_get_type())
|
||||
#define GTK_TEXT_TAG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TEXT_TAG, GtkTextTag))
|
||||
@ -52,7 +52,7 @@ struct _GtkTextTag {
|
||||
* defaults if no tag specifies an override.
|
||||
*/
|
||||
|
||||
GtkTextStyleValues *values;
|
||||
GtkTextAttributes *values;
|
||||
|
||||
/*
|
||||
Flags for whether a given value is set; if a value is unset, then
|
||||
@ -128,12 +128,12 @@ struct _GtkTextAppearance
|
||||
|
||||
/* This is only used when we are actually laying out and rendering
|
||||
* a paragraph; not when a GtkTextAppearance is part of a
|
||||
* GtkTextStyleValues.
|
||||
* GtkTextAttributes.
|
||||
*/
|
||||
guint inside_selection : 1;
|
||||
};
|
||||
|
||||
struct _GtkTextStyleValues
|
||||
struct _GtkTextAttributes
|
||||
{
|
||||
guint refcount;
|
||||
|
||||
@ -191,11 +191,11 @@ struct _GtkTextStyleValues
|
||||
guint pad4 : 1;
|
||||
};
|
||||
|
||||
GtkTextStyleValues *gtk_text_style_values_new (void);
|
||||
void gtk_text_style_values_copy (GtkTextStyleValues *src,
|
||||
GtkTextStyleValues *dest);
|
||||
void gtk_text_style_values_unref (GtkTextStyleValues *values);
|
||||
void gtk_text_style_values_ref (GtkTextStyleValues *values);
|
||||
GtkTextAttributes *gtk_text_attributes_new (void);
|
||||
void gtk_text_attributes_copy (GtkTextAttributes *src,
|
||||
GtkTextAttributes *dest);
|
||||
void gtk_text_attributes_unref (GtkTextAttributes *values);
|
||||
void gtk_text_attributes_ref (GtkTextAttributes *values);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -7,20 +7,20 @@
|
||||
* the defaults with settings in the given tags, which should be sorted in
|
||||
* ascending order of priority
|
||||
*/
|
||||
void gtk_text_style_values_fill_from_tags (GtkTextStyleValues *values,
|
||||
void gtk_text_attributes_fill_from_tags (GtkTextAttributes *values,
|
||||
GtkTextTag **tags,
|
||||
guint n_tags);
|
||||
void gtk_text_tag_array_sort (GtkTextTag **tag_array_p,
|
||||
guint len);
|
||||
|
||||
/* ensure colors are allocated, etc. for drawing */
|
||||
void gtk_text_style_values_realize (GtkTextStyleValues *values,
|
||||
GdkColormap *cmap,
|
||||
GdkVisual *visual);
|
||||
void gtk_text_attributes_realize (GtkTextAttributes *values,
|
||||
GdkColormap *cmap,
|
||||
GdkVisual *visual);
|
||||
|
||||
/* free the stuff again */
|
||||
void gtk_text_style_values_unrealize (GtkTextStyleValues *values,
|
||||
GdkColormap *cmap,
|
||||
GdkVisual *visual);
|
||||
void gtk_text_attributes_unrealize (GtkTextAttributes *values,
|
||||
GdkColormap *cmap,
|
||||
GdkVisual *visual);
|
||||
|
||||
#endif
|
||||
|
@ -189,7 +189,7 @@ static void gtk_text_view_get_first_para_iter (GtkTextView *text_vi
|
||||
GtkTextIter *iter);
|
||||
static void gtk_text_view_scroll_calc_now (GtkTextView *text_view);
|
||||
static void gtk_text_view_set_values_from_style (GtkTextView *text_view,
|
||||
GtkTextStyleValues *values,
|
||||
GtkTextAttributes *values,
|
||||
GtkStyle *style);
|
||||
static void gtk_text_view_ensure_layout (GtkTextView *text_view);
|
||||
static void gtk_text_view_destroy_layout (GtkTextView *text_view);
|
||||
@ -2471,7 +2471,7 @@ gtk_text_view_scroll_calc_now (GtkTextView *text_view)
|
||||
|
||||
static void
|
||||
gtk_text_view_set_values_from_style (GtkTextView *text_view,
|
||||
GtkTextStyleValues *values,
|
||||
GtkTextAttributes *values,
|
||||
GtkStyle *style)
|
||||
{
|
||||
values->appearance.bg_color = style->base[GTK_STATE_NORMAL];
|
||||
@ -2492,7 +2492,7 @@ gtk_text_view_ensure_layout (GtkTextView *text_view)
|
||||
|
||||
if (text_view->layout == NULL)
|
||||
{
|
||||
GtkTextStyleValues *style;
|
||||
GtkTextAttributes *style;
|
||||
PangoContext *ltr_context, *rtl_context;
|
||||
|
||||
text_view->layout = gtk_text_layout_new ();
|
||||
@ -2520,7 +2520,7 @@ gtk_text_view_ensure_layout (GtkTextView *text_view)
|
||||
g_object_unref (G_OBJECT (ltr_context));
|
||||
g_object_unref (G_OBJECT (rtl_context));
|
||||
|
||||
style = gtk_text_style_values_new ();
|
||||
style = gtk_text_attributes_new ();
|
||||
|
||||
gtk_widget_ensure_style (widget);
|
||||
gtk_text_view_set_values_from_style (text_view, style, widget->style);
|
||||
@ -2535,7 +2535,7 @@ gtk_text_view_ensure_layout (GtkTextView *text_view)
|
||||
|
||||
gtk_text_layout_set_default_style (text_view->layout, style);
|
||||
|
||||
gtk_text_style_values_unref (style);
|
||||
gtk_text_attributes_unref (style);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user