change "offset" to "rise"
2000-11-14 Havoc Pennington <hp@pobox.com> * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" * gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for unknown char, no real reason we were using a variable. Remove gtk_text_unknown_char variable. Fix all the text widget files accordingly. * gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC, since the Unicode spec seems to prefer that character for our purposes.
This commit is contained in:
parent
98e453dc04
commit
c72cec38f1
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-11-14 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
|
||||
|
||||
* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
|
||||
unknown char, no real reason we were using a variable.
|
||||
Remove gtk_text_unknown_char variable. Fix all the text widget
|
||||
files accordingly.
|
||||
|
||||
* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
|
||||
since the Unicode spec seems to prefer that character for our
|
||||
purposes.
|
||||
|
||||
Wed Nov 15 02:18:01 2000 Robert Brady <robert@suse.co.uk>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_get_im_module_file): The return
|
||||
|
@ -557,7 +557,7 @@ static gboolean
|
||||
possibly_not_text (gunichar ch,
|
||||
gpointer user_data)
|
||||
{
|
||||
return ch == 0xFFFD;
|
||||
return ch == GTK_TEXT_UNKNOWN_CHAR;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -684,7 +684,7 @@ insert_range_untagged (GtkTextBuffer *buffer,
|
||||
/* nothing left to do */
|
||||
break;
|
||||
}
|
||||
else if (gtk_text_iter_get_char (&range_end) == 0xFFFD)
|
||||
else if (gtk_text_iter_get_char (&range_end) == GTK_TEXT_UNKNOWN_CHAR)
|
||||
{
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
GtkTextChildAnchor *anchor = NULL;
|
||||
@ -717,7 +717,7 @@ insert_range_untagged (GtkTextBuffer *buffer,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The 0xFFFD was in a text segment, so
|
||||
/* The GTK_TEXT_UNKNOWN_CHAR was in a text segment, so
|
||||
* keep going.
|
||||
*/
|
||||
gtk_text_iter_forward_find_char (&range_end,
|
||||
@ -1287,11 +1287,11 @@ gtk_text_buffer_get_text (GtkTextBuffer *buffer,
|
||||
* Returns the text in the range [@start,@end). Excludes undisplayed
|
||||
* text (text marked with tags that set the invisibility attribute) if
|
||||
* @include_hidden_chars is FALSE. The returned string includes a
|
||||
* 0xFFFD character whenever the buffer contains
|
||||
* 0xFFFC character whenever the buffer contains
|
||||
* embedded images, so byte and character indexes into
|
||||
* the returned string <emphasis>do</emphasis> correspond to byte
|
||||
* and character indexes into the buffer. Contrast with
|
||||
* gtk_text_buffer_get_text (). Note that 0xFFFD can occur in normal
|
||||
* gtk_text_buffer_get_text (). Note that 0xFFFC can occur in normal
|
||||
* text as well, so it is not a reliable indicator that a pixbuf or
|
||||
* widget is in the buffer.
|
||||
*
|
||||
|
@ -112,8 +112,9 @@ _gtk_pixbuf_segment_new (GdkPixbuf *pixbuf)
|
||||
|
||||
seg->next = NULL;
|
||||
|
||||
seg->byte_count = 3; /* We convert to the 0xFFFD "unknown character",
|
||||
a 3-byte sequence in UTF-8 */
|
||||
seg->byte_count = 3; /* We convert to the 0xFFFC "unknown character",
|
||||
* a 3-byte sequence in UTF-8
|
||||
*/
|
||||
seg->char_count = 1;
|
||||
|
||||
seg->body.pixbuf.pixbuf = pixbuf;
|
||||
@ -208,7 +209,7 @@ _gtk_widget_segment_new (void)
|
||||
|
||||
seg->next = NULL;
|
||||
|
||||
seg->byte_count = 3; /* We convert to the 0xFFFD "unknown character",
|
||||
seg->byte_count = 3; /* We convert to the 0xFFFC "unknown character",
|
||||
* a 3-byte sequence in UTF-8
|
||||
*/
|
||||
seg->char_count = 1;
|
||||
|
@ -699,7 +699,7 @@ gtk_text_iter_get_line_index (const GtkTextIter *iter)
|
||||
* Returns the Unicode character at this iterator. (Equivalent to
|
||||
* operator* on a C++ iterator.) If the iterator points at a
|
||||
* non-character element, such as an image embedded in the buffer, the
|
||||
* Unicode "unknown" character 0xFFFD is returned. If invoked on
|
||||
* Unicode "unknown" character 0xFFFC is returned. If invoked on
|
||||
* the end iterator, zero is returned; zero is not a valid Unicode character.
|
||||
* So you can write a loop which ends when gtk_text_iter_get_char ()
|
||||
* returns 0.
|
||||
@ -731,8 +731,8 @@ gtk_text_iter_get_char (const GtkTextIter *iter)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Unicode "unknown character" 0xFFFD */
|
||||
return gtk_text_unknown_char;
|
||||
/* Unicode "unknown character" 0xFFFC */
|
||||
return GTK_TEXT_UNKNOWN_CHAR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -743,10 +743,10 @@ gtk_text_iter_get_char (const GtkTextIter *iter)
|
||||
*
|
||||
* Returns the text in the given range. A "slice" is an array of
|
||||
* characters encoded in UTF-8 format, including the Unicode "unknown"
|
||||
* character 0xFFFD for iterable non-character elements in the buffer,
|
||||
* character 0xFFFC for iterable non-character elements in the buffer,
|
||||
* such as images. Because images are encoded in the slice, byte and
|
||||
* character offsets in the returned array will correspond to byte
|
||||
* offsets in the text buffer. Note that 0xFFFD can occur in normal
|
||||
* offsets in the text buffer. Note that 0xFFFC can occur in normal
|
||||
* text as well, so it is not a reliable indicator that a pixbuf or
|
||||
* widget is in the buffer.
|
||||
*
|
||||
@ -2975,7 +2975,7 @@ forward_chars_with_skipping (GtkTextIter *iter,
|
||||
gboolean ignored = FALSE;
|
||||
|
||||
if (skip_nontext &&
|
||||
gtk_text_iter_get_char (iter) == gtk_text_unknown_char)
|
||||
gtk_text_iter_get_char (iter) == GTK_TEXT_UNKNOWN_CHAR)
|
||||
ignored = TRUE;
|
||||
|
||||
if (!ignored &&
|
||||
@ -3152,7 +3152,7 @@ strbreakup (const char *string,
|
||||
* @iter: start of search
|
||||
* @str: a search string
|
||||
* @visible_only: if %TRUE, search only visible text
|
||||
* @slice: if %TRUE, @str contains 0xFFFD when we want to match widgets, pixbufs
|
||||
* @slice: if %TRUE, @str contains 0xFFFC when we want to match widgets, pixbufs
|
||||
* @match_start: return location for start of match, or %NULL
|
||||
* @match_end: return location for end of match, or %NULL
|
||||
* @limit: bound for the search, or %NULL for the end of the buffer
|
||||
@ -3470,7 +3470,7 @@ my_strrstr (const gchar *haystack,
|
||||
* @iter: a #GtkTextIter where the search begins
|
||||
* @str: search string
|
||||
* @visible_only: if %TRUE search only visible text
|
||||
* @slice: if %TRUE the search string contains 0xFFFD to match pixbufs, widgets
|
||||
* @slice: if %TRUE the search string contains 0xFFFC to match pixbufs, widgets
|
||||
* @match_start: return location for start of match, or %NULL
|
||||
* @match_end: return location for end of match, or %NULL
|
||||
* @limit: location of last possible @match_start, or %NULL for start of buffer
|
||||
|
@ -3,8 +3,7 @@
|
||||
/* These are used to represent embedded non-character objects
|
||||
* if you return a string representation of a text buffer
|
||||
*/
|
||||
const gunichar gtk_text_unknown_char = 0xFFFD;
|
||||
const gchar gtk_text_unknown_char_utf8[] = { 0xEF, 0xBF, 0xBD, '\0' };
|
||||
const gchar gtk_text_unknown_char_utf8[] = { 0xEF, 0xBF, 0xBC, '\0' };
|
||||
|
||||
static inline gboolean
|
||||
inline_byte_begins_utf8_char (const gchar *byte)
|
||||
|
@ -38,7 +38,7 @@ extern GtkTextLineSegmentClass gtk_text_child_type;
|
||||
* UTF 8 Stubs
|
||||
*/
|
||||
|
||||
extern const gunichar gtk_text_unknown_char;
|
||||
#define GTK_TEXT_UNKNOWN_CHAR 0xFFFC
|
||||
extern const gchar gtk_text_unknown_char_utf8[];
|
||||
|
||||
gboolean gtk_text_byte_begins_utf8_char (const gchar *byte);
|
||||
|
@ -22,7 +22,7 @@ main (int argc, char** argv)
|
||||
/* Check UTF8 unknown char thing */
|
||||
g_assert (g_utf8_strlen (gtk_text_unknown_char_utf8, 3) == 1);
|
||||
ch = g_utf8_get_char (gtk_text_unknown_char_utf8);
|
||||
g_assert (ch == gtk_text_unknown_char);
|
||||
g_assert (ch == GTK_TEXT_UNKNOWN_CHAR);
|
||||
|
||||
/* First, we turn on btree debugging. */
|
||||
gtk_debug_flags |= GTK_DEBUG_TEXT;
|
||||
@ -603,7 +603,7 @@ fill_buffer (GtkTextBuffer *buffer)
|
||||
color.blue = color.green = 0;
|
||||
color.red = 0xffff;
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"offset", -4,
|
||||
"rise", -4,
|
||||
"foreground_gdk", &color,
|
||||
NULL);
|
||||
|
||||
|
@ -22,7 +22,7 @@ main (int argc, char** argv)
|
||||
/* Check UTF8 unknown char thing */
|
||||
g_assert (g_utf8_strlen (gtk_text_unknown_char_utf8, 3) == 1);
|
||||
ch = g_utf8_get_char (gtk_text_unknown_char_utf8);
|
||||
g_assert (ch == gtk_text_unknown_char);
|
||||
g_assert (ch == GTK_TEXT_UNKNOWN_CHAR);
|
||||
|
||||
/* First, we turn on btree debugging. */
|
||||
gtk_debug_flags |= GTK_DEBUG_TEXT;
|
||||
@ -603,7 +603,7 @@ fill_buffer (GtkTextBuffer *buffer)
|
||||
color.blue = color.green = 0;
|
||||
color.red = 0xffff;
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"offset", -4,
|
||||
"rise", -4,
|
||||
"foreground_gdk", &color,
|
||||
NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user