[Glade-users] libglade, GtkDrawingArea, GdkEvents ?

oogothoo pop.mail.yahoo.fr@listsmx.ximian.com
Wed, 13 Aug 2003 10:10:01 +0200


Yes, but my problem is :

Only motion_notify_event work.

=2E..

gtk_widget_add_events(glade_xml_get_widget(xml,"drawingarea"),
	GDK_BUTTON_RELEASE_MASK
	| GDK_POINTER_MOTION_MASK);

glade_xml_signal_connect(xml,
	"on_drawingarea_motion_notify_event",
	G_CALLBACK(motion_notify_event));

glade_xml_signal_connect(xml,
	"on_drawingarea_button_release_event",
	G_CALLBACK(button_release_event));

=2E..

The function button_release_event is never call.

???




Le Mercredi 13 Ao=FBt 2003 03:16, Russell Shaw a =E9crit :
> goth goth wrote:
> > Hello,
> >
> > I realise a simple application using libglade 2, Gtk
> > 2.2 : a GtkDrawingArea in a GtkWindow.
> >
> > window : signal destroy connect to gtk_main_quit
> > drawingarea : signals button_release_event and
> > motion_notify_event on two function who g_print event.
> >
> > drawingarea use the string "00000000001000000100" to
> > the GdkEvent (activate GDK_MOTION_NOTIFY_MASK and
> > GDK_BUTTON_RELEASE_MASK).
> >
> > Events are not send : no error message but no action
> > What is the problem ?
>
>  From the docs:
>
>    To receive mouse events on a drawing area, you will
>    need to enable them with gtk_widget_add_events().
>
> _______________________________________________
> Glade-users maillist  -  Glade-users@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-users