Re: How to trap right mouse button?
- From: Mark Jones <mark jones106 verizon net>
- To: Ana Gutierrez Pascual <al004180 anubis uji es>, gtk-list <gtk-list gnome org>
- Subject: Re: How to trap right mouse button?
- Date: Fri, 17 Jan 2003 13:20:38 -0600
At 10:46 AM 1/17/2003 +0100, Ana Gutierrez Pascual wrote:
Hi list,
My question is how can I trap the right or middle mouse button click?
I know how trap the left mouse click, but I don't know with the others.
thanks.
from:
http://www.gtk.org/tutorial/sec-eventhandling.html
static gint
button_press_event (GtkWidget *widget, GdkEventButton *event)
{
if (event->button == 1 && pixmap != NULL)
draw_brush (widget, event->x, event->y);
return TRUE;
}
Change that 1 to a 2 or 3, and remove the pixmap part from the if clause:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html#GdkEventButton
That should do it.
Mark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]