Re: [gtk-list] trapping key-press signals at the window level




On Tue, 8 Jun 1999, Duane Johnson wrote:
> I have a case where, if a particular application window is in focus, I want to
> trap all single key-press signals; however, using the usual gtk-signal-connect
> function, my callback function is never called:
> 
>   gtk_signal_connect( GTK_OBJECT( control_window ),
> 		      "key_press_event",
> 		      GTK_SIGNAL_FUNC( control_window_key_press ),
> 		      (gpointer) NULL );
> 
> How can I accomplish this?
>

If control_window is a GtkWindow, I would expect that to work. Hard to
say. Maybe someone else will see the problem.
 
> Also, is there a way to do a "signal dump"?  By that, I mean, is there some
> sort of "debug flag" that will show all GTK signals, from whence they are
> emitted, and if they have been stopped on their way up the hierarchy?
> 

If you build your Gtk with --enable-debug=yes, then you can pass your app
the --gtk-debug=signals flag and it will do something along these lines.
It's a lot of output though. :-)

Havoc




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