#define abs(a) (((a)<0)?(-a):(a))
#define max(a,b) ((a)>(b)?(a):(b))
+/* Number of events between checks for GDK events (stop button) */
+#define CHECK_GDK_INTERVAL 50000
+
/** Array containing instanced objects. Used when module is unloaded */
static GSList *g_event_viewer_data_list = NULL ;
guint32 last_tree_update_time; /* To filter out repeat keys */
+ guint num_events; /* Number of events processed */
+
} EventViewerData ;
/** hook functions for update time interval, current time ... */
double value = new_value - event_viewer_data->previous_value;
+ /* Set stop button status for foreground processing */
+ event_viewer_data->tab->stop_foreground = FALSE;
+
/* See where we have to scroll... */
ScrollDirection direction;
gint relative_position;
/* Mathieu :
* I make the choice not to use the mainwindow lttvwindow API here : the idle
* loop might have a too low priority, and we want good update while
- * scrolling.
+ * scrolling. However, we call the gdk loop to get events periodically so the
+ * processing can be stopped.
*/
lttv_process_traceset_begin(tsc,
NULL, NULL, NULL, event_viewer_data->event_hooks, NULL);
+
+ event_viewer_data->num_events = 0;
lttv_process_traceset_middle(tsc, ltt_time_infinite, G_MAXUINT, NULL);
LttvTracefileState *tfs = (LttvTracefileState*)call_data;
LttEvent *e = ltt_tracefile_get_event(tfc->tf);
+ event_viewer_data->num_events++;
+ if(event_viewer_data->num_events % CHECK_GDK_INTERVAL == 0) {
+ while(gtk_events_pending ())
+ gtk_main_iteration();
+ if(event_viewer_data->tab->stop_foreground)
+ return TRUE;
+ }
+
LttvFilter *filter = event_viewer_data->main_win_filter;
if(filter != NULL && filter->head != NULL)
if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
g_slist_remove_link(tab->events_requests, remove_iter);
}
tab->events_request_pending = FALSE;
+ tab->stop_foreground = TRUE;
g_idle_remove_by_data(tab);
g_assert(g_slist_length(tab->events_requests) == 0);
}
/* Start with empty events requests list */
tab->events_requests = NULL;
tab->events_request_pending = FALSE;
+ tab->stop_foreground = FALSE;
+
g_signal_connect(G_OBJECT(tab->scrollbar), "value-changed",
GSList *events_requests;
gboolean events_request_pending;
LttvAttribute *interrupted_state;
+ gboolean stop_foreground;
};
#endif /* _MAIN_WINDOW_PRIVATE_ */
/usr/include/features.h /usr/include/sys/cdefs.h \
/usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
/usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/bits/mathinline.h /usr/include/glib-2.0/glib.h \
- /usr/include/glib-2.0/glib/galloca.h \
+ /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/galloca.h \
/usr/include/glib-2.0/glib/gtypes.h \
/usr/lib/glib-2.0/include/glibconfig.h \
/usr/include/glib-2.0/glib/gmacros.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/include/bits/wchar.h /usr/include/gconv.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/bits/stdio.h /usr/include/glib-2.0/gmodule.h \
+ /usr/include/glib-2.0/gmodule.h \
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \
/usr/include/pango-1.0/pango/pangocairo.h \
/usr/include/bits/select.h /usr/include/bits/sigset.h \
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
/usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/bits/string.h /usr/include/bits/string2.h \
../../../../ltt/ltt.h ../../../../ltt/time.h ../../../../ltt/compiler.h \
../../../../ltt/event.h ../../../../ltt/type.h ../../../../ltt/trace.h \
../../../../ltt/facility.h ../../../../lttv/lttv/module.h \
/usr/include/bits/mathcalls.h:
-/usr/include/bits/mathinline.h:
-
/usr/include/glib-2.0/glib.h:
/usr/include/glib-2.0/glib/galloca.h:
/usr/include/bits/sys_errlist.h:
-/usr/include/bits/stdio.h:
-
/usr/include/glib-2.0/gmodule.h:
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h:
/usr/include/string.h:
-/usr/include/bits/string.h:
-
-/usr/include/bits/string2.h:
-
../../../../ltt/ltt.h:
../../../../ltt/time.h: