fixed memory leak in test drawing functions
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Drawing.c
index cacabf5c4caf445687e02bbe88bc227483f0d440..be9f3d92b5103294f31eecdceee19ea8ba718837 100644 (file)
@@ -6,6 +6,11 @@
 
 #include <lttv/processTrace.h>
 
+
+#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+
+
 /*****************************************************************************
  *                              Drawing functions                            *
  *****************************************************************************/
@@ -32,15 +37,6 @@ static GdkColor CF_Colors [] =
 };
 
 
-//struct _Drawing_t {
-//     GtkWidget       *Drawing_Area_V;
-//     GdkPixmap       *Pixmap;
-//     ControlFlowData *Control_Flow_Data;
-
-//     gint            height, width, depth;
-
-//};
-
 /* Function responsible for updating the exposed area.
  * It must call processTrace() to ask for this update.
  */
@@ -50,6 +46,12 @@ void drawing_data_request(Drawing_t *Drawing,
                  gint width,
                        gint height)
 {
+       
+//     start from pixel to time(x)
+//     end from pixel to time (x + width)
+       
+//     LttvTracesetContext * tsc = get_traceset_context(event_viewer_data->mw);
+       
   if(width < 0) return ;
   if(height < 0) return ;
 
@@ -67,6 +69,13 @@ void drawing_data_request(Drawing_t *Drawing,
        guicontrolflow_get_process_list(Drawing->Control_Flow_Data),
        Drawing, *Pixmap, x, y, width, height);
   
+       // Let's call processTrace() !!
+       
+       
+       //lttv_process_traceset_seek_time(tsc, start);
+       //lttv_traceset_context_add_hooks(
+       //lttv_process_traceset
+       //lttv_traceset_context_remove_hooks
 }
                      
 /* Callbacks */
@@ -147,7 +156,6 @@ g_critical("missing data");
 //                   widget->allocation.height -
 //                                     Drawing->height);
  
-
   
   
   if (Drawing->Pixmap)
@@ -288,6 +296,7 @@ void drawing_refresh (      Drawing_t *Drawing,
                        guint x, guint y,
                        guint width, guint height)
 {
+       g_info("Drawing.c : drawing_refresh %u, %u, %u, %u", x, y, width, height);
        GdkRectangle update_rect;
 
        gdk_draw_drawable(
@@ -444,3 +453,5 @@ void drawing_remove_square(Drawing_t *Drawing,
        update_rect.height = Drawing->height - y ;
        gtk_widget_draw( Drawing->Drawing_Area_V, &update_rect);
 }
+
+
This page took 0.023366 seconds and 4 git commands to generate.