Aw: Re: Multiple colors in vte



Hi Stephen and Marcus,

thanks for your answers.

My client application receives some control bytes from the server in a way that the attribute is specified at 
first and the the actual text comes right after that. Specifically it's the Wang/FICE protocol.
02 03 02 04 0E "foo" 02 03 02 05 0e " bar"
..would write a red "foo" and a cyan "bar" on the screen. So the escape sequences are standardized in their 
very own way I guess. To change the color of "bar" it would simply be overwritten with a new color code. 
Basic things like moving the cursor (01, 08, 09, 0a, 0c) or ringing the bell (07) work like in normal ascii 
standards.

I'm processing each byte in a state machine anyway, so setting the attributes one-by-one might not be the 
problem if doing so doesn't lead to lower performance or excessive memory usage. I'd be glad to know an 
example on how to achieve this.

Thanks once again.

gilzad

Gesendet: Dienstag, 12. Januar 2016 um 15:40 Uhr
Von: "Stephen Boddy" <stephen j boddy googlemail com>

(But I think you are really asking) Are you talking about setting the
palette/color attribute of the multiple characters of a string retrieved
using vte_terminal_get_text[_range] ()?
In which case I haven't seen any way of setting all the characters
attributes in one call. I think you'd have to submit a feature request to
get this. As far as I can tell at the moment you just have to loop over
each char setting the attributes one-by-one.


Gesendet: Dienstag, 12. Januar 2016 um 15:01 Uhr
Von: "Marcus Karlsson" <mk acc umu se>

It's the program that outputs to the VTE that sets the color using
standardized escape sequences. Is that what you want to use?

              Marcus



On 10 January 2016 at 20:19, <gilli4 gmx net> wrote:

Hi list,
sorry if this question is redundant, I haven't found any answers after
searching yet.

Is there a way to set multiple colors in a vte programatically?
I can see how you can set the color for the whole text and I understand
that there are color-codes for bash but since I want to use VTE for a very
custom terminal, I need to set multiple colors programatically. Right now
I'm using a TextView to achieve this but it seems to be too slow when
successively updating large parts of the screen.

Thanks in advance fpr any hint.

Gilzad
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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