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