diff src/image.c @ 868:db6977f8b0f1

Reduce number of parameters (mostly unused), just pass the event pointer.
author zas_
date Sat, 28 Jun 2008 07:43:37 +0000
parents 8ddd00cc8b69
children ad420f2eb789
line wrap: on
line diff
--- a/src/image.c	Sat Jun 28 00:44:31 2008 +0000
+++ b/src/image.c	Sat Jun 28 07:43:37 2008 +0000
@@ -67,8 +67,7 @@
 
 	if (imd->func_button)
 		{
-		imd->func_button(imd, event->button, event->time,
-				 event->x, event->y, event->state, imd->data_button);
+		imd->func_button(imd, event, imd->data_button);
 		}
 }
 
@@ -81,10 +80,10 @@
 
 	if (imd->func_drag)
 		{
-		imd->func_drag(imd, event->button, event->time,
-				 event->x, event->y, event->state,
-				 (gfloat)(pr->drag_last_x - event->x) / width, (gfloat)(pr->drag_last_y - event->y) / height,
-				 imd->data_button);
+		imd->func_drag(imd, event,
+			       (gfloat)(pr->drag_last_x - event->x) / width,
+			       (gfloat)(pr->drag_last_y - event->y) / height,
+			       imd->data_button);
 		}
 }
 
@@ -880,8 +879,7 @@
 	if (imd->func_scroll &&
 	    event && event->type == GDK_SCROLL)
 		{
-		imd->func_scroll(imd, event->direction, event->time,
-				 event->x, event->y, event->state, imd->data_scroll);
+		imd->func_scroll(imd, event, imd->data_scroll);
 		return TRUE;
 		}
 
@@ -937,7 +935,7 @@
 
 
 void image_set_button_func(ImageWindow *imd,
-			   void (*func)(ImageWindow *, gint button, guint32 time, gdouble x, gdouble y, guint state, gpointer),
+			   void (*func)(ImageWindow *, GdkEventButton *event, gpointer),
 			   gpointer data)
 {
 	imd->func_button = func;
@@ -945,7 +943,7 @@
 }
 
 void image_set_drag_func(ImageWindow *imd,
-			   void (*func)(ImageWindow *, gint button, guint32 time, gdouble x, gdouble y, guint state, gdouble dx, gdouble dy, gpointer),
+			   void (*func)(ImageWindow *, GdkEventButton *event, gdouble dx, gdouble dy, gpointer),
 			   gpointer data)
 {
 	imd->func_drag = func;
@@ -953,7 +951,7 @@
 }
 
 void image_set_scroll_func(ImageWindow *imd,
-			   void (*func)(ImageWindow *, GdkScrollDirection direction, guint32 time, gdouble x, gdouble y, guint state, gpointer),
+			   void (*func)(ImageWindow *, GdkEventScroll *event, gpointer),
 			   gpointer data)
 {
 	imd->func_scroll = func;