static gboolean
scroll_event(GtkWidget * widget, GdkEventScroll * event, gpointer data)
{
- g_signal_handlers_disconnect_by_func(G_OBJECT(view->drawing_area),scroll_event,NULL);
- if(event->direction==0)
- view->mouse.dx = -30;
- if(event->direction==1)
- view->mouse.dx = 30;
- glmotion_zoom(view);
- glexpose();
-// g_signal_handlers_unblock_by_func(G_OBJECT(view->drawing_area),scroll_event,NULL);
- g_signal_connect(G_OBJECT(view->drawing_area), "scroll_event",G_CALLBACK(scroll_event), NULL);
+ gdouble seconds;
+ static int callcount=0;
+ int fr;
+ seconds=g_timer_elapsed(view->timer2,NULL);
+ if (seconds > 0.005)
+ {
+ g_timer_stop(view->timer2);
+ if(event->direction==0)
+ view->mouse.dx=-30;
+ if(event->direction==1)
+ view->mouse.dx=+30;
+ glmotion_zoom(view);
+ glexpose();
+ g_timer_start(view->timer2);
+
+ }
return TRUE;
}
view->Topview->parms.repos.distortion = 1.0;
/*create timer*/
view->timer=g_timer_new();
+ view->timer2=g_timer_new();
+
g_timer_stop(view->timer);
view->active_frame=0;
view->total_frames=1500;