following GTK convention
[lttv.git] / ltt / branches / poly / include / lttv / gtkTraceSet.h
index 03911d74cce34375c01ed689a9f8e319dd2e8eda..ce2a37ef2a47e9ba609dc827628809087c12124b 100644 (file)
@@ -13,6 +13,8 @@
 #include <gtk/gtk.h>
 #include <ltt/ltt.h>
 #include <lttv/hook.h>
+#include <lttv/common.h>
+#include <lttv/stats.h>
 
 /**
  * Function to register a view constructor so that main window can generate
@@ -23,7 +25,7 @@
  * @param view_constructor constructor of the viewer. 
  */
 
-void ToolbarItemReg(gchar **ButtonPixmap, char *tooltip, void *view_constructor);
+void ToolbarItemReg(char ** pixmap, char *tooltip, lttv_constructor view_constructor);
 
 
 /**
@@ -34,7 +36,7 @@ void ToolbarItemReg(gchar **ButtonPixmap, char *tooltip, void *view_constructor)
  * a reference to find out where the pixmap and tooltip are.
  */
 
-void ToolbarItemUnreg(void *view_constructor);
+void ToolbarItemUnreg(lttv_constructor view_constructor);
 
 
 /**
@@ -46,7 +48,7 @@ void ToolbarItemUnreg(void *view_constructor);
  * @param view_constructor constructor of the viewer. 
  */
 
-void MenuItemReg(char *menu_path, char *menu_text, void *view_constructor);
+void MenuItemReg(char *menu_path, char *menu_text, lttv_constructor view_constructor);
 
 
 /**
@@ -57,7 +59,7 @@ void MenuItemReg(char *menu_path, char *menu_text, void *view_constructor);
  * a reference to find out where the menu_path and menu_text are.
  */
 
-void MenuItemUnreg(void *view_constructor);
+void MenuItemUnreg(lttv_constructor view_constructor);
 
 
 /**
@@ -95,15 +97,15 @@ void UpdateStatus(MainWindow *main_win, char *info);
 
 
 /**
- * Function to get the current time interval of the current tab.
+ * Function to get the current time window of the current tab.
  * It will be called by a viewer's hook function to update the 
- * time interval of the viewer and also be called by the constructor
+ * time window of the viewer and also be called by the constructor
  * of the viewer.
  * @param main_win the main window the viewer belongs to.
  * @param time_interval a pointer where time interval will be stored.
  */
 
-void GetTimeInterval(MainWindow *main_win, TimeInterval *time_interval);
+void GetTimeWindow(MainWindow *main_win, TimeWindow *time_window);
 
 
 /**
@@ -114,18 +116,22 @@ void GetTimeInterval(MainWindow *main_win, TimeInterval *time_interval);
  * @param time_interval a pointer where time interval is stored.
  */
 
-void SetTimeInterval(MainWindow *main_win, TimeInterval *time_interval);
+void SetTimeWindow(MainWindow *main_win, TimeWindow *time_window);
 
+/**
+ * Function to get the time span of the main window's traceset.
+ */
+void GetTracesetTimeSpan(MainWindow *main_win, TimeInterval *time_interval);
 
 /**
  * Function to get the current time/event of the current tab.
  * It will be called by a viewer's hook function to update the 
  * current time/event of the viewer.
  * @param main_win the main window the viewer belongs to.
- * @param ltt_time a pointer where time will be stored.
+ * @param time a pointer where time will be stored.
  */
 
-void GetCurrentTime(MainWindow *main_win, ltt_time *time);
+void GetCurrentTime(MainWindow *main_win, LttTime *time);
 
 
 /**
@@ -133,10 +139,10 @@ void GetCurrentTime(MainWindow *main_win, ltt_time *time);
  * It will be called by a viewer's signal handle associated with 
  * the button-release-event signal
  * @param main_win the main window the viewer belongs to.
- * @param ltt_time a pointer where time is stored.
+ * @param time a pointer where time is stored.
  */
 
-void SetCurrentTime(MainWindow *main_win, ltt_time *time);
+void SetCurrentTime(MainWindow *main_win, LttTime *time);
 
 
 /**
@@ -147,7 +153,7 @@ void SetCurrentTime(MainWindow *main_win, ltt_time *time);
  * @param traceset a pointer to a traceset.
  */
 
