X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FDrawing.h;h=801ef2d196972db8f31bde6abe1c60e871d704af;hb=fa2c4dbef9d6f7f509a1d13ca8b7d16f95236100;hp=a3c28e44798c3d8663a5887ddde9b41dab6a8a12;hpb=091d11c77deb2a6537bf2c1ce89ba8877441cba9;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h index a3c28e44..801ef2d1 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h @@ -1,17 +1,17 @@ #ifndef _DRAWING_H #define _DRAWING_H -#include #include +#include -typedef time_t ltt_time; - -typedef struct _ltt_time_interval -{ - ltt_time time_begin, time_end; -} ltt_time_interval; - - +/* This part of the viewer does : + * Draw horizontal lines, getting line color and width as arguments. + * Copy region of the screen into another. + * Modify the boundaries to reflect a scale change. + * + * A helper function is provided here to convert from time and process + * identifier to pixels and the contrary (will be useful for mouse selection). + */ typedef struct _Drawing_t Drawing_t; @@ -21,14 +21,19 @@ void Drawing_Resize(Drawing_t *Drawing, guint h, guint w); -void get_time_from_pixels( - guint area_x, - guint area_width, - guint window_width, - ltt_time *window_time_begin, - ltt_time *window_time_end, - ltt_time *time_begin, - ltt_time *time_end); +void convert_pixels_to_time( + Drawing_t *Drawing, + guint x, + LttTime *window_time_begin, + LttTime *window_time_end, + LttTime *begin); + +void convert_time_to_pixels( + LttTime window_time_begin, + LttTime window_time_end, + LttTime time, + Drawing_t *Drawing, + guint *x); #endif // _DRAWING_H