Mouse and Gtk
- From: Romain <romain parmantier wanadoo fr>
- To: gtk-list gnome org
- Subject: Mouse and Gtk
- Date: Mon, 28 Apr 2003 20:00:45 +0200
Hi,
I try to catch coordonates of the mouse and I didn't success.
I don't understant why my code doesn't run.
I do the following things :
#I connect a function to my gtk object (a gtk_window) with the line :
gtk_signal_connect(GTK_OBJECT(Window),"button_press_event",(GtkSignalFunc)catch_mouse,NULL);
#The prototype of the function catch_mouse is :
gboolean catch_mouse(GtkWidget *Window, GdkEventButton *event, gpointer user);
#In this function, I test the event with the following code :
if(event->type == GDK_BUTTON_PRESS)
{
/* my code, example*/
printf("x %d y %d\n",event->x, event->y);
}
I use a notebook under Debian with a touchpad and GTKI+ 1.2.9. I don't thing my
notebook prevents execution.
More, I develop this project under MacOS X, it runs (the graphic interface) but
I don't catch coordonates of the mouse.
C stor
--
* Romain PARMANTIER <--- EPITA ---> [## parman_r ##] tel: 01-45-59-03-88 *
* a.k.a C stor <-PROMO 2005-> [### Ing 1 ###] tel: 06-07-66-16-18 *
* plus d'info : finger parman_r [#delegue Gr C#] UIN: 26512401 *
* GnuPG : B343 656 0 F94B CDE1 1D9F 23D2 1D7E E2CA 1B89 A78E *
"Tout être vivant est un suspect qui s'ignore"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]