1 /*! \file gtkTraceSet.h
2 * \brief API used by the graphical viewers to interact with their top window.
4 * Main window (gui module) is the place to contain and display viewers.
5 * Viewers (lttv plugins) interacte with main window through this API and
7 * This header file should be included in each graphic module.
8 * This library is used by graphical modules to interact with the
13 #include <lttv/common.h>
15 #include <lttv/lttv.h>
16 #include <lttv/mainWindow.h>
17 #include <lttv/gtkTraceSet.h>
18 #include <lttv/processTrace.h>
19 #include <lttv/toolbar.h>
20 #include <lttv/menu.h>
21 #include <lttv/state.h>
22 #include <lttv/stats.h>
26 * Internal function parts
30 * Function to set/update traceset for the viewers
31 * @param main_win main window
32 * @param traceset traceset of the main window.
35 void SetTraceset(MainWindow
* main_win
, gpointer traceset
)
38 LttvAttributeValue value
;
40 g_assert(lttv_iattribute_find_by_path(main_win
->attributes
,
41 "hooks/updatetraceset", LTTV_POINTER
, &value
));
42 tmp
= (LttvHooks
*)*(value
.v_pointer
);
43 if(tmp
== NULL
)return;
44 lttv_hooks_call(tmp
,traceset
);
49 * Function to set/update filter for the viewers
50 * @param main_win main window
51 * @param filter filter of the main window.
54 void SetFilter(MainWindow
* main_win
, gpointer filter
)
57 LttvAttributeValue value
;
59 g_assert(lttv_iattribute_find_by_path(main_win
->attributes
,
60 "hooks/updatefilter", LTTV_POINTER
, &value
));
61 tmp
= (LttvHooks
*)*(value
.v_pointer
);
63 if(tmp
== NULL
)return;
64 lttv_hooks_call(tmp
,filter
);
74 * Function to register a view constructor so that main window can generate
75 * a toolbar item for the viewer in order to generate a new instance easily.
76 * It will be called by init function of the module.
77 * @param ButtonPixmap image shown on the toolbar item.
78 * @param tooltip tooltip of the toolbar item.
79 * @param view_constructor constructor of the viewer.
82 void toolbar_item_reg(char ** pixmap
, char *tooltip
, lttv_constructor view_constructor
)
84 LttvIAttribute
*attributes_global
= LTTV_IATTRIBUTE(lttv_global_attributes());
85 LttvToolbars
* toolbar
;
86 LttvAttributeValue value
;
88 g_assert(lttv_iattribute_find_by_path(attributes_global
,
89 "viewers/toolbar", LTTV_POINTER
, &value
));
90 toolbar
= (LttvToolbars
*)*(value
.v_pointer
);
93 toolbar
= lttv_toolbars_new();
94 *(value
.v_pointer
) = toolbar
;
96 lttv_toolbars_add(toolbar
, view_constructor
, tooltip
, pixmap
);
101 * Function to unregister the viewer's constructor, release the space
102 * occupied by pixmap, tooltip and constructor of the viewer.
103 * It will be called when a module is unloaded.
104 * @param view_constructor constructor of the viewer which is used as
105 * a reference to find out where the pixmap and tooltip are.
108 void toolbar_item_unreg(lttv_constructor view_constructor
)
110 LttvIAttribute
*attributes_global
= LTTV_IATTRIBUTE(lttv_global_attributes());
111 LttvToolbars
* toolbar
;
112 LttvAttributeValue value
;
114 g_assert(lttv_iattribute_find_by_path(attributes_global
,
115 "viewers/toolbar", LTTV_POINTER
, &value
));
116 toolbar
= (LttvToolbars
*)*(value
.v_pointer
);
118 main_window_remove_toolbar_item(view_constructor
);
120 lttv_toolbars_remove(toolbar
, view_constructor
);
125 * Function to register a view constructor so that main window can generate
126 * a menu item for the viewer in order to generate a new instance easily.
127 * It will be called by init function of the module.
128 * @param menu_path path of the menu item.
129 * @param menu_text text of the menu item.
130 * @param view_constructor constructor of the viewer.
133 void menu_item_reg(char *menu_path
, char *menu_text
, lttv_constructor view_constructor
)
135 LttvIAttribute
*attributes_global
= LTTV_IATTRIBUTE(lttv_global_attributes());
137 LttvAttributeValue value
;
139 g_assert(lttv_iattribute_find_by_path(attributes_global
,
140 "viewers/menu", LTTV_POINTER
, &value
));
141 menu
= (LttvMenus
*)*(value
.v_pointer
);
144 menu
= lttv_menus_new();
145 *(value
.v_pointer
) = menu
;
147 lttv_menus_add(menu
, view_constructor
, menu_path
, menu_text
);
151 * Function to unregister the viewer's constructor, release the space
152 * occupied by menu_path, menu_text and constructor of the viewer.
153 * It will be called when a module is unloaded.
154 * @param view_constructor constructor of the viewer which is used as
155 * a reference to find out where the menu_path and menu_text are.
158 void menu_item_unreg(lttv_constructor view_constructor
)
160 LttvIAttribute
*attributes_global
= LTTV_IATTRIBUTE(lttv_global_attributes());
162 LttvAttributeValue value
;
164 g_assert(lttv_iattribute_find_by_path(attributes_global
,
165 "viewers/menu", LTTV_POINTER
, &value
));
166 menu
= (LttvMenus
*)*(value
.v_pointer
);
168 main_window_remove_menu_item(view_constructor
);
170 lttv_menus_remove(menu
, view_constructor
);
175 * Update the status bar whenever something changed in the viewer.
176 * @param main_win the main window the viewer belongs to.
177 * @param info the message which will be shown in the status bar.
180 void update_status(MainWindow
*main_win
, char *info
)
186 * Function to get the current time interval shown on the current tab.
187 * It will be called by a viewer's hook function to update the
188 * shown time interval of the viewer and also be called by the constructor
190 * @param main_win the main window the viewer belongs to.
191 * @param time_interval a pointer where time interval will be stored.
194 void get_time_window(MainWindow
*main_win
, TimeWindow
*time_window
)
196 //time_window->start_time = main_win->current_tab->time_window.start_time;
197 //time_window->time_width = main_win->current_tab->time_window.time_width;
198 *time_window
= main_win
->current_tab
->time_window
;
202 * Function to get the current time interval of the current traceset.
203 * It will be called by a viewer's hook function to update the
204 * time interval of the viewer and also be called by the constructor
206 * @param main_win the main window the viewer belongs to.
207 * @param time_interval a pointer where time interval will be stored.
210 void get_traceset_time_span(MainWindow
*main_win
, TimeInterval
*time_interval
)
212 //time_window->start_time = main_win->current_tab->time_window.start_time;
213 //time_window->time_width = main_win->current_tab->time_window.time_width;
214 *time_interval
= *(LTTV_TRACESET_CONTEXT(main_win
->current_tab
->traceset_info
->
215 traceset_context
)->Time_Span
);
221 * Function to set the time interval of the current tab.
222 * It will be called by a viewer's signal handle associated with
223 * the move_slider signal
224 * @param main_win the main window the viewer belongs to.
225 * @param time_interval a pointer where time interval is stored.
228 void set_time_window(MainWindow
*main_win
, TimeWindow
*time_window
)
230 LttvAttributeValue value
;
232 main_win
->current_tab
->time_window
= *time_window
;
233 gtk_multi_vpaned_set_scroll_value(main_win
->current_tab
->multi_vpaned
,
234 ltt_time_to_double(time_window
->start_time
)
235 * NANOSECONDS_PER_SECOND
);
236 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
237 "hooks/updatetimewindow", LTTV_POINTER
, &value
));
238 tmp
= (LttvHooks
*)*(value
.v_pointer
);
239 if(tmp
== NULL
) return;
240 lttv_hooks_call(tmp
, time_window
);
245 * Function to get the current time/event of the current tab.
246 * It will be called by a viewer's hook function to update the
247 * current time/event of the viewer.
248 * @param main_win the main window the viewer belongs to.
249 * @param time a pointer where time will be stored.
252 void get_current_time(MainWindow
*main_win
, LttTime
*time
)
254 time
= &main_win
->current_tab
->current_time
;
259 * Function to set the current time/event of the current tab.
260 * It will be called by a viewer's signal handle associated with
261 * the button-release-event signal
262 * @param main_win the main window the viewer belongs to.
263 * @param time a pointer where time is stored.
266 void set_current_time(MainWindow
*main_win
, LttTime
*time
)
268 LttvAttributeValue value
;
270 main_win
->current_tab
->current_time
= *time
;
271 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
272 "hooks/updatecurrenttime", LTTV_POINTER
, &value
));
273 tmp
= (LttvHooks
*)*(value
.v_pointer
);
275 if(tmp
== NULL
)return;
276 lttv_hooks_call(tmp
, time
);
281 * Function to get the traceset from the current tab.
282 * It will be called by the constructor of the viewer and also be
283 * called by a hook funtion of the viewer to update its traceset.
284 * @param main_win the main window the viewer belongs to.
285 * @param traceset a pointer to a traceset.
288 void get_traceset(MainWindow *main_win, Traceset *traceset)
294 * Function to get the filter of the current tab.
295 * It will be called by the constructor of the viewer and also be
296 * called by a hook funtion of the viewer to update its filter.
297 * @param main_win, the main window the viewer belongs to.
298 * @param filter, a pointer to a filter.
301 void get_filter(MainWindow *main_win, Filter *filter)
307 * Function to register a hook function for a viewer to set/update its
309 * It will be called by the constructor of the viewer.
310 * @param hook hook function of the viewer.
311 * @param hook_data hook data associated with the hook function.
312 * @param main_win the main window the viewer belongs to.
315 void reg_update_time_window(LttvHook hook
, gpointer hook_data
,
316 MainWindow
* main_win
)
318 LttvAttributeValue value
;
320 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
321 "hooks/updatetimewindow", LTTV_POINTER
, &value
));
322 tmp
= (LttvHooks
*)*(value
.v_pointer
);
324 tmp
= lttv_hooks_new();
325 *(value
.v_pointer
) = tmp
;
327 lttv_hooks_add(tmp
, hook
,hook_data
);
332 * Function to unregister a viewer's hook function which is used to
333 * set/update the time interval of the viewer.
334 * It will be called by the destructor of the viewer.
335 * @param hook hook function of the viewer.
336 * @param hook_data hook data associated with the hook function.
337 * @param main_win the main window the viewer belongs to.
340 void unreg_update_time_window(LttvHook hook
, gpointer hook_data
,
341 MainWindow
* main_win
)
343 LttvAttributeValue value
;
345 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
346 "hooks/updatetimewindow", LTTV_POINTER
, &value
));
347 tmp
= (LttvHooks
*)*(value
.v_pointer
);
348 if(tmp
== NULL
) return;
349 lttv_hooks_remove_data(tmp
, hook
, hook_data
);
354 * Function to register a hook function for a viewer to set/update its
356 * It will be called by the constructor of the viewer.
357 * @param hook hook function of the viewer.
358 * @param hook_data hook data associated with the hook function.
359 * @param main_win the main window the viewer belongs to.
362 void reg_update_traceset(LttvHook hook
, gpointer hook_data
,
363 MainWindow
* main_win
)
365 LttvAttributeValue value
;
367 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
368 "hooks/updatetraceset", LTTV_POINTER
, &value
));
369 tmp
= (LttvHooks
*)*(value
.v_pointer
);
371 tmp
= lttv_hooks_new();
372 *(value
.v_pointer
) = tmp
;
374 lttv_hooks_add(tmp
, hook
, hook_data
);
379 * Function to unregister a viewer's hook function which is used to
380 * set/update the traceset of the viewer.
381 * It will be called by the destructor of the viewer.
382 * @param hook hook function of the viewer.
383 * @param hook_data hook data associated with the hook function.
384 * @param main_win the main window the viewer belongs to.
387 void unreg_update_traceset(LttvHook hook
, gpointer hook_data
,
388 MainWindow
* main_win
)
390 LttvAttributeValue value
;
392 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
393 "hooks/updatetraceset", LTTV_POINTER
, &value
));
394 tmp
= (LttvHooks
*)*(value
.v_pointer
);
395 if(tmp
== NULL
) return;
396 lttv_hooks_remove_data(tmp
, hook
, hook_data
);
401 * Function to redraw each viewer belonging to the current tab
402 * @param main_win the main window the viewer belongs to.
405 void update_traceset(MainWindow
* main_win
)
407 LttvAttributeValue value
;
409 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
410 "hooks/updatetraceset", LTTV_POINTER
, &value
));
411 tmp
= (LttvHooks
*)*(value
.v_pointer
);
412 if(tmp
== NULL
) return;
413 lttv_hooks_call(tmp
, NULL
);
418 * Function to register a hook function for a viewer to set/update its
420 * It will be called by the constructor of the viewer.
421 * @param hook hook function of the viewer.
422 * @param hook_data hook data associated with the hook function.
423 * @param main_win the main window the viewer belongs to.
426 void reg_update_filter(LttvHook hook
, gpointer hook_data
,
427 MainWindow
*main_win
)
429 LttvAttributeValue value
;
431 g_assert(lttv_iattribute_find_by_path(main_win
->attributes
,
432 "hooks/updatefilter", LTTV_POINTER
, &value
));
433 tmp
= (LttvHooks
*)*(value
.v_pointer
);
435 tmp
= lttv_hooks_new();
436 *(value
.v_pointer
) = tmp
;
438 lttv_hooks_add(tmp
, hook
, hook_data
);
443 * Function to unregister a viewer's hook function which is used to
444 * set/update the filter of the viewer.
445 * It will be called by the destructor of the viewer.
446 * @param hook hook function of the viewer.
447 * @param hook_data hook data associated with the hook function.
448 * @param main_win the main window the viewer belongs to.
451 void unreg_update_filter(LttvHook hook
, gpointer hook_data
,
452 MainWindow
* main_win
)
454 LttvAttributeValue value
;
456 g_assert(lttv_iattribute_find_by_path(main_win
->attributes
,
457 "hooks/updatefilter", LTTV_POINTER
, &value
));
458 tmp
= (LttvHooks
*)*(value
.v_pointer
);
459 if(tmp
== NULL
) return;
460 lttv_hooks_remove_data(tmp
, hook
, hook_data
);
465 * Function to register a hook function for a viewer to set/update its
467 * It will be called by the constructor of the viewer.
468 * @param hook hook function of the viewer.
469 * @param hook_data hook data associated with the hook function.
470 * @param main_win the main window the viewer belongs to.
473 void reg_update_current_time(LttvHook hook
, gpointer hook_data
,
474 MainWindow
*main_win
)
476 LttvAttributeValue value
;
478 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
479 "hooks/updatecurrenttime", LTTV_POINTER
, &value
));
480 tmp
= (LttvHooks
*)*(value
.v_pointer
);
482 tmp
= lttv_hooks_new();
483 *(value
.v_pointer
) = tmp
;
485 lttv_hooks_add(tmp
, hook
, hook_data
);
490 * Function to unregister a viewer's hook function which is used to
491 * set/update the current time of the viewer.
492 * It will be called by the destructor of the viewer.
493 * @param hook hook function of the viewer.
494 * @param hook_data hook data associated with the hook function.
495 * @param main_win the main window the viewer belongs to.
498 void unreg_update_current_time(LttvHook hook
, gpointer hook_data
,
499 MainWindow
* main_win
)
501 LttvAttributeValue value
;
503 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
504 "hooks/updatecurrenttime", LTTV_POINTER
, &value
));
505 tmp
= (LttvHooks
*)*(value
.v_pointer
);
506 if(tmp
== NULL
) return;
507 lttv_hooks_remove_data(tmp
, hook
, hook_data
);
512 * Function to register a hook function for a viewer to show
513 *the content of the viewer.
514 * It will be called by the constructor of the viewer.
515 * @param hook hook function of the viewer.
516 * @param hook_data hook data associated with the hook function.
517 * @param main_win the main window the viewer belongs to.
520 void reg_show_viewer(LttvHook hook
, gpointer hook_data
,
521 MainWindow
*main_win
)
523 LttvAttributeValue value
;
525 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
526 "hooks/showviewer", LTTV_POINTER
, &value
));
527 tmp
= (LttvHooks
*)*(value
.v_pointer
);
529 tmp
= lttv_hooks_new();
530 *(value
.v_pointer
) = tmp
;
532 lttv_hooks_add(tmp
, hook
, hook_data
);
537 * Function to unregister a viewer's hook function which is used to
538 * show the content of the viewer..
539 * It will be called by the destructor of the viewer.
540 * @param hook hook function of the viewer.
541 * @param hook_data hook data associated with the hook function.
542 * @param main_win the main window the viewer belongs to.
545 void unreg_show_viewer(LttvHook hook
, gpointer hook_data
,
546 MainWindow
* main_win
)
548 LttvAttributeValue value
;
550 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
551 "hooks/showviewer", LTTV_POINTER
, &value
));
552 tmp
= (LttvHooks
*)*(value
.v_pointer
);
553 if(tmp
== NULL
) return;
554 lttv_hooks_remove_data(tmp
, hook
, hook_data
);
559 * Function to show each viewer in the current tab.
560 * It will be called by main window after it called process_traceset
561 * @param main_win the main window the viewer belongs to.
564 void show_viewer(MainWindow
*main_win
)
566 LttvAttributeValue value
;
568 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
569 "hooks/showviewer", LTTV_POINTER
, &value
));
570 tmp
= (LttvHooks
*)*(value
.v_pointer
);
571 if(tmp
== NULL
) return;
572 lttv_hooks_call(tmp
, NULL
);
577 * Function to set the focused pane (viewer).
578 * It will be called by a viewer's signal handle associated with
579 * the grab_focus signal
580 * @param main_win the main window the viewer belongs to.
581 * @param paned a pointer to a pane where the viewer is contained.
584 void set_focused_pane(MainWindow
*main_win
, gpointer paned
)
586 gtk_multi_vpaned_set_focus((GtkWidget
*)main_win
->current_tab
->multi_vpaned
,paned
);
591 * Function to register a hook function for a viewer to set/update the
592 * dividor of the hpane.
593 * It will be called by the constructor of the viewer.
594 * @param hook hook function of the viewer.
595 * @param hook_data hook data associated with the hook function.
596 * @param main_win the main window the viewer belongs to.
599 void reg_update_dividor(LttvHook hook
, gpointer hook_data
,
600 MainWindow
*main_win
)
602 LttvAttributeValue value
;
604 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
605 "hooks/hpanedividor", LTTV_POINTER
, &value
));
606 tmp
= (LttvHooks
*)*(value
.v_pointer
);
608 tmp
= lttv_hooks_new();
609 *(value
.v_pointer
) = tmp
;
611 lttv_hooks_add(tmp
, hook
, hook_data
);
616 * Function to unregister a viewer's hook function which is used to
617 * set/update hpane's dividor of the viewer.
618 * It will be called by the destructor of the viewer.
619 * @param hook hook function of the viewer.
620 * @param hook_data hook data associated with the hook function.
621 * @param main_win the main window the viewer belongs to.
624 void unreg_update_dividor(LttvHook hook
, gpointer hook_data
,
625 MainWindow
*main_win
)
627 LttvAttributeValue value
;
629 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
630 "hooks/hpanedividor", LTTV_POINTER
, &value
));
631 tmp
= (LttvHooks
*)*(value
.v_pointer
);
632 if(tmp
== NULL
) return;
633 lttv_hooks_remove_data(tmp
, hook
, hook_data
);
638 * Function to set the position of the hpane's dividor (viewer).
639 * It will be called by a viewer's signal handle associated with
640 * the motion_notify_event event/signal
641 * @param main_win the main window the viewer belongs to.
642 * @param position position of the hpane's dividor.
645 void set_hpane_dividor(MainWindow
*main_win
, gint position
)
647 LttvAttributeValue value
;
649 g_assert(lttv_iattribute_find_by_path(main_win
->current_tab
->attributes
,
650 "hooks/hpanedividor", LTTV_POINTER
, &value
));
651 tmp
= (LttvHooks
*)*(value
.v_pointer
);
652 if(tmp
== NULL
) return;
653 lttv_hooks_call(tmp
, &position
);
658 * Function to process traceset. It will call lttv_process_trace,
659 * each view will call this api to get events.
660 * @param main_win the main window the viewer belongs to.
661 * @param start the start time of the first event to be processed.
662 * @param end the end time of the last event to be processed.
665 void process_traceset_api(MainWindow
*main_win
, LttTime start
,
666 LttTime end
, unsigned maxNumEvents
)
668 lttv_process_traceset_seek_time(main_win
->current_tab
->traceset_info
->
669 traceset_context
, start
);
670 lttv_process_traceset(main_win
->current_tab
->traceset_info
->
671 traceset_context
, end
, maxNumEvents
);
675 * Function to add hooks into the context of a traceset,
676 * before reading events from traceset, viewer will call this api to
678 * @param main_win the main window the viewer belongs to.
679 * @param LttvHooks hooks to be registered.
682 void context_add_hooks_api(MainWindow
*main_win
,
683 LttvHooks
*before_traceset
,
684 LttvHooks
*after_traceset
,
685 LttvHooks
*check_trace
,
686 LttvHooks
*before_trace
,
687 LttvHooks
*after_trace
,
688 LttvHooks
*check_tracefile
,
689 LttvHooks
*before_tracefile
,
690 LttvHooks
*after_tracefile
,
691 LttvHooks
*check_event
,
692 LttvHooks
*before_event
,
693 LttvHooks
*after_event
)
695 LttvTracesetContext
* tsc
=
696 LTTV_TRACESET_CONTEXT(main_win
->current_tab
->traceset_info
->
698 lttv_traceset_context_add_hooks(tsc
,before_traceset
,after_traceset
,
699 check_trace
,before_trace
,after_trace
,
700 check_tracefile
,before_tracefile
,after_tracefile
,
701 check_event
,before_event
, after_event
);
706 * Function to remove hooks from the context of a traceset,
707 * before reading events from traceset, viewer will call this api to
709 * @param main_win the main window the viewer belongs to.
710 * @param LttvHooks hooks to be registered.
713 void context_remove_hooks_api(MainWindow
*main_win
,
714 LttvHooks
*before_traceset
,
715 LttvHooks
*after_traceset
,
716 LttvHooks
*check_trace
,
717 LttvHooks
*before_trace
,
718 LttvHooks
*after_trace
,
719 LttvHooks
*check_tracefile
,
720 LttvHooks
*before_tracefile
,
721 LttvHooks
*after_tracefile
,
722 LttvHooks
*check_event
,
723 LttvHooks
*before_event
,
724 LttvHooks
*after_event
)
726 LttvTracesetContext
* tsc
=
727 LTTV_TRACESET_CONTEXT(main_win
->current_tab
->traceset_info
->traceset_context
);
728 lttv_traceset_context_remove_hooks(tsc
,before_traceset
,after_traceset
,
729 check_trace
,before_trace
,after_trace
,
730 check_tracefile
,before_tracefile
,after_tracefile
,
731 check_event
,before_event
, after_event
);
736 * Function to add/remove event hooks for state
737 * @param main_win the main window the viewer belongs to.
740 void state_add_event_hooks_api(MainWindow
*main_win
)
742 lttv_state_add_event_hooks(
743 (LttvTracesetState
*)main_win
->current_tab
->traceset_info
->traceset_context
);
746 void state_remove_event_hooks_api(MainWindow
*main_win
)
748 lttv_state_remove_event_hooks(
749 (LttvTracesetState
*)main_win
->current_tab
->traceset_info
->traceset_context
);
754 * Function to add/remove event hooks for stats
755 * @param main_win the main window the viewer belongs to.
758 void stats_add_event_hooks_api(MainWindow
*main_win
)
760 lttv_stats_add_event_hooks(
761 (LttvTracesetStats
*)main_win
->current_tab
->traceset_info
->traceset_context
);
764 void stats_remove_event_hooks_api(MainWindow
*main_win
)
766 lttv_stats_remove_event_hooks(
767 (LttvTracesetStats
*)main_win
->current_tab
->traceset_info
->traceset_context
);
771 * Function to get the stats of the traceset
772 * @param main_win the main window the viewer belongs to.
775 LttvTracesetStats
* get_traceset_stats_api(MainWindow
*main_win
)
777 return main_win
->current_tab
->traceset_info
->traceset_context
;
781 LttvTracesetContext
* get_traceset_context(MainWindow
*main_win
)
783 return (LttvTracesetContext
*)main_win
->current_tab
->traceset_info
->traceset_context
;