[9455] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] events_pending

daemon@ATHENA.MIT.EDU (Pauli Virtanen)
Tue Oct 20 15:30:33 1998

From: Pauli Virtanen <virtanen@jytko.jyu.fi>
To: gtk-list@redhat.com
Date: Tue, 20 Oct 1998 22:31:25 +0300 (EETDST)
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

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

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post