#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 ;
/* Set stop button status for foreground processing */
event_viewer_data->tab->stop_foreground = FALSE;
+ lttvwindow_events_request_disable();
/* See where we have to scroll... */
ScrollDirection direction;
gdk_x11_get_server_time(
gtk_widget_get_parent_window(event_viewer_data->tree_v));
+ lttvwindow_events_request_enable();
+
return;
}
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();
+ gtk_main_iteration();
if(event_viewer_data->tab->stop_foreground)
return TRUE;
}
+ event_viewer_data->num_events++;
LttvFilter *filter = event_viewer_data->main_win_filter;
if(filter != NULL && filter->head != NULL)
extern GSList * g_main_window_list;
+gint lttvwindow_preempt_count = 0;
+
/* set_time_window
*
* It updates the time window of the tab, then calls the updatetimewindow
}
-
-
/**
* Function to get the current time interval shown on the current tab.
* It will be called by a viewer's hook function to update the
/* constructor a the viewer */
typedef GtkWidget* (*lttvwindow_viewer_constructor)(LttvPlugin *plugin);
+extern gint lttvwindow_preempt_count;
+
+#define CHECK_GDK_INTERVAL 50000
/**
* Function to register a view constructor so that main window can generate
void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos);
+
+/**
+ * Function to disable the EventsRequests scheduler, nestable.
+ *
+ */
+static inline void lttvwindow_events_request_disable(void)
+{
+ lttvwindow_preempt_count++;
+}
+
+/**
+ * Function to restore the EventsRequests scheduler, nestable.
+ *
+ */
+static inline void lttvwindow_events_request_enable(void)
+{
+ lttvwindow_preempt_count--;
+}
+
+
+
+
+
+
+
+
#endif //LTTVWINDOW_H