module name change oops
[lttv.git] / ltt / branches / poly / lttv / modules / gui / controlflow / eventhooks.h
CommitLineData
d66666fe 1/* eventhooks.c defines the hooks that are given to processTrace as parameter.
501d5405 2 * These hooks call the drawing API to draw the information on the screen,
831a876d 3 * using information from Context, but mostly state (running, waiting...).
4 */
5
f0d936c0 6
7#ifndef _EVENT_HOOKS_H
8#define _EVENT_HOOKS_H
9
1ab818de 10#include <gtk/gtk.h>
11#include <lttv/mainWindow.h>
f66eba62 12#include <ltt/time.h>
d66666fe 13
14#include "processlist.h"
15#include "drawing.h"
16#include "cfv.h"
f66eba62 17
18
19/* Structure used to store and use information relative to one events refresh
20 * request. Typically filled in by the expose event callback, then passed to the
21 * library call, then used by the drawing hooks. Then, once all the events are
22 * sent, it is freed by the hook called after the reading.
23 */
24typedef struct _EventRequest
25{
68997a22 26 ControlFlowData *control_flow_data;
a56a1ba4 27 LttTime time_begin, time_end;
28 gint x_begin, x_end;
29 /* Fill the Events_Context during the initial expose, before calling for
30 * events.
31 */
32 //GArray Events_Context; //FIXME
f66eba62 33} EventRequest ;
34
35
36
37
5f16133f 38
501d5405 39void send_test_data(ProcessList *process_list, Drawing_t *drawing);
1ab818de 40
14963be0 41GtkWidget *h_guicontrolflow(MainWindow *mw, LttvTracesetSelector * s, char * key);
f0d936c0 42
4c69e0cc 43int event_selected_hook(void *hook_data, void *call_data);
f0d936c0 44
45/* Hook called before drawing. Gets the initial context at the beginning of the
14963be0 46 * drawing interval and copy it to the context in event_request.
f0d936c0 47 */
4c69e0cc 48int draw_before_hook(void *hook_data, void *call_data);
f0d936c0 49
50/*
51 * The draw event hook is called by the reading API to have a
52 * particular event drawn on the screen.
53 * @param hook_data ControlFlowData structure of the viewer.
54 * @param call_data Event context.
55 *
56 * This function basically draw lines and icons. Two types of lines are drawn :
57 * one small (3 pixels?) representing the state of the process and the second
58 * type is thicker (10 pixels?) representing on which CPU a process is running
59 * (and this only in running state).
60 *
61 * Extremums of the lines :
62 * x_min : time of the last event context for this process kept in memory.
63 * x_max : time of the current event.
64 * y : middle of the process in the process list. The process is found in the
65 * list, therefore is it's position in pixels.
66 *
67 * The choice of lines'color is defined by the context of the last event for this
68 * process.
69 */
4c69e0cc 70int draw_event_hook(void *hook_data, void *call_data);
f0d936c0 71
4c69e0cc 72int draw_after_hook(void *hook_data, void *call_data);
f0d936c0 73
8b90e648 74void draw_closure(gpointer key, gpointer value, gpointer user_data);
75
76int after_data_request(void *hook_data, void *call_data);
77
78
1b238973 79gint update_time_window_hook(void *hook_data, void *call_data);
80gint update_current_time_hook(void *hook_data, void *call_data);
f7afe191 81
82
f66eba62 83
84
f0d936c0 85#endif // _EVENT_HOOKS_H
This page took 0.028432 seconds and 4 git commands to generate.