core filter tree
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvwindow / lttvwindow / lttvwindow.h
CommitLineData
501e4e70 1/* This file is part of the Linux Trace Toolkit Graphic User Interface
2 * Copyright (C) 2003-2004 Xiangxiu Yang, Mathieu Desnoyers
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, USA.
17 */
18
19/*
20This file is what every viewer plugin writer should refer to.
21
22
23Module Related API
24
2d262115 25A viewer plugin is, before anything, a plugin. As a dynamically loadable
501e4e70 26module, it thus has an init and a destroy function called whenever it is
27loaded/initialized and unloaded/destroyed. A graphical module depends on
2d262115 28lttvwindow for construction of its viewer instances. In order to achieve
29this, it must register its constructor function to the main window along
30with button description or text menu entry description. A module keeps
31a list of every viewer that currently sits in memory so it can destroy
32them before the module gets unloaded/destroyed.
501e4e70 33
2d262115 34The contructor registration to the main windows adds button and menu
35entry to each main window, thus allowing instanciation of viewers.
501e4e70 36
37
38Main Window
39
2d262115 40The main window is a container that offers menus, buttons and a
41notebook. Some of those menus and buttons are part of the core of the
42main window, others are dynamically added and removed when modules are
43loaded/unloaded.
501e4e70 44
2d262115 45The notebook contains as much tabs as wanted. Each tab is linked with
46a set of traces (traceset). Each trace contains many tracefiles (one
47per cpu). A trace corresponds to a kernel being traced. A traceset
48corresponds to many traces read together. The time span of a traceset
49goes from the earliest start of all the traces to the latest end of all
50the traces.
501e4e70 51
52Inside each tab are added the viewers. When they interact with the main
53window through the lttvwindow API, they affect the other viewers located
54in the same tab as they are.
55
56The insertion of many viewers in a tab permits a quick look at all the
2d262115 57information wanted in a glance. The main window does merge the read
58requests from all the viewers in the same tab in a way that every viewer
59will get exactly the events it asked for, while the event reading loop
60and state update are shared. It improves performance of events delivery
61to the viewers.
501e4e70 62
63
64
65Viewer Instance Related API
66
2d262115 67The lifetime of a viewer is as follows. The viewer constructor function
68is called each time an instance view is created (one subwindow of this
69viewer type is created by the user either by clicking on the menu item
70or the button corresponding to the viewer). Thereafter, the viewer gets
71hooks called for different purposes by the window containing it. These
72hooks are detailed below. It also has to deal with GTK Events. Finally,
73it can be destructed by having its top level widget unreferenced by the
74main window or by any GTK Event causing a "destroy-event" signal on the
75its top widget. Another possible way for it do be destroyed is if the
76module gets unloaded. The module unload function will have to emit a
77"destroy" signal on each top level widget of all instances of its viewers.
501e4e70 78
79
80Notices from Main Window
81
82time_window : This is the time interval visible on the viewer's tab. Every
83 viewer that cares about being synchronised by respect to the
84 time with other viewers should register to this notification.
85 They should redraw all or part of their display when this occurs.
86
87traceset : This notification is called whenever a trace is added/removed
88 from the traceset. As it affects all the data displayed by the
89 viewer, it sould redraw itself totally.
90
91filter : FIXME : describe..
92
93current_time: Being able to zoom nearer a specific time or highlight a specific
94 time on every viewer in synchronicity implies that the viewer
95 has to shown a visual sign over the drawing or select an event
96 when it receives this notice. It should also inform the main
97 window with the appropriate report API function when a user
98 selects a specific time as being the current time.
99
100dividor : This notice links the positions of the horizontal dividors
101 between the graphic display zone of every viewer and their Y axis,
102 typically showing processes, cpus, ...
103
104
501e4e70 105Reporting Changes to the Main Window
106
2d262115 107In most cases, the enclosing window knows about updates such as described
108in the Notification section higher. There are a few cases, however, where
109updates are caused by actions known by a view instance. For example,
110clicking in a view may update the current time; all viewers within
111the same window must be told about the new current time to change the
112currently highlighted time point. A viewer reports such events by calling
113lttvwindow_report_current_time on its lttvwindow. The lttvwindow will
114consequently call current_time_notify for each of its contained viewers.
501e4e70 115
116
117Available report methods are :
118
501e4e70 119lttvwindow_report_time_window : reports the new time window.
120lttvwindow_report_current_time : reports the new current time.
121lttvwindow_report_dividor : reports the new horizontal dividor's position.
501e4e70 122
123
124
125Requesting Events to Main Window
126
2d262115 127Events can be requested by passing a EventsRequest structure to the main
128window. They will be delivered later when the next g_idle functions
129will be called. Event delivery is done by calling the event hook for
130this event ID, or the main event hooks. A pointer to the EventsRequest
131structure is passed as hook_data to the event hooks of the viewers.
501e4e70 132
133EventsRequest consists in
134- a pointer to the viewer specific data structure
135- a start timestamp or position
136- a stop_flag, ending the read process when set to TRUE
137- a end timestamp and/or position and/or number of events to read
138- hook lists to call for traceset/trace/tracefile begin and end, and for each
139 event (event hooks and event_by_id hooks).
140
2d262115 141The main window will deliver events for every EventRequests it has
142pending through an algorithm that guarantee that all events requested,
143and only them, will be delivered to the viewer between the call of the
144tracefile_begin hooks and the call of the tracefile_end hooks.
501e4e70 145
2d262115 146If a viewer wants to stop the event request at a certain point inside the
147event hooks, it has to set the stop_flag to TRUE and return TRUE from the
148hook function. Then return value will stop the process traceset. Then,
149the main window will look for the stop_flag and remove the EventRequests
150from its lists, calling the process_traceset_end for this request (it
151removes hooks from the context and calls the after hooks).
501e4e70 152
9232f6fd 153It no stop_flag is risen, the end timestamp, end position or number
2d262115 154of events to read has to be reached to determine the end of the
155request. Otherwise, the end of traceset does determine it.
501e4e70 156
157
158GTK Events
159
160Events and Signals
161
2d262115 162GTK is quite different from the other graphical toolkits around
163there. The main difference resides in that there are many X Windows
164inside one GtkWindow, instead of just one. That means that X events are
165delivered by the glib main loop directly to the widget corresponding to
166the GdkWindow affected by the X event.
501e4e70 167
2d262115 168Event delivery to a widget emits a signal on that widget. Then, if a
169handler is connected to this widget's signal, it will be executed. There
170are default handlers for signals, connected at class instantiation
171time. There is also the possibility to connect other handlers to these
172signals, which is what should be done in most cases when a viewer needs
173to interact with X in any way.
501e4e70 174
175
176
177Signal emission and propagation is described there :
178
179http://www.gtk.org/tutorial/sec-signalemissionandpropagation.html
180
181For further information on the GTK main loop (now a wrapper over glib main loop)
182see :
183
184http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html
185http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html
186
187
188For documentation on event handling in GTK/GDK, see :
189
190http://developer.gnome.org/doc/API/2.0/gdk/gdk-Events.html
191http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html
192
193
194Signals can be connected to handlers, emitted, propagated, blocked,
195stopped. See :
196
197http://developer.gnome.org/doc/API/2.0/gobject/gobject-Signals.html
198
199
200
201
202The "expose_event"
203
204Provides the exposed region in the GdkEventExpose structure.
205
2d262115 206There are two ways of dealing with exposures. The first one is to directly
207draw on the screen and the second one is to draw in a pixmap buffer,
208and then to update the screen when necessary.
501e4e70 209
2d262115 210In the first case, the expose event will be responsible for registering
211hooks to process_traceset and require time intervals to the main
212window. So, in this scenario, if a part of the screen is damaged, the
213trace has to be read to redraw the screen.
501e4e70 214
2d262115 215In the second case, with a pixmap buffer, the expose handler is only
216responsible of showing the pixmap buffer on the screen. If the pixmap
217buffer has never been filled with a drawing, the expose handler may ask
218for it to be filled.
501e4e70 219
2d262115 220The interest of using events request to the main window instead of reading
221the events directly from the trace comes from the fact that the main
222window does merge requests from the different viewers in the same tab so
223that the read loop and the state update is shared. As viewers will, in
224the common scenario, request the same events, only one pass through the
225trace that will call the right hooks for the right intervals will be done.
501e4e70 226
2d262115 227When the traceset read is over for a events request, the traceset_end
228hook is called. It has the responsibility of finishing the drawing if
229some parts still need to be drawn and to show it on the screen (if the
230viewer uses a pixmap buffer).
501e4e70 231
232It can add dotted lines and such visual effects to enhance the user's
233experience.
234
235
236FIXME : explain other important events
237
238*/
239
240
241#ifndef VIEWER_H
242#define VIEWER_H
243
244/*! \file lttvwindow.h
245 * \brief API used by the graphical viewers to interact with their top window.
246 *
247 * Main window (lttvwindow module) is the place to contain and display viewers.
248 * Viewers (lttv plugins) interact with main window through this API.
249 * This header file should be included in each graphic module.
250 *
251 */
252
253#include <gtk/gtk.h>
254#include <ltt/ltt.h>
255#include <ltt/time.h>
256#include <lttv/hook.h>
257#include <lttv/tracecontext.h>
258#include <lttv/stats.h>
2d262115 259#include <lttvwindow/mainwindow.h>
260#include <lttvwindow/lttvfilter.h>
501e4e70 261//FIXME (not ready yet) #include <lttv/filter.h>
262
501e4e70 263/* Module Related API */
264
e025a729 265/* GQuark containing constructors of viewers in global attributes */
266extern GQuark LTTV_VIEWER_CONSTRUCTORS;
501e4e70 267
268/* constructor a the viewer */
d47b33d2 269typedef GtkWidget* (*lttvwindow_viewer_constructor)(Tab *tab);
501e4e70 270
271
272/**
273 * Function to register a view constructor so that main window can generate
274 * a menu item and a toolbar item for the viewer in order to generate a new
275 * instance easily. A menu entry and toolbar item will be added to each main
276 * window.
277 *
278 * It should be called by init function of the module.
e025a729 279 *
280 * @param name name of the viewer : mainly used as tag for constructor
501e4e70 281 * @param menu_path path of the menu item. NULL : no menu entry.
282 * @param menu_text text of the menu item.
283 * @param pixmap Image shown on the toolbar item. NULL : no button.
284 * @param tooltip tooltip of the toolbar item.
285 * @param view_constructor constructor of the viewer.
286 */
287
288void lttvwindow_register_constructor
e025a729 289 (char * name,
290 char * menu_path,
501e4e70 291 char * menu_text,
292 char ** pixmap,
293 char * tooltip,
294 lttvwindow_viewer_constructor view_constructor);
295
296
297/**
298 * Function to unregister the viewer's constructor, release the space
299 * occupied by menu_path, menu_text, pixmap, tooltip and constructor of the
300 * viewer.
301 *
302 * It will be called when a module is unloaded.
303 *
304 * @param view_constructor constructor of the viewer.
305 */
306
307void lttvwindow_unregister_constructor
308 (lttvwindow_viewer_constructor view_constructor);
309
310
311
312
313/* Viewer Instance Related API */
314
315/**
316 * Structure used as hook_data for the time_window_notify hook.
317 */
318typedef struct _TimeWindowNotifyData {
319 TimeWindow *new_time_window;
320 TimeWindow *old_time_window;
321} TimeWindowNotifyData;
322
323
324/**
325 * Function to register a hook function that will be called by the main window
326 * when the time interval needs to be updated.
327 *
328 * This register function is typically called by the constructor of the viewer.
329 *
330 * @param tab the tab the viewer belongs to.
331 * @param hook hook that sould be called by the main window when the time
332 * interval changes. This hook function takes a
333 * TimeWindowNotifyData* as call_data.
334 * @param hook_data hook data associated with the hook function. It will
335 * be typically a pointer to the viewer's data structure.
336 */
337
338void lttvwindow_register_time_window_notify(Tab *tab,
339 LttvHook hook,
340 gpointer hook_data);
341
342
343/**
344 * Function to unregister the time_window notification hook.
345 *
346 * This unregister function is typically called by the destructor of the viewer.
347 *
348 * @param tab the tab the viewer belongs to.
349 * @param hook hook that sould be called by the main window when the time
350 * interval changes. This hook function takes a
351 * TimeWindowNotifyData* as call_data.
352 * @param hook_data hook data associated with the hook function. It will
353 * be typically a pointer to the viewer's data structure.
354 */
355
356void lttvwindow_unregister_time_window_notify(Tab *tab,
357 LttvHook hook,
358 gpointer hook_data);
359
360
361/**
362 * Function to register a hook function that will be called by the main window
363 * when the traceset is changed. That means that the viewer must redraw
364 * itself completely or check if it's affected by the particular change to the
365 * traceset.
366 *
367 * This register function is typically called by the constructor of the viewer.
368 *
369 * @param tab the tab the viewer belongs to.
370 * @param hook hook that should be called whenever a change to the traceset
371 * occurs. The call_data of this hook is a NULL pointer.
372 * @param hook_data hook data associated with the hook function. It will
373 * be typically a pointer to the viewer's data structure.
374 */
375
376void lttvwindow_register_traceset_notify(Tab *tab,
377 LttvHook hook,
378 gpointer hook_data);
379
380
381/**
382 * Function to unregister the traceset_notify hook.
383 *
384 * @param tab the tab the viewer belongs to.
385 * @param hook hook that should be called whenever a change to the traceset
386 * occurs. The call_data of this hook is a NULL pointer.
387 * @param hook_data hook data associated with the hook function. It will
388 * be typically a pointer to the viewer's data structure.
389 */
390
391void lttvwindow_unregister_traceset_notify(Tab *tab,
392 LttvHook hook,
393 gpointer hook_data);
394
395
9878c8a4 396/**
397 * Function to register a hook function for a viewer be completely redrawn.
398 *
399 * @param tab viewer's tab
400 * @param hook hook function of the viewer.
401 * @param hook_data hook data associated with the hook function.
402 */
403
404void lttvwindow_register_redraw_notify(Tab *tab,
405 LttvHook hook, gpointer hook_data);
406
407/**
408 * Function to unregister a hook function for a viewer be completely redrawn.
409 *
410 * @param tab viewer's tab
411 * @param hook hook function of the viewer.
412 * @param hook_data hook data associated with the hook function.
413 */
414
415void lttvwindow_unregister_redraw_notify(Tab *tab,
416 LttvHook hook, gpointer hook_data);
417
418
419/**
420 * Function to register a hook function for a viewer to re-do the events
421 * requests for the needed interval.
422 *
423 * This action is typically done after a "stop".
424 *
425 * The typical hook will remove all current requests for the viewer
426 * and make requests for missing information.
427 *
428 * @param tab viewer's tab
429 * @param hook hook function of the viewer.
430 * @param hook_data hook data associated with the hook function.
431 */
432
433void lttvwindow_register_continue_notify(Tab *tab,
434 LttvHook hook, gpointer hook_data);
435
436
437/**
438 * Function to unregister a hook function for a viewer to re-do the events
439 * requests for the needed interval.
440 *
441 * @param tab viewer's tab
442 * @param hook hook function of the viewer.
443 * @param hook_data hook data associated with the hook function.
444 */
445
446void lttvwindow_unregister_continue_notify(Tab *tab,
447 LttvHook hook, gpointer hook_data);
448
449
501e4e70 450/**
451 * Function to register a hook function for a viewer to set/update its
452 * filter.
453 *
454 * FIXME : Add information about what a filter is as seen from a viewer and how
455 * to use it.
456 *
457 * This register function is typically called by the constructor of the viewer.
458 *
459 * @param tab the tab the viewer belongs to.
460 * @param hook hook function called by the main window when a filter change
461 * occurs.
462 * @param hook_data hook data associated with the hook function. It will
463 * be typically a pointer to the viewer's data structure.
464 */
465
466void lttvwindow_register_filter_notify(Tab *tab,
467 LttvHook hook,
468 gpointer hook_data);
469
470
471/**
472 * Function to unregister a viewer's hook function which is used to
473 * set/update the filter of the viewer.
474 *
475 * This unregistration is called by the destructor of the viewer.
476 *
477 * @param tab the tab the viewer belongs to.
478 * @param hook hook function called by the main window when a filter change
479 * occurs.
480 * @param hook_data hook data associated with the hook function. It will
481 * be typically a pointer to the viewer's data structure.
482 */
483
484void lttvwindow_unregister_filter_notify(Tab *tab,
485 LttvHook hook,
486 gpointer hook_data);
487
488
489/**
490 * Function to register a hook function for a viewer to set/update its
491 * current time.
492 *
493 * @param tab the tab the viewer belongs to.
494 * @param hook hook function of the viewer that updates the current time. The
495 * call_data is a LttTime* representing the new current time.
496 * @param hook_data hook data associated with the hook function. It will
497 * be typically a pointer to the viewer's data structure.
498 */
499
500void lttvwindow_register_current_time_notify(Tab *tab,
501 LttvHook hook,
502 gpointer hook_data);
503
504
505/**
506 * Function to unregister a viewer's hook function which is used to
507 * set/update the current time of the viewer.
508 * @param tab the tab the viewer belongs to.
509 * @param hook hook function of the viewer that updates the current time. The
510 * call_data is a LttTime* representing the new current time.
511 * @param hook_data hook data associated with the hook function. It will
512 * be typically a pointer to the viewer's data structure.
513 */
514
515void lttvwindow_unregister_current_time_notify(Tab *tab,
516 LttvHook hook,
517 gpointer hook_data);
518
519
520/**
521 * Function to register a hook function for a viewer to set/update the
522 * dividor of the hpane. It provides a way to make the horizontal
523 * dividors of all the viewers linked together.
524 *
525 * @param tab the tab the viewer belongs to.
526 * @param hook hook function of the viewer that will be called whenever a
527 * dividor changes in another viewer. The call_data of this hook
528 * is a gint*. The value of the integer is the new position of the
529 * hpane dividor.
530 * @param hook_data hook data associated with the hook function. It will
531 * be typically a pointer to the viewer's data structure.
532 */
533
534void lttvwindow_register_dividor(Tab *tab,
535 LttvHook hook,
536 gpointer hook_data);
537
538
539/**
540 * Function to unregister a viewer's hook function which is used to
541 * set/update hpane's dividor of the viewer.
542 *
543 * @param tab the tab the viewer belongs to.
544 * @param hook hook function of the viewer that will be called whenever a
545 * dividor changes in another viewer. The call_data of this hook
546 * is a gint*. The value of the integer is the new position of the
547 * hpane dividor.
548 * @param hook_data hook data associated with the hook function. It will
549 * be typically a pointer to the viewer's data structure.
550 */
551
552void lttvwindow_unregister_dividor(Tab *tab,
553 LttvHook hook,
554 gpointer hook_data);
555
556
557
501e4e70 558/**
559 * Function to set the time interval of the current tab.a
560 *
561 * @param tab the tab the viewer belongs to.
e800cf84 562 * @param time_interval new time window.
501e4e70 563 */
564
565void lttvwindow_report_time_window(Tab *tab,
e800cf84 566 TimeWindow time_window);
501e4e70 567
568/**
569 * Function to set the current time/event of the current tab.
570 * It will be called by a viewer's signal handle associated with
571 * the button-release-event signal
572 * @param tab the tab the viewer belongs to.
e800cf84 573 * @param new current time.
501e4e70 574 */
575
576void lttvwindow_report_current_time(Tab *tab,
e800cf84 577 LttTime time);
501e4e70 578
579
580/**
581 * Function to set the position of the hpane's dividor (viewer).
582 * It will typically be called by a viewer's signal handle associated
583 * with the motion_notify_event event/signal.
584 *
585 * @param tab the tab the viewer belongs to.
586 * @param position position of the hpane's dividor.
587 */
588
589void lttvwindow_report_dividor(Tab *tab, gint position);
590
501e4e70 591
592/* Structure sent to the events request hook */
0aa6c3a1 593 /* Value considered as empty*/
501e4e70 594typedef struct _EventsRequest {
2d262115 595 gpointer owner; /* Owner of the request */
501e4e70 596 gpointer viewer_data; /* Unset : NULL */
0aa6c3a1 597 gboolean servicing; /* service in progress: TRUE*/
598 LttTime start_time; /* Unset : ltt_time_infinite*/
501e4e70 599 LttvTracesetContextPosition *start_position; /* Unset : NULL */
600 gboolean stop_flag; /* Continue:TRUE Stop:FALSE */
0aa6c3a1 601 LttTime end_time; /* Unset : ltt_time_infinite*/
501e4e70 602 guint num_events; /* Unset : G_MAXUINT */
603 LttvTracesetContextPosition *end_position; /* Unset : NULL */
54d8f654 604 gint trace; /* unset : -1 */
10a1069a 605 GArray *hooks; /* Unset : NULL */
501e4e70 606 LttvHooks *before_chunk_traceset; /* Unset : NULL */
607 LttvHooks *before_chunk_trace; /* Unset : NULL */
608 LttvHooks *before_chunk_tracefile;/* Unset : NULL */
609 LttvHooks *event; /* Unset : NULL */
610 LttvHooksById *event_by_id; /* Unset : NULL */
611 LttvHooks *after_chunk_tracefile; /* Unset : NULL */
612 LttvHooks *after_chunk_trace; /* Unset : NULL */
613 LttvHooks *after_chunk_traceset; /* Unset : NULL */
614 LttvHooks *before_request; /* Unset : NULL */
2d262115 615 LttvHooks *after_request; /* Unset : NULL */
501e4e70 616} EventsRequest;
617
2d262115 618/* Maximum number of events to proceed at once in a chunk */
ac4e21cf 619#define CHUNK_NUM_EVENTS 2000
2d262115 620
501e4e70 621
622/**
623 * Function to request data in a specific time interval to the main window. The
624 * event request servicing is differed until the glib idle functions are
625 * called.
626 *
627 * The viewer has to provide hooks that should be associated with the event
628 * request.
629 *
630 * Either start time or start position must be defined in a EventRequest
631 * structure for it to be valid.
632 *
633 * end_time, end_position and num_events can all be defined. The first one
634 * to occur will be used as end criterion.
20fde85f 635 *
636 * The events_request memory will be managed by the main window once its
637 * pointer is passed by this function.
501e4e70 638 *
639 * @param tab the tab the viewer belongs to.
640 * @param events_requested Details about the event request.
641 */
642
643void lttvwindow_events_request(Tab *tab,
20fde85f 644 EventsRequest *events_request);
501e4e70 645
646/**
647 * Function to remove data requests related to a viewer.
648 *
649 * The existing requests's viewer gpointer is compared to the pointer
650 * given in argument to establish which data request should be removed.
651 *
652 * @param tab the tab the viewer belongs to.
653 * @param viewer a pointer to the viewer data structure
654 */
655
656void lttvwindow_events_request_remove_all(Tab *tab,
657 gconstpointer viewer);
658
659
501e4e70 660/**
6550d711 661 * Function to get the current time interval shown on the current tab.
662 * It will be called by a viewer's hook function to update the
663 * shown time interval of the viewer and also be called by the constructor
664 * of the viewer.
665 * @param tab viewer's tab
666 * @return time window.
501e4e70 667 */
668
50106726 669TimeWindow lttvwindow_get_time_window(Tab *tab);
501e4e70 670
671
672/**
673 * Function to get the current time of the current tab.
674 *
675 * @param tab the tab the viewer belongs to.
6ea08962 676 * @return the current tab's current time.
501e4e70 677 */
678
6ea08962 679LttTime lttvwindow_get_current_time(Tab *tab);
501e4e70 680
681
682/**
683 * Function to get the filter of the current tab.
684 * @param main_win, the main window the viewer belongs to.
685 * @param filter, a pointer to a filter.
686 */
687
688//FIXME
689typedef void lttv_filter;
690//FIXME
691const lttv_filter *lttvwindow_get_filter(Tab *tab);
692
693
694/**
695 * Function to get the stats of the traceset
696 * It must be non const so the viewer can modify it.
697 * FIXME : a set/get pair of functions would be more appropriate here.
698 * @param tab the tab the viewer belongs to.
699 * @return A pointer to Traceset statistics.
700 */
701
702LttvTracesetStats* lttvwindow_get_traceset_stats(Tab *tab);
703
704/**
705 * Function to get the context of the traceset
706 * It must be non const so the viewer can add and remove hooks from it.
707 * @param tab the tab the viewer belongs to.
708 * @return Context of the current tab.
709 */
710
711
712LttvTracesetContext* lttvwindow_get_traceset_context(Tab *tab);
713
714
2eef04b5 715/* set_time_window
716 *
717 * It updates the time window of the tab, then calls the updatetimewindow
718 * hooks of each viewer.
719 *
720 * This is called whenever the scrollbar value changes.
721 *
722 * This is mostly an internal function.
723 */
724
725void set_time_window(Tab *tab, const TimeWindow *time_window);
726
727
728/* set_current_time
729 *
730 * It updates the current time of the tab, then calls the updatetimewindow
731 * hooks of each viewer.
732 *
733 * This is called whenever the current time value changes.
734 *
735 * This is mostly an internal function.
736 */
737
738void set_current_time(Tab *tab, const LttTime *current_time);
739
501e4e70 740#endif //VIEWER_H
This page took 0.055566 seconds and 4 git commands to generate.