10 /* This part of the viewer does :
11 * Draw horizontal lines, getting graphic context as arg.
12 * Copy region of the screen into another.
13 * Modify the boundaries to reflect a scale change. (resize)
14 * Refresh the physical screen with the pixmap
15 * A helper function is provided here to convert from time to process
16 * identifier to pixels and the contrary (will be useful for mouse selection).
17 * Insert an empty square in the drawing, moving the bottom part.
19 * Note: The last point is exactly why it would not be so easy to add the
20 * vertical line functionnality as in the original version of LTT. In order
21 * to do so, we should keep all processes in the list for the duration of
22 * all the trace instead of dynamically adding and removing them when we
23 * scroll. Another possibility is to redraw all the visible area when a new
24 * process is added to the list. The second solution seems more appropriate
28 * The pixmap used has the width of the physical window, but the height
29 * of the shown processes.
32 typedef struct _Drawing_t Drawing_t
;
35 //FIXME : TEMPORARILY PLACED HERE FOR GC !!
37 GtkWidget
*Drawing_Area_V
;
39 ControlFlowData
*Control_Flow_Data
;
41 gint height
, width
, depth
;
46 Drawing_t
*drawing_construct(ControlFlowData
*Control_Flow_Data
);
47 void drawing_destroy(Drawing_t
*Drawing
);
49 GtkWidget
*drawing_get_widget(Drawing_t
*Drawing
);
51 //void Drawing_Refresh ( Drawing_t *Drawing,
53 // guint width, guint height);
55 void drawing_draw_line( Drawing_t
*Drawing
,
61 //void Drawing_copy( Drawing_t *Drawing,
62 // guint xsrc, guint ysrc,
63 // guint xdest, guint ydest,
64 // guint width, guint height);
66 /* Insert a square corresponding to a new process in the list */
67 void drawing_insert_square(Drawing_t
*Drawing
,
71 /* Remove a square corresponding to a removed process in the list */
72 void drawing_remove_square(Drawing_t
*Drawing
,
77 //void Drawing_Resize(Drawing_t *Drawing, guint h, guint w);
79 void convert_pixels_to_time(
82 LttTime
*window_time_begin
,
83 LttTime
*window_time_end
,
86 void convert_time_to_pixels(
87 LttTime window_time_begin
,
88 LttTime window_time_end
,