#ifndef _DRAWING_H
#define _DRAWING_H
-#include <time.h>
#include <glib.h>
-
-typedef time_t ltt_time;
-
-typedef struct _ltt_time_interval
-{
- ltt_time time_begin, time_end;
-} ltt_time_interval;
-
-
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+#include <ltt/ltt.h>
+
+/* This part of the viewer does :
+ * Draw horizontal lines, getting graphic context as arg.
+ * Copy region of the screen into another.
+ * Modify the boundaries to reflect a scale change. (resize)
+ *
+ * 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;
-Drawing_t *Drawing(void);
+Drawing_t *Drawing_construct(void);
void Drawing_destroy(Drawing_t *Drawing);
-void Drawing_Resize(Drawing_t *Drawing, guint h, guint w);
+GtkWidget *Drawing_getWidget(Drawing_t *Drawing);
+
+
+void Drawing_draw_line( guint x1, guint y1, guint x2, guint y2,
+ GdkGC *GC);
+void Drawing_copy(guint xsrc, guint ysrc,
+ guint xdest, guint ydest,
+ guint width, guint height);
-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 Drawing_Resize(Drawing_t *Drawing, guint h, guint w);
+
+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