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 | typedef struct _TimeWindow { |
22 | LttTime startTime; |
23 | LttTime Time_Width; |
24 | } TimeWindow; |
25 | |
26 | typedef struct _TracesetInfo { |
27 | gchar* path; |
28 | LttvHooks |
29 | *before_traceset, |
30 | *after_traceset, |
31 | *before_trace, |
32 | *after_trace, |
33 | *before_tracefile, |
34 | *after_tracefile, |
35 | *before_event, |
36 | *after_event; |
37 | //FIXME? TracesetContext and stats in same or different variable ? |
38 | LttvTracesetStats * TracesetContext; |
39 | LttvTraceset * traceset; |
40 | } TracesetInfo ; |
41 | |
42 | |
e969fd8e |
43 | struct _mainWindow{ |
44 | GtkWidget* MWindow; /* Main Window */ |
e969fd8e |
45 | |
46 | /* Status bar information */ |
47 | // guint MainSBarContextID; /* Context ID of main status bar */ |
48 | // guint BegTimeSBarContextID; /* Context ID of BegTime status bar */ |
49 | // guint EndTimeSBarContextID; /* Context ID of EndTime status bar */ |
50 | |
51 | /* Child windows */ |
52 | //openTracesetWindow* OpenTracesetWindow;/* Window to get prof and proc file*/ |
53 | //viewTimeFrameWindow* ViewTimeFrameWindow;/*Window to select time frame */ |
54 | //gotoEventWindow* GotoEventWindow; /*search for event description*/ |
55 | //openFilterWindow* OpenFilterWindow; /* Open a filter selection window */ |
56 | GtkWidget* HelpContents;/* Window to display help contents */ |
57 | GtkWidget* AboutBox; /* Window about information */ |
58 | |
e969fd8e |
59 | // lttv_trace_filter * filter; /* trace filter associated with the window */ |
e969fd8e |
60 | |
f7afe191 |
61 | /* Traceset related information */ |
62 | TracesetInfo * Traceset_Info; |
63 | /* Attributes for trace reading hooks local to the main window */ |
64 | LttvIAttribute * Attributes; |
65 | |
e969fd8e |
66 | tab * Tab; |
67 | tab * CurrentTab; |
36b3c068 |
68 | |
69 | WindowCreationData * winCreationData; |
e969fd8e |
70 | |
2061e03d |
71 | GHashTable * hash_menu_item; |
72 | GHashTable * hash_toolbar_item; |
73 | }; |
e969fd8e |
74 | |
e969fd8e |
75 | |
76 | struct _tab{ |
77 | GtkWidget * label; |
78 | GtkCustom * custom; |
2061e03d |
79 | |
f7afe191 |
80 | // startTime is the left of the visible area. Corresponds to the scrollbar |
81 | // value. |
82 | // Time_Width is a zoom dependant value (corresponding to page size) |
83 | TimeWindow Time_Window; |
84 | |
85 | // The current time is the time selected in the visible area by the user, |
86 | // not the scrollbar value. |
e969fd8e |
87 | LttTime currentTime; |
88 | LttvIAttribute * Attributes; |
89 | |
90 | struct _tab * Next; |
2061e03d |
91 | mainWindow * mw; |
e969fd8e |
92 | }; |
93 | |
2061e03d |
94 | /** |
95 | * Remove menu and toolbar item when a module unloaded |
96 | */ |
97 | void main_window_remove_menu_item(lttv_constructor view_constructor); |
98 | void main_window_remove_toolbar_item(lttv_constructor view_constructor); |
99 | |
e969fd8e |
100 | #endif /* _MAIN_WINDOW_ */ |
101 | |
102 | |