? about gtk_text_iter_is_cursor_position()



Hi,

I've got a question about gtk_text_iter_is_cursor_position(GtkTextIter *iter).

As far as I understand this function returns TRUE if iter is a valid cursor
position.
If so, why the compiled program listed below shows that all the positions are
valid?
Should the 5th position be valid?

According to
http://lcweb.loc.gov/marc/specifications/speccharlatin.html

0308    is UMLAUT, DIAERESIS / COMBINING DIAERESIS (Dialytika)

Thanks,
    Vitaly.


int
main (int argc, char** argv)
{

    GtkTextIter iter;
    GtkTextBuffer* buffer;
    char *str = "One \0061\0308 Two";
    int pos;

    gtk_init (&argc, &argv);

    buffer = gtk_text_buffer_new (NULL);
    gtk_text_buffer_set_text (buffer, str, strlen (str));

    for (pos = 0; pos < strlen (str); pos++){
        gtk_text_buffer_get_iter_at_offset(buffer, &iter, pos);

        if (gtk_text_iter_is_cursor_position (&iter))
        {
            printf ("VALID\n");
        } else {
            printf ("INVALID\n");
        }
    }
}






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]