lttvwindow_report_time_window : reports the new time window.
lttvwindow_report_current_time : reports the new current time.
lttvwindow_report_dividor : reports the new horizontal dividor's position.
+lttvwindow_report_filter : reports the new filter object
#include <lttv/hook.h>
#include <lttv/tracecontext.h>
#include <lttv/stats.h>
+#include <lttv/filter.h>
#include <lttvwindow/mainwindow.h>
-#include <lttvwindow/lttvfilter.h>
-//FIXME (not ready yet) #include <lttv/filter.h>
/* Module Related API */
LttTime end_time; /* Unset : ltt_time_infinite*/
guint num_events; /* Unset : G_MAXUINT */
LttvTracesetContextPosition *end_position; /* Unset : NULL */
+ gint trace; /* unset : -1 */
+ GArray *hooks; /* Unset : NULL */
LttvHooks *before_chunk_traceset; /* Unset : NULL */
LttvHooks *before_chunk_trace; /* Unset : NULL */
LttvHooks *before_chunk_tracefile;/* Unset : NULL */
} EventsRequest;
/* Maximum number of events to proceed at once in a chunk */
-#define CHUNK_NUM_EVENTS 500
+#define CHUNK_NUM_EVENTS 2000
/**
/**
- * Function to get the current time window of the current tab.
- *
- * @param tab the tab the viewer belongs to.
- * @return the current tab's time interval.
+ * 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
+ * shown time interval of the viewer and also be called by the constructor
+ * of the viewer.
+ * @param tab viewer's tab
+ * @return time window.
*/
TimeWindow lttvwindow_get_time_window(Tab *tab);
* @param filter, a pointer to a filter.
*/
-//FIXME
-typedef void lttv_filter;
-//FIXME
-const lttv_filter *lttvwindow_get_filter(Tab *tab);
+LttvFilter *lttvwindow_get_filter(Tab *tab);
+
+/**
+ * Function to set the filter of the current tab.
+ * It should be called by the filter GUI to tell the
+ * main window to update the filter tab's lttv_filter.
+ *
+ * Notice : the lttv_filter object will be owned by the
+ * main window after the return of this function.
+ * Do NOT desallocate it.
+ *
+ * @param main_win, the main window the viewer belongs to.
+ * @param filter, a pointer to a filter.
+ */
+
+void lttvwindow_report_filter(Tab *tab, LttvFilter *filter);
+
/**
LttvTracesetContext* lttvwindow_get_traceset_context(Tab *tab);
+/* set_time_window
+ *
+ * It updates the time window of the tab, then calls the updatetimewindow
+ * hooks of each viewer.
+ *
+ * This is called whenever the scrollbar value changes.
+ *
+ * This is mostly an internal function.
+ */
+
+void set_time_window(Tab *tab, const TimeWindow *time_window);
+
+
+/* set_current_time
+ *
+ * It updates the current time of the tab, then calls the updatetimewindow
+ * hooks of each viewer.
+ *
+ * This is called whenever the current time value changes.
+ *
+ * This is mostly an internal function.
+ */
+
+void set_current_time(Tab *tab, const LttTime *current_time);
+
#endif //VIEWER_H