1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2006 Parisa heidari (inspired from CFV by Mathieu Desnoyers)
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;
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.
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,
25 #include <lttvwindow/mainwindow.h>
26 #include <lttvwindow/lttv_plugin_tab.h>
28 //#include "histobuttonwidget.h"
30 extern GQuark LTT_NAME_CPU
;
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
38 #ifndef TYPE_ButtonWidget_DEFINED
39 #define TYPE_ButtonWidget_DEFINED
40 typedef struct _ButtonWidget ButtonWidget
;
41 #endif //TYPE_ButtonWidget_DEFINED
43 #ifndef TYPE_HistoControlFlowData_DEFINED
44 #define TYPE_HistoControlFlowData_DEFINED
45 typedef struct _HistoControlFlowData HistoControlFlowData
;
46 #endif //TYPE_HistoControlFlowData_DEFINED
50 struct _HistoControlFlowData
{
52 GtkWidget
*top_widget
;//The hbox containing buttons and drawing area.
56 GtkWidget
*ev_box
;//for histogram
57 ButtonWidget
*buttonwidget
;
59 histoDrawing_t
*drawing
;
60 //GtkAdjustment *v_adjust ;//may be used later for scrollbar
62 /* Shown events information */
63 // TimeWindow time_window;
64 // LttTime current_time;
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. */
73 LttvFilter
*histo_main_win_filter
;
74 gboolean chunk_has_begun
;
77 /* Control Flow Data constructor */
78 HistoControlFlowData
*guihistocontrolflow(LttvPluginTab
*ptab
);
80 guihistocontrolflow_destructor_full(HistoControlFlowData
*histo_control_flow_data
);
82 guihistocontrolflow_destructor(HistoControlFlowData
*histo_control_flow_data
);
84 static inline GtkWidget
*guihistocontrolflow_get_widget(
85 HistoControlFlowData
*histo_control_flow_data
)
87 return histo_control_flow_data
->top_widget
;
90 static inline ButtonWidget
*guihistocontrolflow_get_buttonwidget
91 (HistoControlFlowData
*histo_control_flow_data
)
93 return histo_control_flow_data
->buttonwidget
;