GtkTextBuffer: Q: offsets to indicies?



Dear Sirs,

I am working on an application that passes the content of a
GtkTextBuffer to a function as a gchar array (using
gtk_text_buffer_get_slice). The function then returns ranges in the
gchar array that need coloring.

My problem is the handling of multibyte characters. I need to be able to
somehow convert an integer offset in the GtkTextBuffer into a index
(somthing a. la. gtk_text_buffer_get_iter_from_index). But I cannot find
such a function?

Maybe this should be done otherwise then?

Regards,
Janus N. Tøndering


-- 
Janus Nørgaard Tøndering        
email: janus bananus dk, j nus person dk or u011014 daimi au dk

"Would you buy a car with the hood welded shut?"
-Phil Hughes, Linux Journal Magazine

-- 
Janus Nørgaard Tøndering        
email: j nus person dk or u011014 daimi au dk

"Would you buy a car with the hood welded shut?"
-Phil Hughes, Linux Journal Magazine





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