]> Pileus Git - ~andy/gtk/blob - gtk/gtktexttypes.c
a0c9a98a23dff04586fa22110540ee4689bf752e
[~andy/gtk] / gtk / gtktexttypes.c
1 #include "gtktexttypes.h"
2
3 /* These are used to represent embedded non-character objects
4  * if you return a string representation of a text buffer
5  */
6 const gunichar gtk_text_unknown_char = 0xFFFD;
7 const gchar gtk_text_unknown_char_utf8[] = { 0xEF, 0xBF, 0xBD, '\0' };
8
9 static inline gboolean
10 inline_byte_begins_utf8_char (const gchar *byte)
11 {
12   return ((*byte & 0xC0) != 0x80);
13 }
14
15 gboolean
16 gtk_text_byte_begins_utf8_char (const gchar *byte)
17 {
18   return inline_byte_begins_utf8_char (byte);
19 }