-void GetTraceset(MainWindow *main_win, Traceset *traceset);
+//void GetTraceset(MainWindow *main_win, Traceset *traceset);
 
 
 /**
@@ -158,19 +164,19 @@ void GetTraceset(MainWindow *main_win, Traceset *traceset);
  * @param filter, a pointer to a filter.
  */
 
-void GetFilter(MainWindow *main_win, Filter *filter);
+//void GetFilter(MainWindow *main_win, Filter *filter);
 
 
 /**
  * Function to register a hook function for a viewer to set/update its
  * time interval.
  * It will be called by the constructor of the viewer.
- * @param hook hook function of the viewer.
+ * @param hook hook function of the viewer. Takes a TimeInterval* as call_data.
  * @param hook_data hook data associated with the hook function.
  * @param main_win the main window the viewer belongs to.
  */
 
-void RegUpdateTimeInterval(lttv_hook *hook, TimeInterval *hook_data,
+void RegUpdateTimeInterval(LttvHook hook, gpointer hook_data,
                           MainWindow * main_win);
 
 
@@ -178,12 +184,12 @@ void RegUpdateTimeInterval(lttv_hook *hook, TimeInterval *hook_data,
  * Function to unregister a viewer's hook function which is used to 
  * set/update the time interval of the viewer.
  * It will be called by the destructor of the viewer.
- * @param hook hook function of the viewer.
+ * @param hook hook function of the viewer. Takes a TimeInterval as call_data.
  * @param hook_data hook data associated with the hook function.
  * @param main_win the main window the viewer belongs to.
  */
 
-void UnregUpdateTimeInterval(lttv_hook *hook, TimeInterval *hook_data,
+void UnregUpdateTimeInterval(LttvHook hook, gpointer hook_data,
                             MainWindow * main_win);
 
 
@@ -196,7 +202,7 @@ void UnregUpdateTimeInterval(lttv_hook *hook, TimeInterval *hook_data,
  * @param main_win the main window the viewer belongs to.
  */
 
-void RegUpdateTraceset(lttv_hook *hook, Traceset *hook_data,
+void RegUpdateTraceset(LttvHook hook, gpointer hook_data,
                       MainWindow * main_win);
 
 
@@ -209,7 +215,7 @@ void RegUpdateTraceset(lttv_hook *hook, Traceset *hook_data,
  * @param main_win the main window the viewer belongs to.
  */
 
-void UnregUpdateTraceset(lttv_hook *hook, Traceset *hook_data,
+void UnregUpdateTraceset(LttvHook hook, gpointer hook_data,
                         MainWindow * main_win);
 
 
@@ -222,7 +228,7 @@ void UnregUpdateTraceset(lttv_hook *hook, Traceset *hook_data,
  * @param main_win the main window the viewer belongs to.
  */
 
-void RegUpdateFilter(lttv_hook *hook, Filter *hook_data, 
+void RegUpdateFilter(LttvHook hook, gpointer hook_data, 
                     MainWindow *main_win);
 
 
@@ -235,7 +241,7 @@ void RegUpdateFilter(lttv_hook *hook, Filter *hook_data,
  * @param main_win the main window the viewer belongs to.
  */
 
-void UnregUpdateFilter(lttv_hook *hook, Filter *hook_data,
+void UnregUpdateFilter(LttvHook hook,  gpointer hook_data,
                       MainWindow * main_win);
 
 
@@ -248,7 +254,7 @@ void UnregUpdateFilter(lttv_hook *hook, Filter *hook_data,
  * @param main_win the main window the viewer belongs to.
  */
 
-void RegUpdateCurrentTime(lttv_hook *hook, ltt_time *hook_data, 
+void RegUpdateCurrentTime(LttvHook hook, gpointer hook_data, 
                          MainWindow *main_win);
 
 
@@ -261,7 +267,145 @@ void RegUpdateCurrentTime(lttv_hook *hook, ltt_time *hook_data,
  * @param main_win the main window the viewer belongs to.
  */
 
-void UnregUpdateCurrentTime(lttv_hook *hook, ltt_time *hook_data,
+void UnregUpdateCurrentTime(LttvHook hook, gpointer hook_data,
                            MainWindow * main_win);
 
 
+/**
+ * Function to set the focused pane (viewer).
+ * It will be called by a viewer's signal handle associated with 
+ * the grab_focus signal
+ * @param main_win the main window the viewer belongs to.
+ * @param paned a pointer to a pane where the viewer is contained.
+ */
+
+void SetFocusedPane(MainWindow *main_win, gpointer paned);
+
+
+/**
+ * Function to register a hook function for a viewer to set/update the 
+ * dividor of the hpane.
+ * It will be called by the constructor of the viewer.
+ * @param hook hook function of the viewer.
+ * @param hook_data hook data associated with the hook function.
+ * @param main_win the main window the viewer belongs to.
+ */
+
+void RegUpdateDividor(LttvHook hook, gpointer hook_data, 
+                     MainWindow *main_win);
+
+
+/**
+ * Function to unregister a viewer's hook function which is used to 
+ * set/update hpane's dividor of the viewer.
+ * It will be called by the destructor of the viewer.
+ * @param hook hook function of the viewer.
+ * @param hook_data hook data associated with the hook function.
+ * @param main_win the main window the viewer belongs to.
+ */
+
+void UnregUpdateDividor(LttvHook hook, gpointer hook_data, 
+                       MainWindow *main_win);
+
+
+/**
+ * Function to set the position of the hpane's dividor (viewer).
+ * It will be called by a viewer's signal handle associated with 
+ * the motion_notify_event event/signal
+ * @param main_win the main window the viewer belongs to.
+ * @param position position of the hpane's dividor.
+ */
+
+void SetHPaneDividor(MainWindow *main_win, gint position);
+
+
+/**
+ * Function to process traceset. It will call lttv_process_trace, 
+ * each view will call this api to get events.
+ * @param main_win the main window the viewer belongs to.
+ * @param start the start time of the first event to be processed.
+ * @param end the end time of the last event to be processed.
+ */
+
+void processTraceset(MainWindow *main_win, LttTime start, 
+                    LttTime end, unsigned maxNumEvents);
+
+
+/**
+ * Function to add hooks into the context of a traceset,
+ * before reading events from traceset, viewer will call this api to
+ * register hooks
+ * @param main_win the main window the viewer belongs to.
+ * @param LttvHooks hooks to be registered.
+ */
+
+void contextAddHooks(MainWindow *main_win ,
+                    LttvHooks *before_traceset, 
+                    LttvHooks *after_traceset,
+                    LttvHooks *check_trace, 
+                    LttvHooks *before_trace, 
+                    LttvHooks *after_trace, 
+                    LttvHooks *check_tracefile,
+                    LttvHooks *before_tracefile,
+                    LttvHooks *after_tracefile,
+                    LttvHooks *check_event, 
+                    LttvHooks *before_event, 
+                    LttvHooks *after_event);
+
+
+/**
+ * Function to remove hooks from the context of a traceset,
+ * before reading events from traceset, viewer will call this api to
+ * unregister hooks
+ * @param main_win the main window the viewer belongs to.
+ * @param LttvHooks hooks to be registered.
+ */
+
+void contextRemoveHooks(MainWindow *main_win ,
+                       LttvHooks *before_traceset, 
+                       LttvHooks *after_traceset,
+                       LttvHooks *check_trace, 
+                       LttvHooks *before_trace, 
+                       LttvHooks *after_trace, 
+                       LttvHooks *check_tracefile,
+                       LttvHooks *before_tracefile,
+                       LttvHooks *after_tracefile,
+                       LttvHooks *check_event, 
+                       LttvHooks *before_event, 
+                       LttvHooks *after_event);
+
+
+/**
+ * Function to get the life span of the traceset
+ * @param main_win the main window the viewer belongs to.
+ * @param start start time of the traceset.
+ * @param end end time of the traceset.
+ */
+
+void getTracesetTimeSpan(MainWindow *main_win, TimeInterval *time_span);
+
+
+/**
+ * Function to add/remove event hooks for state 
+ * @param main_win the main window the viewer belongs to.
+ */
+
+void stateAddEventHooks(MainWindow *main_win );
+void stateRemoveEventHooks(MainWindow *main_win );
+
+
+/**
+ * Function to add/remove event hooks for stats 
+ * @param main_win the main window the viewer belongs to.
+ */
+
+void statsAddEventHooks(MainWindow *main_win );
+void statsRemoveEventHooks(MainWindow *main_win );
+
+
+/**
+ * Function to get the stats of the traceset 
+ * @param main_win the main window the viewer belongs to.
+ */
+
+LttvTracesetStats* getTracesetStats(MainWindow *main_win);
This page took 0.029619 seconds and 4 git commands to generate.