d2aa3c05 |
1 | /* This file is part of the Linux Trace Toolkit viewer |
2 | * Copyright (C) 2003-2004 Xiangxiu Yang |
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 | #ifndef _MAIN_WINDOW_ |
20 | #define _MAIN_WINDOW_ |
21 | |
22 | #include <gtk/gtk.h> |
23 | |
24 | #include <ltt/ltt.h> |
25 | #include <lttv/attribute.h> |
26 | #include <lttv/traceset.h> |
d8f124de |
27 | #include <lttv/tracecontext.h> |
d2aa3c05 |
28 | |
13f86ce2 |
29 | #include <lttvwindow/common.h> |
30 | #include <lttvwindow/gtkmultivpaned.h> |
d2aa3c05 |
31 | #include <lttv/hook.h> |
32 | #include <lttv/stats.h> |
33 | |
d2aa3c05 |
34 | typedef struct _TracesetInfo { |
35 | //FIXME? TracesetContext and stats in same or different variable ? |
36 | LttvTracesetStats * traceset_context; |
37 | LttvTraceset * traceset; |
38 | } TracesetInfo ; |
39 | |
40 | |
41 | struct _MainWindow{ |
42 | GtkWidget* mwindow; /* Main Window */ |
43 | int window_width; |
44 | |
45 | /* Status bar information */ |
46 | // guint MainSBarContextID; /* Context ID of main status bar */ |
47 | // guint BegTimeSBarContextID; /* Context ID of BegTime status bar */ |
48 | // guint EndTimeSBarContextID; /* Context ID of EndTime status bar */ |
49 | |
50 | /* Child windows */ |
51 | //openTracesetWindow* OpenTracesetWindow;/* Window to get prof and proc file*/ |
52 | //viewTimeFrameWindow* ViewTimeFrameWindow;/*Window to select time frame */ |
53 | //gotoEventWindow* GotoEventWindow; /*search for event description*/ |
54 | //openFilterWindow* OpenFilterWindow; /* Open a filter selection window */ |
55 | GtkWidget* help_contents;/* Window to display help contents */ |
56 | GtkWidget* about_box; /* Window about information */ |
57 | |
58 | // lttv_trace_filter * filter; /* trace filter associated with the window */ |
59 | |
60 | /* Attributes for trace reading hooks local to the main window */ |
61 | LttvIAttribute * attributes; |
62 | |
63 | Tab * tab; |
64 | Tab * current_tab; |
65 | |
d2aa3c05 |
66 | GHashTable * hash_menu_item; |
67 | GHashTable * hash_toolbar_item; |
68 | }; |
69 | |
70 | |
71 | struct _Tab{ |
72 | GtkWidget * label; |
73 | GtkMultiVPaned * multi_vpaned; |
74 | |
75 | // startTime is the left of the visible area. Corresponds to the scrollbar |
76 | // value. |
77 | // Time_Width is a zoom dependant value (corresponding to page size) |
78 | TimeWindow time_window; |
79 | |
80 | // The current time is the time selected in the visible area by the user, |
81 | // not the scrollbar value. |
82 | LttTime current_time; |
83 | LttvIAttribute * attributes; |
84 | |
85 | struct _Tab * next; |
86 | MainWindow * mw; |
87 | |
88 | /* Traceset related information */ |
89 | TracesetInfo * traceset_info; |
a43d67ba |
90 | |
91 | /* A list of time requested for the next process trace */ |
92 | GArray *time_requests; |
93 | gboolean time_request_pending; |
d2aa3c05 |
94 | }; |
95 | |
96 | /** |
97 | * Remove menu and toolbar item when a module unloaded |
98 | */ |
42fcbb71 |
99 | void main_window_remove_menu_item(lttvwindow_viewer_constructor view_constructor); |
100 | void main_window_remove_toolbar_item(lttvwindow_viewer_constructor view_constructor); |
d2aa3c05 |
101 | |
102 | #endif /* _MAIN_WINDOW_ */ |
103 | |
104 | |