Re: Obtaining a location on a Drawing Area via a mouse click.

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),
>                       NULL);
> 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


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