How to trap mouse motion, mouse up, and wheel events?



I posted yesterday, but perhaps I was not clear.

I have code that works trapping mouse and key presses.
It registers for callbacks using the following line:
  gtk_widget_set_events(GTK_WIDGET(glarea),GDK_ALL_EVENTS_MASK);


The following signal connect requests are made:
  gtk_signal_connect (GTK_OBJECT(glarea), "motion_notify_event",
                      GTK_SIGNAL_FUNC(glarea_motion_notify), NULL);


I see in the gtk docs for 2.8 that this function is deprecated, and that
I should use:

g_signal_connect(instance, detailed_signal, c_handler, data)


I do not see examples of how to use g_signal_connect and would
appreciate some help, perhaps an example?

Right now, the code does not trap mouse motion, mouse up, or wheel
events, but it does trap key clicks and mouse presses.

Can someone please tell me what is wrong? Is it that the code is
deprecated? Is there something I am doing wrong?

thanks!




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