events_pending



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]