+ pango_font_description_set_size(FontDesc, 6*PANGO_SCALE);
+ pango_layout_context_changed(layout);
+
+ pango_layout_set_text(layout, text, -1);
+ pango_layout_get_pixel_extents(layout, &ink_rect, NULL);
+ global_width += ink_rect.width;
+
+ gdk_draw_layout_with_colors(drawing->ruler->window,
+ gc,
+ 0,
+ 6,
+ layout, &foreground, &background);
+
+ gdk_gc_set_line_attributes(gc,
+ 2,
+ GDK_LINE_SOLID,
+ GDK_CAP_ROUND,
+ GDK_JOIN_ROUND);
+
+ gdk_draw_line (drawing->ruler->window,
+ gc,
+ 1, 1,
+ 1, 7);
+
+
+ snprintf(text, 255, "%lus\n%luns", window_end.tv_sec,
+ window_end.tv_nsec);
+
+ pango_layout_set_text(layout, text, -1);
+ pango_layout_get_pixel_extents(layout, &ink_rect, NULL);
+ global_width += ink_rect.width;
+
+ if(global_width <= drawing->ruler->allocation.width)
+ {
+ gdk_draw_layout_with_colors(drawing->ruler->window,
+ gc,
+ drawing->ruler->allocation.width - ink_rect.width,
+ 6,
+ layout, &foreground, &background);
+
+ gdk_gc_set_line_attributes(gc,
+ 2,
+ GDK_LINE_SOLID,
+ GDK_CAP_ROUND,
+ GDK_JOIN_ROUND);
+
+ gdk_draw_line (drawing->ruler->window,
+ gc,
+ drawing->ruler->allocation.width-1, 1,
+ drawing->ruler->allocation.width-1, 7);
+ }
+
+
+ snprintf(text, 255, "%lus\n%luns", window_middle.tv_sec,
+ window_middle.tv_nsec);
+
+ pango_layout_set_text(layout, text, -1);
+ pango_layout_get_pixel_extents(layout, &ink_rect, NULL);
+ global_width += ink_rect.width;
+
+ if(global_width <= drawing->ruler->allocation.width)
+ {
+ gdk_draw_layout_with_colors(drawing->ruler->window,
+ gc,
+ (drawing->ruler->allocation.width - ink_rect.width)/2,
+ 6,
+ layout, &foreground, &background);
+
+ gdk_gc_set_line_attributes(gc,
+ 2,
+ GDK_LINE_SOLID,
+ GDK_CAP_ROUND,
+ GDK_JOIN_ROUND);
+
+ gdk_draw_line (drawing->ruler->window,
+ gc,
+ drawing->ruler->allocation.width/2, 1,
+ drawing->ruler->allocation.width/2, 7);
+
+
+
+
+ }
+
+ gdk_gc_unref(gc);
+ g_object_unref(layout);
+
+ return FALSE;
+}
+
+
+/* notify mouse on ruler */
+static gboolean
+motion_notify_ruler(GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
+{
+ //g_critical("motion");
+ //eventually follow mouse and show time here
+}