2d262115 |
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_PRIVATE_ |
20 | #define _MAIN_WINDOW_PRIVATE_ |
21 | |
22 | #include <gtk/gtk.h> |
23 | |
24 | #include <ltt/ltt.h> |
25 | #include <lttv/attribute.h> |
26 | #include <lttv/traceset.h> |
27 | #include <lttv/tracecontext.h> |
28 | #include <lttv/hook.h> |
29 | #include <lttv/stats.h> |
b052368a |
30 | //#include <lttvwindow/gtkmultivpaned.h> |
2d262115 |
31 | #include <lttvwindow/mainwindow.h> |
32 | |
b052368a |
33 | #define SCROLL_STEP_PER_PAGE 10.0 |
34 | |
2d262115 |
35 | struct _TracesetInfo { |
36 | //FIXME? TracesetContext and stats in same or different variable ? |
37 | LttvTracesetStats * traceset_context; |
38 | LttvTraceset * traceset; |
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 | |
6ced96ef |
63 | //Tab * tab; |
64 | //Tab * current_tab; |
2d262115 |
65 | |
66 | }; |
67 | |
68 | |
69 | struct _Tab{ |
b052368a |
70 | GtkWidget *label; |
71 | |
72 | GtkWidget *vbox; /* contains viewer_container and scrollbar */ |
73 | //GtkWidget *multivpaned; |
74 | GtkWidget *viewer_container; |
75 | GtkWidget *scrollbar; |
e800cf84 |
76 | |
f02b5e22 |
77 | /* Paste zones */ |
78 | GtkTooltips *tooltips; |
79 | |
e800cf84 |
80 | /* time bar */ |
81 | GtkWidget *MTimebar; |
f02b5e22 |
82 | GtkWidget *MEventBox1a; |
83 | GtkWidget *MText1a; |
84 | GtkWidget *MEventBox1b; |
85 | GtkWidget *MText1b; |
e800cf84 |
86 | GtkWidget *MEntry1; |
87 | GtkWidget *MText2; |
88 | GtkWidget *MEntry2; |
89 | GtkWidget *MText3a; |
f02b5e22 |
90 | GtkWidget *MEventBox3b; |
e800cf84 |
91 | GtkWidget *MText3b; |
92 | GtkWidget *MEntry3; |
93 | GtkWidget *MText4; |
94 | GtkWidget *MEntry4; |
95 | GtkWidget *MText5a; |
f02b5e22 |
96 | GtkWidget *MEventBox5b; |
e800cf84 |
97 | GtkWidget *MText5b; |
98 | GtkWidget *MEntry5; |
99 | GtkWidget *MText6; |
100 | GtkWidget *MEntry6; |
101 | GtkWidget *MText7; |
2d262115 |
102 | |
103 | // startTime is the left of the visible area. Corresponds to the scrollbar |
104 | // value. |
105 | // Time_Width is a zoom dependant value (corresponding to page size) |
106 | TimeWindow time_window; |
e800cf84 |
107 | gboolean time_manager_lock; |
2d262115 |
108 | |
109 | // The current time is the time selected in the visible area by the user, |
110 | // not the scrollbar value. |
111 | LttTime current_time; |
e800cf84 |
112 | gboolean current_time_manager_lock; |
113 | |
2d262115 |
114 | LttvIAttribute * attributes; |
115 | |
6ced96ef |
116 | //struct _Tab * next; |
2d262115 |
117 | MainWindow * mw; |
118 | |
119 | /* Traceset related information */ |
120 | TracesetInfo * traceset_info; |
121 | |
122 | /* A list of time requested for the next process trace */ |
123 | GSList *events_requests; |
124 | gboolean events_request_pending; |
125 | LttvAttribute *interrupted_state; |
126 | }; |
127 | |
128 | #endif /* _MAIN_WINDOW_PRIVATE_ */ |
129 | |
130 | |