f0d936c0 |
1 | #ifndef _DRAWING_H |
2 | #define _DRAWING_H |
3 | |
558aa013 |
4 | #include <glib.h> |
fa2c4dbe |
5 | #include <ltt/ltt.h> |
f0d936c0 |
6 | |
fa2c4dbe |
7 | /* This part of the viewer does : |
8 | * Draw horizontal lines, getting line color and width as arguments. |
9 | * Copy region of the screen into another. |
10 | * Modify the boundaries to reflect a scale change. |
11 | * |
12 | * A helper function is provided here to convert from time and process |
13 | * identifier to pixels and the contrary (will be useful for mouse selection). |
14 | */ |
f0d936c0 |
15 | |
16 | typedef struct _Drawing_t Drawing_t; |
17 | |
18 | Drawing_t *Drawing(void); |
19 | void Drawing_destroy(Drawing_t *Drawing); |
558aa013 |
20 | void Drawing_Resize(Drawing_t *Drawing, guint h, guint w); |
f0d936c0 |
21 | |
22 | |
23 | |
fa2c4dbe |
24 | void convert_pixels_to_time( |
25 | Drawing_t *Drawing, |
26 | guint x, |
27 | LttTime *window_time_begin, |
28 | LttTime *window_time_end, |
29 | LttTime *begin); |
30 | |
31 | void convert_time_to_pixels( |
32 | LttTime window_time_begin, |
33 | LttTime window_time_end, |
34 | LttTime time, |
35 | Drawing_t *Drawing, |
36 | guint *x); |
f0d936c0 |
37 | |
38 | |
39 | #endif // _DRAWING_H |