[9463] in The GTK GIMP ToolKit mailing list archive

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

[gtk-list] Re: events_pending

daemon@ATHENA.MIT.EDU (Pauli Virtanen)
Wed Oct 21 06:47:28 1998

From: Pauli Virtanen <virtanen@jytko.jyu.fi>
To: gtk-list@redhat.com
Date: Wed, 21 Oct 1998 13:48:13 +0300 (EETDST)
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Tue, 20 Oct 1998, Pauli Virtanen wrote:
>
> How can I do this in gtk+.

Connect to key_press_event and button_press_event and whatever else you
care about, and have your callbacks do the right thing. Or connect to
plain event, and then do:

switch (event->type) {
case GDK_BUTTON_PRESS:

break;
/* etc */
}

in your callback.

Havoc

Thanx for the reply.
I use 'entry' in the gtk+ as a message window and I use it in two
separate ways:
[snip]
Yes, I can get signals, that's easy, but that wating loop
I can't figure out.

pauli

Hah, it was that easy:

XWarpPointer(dpy, None, window, 0, 0, 0, 0, len, heig/2);
for (;;)  {
  while (gdk_events_pending())  {
    ev = gdk_event_get();
    if (ev->type == GDK_KEY_PRESS)
      message_event(messages, ev);
  }
}

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