mega modif by Mathieu Desnoyers. Independant main windows, multiple tracesets, contro...
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Drawing.h
1 #ifndef _DRAWING_H
2 #define _DRAWING_H
3
4 #include <glib.h>
5 #include <gdk/gdk.h>
6 #include <gtk/gtk.h>
7 #include <ltt/ltt.h>
8 #include "CFV.h"
9
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 and 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.
18 *
19 * The pixmap used has the width of the physical window, but the height
20 * of the shown processes.
21 */
22
23 typedef struct _Drawing_t Drawing_t;
24
25
26 //FIXME : TEMPORARILY FOR GC !!
27 struct _Drawing_t {
28 GtkWidget *Drawing_Area_V;
29 GdkPixmap *Pixmap;
30 ControlFlowData *Control_Flow_Data;
31
32 gint height, width, depth;
33
34 };
35
36
37 Drawing_t *Drawing_construct(ControlFlowData *Control_Flow_Data);
38 void Drawing_destroy(Drawing_t *Drawing);
39
40 GtkWidget *Drawing_getWidget(Drawing_t *Drawing);
41
42 //void Drawing_Refresh ( Drawing_t *Drawing,
43 // guint x, guint y,
44 // guint width, guint height);
45
46 void Drawing_draw_line( Drawing_t *Drawing,
47 GdkPixmap *Pixmap,
48 guint x1, guint y1,
49 guint x2, guint y2,
50 GdkGC *GC);
51
52 //void Drawing_copy( Drawing_t *Drawing,
53 // guint xsrc, guint ysrc,
54 // guint xdest, guint ydest,
55 // guint width, guint height);
56
57 /* Insert a square corresponding to a new process in the list */
58 void Drawing_Insert_Square(Drawing_t *Drawing,
59 guint y,
60 guint height);
61
62 /* Remove a square corresponding to a removed process in the list */
63 void Drawing_Remove_Square(Drawing_t *Drawing,
64 guint y,
65 guint height);
66
67
68 //void Drawing_Resize(Drawing_t *Drawing, guint h, guint w);
69
70 void convert_pixels_to_time(
71 Drawing_t *Drawing,
72 guint x,
73 LttTime *window_time_begin,
74 LttTime *window_time_end,
75 LttTime *begin);
76
77 void convert_time_to_pixels(
78 LttTime window_time_begin,
79 LttTime window_time_end,
80 LttTime time,
81 Drawing_t *Drawing,
82 guint *x);
83
84 #endif // _DRAWING_H
This page took 0.033881 seconds and 4 git commands to generate.