Re: [gtk-list] Re: callback question



robert havoc pennington wrote:
> You need to look at the class structure for the widget, and all parent
> widgets. The function pointers there are the signals you can connect to.

 Ah. I've been playing about, and I see what you mean. Exactly what I was
looking for.
 
> which means if you connect to key_press_event your callback should be:
> gint key_press_cb(GtkWidget * w, GdkEventKey * e, gpointer data);
> Most if not all of the events are in GtkWidget, I think, so for events
> that's the first place to look.

 Heh. I was playing about with the EventBox widget. I set a signal for a
button press event, and tried to: printf(" got me at %d %d\n",
event->button.x, event->button.y) - I was very surprised to eventually find
out that the problem was that x and y are stored as doubles!! Wow. GTK
really is portable, if it uses doubles for x and y pixel resolution!

 Thanks for the tips!
 
Kate

-- 
 "I am Grey. I stand between the candle and the star.
    We are Grey. We stand between the darkness and the light."

John "Kate" Looney, Horizon Open Systems. Sun Microsystems distributor and 
Support centre. Hotline: [+353 1 8055700] Web http://www.hos.horizon.ie/



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