Add Histogram
[lttv.git] / ltt / branches / poly / lttv / modules / gui / histogram / histocfv.h
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., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, 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 "histobuttonwidget.h"
27
28 extern GQuark LTT_NAME_CPU;
29
30
31 #ifndef TYPE_histoDrawing_t_DEFINED
32 #define TYPE_histoDrawing_t_DEFINED
33 typedef struct _histoDrawing_t histoDrawing_t;
34 #endif //TYPE_histoDrawing_t_DEFINED
35
36 #ifndef TYPE_ButtonWidget_DEFINED
37 #define TYPE_ButtonWidget_DEFINED
38 typedef struct _ButtonWidget ButtonWidget;
39 #endif //TYPE_ButtonWidget_DEFINED
40
41 #ifndef TYPE_HistoControlFlowData_DEFINED
42 #define TYPE_HistoControlFlowData_DEFINED
43 typedef struct _HistoControlFlowData HistoControlFlowData;
44 #endif //TYPE_HistoControlFlowData_DEFINED
45
46
47
48 struct _HistoControlFlowData {
49
50 GtkWidget *top_widget;//The hbox containing buttons and drawing area.
51 Tab *tab;
52 GtkWidget *box;
53 GtkWidget *ev_box;//for histogram
54 ButtonWidget *buttonwidget;
55
56 histoDrawing_t *drawing;
57 //GtkAdjustment *v_adjust ;//may be used later for scrollbar
58
59 /* Shown events information */
60 // TimeWindow time_window;
61 // LttTime current_time;
62
63 //guint currently_Selected_Event ;
64 GArray *number_of_process;//number of events
65 guint background_info_waiting; /* Number of background requests waited for
66 in order to have all the info ready. */
67 // For histogram
68 guint max_height;
69
70 LttvFilter *histo_main_win_filter;
71 } ;
72
73 /* Control Flow Data constructor */
74 HistoControlFlowData *guihistocontrolflow(Tab *tab);
75 void
76 guihistocontrolflow_destructor_full(HistoControlFlowData *histo_control_flow_data);
77 void
78 guihistocontrolflow_destructor(HistoControlFlowData *histo_control_flow_data);
79
80 static inline GtkWidget *guihistocontrolflow_get_widget(
81 HistoControlFlowData *histo_control_flow_data)
82 {
83 return histo_control_flow_data->top_widget ;
84 }
85
86 static inline ButtonWidget *guihistocontrolflow_get_buttonwidget
87 (HistoControlFlowData *histo_control_flow_data)
88 {
89 return histo_control_flow_data->buttonwidget ;
90 }
91
92
93
94 #endif // _HISTOCFV_H
This page took 0.030289 seconds and 4 git commands to generate.