correct bug : need EXIT and ZOMBIE states : one for exit event, the other for schedul...
[lttv.git] / ltt / branches / poly / lttv / modules / gui / controlflow / drawing.h
index 29ac461c989812f892f78e6795326711cde665d2..30b70f1ea6eb6874c3ba9ca88375d7087df9a07b 100644 (file)
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 #include <ltt/ltt.h>
+#include <lttv/tracecontext.h>
+#include <lttv/state.h>
+#include <lttvwindow/lttvwindow.h>
 #include "cfv.h"
 #include "drawitem.h"
 
 
 #define SAFETY 50 // safety pixels at right and bottom of pixmap buffer
 
+
+typedef enum _draw_color { COL_BLACK,
+                           COL_WHITE,
+                           COL_WAIT_FORK,
+                           COL_WAIT_CPU,
+                           COL_EXIT,
+                           COL_ZOMBIE,
+                           COL_WAIT,
+                           COL_RUN,
+                           COL_USER_MODE,
+                           COL_SYSCALL,
+                           COL_TRAP,
+                           COL_IRQ,
+                           COL_MODE_UNKNOWN,
+                           NUM_COLORS } draw_color;
+
+extern GdkColor drawing_colors[NUM_COLORS];
+
 /* This part of the viewer does :
  * Draw horizontal lines, getting graphic context as arg.
  * Copy region of the screen into another.
@@ -57,15 +78,30 @@ typedef struct _Drawing_t Drawing_t;
 struct _Drawing_t {
   GtkWidget *vbox;
   GtkWidget *drawing_area;
+  //GtkWidget *scrolled_window;
+  GtkWidget *hbox;
+  GtkWidget *viewport;
+  GtkWidget *scrollbar;
+  
+  GtkWidget *ruler_hbox;
   GtkWidget *ruler;
+  GtkWidget *padding;
   GdkPixmap *pixmap;
   ControlFlowData *control_flow_data;
   
   PangoLayout *pango_layout;
 
   gint      height, width, depth;
-  gboolean  data_injected;
   
+  /* X coordinate of damaged region */
+  gint      damage_begin, damage_end; /* damaged region to be exposed,
+                                         updated per chunk */
+  LttTime   last_start;               
+  GdkGC     *dotted_gc;
+  GdkGC     *gc;
+
+  /* Position of the horizontal selector, -1 for none */
+  gint horizontal_sel;
 };
 
 Drawing_t *drawing_construct(ControlFlowData *control_flow_data);
@@ -85,6 +121,9 @@ void drawing_draw_line( Drawing_t *drawing,
 //    guint xdest, guint ydest,
 //    guint width, guint height);
 
+/* Clear the drawing : make it 1xwidth. */
+void drawing_clear(Drawing_t *drawing);
+
 /* Insert a square corresponding to a new process in the list */
 void drawing_insert_square(Drawing_t *drawing,
         guint y,
@@ -95,9 +134,6 @@ void drawing_remove_square(Drawing_t *drawing,
         guint y,
         guint height);
 
-
-//void drawing_Resize(Drawing_t *drawing, guint h, guint w);
-
 void convert_pixels_to_time(
     gint width,
     guint x,
@@ -114,8 +150,20 @@ void convert_time_to_pixels(
 
 void drawing_update_ruler(Drawing_t *drawing, TimeWindow *time_window);
 
-void drawing_data_request_end(Drawing_t *drawing,
-                              TimeWindow req_time_window);
+void drawing_request_expose(EventsRequest *events_request,
+                            LttvTracesetState *tss,
+                            LttTime end_time);
+
+void drawing_data_request_begin(EventsRequest *events_request,
+                                LttvTracesetState *tss);
+void drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss);
+
+
 
+void
+tree_row_activated(GtkTreeModel *treemodel,
+                   GtkTreePath *arg1,
+                   GtkTreeViewColumn *arg2,
+                   gpointer user_data);
 
 #endif // _DRAWING_H
This page took 0.023715 seconds and 4 git commands to generate.