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