e969fd8e |
1 | #ifndef _MAIN_WINDOW_ |
2 | #define _MAIN_WINDOW_ |
3 | |
4 | #include <gtk/gtk.h> |
5 | |
6 | #include <ltt/ltt.h> |
7 | #include <lttv/attribute.h> |
8 | #include <lttv/traceset.h> |
9 | #include <lttv/processTrace.h> |
10 | |
11 | #include <lttv/common.h> |
12 | #include <lttv/gtkcustom.h> |
f7afe191 |
13 | #include <lttv/hook.h> |
14 | #include <lttv/stats.h> |
e969fd8e |
15 | |
36b3c068 |
16 | typedef struct _WindowCreationData { |
17 | int argc; |
18 | char ** argv; |
19 | } WindowCreationData; |
e969fd8e |
20 | |
f7afe191 |
21 | |
22 | typedef struct _TracesetInfo { |
23 | gchar* path; |
24 | LttvHooks |
25 | *before_traceset, |
26 | *after_traceset, |
27 | *before_trace, |
28 | *after_trace, |
29 | *before_tracefile, |
30 | *after_tracefile, |
31 | *before_event, |
32 | *after_event; |
33 | //FIXME? TracesetContext and stats in same or different variable ? |
bca3b81f |
34 | LttvTracesetStats * traceset_context; |
f7afe191 |
35 | LttvTraceset * traceset; |
36 | } TracesetInfo ; |
37 | |
38 | |
bca3b81f |
39 | struct _MainWindow{ |
40 | GtkWidget* mwindow; /* Main Window */ |
e969fd8e |
41 | |
42 | /* Status bar information */ |
43 | // guint MainSBarContextID; /* Context ID of main status bar */ |
44 | // guint BegTimeSBarContextID; /* Context ID of BegTime status bar */ |
45 | // guint EndTimeSBarContextID; /* Context ID of EndTime status bar */ |
46 | |
47 | /* Child windows */ |
48 | //openTracesetWindow* OpenTracesetWindow;/* Window to get prof and proc file*/ |
49 | //viewTimeFrameWindow* ViewTimeFrameWindow;/*Window to select time frame */ |
50 | //gotoEventWindow* GotoEventWindow; /*search for event description*/ |
51 | //openFilterWindow* OpenFilterWindow; /* Open a filter selection window */ |
bca3b81f |
52 | GtkWidget* help_contents;/* Window to display help contents */ |
53 | GtkWidget* about_box; /* Window about information */ |
e969fd8e |
54 | |
e969fd8e |
55 | // lttv_trace_filter * filter; /* trace filter associated with the window */ |
e969fd8e |
56 | |
f7afe191 |
57 | /* Traceset related information */ |
bca3b81f |
58 | TracesetInfo * traceset_info; |
f7afe191 |
59 | /* Attributes for trace reading hooks local to the main window */ |
bca3b81f |
60 | LttvIAttribute * attributes; |
f7afe191 |
61 | |
bca3b81f |
62 | Tab * tab; |
63 | Tab * current_tab; |
36b3c068 |
64 | |
bca3b81f |
65 | WindowCreationData * win_creation_data; |
e969fd8e |
66 | |
2061e03d |
67 | GHashTable * hash_menu_item; |
68 | GHashTable * hash_toolbar_item; |
69 | }; |
e969fd8e |
70 | |
e969fd8e |
71 | |
bca3b81f |
72 | struct _Tab{ |
e969fd8e |
73 | GtkWidget * label; |
74 | GtkCustom * custom; |
2061e03d |
75 | |
f7afe191 |
76 | // startTime is the left of the visible area. Corresponds to the scrollbar |
77 | // value. |
78 | // Time_Width is a zoom dependant value (corresponding to page size) |
bca3b81f |
79 | TimeWindow time_window; |
f7afe191 |
80 | |
81 | // The current time is the time selected in the visible area by the user, |
82 | // not the scrollbar value. |
bca3b81f |
83 | LttTime current_time; |
84 | LttvIAttribute * attributes; |
e969fd8e |
85 | |
bca3b81f |
86 | struct _Tab * next; |
87 | MainWindow * mw; |
e969fd8e |
88 | }; |
89 | |
2061e03d |
90 | /** |
91 | * Remove menu and toolbar item when a module unloaded |
92 | */ |
93 | void main_window_remove_menu_item(lttv_constructor view_constructor); |
94 | void main_window_remove_toolbar_item(lttv_constructor view_constructor); |
95 | |
e969fd8e |
96 | #endif /* _MAIN_WINDOW_ */ |
97 | |
98 | |