Re: Erro with "key-press-event" signal
- From: Michael Natterer <mitch gimp org>
- To: frederico schardong <frede sch gmail com>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: Erro with "key-press-event" signal
- Date: Mon, 31 May 2010 16:19:26 +0200
On Mon, 2010-05-31 at 09:52 -0300, frederico schardong wrote:
> Just a attention error, thank you.
Fixing all compile warnings in your code is usually helpful.
--mitch
> 2010/5/31 David Nečas <yeti physics muni cz>:
> > On Mon, May 31, 2010 at 09:47:26AM -0300, frederico schardong wrote:
> >> I have a window with a callback to resolve the "key-press-event"
> >> signal. The callback is:
> >>
> >> gboolean alterCurrentTab(GtkWidget widget, GdkEventKey *event,
> >> gpointer user_data)
> >> {
> >> g_print("\nkey: %s - %d - %lu", gdk_keyval_name(event->keyval),
> >> event->state, event->hardware_keycode);
> >> return FALSE;
> >> }
> >>
> >> The problem is that the return is always:
> >> key: (null) - -15694833 - 51081
> >>
> >> Obs: I'm using the gtk_widget_set_events(window, GDK_KEY_PRESS_MASK);
> >> on this window.
> >>
> >> What I'm doing wrong?
> >
> > If you really declare the first argument as GtkWidget widget instead of
> > GtkWidget *widget then you get complete rubbish in the function
> > arguments.
> >
> > Yeti
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]