Re: how can I emit a key-press-event?
- From: Tommi Komulainen <tommi komulainen nokia com>
- To: gtk-app-devel-list gnome org
- Subject: Re: how can I emit a key-press-event?
- Date: Mon, 05 Jul 2004 10:45:55 +0300
On Fri, 2004-07-02 at 20:32, ext Juhana Sadeharju wrote:
Just include it to your message, like I have included the code
below. Short good examples are better if they are in the mail archives
and not as dead urls later.
Well, I think short good examples should be in the documentation, but
that's just me. But you're right. I blame lack of caffeine for my
earlier blunder. :)
/* synthesize Alt+O key press */
event = gdk_event_new (GDK_KEY_PRESS);
event->key.window = widget->window;
This line should actually read:
event->key.window = g_object_ref (widget->window);
Otherwise you'll get interesting error messages later on if you destroy
widgets. Took some time to figure out for myself. :)
--
Tommi Komulainen <tommi komulainen nokia com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]