X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Flttvwindow.h;h=e690ec570c70a62f1e7cea84a04de55fc2c30a11;hb=0be5d43de2734bacc37b4505237f064d57a474d0;hp=514598fb0b059b0f67eae27fb6bc6e32b2385390;hpb=5b962ad03379ff7378f10af31c3e4bdb4e83dffc;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h index 514598fb..e690ec57 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h @@ -239,8 +239,8 @@ FIXME : explain other important events */ -#ifndef VIEWER_H -#define VIEWER_H +#ifndef LTTVWINDOW_H +#define LTTVWINDOW_H /*! \file lttvwindow.h * \brief API used by the graphical viewers to interact with their top window. @@ -259,6 +259,7 @@ FIXME : explain other important events #include #include #include +#include /* Module Related API */ @@ -266,7 +267,7 @@ FIXME : explain other important events extern GQuark LTTV_VIEWER_CONSTRUCTORS; /* constructor a the viewer */ -typedef GtkWidget* (*lttvwindow_viewer_constructor)(Tab *tab); +typedef GtkWidget* (*lttvwindow_viewer_constructor)(LttvPlugin *plugin); /** @@ -486,6 +487,18 @@ void lttvwindow_unregister_filter_notify(Tab *tab, gpointer hook_data); +/** + * Function to get the current filter of the main window : useful at viewer + * instanciation. + * + * @param tab the tab the viewer belongs to. + * + * returns : the current filter. + */ + + +LttvFilter *lttvwindow_get_filter(Tab *tab); + /** * Function to register a hook function for a viewer to set/update its * current time. @@ -516,6 +529,37 @@ void lttvwindow_unregister_current_time_notify(Tab *tab, LttvHook hook, gpointer hook_data); +/** + * Function to register a hook function for a viewer to set/update its + * current position. + * + * @param tab the tab the viewer belongs to. + * @param hook hook function of the viewer that updates the current time. The + * call_data is a LttTime* representing the new current time. + * @param hook_data hook data associated with the hook function. It will + * be typically a pointer to the viewer's data structure. + */ + +void lttvwindow_register_current_position_notify(Tab *tab, + LttvHook hook, + gpointer hook_data); + + +/** + * Function to unregister a viewer's hook function which is used to + * set/update the current position of the viewer. + * @param tab the tab the viewer belongs to. + * @param hook hook function of the viewer that updates the current time. The + * call_data is a LttTime* representing the new current time. + * @param hook_data hook data associated with the hook function. It will + * be typically a pointer to the viewer's data structure. + */ + +void lttvwindow_unregister_current_position_notify(Tab *tab, + LttvHook hook, + gpointer hook_data); + + /** * Function to register a hook function for a viewer to set/update the @@ -566,17 +610,28 @@ void lttvwindow_report_time_window(Tab *tab, TimeWindow time_window); /** - * Function to set the current time/event of the current tab. + * Function to set the current time of the current tab. * It will be called by a viewer's signal handle associated with * the button-release-event signal * @param tab the tab the viewer belongs to. - * @param new current time. + * @param time current time. */ void lttvwindow_report_current_time(Tab *tab, LttTime time); +/** + * Function to set the current event of the current tab. + * It will be called by a viewer's signal handle associated with + * the button-release-event signal + * @param tab the tab the viewer belongs to. + * @param pos the current position. + */ + +void lttvwindow_report_current_position(Tab *tab, + LttvTracesetContextPosition *pos); + /** * Function to set the position of the hpane's dividor (viewer). * It will typically be called by a viewer's signal handle associated @@ -616,7 +671,7 @@ typedef struct _EventsRequest { } EventsRequest; /* Maximum number of events to proceed at once in a chunk */ -#define CHUNK_NUM_EVENTS 2000 +#define CHUNK_NUM_EVENTS 6000 /** @@ -657,6 +712,22 @@ void lttvwindow_events_request_remove_all(Tab *tab, gconstpointer viewer); +/** + * Function to see if there are events request pending. + * + * It tells if events requests are pending. Useful for checks in some events, + * i.e. detailed event list scrolling. + * + * @param tab the tab the viewer belongs to. + * @param viewer a pointer to the viewer data structure + * @return : TRUE is events requests are pending, else FALSE. + */ + +gboolean lttvwindow_events_request_pending(Tab *tab); + + + + /** * 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 @@ -685,7 +756,7 @@ LttTime lttvwindow_get_current_time(Tab *tab); * @param filter, a pointer to a filter. */ -lttv_filter *lttvwindow_get_filter(Tab *tab); +//LttvFilter *lttvwindow_get_filter(Tab *tab); /** * Function to set the filter of the current tab. @@ -700,7 +771,7 @@ lttv_filter *lttvwindow_get_filter(Tab *tab); * @param filter, a pointer to a filter. */ -void lttvwindow_report_filter(Tab *tab, lttv_filter *filter); +void lttvwindow_report_filter(Tab *tab, LttvFilter *filter); @@ -750,4 +821,10 @@ void set_time_window(Tab *tab, const TimeWindow *time_window); void set_current_time(Tab *tab, const LttTime *current_time); -#endif //VIEWER_H +void events_request_free(EventsRequest *events_request); + +GtkWidget *main_window_get_widget(Tab *tab); + +void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos); + +#endif //LTTVWINDOW_H