| 1 | /* This file is part of the Linux Trace Toolkit viewer |
| 2 | * Copyright (C) 2006 Parisa heidari (inspired from CFV by Mathieu Desnoyers) |
| 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., 51 Franklin Street, Fifth Floor, Boston, |
| 16 | * MA 02110-1301, USA. |
| 17 | */ |
| 18 | |
| 19 | |
| 20 | |
| 21 | #ifndef _HISTOCFV_H |
| 22 | #define _HISTOCFV_H |
| 23 | |
| 24 | #include <gtk/gtk.h> |
| 25 | #include <lttvwindow/mainwindow.h> |
| 26 | #include <lttvwindow/lttv_plugin_tab.h> |
| 27 | |
| 28 | //#include "histobuttonwidget.h" |
| 29 | |
| 30 | extern GQuark LTT_NAME_CPU; |
| 31 | |
| 32 | |
| 33 | #ifndef TYPE_histoDrawing_t_DEFINED |
| 34 | #define TYPE_histoDrawing_t_DEFINED |
| 35 | typedef struct _histoDrawing_t histoDrawing_t; |
| 36 | #endif //TYPE_histoDrawing_t_DEFINED |
| 37 | |
| 38 | #ifndef TYPE_ButtonWidget_DEFINED |
| 39 | #define TYPE_ButtonWidget_DEFINED |
| 40 | typedef struct _ButtonWidget ButtonWidget; |
| 41 | #endif //TYPE_ButtonWidget_DEFINED |
| 42 | |
| 43 | #ifndef TYPE_HistoControlFlowData_DEFINED |
| 44 | #define TYPE_HistoControlFlowData_DEFINED |
| 45 | typedef struct _HistoControlFlowData HistoControlFlowData; |
| 46 | #endif //TYPE_HistoControlFlowData_DEFINED |
| 47 | |
| 48 | |
| 49 | |
| 50 | struct _HistoControlFlowData { |
| 51 | |
| 52 | GtkWidget *top_widget;//The hbox containing buttons and drawing area. |
| 53 | LttvPluginTab *ptab; |
| 54 | Tab *tab; |
| 55 | GtkWidget *box; |
| 56 | GtkWidget *ev_box;//for histogram |
| 57 | ButtonWidget *buttonwidget; |
| 58 | |
| 59 | histoDrawing_t *drawing; |
| 60 | //GtkAdjustment *v_adjust ;//may be used later for scrollbar |
| 61 | |
| 62 | /* Shown events information */ |
| 63 | // TimeWindow time_window; |
| 64 | // LttTime current_time; |
| 65 | |
| 66 | //guint currently_Selected_Event ; |
| 67 | GArray *number_of_process;//number of events |
| 68 | guint background_info_waiting; /* Number of background requests waited for |
| 69 | in order to have all the info ready. */ |
| 70 | // For histogram |
| 71 | guint max_height; |
| 72 | |
| 73 | LttvFilter *histo_main_win_filter; |
| 74 | gboolean chunk_has_begun; |
| 75 | } ; |
| 76 | |
| 77 | /* Control Flow Data constructor */ |
| 78 | HistoControlFlowData *guihistocontrolflow(LttvPluginTab *ptab); |
| 79 | void |
| 80 | guihistocontrolflow_destructor_full(HistoControlFlowData *histo_control_flow_data); |
| 81 | void |
| 82 | guihistocontrolflow_destructor(HistoControlFlowData *histo_control_flow_data); |
| 83 | |
| 84 | static inline GtkWidget *guihistocontrolflow_get_widget( |
| 85 | HistoControlFlowData *histo_control_flow_data) |
| 86 | { |
| 87 | return histo_control_flow_data->top_widget ; |
| 88 | } |
| 89 | |
| 90 | static inline ButtonWidget *guihistocontrolflow_get_buttonwidget |
| 91 | (HistoControlFlowData *histo_control_flow_data) |
| 92 | { |
| 93 | return histo_control_flow_data->buttonwidget ; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | |
| 98 | #endif // _HISTOCFV_H |