From 491f466ff1caf5b368f62ba3654f84263424b38b Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 4 May 2004 23:09:57 +0000 Subject: [PATCH] remove all _api functions and calls git-svn-id: http://ltt.polymtl.ca/svn@513 04897980-b3bd-0310-b5e0-8ef037075253 --- .../gui/lttvwindow/lttvwindow/callbacks.c | 8 +- .../gui/lttvwindow/lttvwindow/viewer.c | 121 +----------------- .../gui/lttvwindow/lttvwindow/viewer.h | 81 +----------- 3 files changed, 8 insertions(+), 202 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index ecbde8e7..8a228fba 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -378,7 +378,7 @@ unsigned get_max_event_number(MainWindow * mw_data) /* redraw_viewer parses the traceset first by calling - * process_traceset_api, then display all viewers of + * process_traceset, then display all viewers of * the current tab */ @@ -388,6 +388,9 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window) GdkWindow * win; GdkCursor * new; GtkWidget* widget; + LttvTracesetContext *tsc = + LTTV_TRACESET_CONTEXT(main_win->current_tab->traceset_info-> + traceset_context); //set the cursor to be X shape, indicating that the computer is busy in doing its job new = gdk_cursor_new(GDK_X_CURSOR); @@ -403,7 +406,8 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window) max_nb_events = get_max_event_number(mw_data); - process_traceset_api(mw_data, time_window->start_time, + lttv_process_traceset_seek_time(tsc, time_window->start_time); + lttv_process_traceset(tsc, ltt_time_add(time_window->start_time,time_window->time_width), max_nb_events); diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c index c25ddf31..0f109283 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c @@ -671,131 +671,12 @@ void set_hpane_dividor(MainWindow *main_win, gint position) lttv_hooks_call(tmp, &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 process_traceset_api(MainWindow *main_win, LttTime start, - LttTime end, unsigned maxNumEvents) -{ - lttv_process_traceset_seek_time( - LTTV_TRACESET_CONTEXT(main_win->current_tab->traceset_info-> - traceset_context), - start); - lttv_process_traceset( - LTTV_TRACESET_CONTEXT(main_win->current_tab->traceset_info-> - traceset_context), - end, - 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 context_add_hooks_api(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) -{ - LttvTracesetContext * tsc = - LTTV_TRACESET_CONTEXT(main_win->current_tab->traceset_info-> - traceset_context); - lttv_traceset_context_add_hooks(tsc,before_traceset,after_traceset, - check_trace,before_trace,after_trace, - check_tracefile,before_tracefile,after_tracefile, - check_event,before_event, 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 context_remove_hooks_api(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) -{ - LttvTracesetContext * tsc = - LTTV_TRACESET_CONTEXT(main_win->current_tab->traceset_info->traceset_context); - lttv_traceset_context_remove_hooks(tsc,before_traceset,after_traceset, - check_trace,before_trace,after_trace, - check_tracefile,before_tracefile,after_tracefile, - check_event,before_event, after_event); -} - - -/** - * Function to add/remove event hooks for state - * @param main_win the main window the viewer belongs to. - */ - -void state_add_event_hooks_api(MainWindow *main_win ) -{ - lttv_state_add_event_hooks( - (LttvTracesetState*)main_win->current_tab->traceset_info->traceset_context); -} - -void state_remove_event_hooks_api(MainWindow *main_win ) -{ - lttv_state_remove_event_hooks( - (LttvTracesetState*)main_win->current_tab->traceset_info->traceset_context); -} - - -/** - * Function to add/remove event hooks for stats - * @param main_win the main window the viewer belongs to. - */ - -void stats_add_event_hooks_api(MainWindow *main_win ) -{ - lttv_stats_add_event_hooks( - (LttvTracesetStats*)main_win->current_tab->traceset_info->traceset_context); -} - -void stats_remove_event_hooks_api(MainWindow *main_win ) -{ - lttv_stats_remove_event_hooks( - (LttvTracesetStats*)main_win->current_tab->traceset_info->traceset_context); -} - /** * Function to get the stats of the traceset * @param main_win the main window the viewer belongs to. */ -LttvTracesetStats* get_traceset_stats_api(MainWindow *main_win) +LttvTracesetStats* get_traceset_stats(MainWindow *main_win) { return main_win->current_tab->traceset_info->traceset_context; } diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h index aa9e6d99..906093aa 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h @@ -19,7 +19,6 @@ /* This file is what every viewer plugin writer should refer to. -- Remove the _api functions which add nothing - streamline the rest. A viewer plugin is, before anything, a plugin. It thus has an init and @@ -424,66 +423,6 @@ void unreg_update_dividor(LttvHook hook, gpointer hook_data, void set_hpane_dividor(MainWindow *main_win, gint position); -/* -CHECK These functions really should not appear here. Directr calls would -be OK unless there is a linker problem. -*/ -/** - * 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 process_traceset_api(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 context_add_hooks_api(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 context_remove_hooks_api(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. @@ -494,29 +433,11 @@ void context_remove_hooks_api(MainWindow *main_win , void get_traceset_time_span(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 state_add_event_hooks_api(MainWindow *main_win ); -void state_remove_event_hooks_api(MainWindow *main_win ); - - -/** - * Function to add/remove event hooks for stats - * @param main_win the main window the viewer belongs to. - */ - -void stats_add_event_hooks_api(MainWindow *main_win ); -void stats_remove_event_hooks_api(MainWindow *main_win ); - - /** * Function to get the stats of the traceset * @param main_win the main window the viewer belongs to. */ -LttvTracesetStats* get_traceset_stats_api(MainWindow *main_win); +LttvTracesetStats* get_traceset_stats(MainWindow *main_win); LttvTracesetContext* get_traceset_context(MainWindow *main_win); -- 2.34.1