uscore-prepend all the stuff in here.

2001-01-01  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.

	* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
	GtkTextAttributes

	* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
	#40246
	(gtk_text_attributes_copy_values): rename from
	gtk_text_attributes_copy
	(gtk_text_attributes_copy): a more standard GTK copy function,
	which returns a new object
This commit is contained in:
Havoc Pennington 2001-01-01 20:26:10 +00:00 committed by Havoc Pennington
parent 66f87948e2
commit aac55c4664
14 changed files with 170 additions and 49 deletions

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1,3 +1,17 @@
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.
* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
GtkTextAttributes
* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
#40246
(gtk_text_attributes_copy_values): rename from
gtk_text_attributes_copy
(gtk_text_attributes_copy): a more standard GTK copy function,
which returns a new object
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes

View File

@ -1286,6 +1286,11 @@
gtk_text_iter_copy
gtk_text_iter_free)
(define-boxed GtkTextAttributes
gtk_text_attributes_ref
gtk_text_attributes_unref)
(define-boxed PangoTabArray
pango_tab_array_copy
pango_tab_array_free)

View File

@ -1539,12 +1539,11 @@ queue_tag_redisplay (GtkTextBTree *tree,
const GtkTextIter *start,
const GtkTextIter *end)
{
if (gtk_text_tag_affects_size (tag))
if (_gtk_text_tag_affects_size (tag))
{
_gtk_text_btree_invalidate_region (tree, start, end);
}
else if (gtk_text_tag_affects_nonsize_appearance (tag))
else if (_gtk_text_tag_affects_nonsize_appearance (tag))
{
/* We only need to queue a redraw, not a relayout */
redisplay_region (tree, start, end);

View File

@ -1207,7 +1207,7 @@ gtk_text_iter_get_tags (const GtkTextIter *iter)
}
/* Sort tags in ascending order of priority */
gtk_text_tag_array_sort (tags, tag_count);
_gtk_text_tag_array_sort (tags, tag_count);
retval = NULL;
i = 0;
@ -1544,11 +1544,11 @@ gtk_text_iter_get_attributes (const GtkTextIter *iter,
}
/* Sort tags in ascending order of priority */
gtk_text_tag_array_sort (tags, tag_count);
_gtk_text_tag_array_sort (tags, tag_count);
gtk_text_attributes_fill_from_tags (values,
tags,
tag_count);
_gtk_text_attributes_fill_from_tags (values,
tags,
tag_count);
g_free (tags);

View File

@ -945,16 +945,16 @@ get_style (GtkTextLayout *layout,
}
/* Sort tags in ascending order of priority */
gtk_text_tag_array_sort (tags, tag_count);
_gtk_text_tag_array_sort (tags, tag_count);
style = gtk_text_attributes_new ();
gtk_text_attributes_copy (layout->default_style,
style);
gtk_text_attributes_copy_values (layout->default_style,
style);
gtk_text_attributes_fill_from_tags (style,
tags,
tag_count);
_gtk_text_attributes_fill_from_tags (style,
tags,
tag_count);
g_free (tags);

View File

@ -1587,8 +1587,8 @@ tag_sort_func (gconstpointer first, gconstpointer second)
}
void
gtk_text_tag_array_sort (GtkTextTag** tag_array_p,
guint len)
_gtk_text_tag_array_sort (GtkTextTag** tag_array_p,
guint len)
{
int i, j, prio;
GtkTextTag **tag;
@ -1664,10 +1664,28 @@ gtk_text_attributes_new (void)
return values;
}
/* FIXME change the signature of this to be correct */
GtkTextAttributes*
gtk_text_attributes_copy (GtkTextAttributes *src)
{
GtkTextAttributes *dest;
dest = gtk_text_attributes_new ();
gtk_text_attributes_copy_values (src, dest);
return dest;
}
/**
* gtk_text_attributes_copy_values:
* @src: a #GtkTextAttributes
* @dest: another #GtkTextAttributes
*
* Copies the values from @src to @dest so that @dest has the same values
* as @src.
**/
void
gtk_text_attributes_copy (GtkTextAttributes *src,
GtkTextAttributes *dest)
gtk_text_attributes_copy_values (GtkTextAttributes *src,
GtkTextAttributes *dest)
{
guint orig_refcount;
@ -1754,9 +1772,9 @@ gtk_text_attributes_unref (GtkTextAttributes *values)
}
void
gtk_text_attributes_realize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual)
_gtk_text_attributes_realize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual)
{
g_return_if_fail (values != NULL);
g_return_if_fail (values->refcount > 0);
@ -1775,9 +1793,9 @@ gtk_text_attributes_realize (GtkTextAttributes *values,
}
void
gtk_text_attributes_unrealize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual)
_gtk_text_attributes_unrealize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual)
{
g_return_if_fail (values != NULL);
g_return_if_fail (values->refcount > 0);
@ -1797,9 +1815,9 @@ gtk_text_attributes_unrealize (GtkTextAttributes *values,
}
void
gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
GtkTextTag** tags,
guint n_tags)
_gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
GtkTextTag** tags,
guint n_tags)
{
guint n = 0;
@ -1926,7 +1944,7 @@ gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
}
gboolean
gtk_text_tag_affects_size (GtkTextTag *tag)
_gtk_text_tag_affects_size (GtkTextTag *tag)
{
g_return_val_if_fail (GTK_IS_TEXT_TAG (tag), FALSE);
@ -1952,7 +1970,7 @@ gtk_text_tag_affects_size (GtkTextTag *tag)
}
gboolean
gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag)
_gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag)
{
g_return_val_if_fail (GTK_IS_TEXT_TAG (tag), FALSE);

View File

@ -195,12 +195,13 @@ struct _GtkTextAttributes
guint pad4 : 1;
};
/* FIXME _copy() has the wrong signature */
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);
GtkTextAttributes* gtk_text_attributes_new (void);
GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
void gtk_text_attributes_copy_values (GtkTextAttributes *src,
GtkTextAttributes *dest);
void gtk_text_attributes_unref (GtkTextAttributes *values);
void gtk_text_attributes_ref (GtkTextAttributes *values);
#ifdef __cplusplus
}

View File

@ -7,23 +7,23 @@
* the defaults with settings in the given tags, which should be sorted in
* ascending order of priority
*/
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);
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_attributes_realize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual);
void _gtk_text_attributes_realize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual);
/* free the stuff again */
void gtk_text_attributes_unrealize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual);
void _gtk_text_attributes_unrealize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual);
gboolean gtk_text_tag_affects_size (GtkTextTag *tag);
gboolean gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag);
gboolean _gtk_text_tag_affects_size (GtkTextTag *tag);
gboolean _gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag);
#endif