Update FSF address
[lttv.git] / lttv / modules / gui / histogram / histoeventhooks.h
CommitLineData
1684ba2e 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
b9ce0bad
YB
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16 * MA 02110-1301, USA.
1684ba2e 17 */
18
19
20/* eventhooks.h defines the hooks that are given to processTrace as parameter.
21 * These hooks call the drawing API to draw the information on the screen,
22 * using information from Context, but mostly state (running, waiting...).
23 */
24
25
26#ifndef _EVENT_HOOKS_H
27#define _EVENT_HOOKS_H
28
29#include <gtk/gtk.h>
30#include <lttvwindow/mainwindow.h>
1684ba2e 31
32#include "histobuttonwidget.h"
33#include "histodrawing.h"
34#include "histocfv.h"
35
36
37/* Structure used to store and use information relative to one events refresh
38 * request. Typically filled in by the expose event callback, then passed to the
39 * library call, then used by the drawing hooks. Then, once all the events are
40 * sent, it is freed by the hook called after the reading.
41 */
42//typedef struct _EventRequest
43//{
44// ControlFlowData *control_flow_data;
45// LttTime time_begin, time_end;
46// gint x_begin, x_end;
47 /* Fill the Events_Context during the initial expose, before calling for
48 * events.
49 */
50 //GArray Events_Context; //FIXME
51//} EventRequest ;
52
53
54
55
56
57void send_test_data(ButtonWidget *buttonwidget, histoDrawing_t *drawing);//??
58
e433e6d6 59GtkWidget *h_guihistocontrolflow(LttvPlugin *plugin);
1684ba2e 60
61//GtkWidget *h_legend(Tab *tab);
62
63int histo_event_selected_hook(void *hook_data, void *call_data);
64
65/*
66 * The draw event hook is called by the reading API to have a
67 * particular event drawn on the screen.
68 * @param hook_data ControlFlowData structure of the viewer.
69 * @param call_data Event context with state.
70 *
71 * This function basically draw lines and icons. Two types of lines are drawn :
72 * one small (3 pixels?) representing the state of the process and the second
73 * type is thicker (10 pixels?) representing on which CPU a process is running
74 * (and this only in running state).
75 *
76 * Extremums of the lines :
77 * x_min : time of the last event context for this process kept in memory.
78 * x_max : time of the current event.
79 * y : middle of the process in the process list. The process is found in the
80 * list, therefore is it's position in pixels.
81 *
82 * The choice of lines'color is defined by the context of the last event for this
83 * process.
84 */
85//int histo_before_schedchange_hook(void *hook_data, void *call_data);
86int histo_after_schedchange_hook(void *hook_data, void *call_data);
87int histo_before_execmode_hook(void *hook_data, void *call_data);
88int histo_after_execmode_hook(void *hook_data, void *call_data);
89
90
91int histo_before_process_exit_hook(void *hook_data, void *call_data);
92int histo_before_process_release_hook(void *hook_data, void *call_data);
93int histo_after_process_exit_hook(void *hook_data, void *call_data);
94int histo_after_process_fork_hook(void *hook_data, void *call_data);
95int histo_after_fs_exec_hook(void *hook_data, void *call_data);
96
97
98#if 0
99int before_process_hook(void *hook_data, void *call_data);
100int after_process_hook(void *hook_data, void *call_data);
101#endif //0
102
103//void histo_draw_closure(guint key, gpointer value, gpointer user_data);
104
105int histo_before_chunk(void *hook_data, void *call_data);
106int histo_after_chunk(void *hook_data, void *call_data);
107//int histo_before_request(void *hook_data, void *call_data);
108//int histo_after_request(void *hook_data, void *call_data);
109
110
111
112gint histo_update_time_window_hook(void *hook_data, void *call_data);
113gint histo_update_current_time_hook(void *hook_data, void *call_data);
114gint histo_traceset_notify(void *hook_data, void *call_data);
115gint histo_redraw_notify(void *hook_data, void *call_data);
116gint histo_continue_notify(void *hook_data, void *call_data);
117
118//just for histogram
119void histo_request_event( HistoControlFlowData *histocontrol_flow_data,guint x, guint width);
120int histo_count_event(void *hook_data, void *call_data);
121int histo_before_trace(void *hook_data, void *call_data);//replaced for histo_before_request
122int histo_after_trace(void *hook_data, void *call_data);//replaced for histo_after_request
123
124gboolean histo_filter_changed(void * hook_data, void * call_data);
125
126void histogram_show(HistoControlFlowData *histocontrol_flow_data,guint draw_begin,guint draw_end);
127#endif // _EVENT_HOOKS_H
This page took 0.054844 seconds and 4 git commands to generate.