Port histogram window to 2.x
[lttv.git] / lttv / modules / gui / histogram / histodrawing.c
index 0b2adcbe28656bda80e16ffc8a3336f1ec856d21..47829c6434119ae80c82b15b6beab71fedb00295 100644 (file)
@@ -27,7 +27,6 @@
 #include <ltt/trace.h>
 
 #include <lttv/lttv.h>
-#include <lttv/tracecontext.h>
 #include <lttvwindow/lttvwindow.h>
 #include <lttv/state.h>
 #include <lttv/hook.h>
@@ -132,11 +131,10 @@ void histo_drawing_data_request(histoDrawing_t *drawing,
 }
  
 
-void histo_drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState *tss)
+void histo_drawing_data_request_begin(EventsRequest *events_request, LttvTraceset *traceset)
 {
   g_debug("Begin of data request");
   HistoControlFlowData *cfd = events_request->viewer_data;
-  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
   TimeWindow time_window = 
     lttvwindow_get_time_window(cfd->tab);
 
@@ -153,11 +151,10 @@ void histo_drawing_data_request_begin(EventsRequest *events_request, LttvTracese
 
  }
 
-void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss)
+void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTraceset *traceset)
 {
   g_debug("Begin of chunk");
   HistoControlFlowData *cfd = events_request->viewer_data;
-  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
 
   if(cfd->chunk_has_begun) return;
 
@@ -166,14 +163,13 @@ void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState
 
 
 void histo_drawing_request_expose(EventsRequest *events_request,
-                            LttvTracesetState *tss,
+                            LttvTraceset *traceset,
                             LttTime end_time)
 {
   HistoControlFlowData *cfd = events_request->viewer_data;
   histoDrawing_t *drawing = cfd->drawing;
    
   guint x, x_end, width;
-  LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
     
   TimeWindow time_window = 
         lttvwindow_get_time_window(cfd->tab);
@@ -749,8 +745,6 @@ void histo_drawing_destroy(histoDrawing_t *drawing)
 
 void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to)
 { 
-  
-  HistoControlFlowData *cfd = drawing->histo_control_flow_data;
   guint clear_width = clear_to- clear_from;
  /* 
   //disabled for histogram
@@ -926,20 +920,7 @@ void drawing_remove_square(histoDrawing_t *drawing,
 
 void histo_drawing_update_ruler(histoDrawing_t *drawing, TimeWindow *time_window)
 {
-  GtkRequisition req;
-  GdkRectangle rect;
-  
-  req.width = drawing->ruler->allocation.width;
-  req.height = drawing->ruler->allocation.height;
-
-  rect.x = 0;
-  rect.y = 0;
-  rect.width = req.width;
-  rect.height = req.height;
-
   gtk_widget_queue_draw(drawing->ruler);
-  //gtk_widget_draw( drawing->ruler, &rect);
 }
 
 /* Redraw the ruler */
@@ -1057,19 +1038,7 @@ histo_expose_ruler( GtkWidget *widget, GdkEventExpose *event, gpointer user_data
 
  void histo_drawing_update_vertical_ruler(histoDrawing_t *drawing)//, TimeWindow *time_window)
 {
-  GtkRequisition req;
-  GdkRectangle rect;
-  
-  req.width = drawing->vertical_ruler->allocation.width;
-  req.height = drawing->vertical_ruler->allocation.height;
-  rect.x = 0;
-  rect.y = 0;
-  rect.width = req.width;
-  rect.height = req.height;
-
   gtk_widget_queue_draw(drawing->vertical_ruler);
-  //gtk_widget_draw( drawing->ruler, &rect);
 }
 
 /* notify mouse on ruler */
@@ -1107,7 +1076,7 @@ histo_expose_vertical_ruler( GtkWidget *widget, GdkEventExpose *event, gpointer
   GdkColor foreground = { 0, 0, 0, 0 };
   GdkColor background = { 0, 0xffff, 0xffff, 0xffff };
   GdkColor red ={ 0, 0xFFFF, 0x1E00, 0x1000 };
-  GdkColor magneta ={ 0, 0x8900, 0x0000, 0x8400 };
+  //GdkColor magneta ={ 0, 0x8900, 0x0000, 0x8400 };
   g_debug("vertical ruler expose event");
  
   gdk_draw_rectangle (drawing->vertical_ruler->window,
This page took 0.026565 seconds and 4 git commands to generate.