11 /* This part of the viewer does :
12 * Draw horizontal lines, getting graphic context as arg.
13 * Copy region of the screen into another.
14 * Modify the boundaries to reflect a scale change. (resize)
15 * Refresh the physical screen with the pixmap
16 * A helper function is provided here to convert from time to process
17 * identifier to pixels and the contrary (will be useful for mouse selection).
18 * Insert an empty square in the drawing, moving the bottom part.
20 * Note: The last point is exactly why it would not be so easy to add the
21 * vertical line functionnality as in the original version of LTT. In order
22 * to do so, we should keep all processes in the list for the duration of
23 * all the trace instead of dynamically adding and removing them when we
24 * scroll. Another possibility is to redraw all the visible area when a new
25 * process is added to the list. The second solution seems more appropriate
29 * The pixmap used has the width of the physical window, but the height
30 * of the shown processes.
33 typedef struct _Drawing_t Drawing_t
;
36 GtkWidget
*Drawing_Area_V
;
38 ControlFlowData
*Control_Flow_Data
;
40 gint height
, width
, depth
;
44 Drawing_t
*drawing_construct(ControlFlowData
*Control_Flow_Data
);
45 void drawing_destroy(Drawing_t
*Drawing
);
47 GtkWidget
*drawing_get_widget(Drawing_t
*Drawing
);
49 //void Drawing_Refresh ( Drawing_t *Drawing,
51 // guint width, guint height);
53 void drawing_draw_line( Drawing_t
*Drawing
,
59 //void Drawing_copy( Drawing_t *Drawing,
60 // guint xsrc, guint ysrc,
61 // guint xdest, guint ydest,
62 // guint width, guint height);
64 /* Insert a square corresponding to a new process in the list */
65 void drawing_insert_square(Drawing_t
*Drawing
,
69 /* Remove a square corresponding to a removed process in the list */
70 void drawing_remove_square(Drawing_t
*Drawing
,
75 //void Drawing_Resize(Drawing_t *Drawing, guint h, guint w);
77 void convert_pixels_to_time(
80 LttTime
*window_time_begin
,
81 LttTime
*window_time_end
,
84 void convert_time_to_pixels(
85 LttTime window_time_begin
,
86 LttTime window_time_end
,