Re: Obtaining a location on a Drawing Area via a mouse click.
- From: Leonardo Zide <leonardo centroin com br>
- Cc: gtk-list gnome org
- Subject: Re: Obtaining a location on a Drawing Area via a mouse click.
- Date: Mon, 15 Jan 2001 11:35:41 +0000
Colin Thomas wrote:
> I have connected a function to the button release on the Drawing
> Area (see below), this does not seem to trigger the function call,
> gtk_signal_connect (GTK_OBJECT (guiDrawingArea), "button_press_event",
> GTK_SIGNAL_FUNC (on_guiDrawingArea_button_press_event),
> But even if I managed to get the function call to execute, from where do
> I extract the cursor's location..
Your callback function should look like:
my_func (GtkWidget *widget, GdkEventButton *event, gpointer data);
You can get the mouse position from event->x and event->y
] [Thread Prev