Various questions (gtk_text and thread)
- From: Emmanuel Varagnat <discoman club-internet fr>
- To: gtk-list redhat com
- Subject: Various questions (gtk_text and thread)
- Date: Sat, 24 Jul 1999 12:12:09 +0200
I've created a log window with a GTK_TEXT widget, and 2 pipes to
redirect
normal output and error output of program launch via execvp.
For reading pipes I've created 2 threads which only consist in:
void log_text_normal_output() {
char buff[100];
int n;
while(n=read(pipe2[0], buff, 100)) {
gtk_text_insert(GTK_TEXT(log_text), NULL, NULL, NULL, buff, n);
}
}
It seems to work well but I would like to know if it cause some
problems,
of synchronisation with X11 for example or if Gtk manage with that well.
I also would like to know if I could limit the size/buffer of the
gtk_text
widget ? Or must I verify the size of it when I add something and delete
the oldest lines ? Could I know the number of lines or only number of
characters ?
So many questions...
Thanks
Manu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]