Date: Fri, 10 Jul 1998 22:00:44 -0200 From: Onur Toker <onur@kfupm.edu.sa> To: FREEBSD <freebsd-questions@FreeBSD.ORG> Subject: Multithreaded X11 applications Message-ID: <35A6AB2C.96514834@kfupm.edu.sa>
next in thread | raw e-mail | index | archive | help
Hello,
(1) I am looking for multithreaded X11 application examples (Using
Solaris threads,
and/or POSIX threads). Do you know any that may help me to understand
the current state of
the art ?
(2) If you are an X11 expert, do you know any actual widget library
written
completely in C++ ? All widget libraries that I know are written in C,
and I am just
curious to learn what direction the industry has adopted in the past
couple of years.
To give you a better idea about what I would like to do, I include this
short program
fragment. This is basically what I want to do. WindowThread will be a
"self" managed
GraphicsWindow widget.
#include "Window.h"
#include <stdlib.h>
#include <unistd.h>
#include <iostream.h>
void main(int argc, char **argv)
{
// Initialize the window thread
WindowThread W(10, 10, 100, 100, "TestWin");
// Display the window on the screen
W.disp();
// Initialize the window thread
WindowThread W2(210, 210, 100, 100, "TestWin");
// Display the window on the screen
W2.disp();
// Start the EVENT HANDLER LOOP as a thread
W.start();
// Start the EVENT HANDLER LOOP as a thread
W2.start();
// Plot something
while(1) {
int i;
for (i = 0; i < 100; i++) {
W.plot(rand() % 100, rand() % 100,rand() % 100, rand() % 100);
W.flush();
W2.plot(rand() % 100, rand() % 100,rand() % 100, rand() % 100);
W2.flush();
}
W.clear();
W2.clear();
}
thr_exit(NULL);
}
Thanks,
Onur
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35A6AB2C.96514834>
