X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fcontrolflow%2Fdrawing.h;h=d07ed4e771e1262fd6c15526a5d426cf3722210a;hb=20640e7057725a118fcca68e8675946561293a75;hp=37dfc8385c1befb0bff148a803c80718db14e59d;hpb=51705146eabfc882972ca6bc815dc78addcee896;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.h b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.h index 37dfc838..d07ed4e7 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.h +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.h @@ -33,6 +33,24 @@ #define SAFETY 50 // safety pixels at right and bottom of pixmap buffer +typedef enum _draw_color { + COL_BLACK, + COL_WHITE, + COL_RUN_USER_MODE,/* green */ + COL_RUN_SYSCALL, /* pale blue */ + COL_RUN_TRAP, /* yellow */ + COL_RUN_IRQ, /* red */ + COL_WAIT, /* dark red */ + COL_WAIT_CPU, /* dark yellow */ + COL_ZOMBIE, /* dark purple */ + COL_WAIT_FORK, /* dark green */ + COL_EXIT, /* "less dark" magenta */ + COL_MODE_UNKNOWN, /* white */ + COL_UNNAMED, /* white */ + 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. @@ -76,10 +94,14 @@ struct _Drawing_t { gint height, width, depth; /* X coordinate of damaged region */ - gint damage_begin, damage_end; - LttTime last_start; + 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); @@ -99,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, @@ -109,16 +134,17 @@ void drawing_remove_square(Drawing_t *drawing, guint y, guint height); - -void convert_pixels_to_time( +__inline void convert_pixels_to_time( gint width, guint x, LttTime window_time_begin, + LttTime window_time_interval, LttTime window_time_end, LttTime *time); -void convert_time_to_pixels( +__inline void convert_time_to_pixels( LttTime window_time_begin, + LttTime window_time_interval, LttTime window_time_end, LttTime time, gint width, @@ -126,6 +152,20 @@ void convert_time_to_pixels( void drawing_update_ruler(Drawing_t *drawing, TimeWindow *time_window); -void drawing_data_request_end(EventsRequest *events_request, LttvTracesetState *tss); +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