events_pending
- From: Pauli Virtanen <virtanen jytko jyu fi>
- To: gtk-list redhat com
- Subject: events_pending
- Date: Tue, 20 Oct 1998 22:31:25 +0300 (EETDST)
Hi
In my Xaw gui I have a message window in which user can answer questions.
It's coded like this:
XEvent event;
XKeyEvent *ke = (XKeyEvent *)&event;
/* and here's the loop */
for (;;) {
XWindowEvent(dpy, window, ButtonPressMask | KeyPressMask, &event);
if (event.type == ButtonPress && ((XButtonEvent *)&event->button !=
Button1) {
*p = '\0';
XClearArea(dpy, window, 0, 0, 0, 0, False);
return;
}
if (event.type == KeyPress &&
XLookupString(ke, buf, sizeof(buf), &key, NULL) <= 0) {
string = XKeysymToString(key);
etc..........
}
}
How can I do this in gtk+.
I've tried many tricks, but none works.
pauli
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]