Re: Which mouse button has been pressed?
- From: Satyajit Kanungo <satyajit kanungo wipro com>
- To: bombadil wanadoo es
- Cc: Desarrollo con GTK+ <gtk-app-devel-list gnome org>
- Subject: Re: Which mouse button has been pressed?
- Date: Fri, 27 Sep 2002 14:36:47 +0530
Hi,
you can do something like this in the callback ( though I guess you
can't find out double clicks , it will be true for two individual clicks
also )
void mouseevent_callback(GtkWidget *widget, GdkEventButton *event,
gpointer data)
{
/*both buttons of the nouse clicked*/
if(event->state == 256)
{ }
/* double click of the mouse */
if(event->type == GDK_2BUTTON_PRESS)
{ }
/* left button of mouse is clicked */
if(event->button == 1)
{ }
/* right button of mouse is clicked */
if(event->button == 3)
{}
}
regds
satya
bombadil wanadoo es wrote:
Hello all.
How can I know inside "clicked" callback function which mouse button
has been pressed? Is there any info about this in the docs?.
Thanks.
David
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]