Re: How to simulate a event (keystroke) in GTK



Hi,

On Wed, 2002-08-14 at 16:08, Carlos Savoretti wrote:
> 
> Hello:
> 
> This program do not use gtk_main() and I need some keystrokes read from
> 
> 'stdin' be sent as event to the main window previously created.

You can use gdk_event_put().  This will queue a copy of the given event,
so you need iterate the main context to make gtk process it.  I think
the usual way to do this is

while (gtk_events_pending ()) gtk_main_iteration ();

Regards,
Gustavo





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]