*
* This plugin adds a Events Viewer functionnality to Linux TraceToolkit
* GUI when this plugin is loaded. The init and destroy functions add the
- * viewer's insertion menu item and toolbar icon by calling gtkTraceSet's
+ * viewer's insertion menu item and toolbar icon by calling viewer.h's
* API functions. Then, when a viewer's object is created, the constructor
* creates ans register through API functions what is needed to interact
* with the TraceSet window.
#include <lttv/module.h>
#include <lttv/hook.h>
-#include <lttvwindow/gtktraceset.h>
+#include <lttvwindow/viewer.h>
#include <lttv/tracecontext.h>
#include <lttv/state.h>
#include <ltt/ltt.h>
#include <ltt/facility.h>
#include <string.h>
-//#include "mw_api.h"
#include "gtktreeprivate.h"
#include "hGuiEventsInsert.xpm"
}
//add hooks for process_traceset
- // context_add_hooks_api(event_viewer_data->mw, NULL, NULL, NULL, NULL, NULL, NULL,
+ // lttv_traceset_context_add_hooks(tsc, NULL, NULL, NULL, NULL, NULL, NULL,
// NULL, NULL, NULL,event_viewer_data->before_event_hooks,NULL);
}
}
}
//remove hooks from context
- // context_remove_hooks_api(event_viewer_data->mw, NULL, NULL, NULL, NULL, NULL, NULL,
+ // lttv_traceset_context_remove_hooks(tsc, NULL, NULL, NULL, NULL, NULL, NULL,
// NULL, NULL, NULL,event_viewer_data->before_event_hooks,NULL);
}
int size;
LttvTracesetContext * tsc = get_traceset_context(event_viewer_data->mw);
- // context_add_hooks_api(event_viewer_data->mw, NULL, NULL, NULL, NULL, NULL, NULL,
- // NULL, NULL, NULL,event_viewer_data->before_event_hooks,NULL);
add_context_hooks(event_viewer_data,tsc);
- process_traceset_api(event_viewer_data->mw, start, end, max_num_events);
+ lttv_process_traceset_seek_time(tsc, start);
+ lttv_process_traceset(tsc, end, max_num_events);
remove_context_hooks(event_viewer_data,tsc);
- // context_remove_hooks_api(event_viewer_data->mw, NULL, NULL, NULL, NULL, NULL, NULL,
- // NULL, NULL, NULL,event_viewer_data->before_event_hooks,NULL);
size = event_viewer_data->raw_trace_data_queue_tmp->length;
*real_num_events = size;