X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Flttvwindow.h;h=1533ae240e7330ee4c9dc91078781b59542a1fa7;hb=8e680509351245867a89f5647c7b926af7652f17;hp=b4dea0e7e914e94b20c6b81702da9b8bfad30131;hpb=0aa6c3a15541d012d2ab10034090490fc2a2d1ca;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 b4dea0e7..1533ae24 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h @@ -119,8 +119,7 @@ Available report methods are : 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_focus : One on the widgets in the viewer has the keyboard's - focus from GTK. +lttvwindow_report_filter : reports the new filter object @@ -240,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. @@ -258,17 +257,16 @@ FIXME : explain other important events #include #include #include +#include #include -#include -//FIXME (not ready yet) #include /* Module Related API */ +/* GQuark containing constructors of viewers in global attributes */ +extern GQuark LTTV_VIEWER_CONSTRUCTORS; /* constructor a the viewer */ -//FIXME explain LttvTracesetSelector and key -typedef GtkWidget * (*lttvwindow_viewer_constructor) - (Tab *tab, LttvTracesetSelector * s, char *key); +typedef GtkWidget* (*lttvwindow_viewer_constructor)(Tab *tab); /** @@ -278,7 +276,8 @@ typedef GtkWidget * (*lttvwindow_viewer_constructor) * window. * * It should be called by init function of the module. - * + * + * @param name name of the viewer : mainly used as tag for constructor * @param menu_path path of the menu item. NULL : no menu entry. * @param menu_text text of the menu item. * @param pixmap Image shown on the toolbar item. NULL : no button. @@ -287,7 +286,8 @@ typedef GtkWidget * (*lttvwindow_viewer_constructor) */ void lttvwindow_register_constructor - (char * menu_path, + (char * name, + char * menu_path, char * menu_text, char ** pixmap, char * tooltip, @@ -559,22 +559,22 @@ void lttvwindow_unregister_dividor(Tab *tab, * Function to set the time interval of the current tab.a * * @param tab the tab the viewer belongs to. - * @param time_interval pointer to the time interval value. + * @param time_interval new time window. */ void lttvwindow_report_time_window(Tab *tab, - const TimeWindow *time_window); + TimeWindow time_window); /** * Function to set the current time/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 time a pointer where time is stored. + * @param new current time. */ void lttvwindow_report_current_time(Tab *tab, - const LttTime *time); + LttTime time); /** @@ -588,18 +588,6 @@ void lttvwindow_report_current_time(Tab *tab, void lttvwindow_report_dividor(Tab *tab, gint position); -/** - * Function to set the focused viewer of the tab. - * It will be called by a viewer's signal handle associated with - * the grab_focus signal of all widgets in the viewer. - * - * @param tab the tab the viewer belongs to. - * @param top_widget the top widget containing all the other widgets of the - * viewer. - */ -void lttvwindow_report_focus(Tab *tab, - GtkWidget *top_widget); - /* Structure sent to the events request hook */ /* Value considered as empty*/ @@ -613,6 +601,8 @@ typedef struct _EventsRequest { 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 */ @@ -626,7 +616,7 @@ typedef struct _EventsRequest { } EventsRequest; /* Maximum number of events to proceed at once in a chunk */ -#define CHUNK_NUM_EVENTS 200 +#define CHUNK_NUM_EVENTS 6000 /** @@ -668,10 +658,12 @@ void lttvwindow_events_request_remove_all(Tab *tab, /** - * 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); @@ -693,10 +685,23 @@ LttTime lttvwindow_get_current_time(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); + /** @@ -720,4 +725,32 @@ LttvTracesetStats* lttvwindow_get_traceset_stats(Tab *tab); LttvTracesetContext* lttvwindow_get_traceset_context(Tab *tab); -#endif //VIEWER_H +/* 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); + + +void events_request_free(EventsRequest *events_request); + +#endif //LTTVWINDOW_H