From: compudj Date: Sat, 17 Jan 2004 04:18:18 +0000 (+0000) Subject: Drawing.h attribute name change X-Git-Tag: v0.12.20~3097 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=14963be07f6a9c7c2db0d988f557b870ebd5dead;p=lttv.git Drawing.h attribute name change git-svn-id: http://ltt.polymtl.ca/svn@392 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c index 22081aa2..3bd8629e 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c @@ -56,7 +56,7 @@ void drawing_data_request(Drawing_t *Drawing, ControlFlowData *control_flow_data = (ControlFlowData*)g_object_get_data( G_OBJECT( - Drawing->Drawing_Area_V), + Drawing->drawing_area), "control_flow_data"); LttTime start, end; @@ -71,12 +71,12 @@ void drawing_data_request(Drawing_t *Drawing, g_critical("x is : %i, x+width is : %i", x, x+width); - convert_pixels_to_time(Drawing->Drawing_Area_V->allocation.width, x, + convert_pixels_to_time(Drawing->drawing_area->allocation.width, x, &control_flow_data->time_window.start_time, &window_end, &start); - convert_pixels_to_time(Drawing->Drawing_Area_V->allocation.width, x + width, + convert_pixels_to_time(Drawing->drawing_area->allocation.width, x + width, &control_flow_data->time_window.start_time, &window_end, &end); @@ -252,7 +252,7 @@ configure_event( GtkWidget *widget, GdkEventConfigure *event, /* Clear the backgound for data request, but not SAFETY */ gdk_draw_rectangle (Pixmap, - Drawing->Drawing_Area_V->style->white_gc, + Drawing->drawing_area->style->white_gc, TRUE, Drawing->width + SAFETY, 0, widget->allocation.width - Drawing->width, // do not overlap @@ -361,55 +361,55 @@ Drawing_t *drawing_construct(ControlFlowData *control_flow_data) { Drawing_t *Drawing = g_new(Drawing_t, 1); - Drawing->Drawing_Area_V = gtk_drawing_area_new (); + Drawing->drawing_area = gtk_drawing_area_new (); Drawing->control_flow_data = control_flow_data; Drawing->pango_layout = - gtk_widget_create_pango_layout(Drawing->Drawing_Area_V, NULL); + gtk_widget_create_pango_layout(Drawing->drawing_area, NULL); - //gtk_widget_set_size_request(Drawing->Drawing_Area_V->window, 50, 50); + //gtk_widget_set_size_request(Drawing->drawing_area->window, 50, 50); g_object_set_data_full( - G_OBJECT(Drawing->Drawing_Area_V), + G_OBJECT(Drawing->drawing_area), "Link_Drawing_Data", Drawing, (GDestroyNotify)drawing_destroy); - //gtk_widget_modify_bg( Drawing->Drawing_Area_V, + //gtk_widget_modify_bg( Drawing->drawing_area, // GTK_STATE_NORMAL, // &CF_Colors[BLACK]); - //gdk_window_get_geometry(Drawing->Drawing_Area_V->window, + //gdk_window_get_geometry(Drawing->drawing_area->window, // NULL, NULL, // &(Drawing->width), // &(Drawing->height), // -1); //Drawing->Pixmap = gdk_pixmap_new( - // Drawing->Drawing_Area_V->window, + // Drawing->drawing_area->window, // Drawing->width, // Drawing->height, // Drawing->depth); Drawing->Pixmap = NULL; -// Drawing->Pixmap = gdk_pixmap_new(Drawing->Drawing_Area_V->window, -// Drawing->Drawing_Area_V->allocation.width, -// Drawing->Drawing_Area_V->allocation.height, +// Drawing->Pixmap = gdk_pixmap_new(Drawing->drawing_area->window, +// Drawing->drawing_area->allocation.width, +// Drawing->drawing_area->allocation.height, // -1); - gtk_widget_add_events(Drawing->Drawing_Area_V, GDK_BUTTON_PRESS_MASK); + gtk_widget_add_events(Drawing->drawing_area, GDK_BUTTON_PRESS_MASK); - g_signal_connect (G_OBJECT(Drawing->Drawing_Area_V), + g_signal_connect (G_OBJECT(Drawing->drawing_area), "configure_event", G_CALLBACK (configure_event), (gpointer)Drawing); - g_signal_connect (G_OBJECT(Drawing->Drawing_Area_V), + g_signal_connect (G_OBJECT(Drawing->drawing_area), "expose_event", G_CALLBACK (expose_event), (gpointer)Drawing); - g_signal_connect (G_OBJECT(Drawing->Drawing_Area_V), + g_signal_connect (G_OBJECT(Drawing->drawing_area), "button-press-event", G_CALLBACK (button_press_event), (gpointer)Drawing); @@ -422,7 +422,7 @@ void drawing_destroy(Drawing_t *Drawing) { // Do not unref here, Drawing_t destroyed by it's widget. - //g_object_unref( G_OBJECT(Drawing->Drawing_Area_V)); + //g_object_unref( G_OBJECT(Drawing->drawing_area)); g_free(Drawing->pango_layout); g_free(Drawing); @@ -430,7 +430,7 @@ void drawing_destroy(Drawing_t *Drawing) GtkWidget *drawing_get_widget(Drawing_t *Drawing) { - return Drawing->Drawing_Area_V; + return Drawing->drawing_area; } /* convert_pixels_to_time @@ -483,9 +483,9 @@ void drawing_refresh ( Drawing_t *Drawing, GdkRectangle update_rect; gdk_draw_drawable( - Drawing->Drawing_Area_V->window, - Drawing->Drawing_Area_V-> - style->fg_gc[GTK_WIDGET_STATE (Drawing->Drawing_Area_V)], + Drawing->drawing_area->window, + Drawing->drawing_area-> + style->fg_gc[GTK_WIDGET_STATE (Drawing->drawing_area)], GDK_DRAWABLE(Drawing->Pixmap), x, y, x, y, @@ -495,7 +495,7 @@ void drawing_refresh ( Drawing_t *Drawing, update_rect.y = 0 ; update_rect.width = Drawing->width; update_rect.height = Drawing->height ; - gtk_widget_draw( Drawing->Drawing_Area_V, &update_rect); + gtk_widget_draw( Drawing->drawing_area, &update_rect); } @@ -519,7 +519,7 @@ void drawing_resize(Drawing_t *Drawing, guint h, guint w) Drawing->height = h ; Drawing->width = w ; - gtk_widget_set_size_request ( Drawing->Drawing_Area_V, + gtk_widget_set_size_request ( Drawing->drawing_area, Drawing->width, Drawing->height); @@ -536,14 +536,14 @@ void drawing_insert_square(Drawing_t *Drawing, //GdkRectangle update_rect; /* Allocate a new pixmap with new height */ - GdkPixmap *Pixmap = gdk_pixmap_new(Drawing->Drawing_Area_V->window, + GdkPixmap *Pixmap = gdk_pixmap_new(Drawing->drawing_area->window, Drawing->width + SAFETY, Drawing->height + height + SAFETY, -1); /* Copy the high region */ gdk_draw_drawable (Pixmap, - Drawing->Drawing_Area_V->style->black_gc, + Drawing->drawing_area->style->black_gc, Drawing->Pixmap, 0, 0, 0, 0, @@ -554,7 +554,7 @@ void drawing_insert_square(Drawing_t *Drawing, /* add an empty square */ gdk_draw_rectangle (Pixmap, - Drawing->Drawing_Area_V->style->white_gc, + Drawing->drawing_area->style->white_gc, TRUE, 0, y, Drawing->width + SAFETY, // do not overlap @@ -564,7 +564,7 @@ void drawing_insert_square(Drawing_t *Drawing, /* copy the bottom of the region */ gdk_draw_drawable (Pixmap, - Drawing->Drawing_Area_V->style->black_gc, + Drawing->drawing_area->style->black_gc, Drawing->Pixmap, 0, y, 0, y + height, @@ -585,7 +585,7 @@ void drawing_insert_square(Drawing_t *Drawing, //update_rect.y = y ; //update_rect.width = Drawing->width; //update_rect.height = Drawing->height - y ; - //gtk_widget_draw( Drawing->Drawing_Area_V, &update_rect); + //gtk_widget_draw( Drawing->drawing_area, &update_rect); } @@ -598,14 +598,14 @@ void drawing_remove_square(Drawing_t *Drawing, /* Allocate a new pixmap with new height */ GdkPixmap *Pixmap = gdk_pixmap_new( - Drawing->Drawing_Area_V->window, + Drawing->drawing_area->window, Drawing->width + SAFETY, Drawing->height - height + SAFETY, -1); /* Copy the high region */ gdk_draw_drawable (Pixmap, - Drawing->Drawing_Area_V->style->black_gc, + Drawing->drawing_area->style->black_gc, Drawing->Pixmap, 0, 0, 0, 0, @@ -615,7 +615,7 @@ void drawing_remove_square(Drawing_t *Drawing, /* Copy up the bottom of the region */ gdk_draw_drawable (Pixmap, - Drawing->Drawing_Area_V->style->black_gc, + Drawing->drawing_area->style->black_gc, Drawing->Pixmap, 0, y + height, 0, y, @@ -634,7 +634,7 @@ void drawing_remove_square(Drawing_t *Drawing, //update_rect.y = y ; //update_rect.width = Drawing->width; //update_rect.height = Drawing->height - y ; - //gtk_widget_draw( Drawing->Drawing_Area_V, &update_rect); + //gtk_widget_draw( Drawing->drawing_area, &update_rect); } diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h index 4f2f509d..34f7490a 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.h @@ -36,7 +36,7 @@ typedef struct _Drawing_t Drawing_t; struct _Drawing_t { - GtkWidget *Drawing_Area_V; + GtkWidget *drawing_area; GdkPixmap *Pixmap; ControlFlowData *control_flow_data; diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c index f16ed511..111e1340 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c @@ -40,16 +40,16 @@ * * This constructor is given as a parameter to the menuitem and toolbar button * registration. It creates the list. - * @param pmParentWindow A pointer to the parent window. + * @param mw A pointer to the parent window. * @return The widget created. */ GtkWidget * -h_guicontrolflow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * key) +h_guicontrolflow(MainWindow *mw, LttvTracesetSelector * s, char * key) { - g_info("h_guicontrolflow, %p, %p, %s", pmParentWindow, s, key); + g_info("h_guicontrolflow, %p, %p, %s", mw, s, key); ControlFlowData *control_flow_data = guicontrolflow() ; - control_flow_data->mw = pmParentWindow; + control_flow_data->mw = mw; TimeWindow *time_window = guicontrolflow_get_time_window(control_flow_data); time_window->start_time.tv_sec = 0; time_window->start_time.tv_nsec = 0; @@ -62,17 +62,17 @@ h_guicontrolflow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * ke //g_critical("time width1 : %u",time_window->time_width); - get_time_window(pmParentWindow, + get_time_window(mw, time_window); - get_current_time(pmParentWindow, + get_current_time(mw, current_time); //g_critical("time width2 : %u",time_window->time_width); // Unreg done in the GuiControlFlow_Destructor reg_update_time_window(update_time_window_hook, control_flow_data, - pmParentWindow); + mw); reg_update_current_time(update_current_time_hook, control_flow_data, - pmParentWindow); + mw); return guicontrolflow_get_widget(control_flow_data) ; } @@ -80,11 +80,11 @@ h_guicontrolflow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * ke int event_selected_hook(void *hook_data, void *call_data) { ControlFlowData *control_flow_data = (ControlFlowData*) hook_data; - guint *Event_Number = (guint*) call_data; + guint *event_number = (guint*) call_data; - g_critical("DEBUG : event selected by main window : %u", *Event_Number); + g_critical("DEBUG : event selected by main window : %u", *event_number); -// control_flow_data->currently_Selected_Event = *Event_Number; +// control_flow_data->currently_Selected_Event = *event_number; // control_flow_data->Selected_Event = TRUE ; // tree_v_set_cursor(control_flow_data); @@ -92,14 +92,14 @@ int event_selected_hook(void *hook_data, void *call_data) } /* Hook called before drawing. Gets the initial context at the beginning of the - * drawing interval and copy it to the context in Event_Request. + * drawing interval and copy it to the context in event_request. */ int draw_before_hook(void *hook_data, void *call_data) { - EventRequest *Event_Request = (EventRequest*)hook_data; + EventRequest *event_request = (EventRequest*)hook_data; //EventsContext Events_Context = (EventsContext*)call_data; - //Event_Request->Events_Context = Events_Context; + //event_request->Events_Context = Events_Context; return 0; } @@ -126,8 +126,8 @@ int draw_before_hook(void *hook_data, void *call_data) */ int draw_event_hook(void *hook_data, void *call_data) { - EventRequest *Event_Request = (EventRequest*)hook_data; - ControlFlowData *control_flow_data = Event_Request->control_flow_data; + EventRequest *event_request = (EventRequest*)hook_data; + ControlFlowData *control_flow_data = event_request->control_flow_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -149,7 +149,7 @@ int draw_event_hook(void *hook_data, void *call_data) guint y_in = 0, y_out = 0, height = 0, pl_height = 0; ProcessList *process_list = - guicontrolflow_get_process_list(Event_Request->control_flow_data); + guicontrolflow_get_process_list(event_request->control_flow_data); LttField *f = ltt_event_field(e); @@ -167,14 +167,14 @@ int draw_event_hook(void *hook_data, void *call_data) birth = process_out->creation_time; gchar *name = strdup(g_quark_to_string(process_out->name)); - HashedProcessData *Hashed_Process_Data_out = NULL; + HashedProcessData *hashed_process_data_out = NULL; if(processlist_get_process_pixels(process_list, pid_out, &birth, &y_out, &height, - &Hashed_Process_Data_out) == 1) + &hashed_process_data_out) == 1) { /* Process not present */ processlist_add(process_list, @@ -182,14 +182,14 @@ int draw_event_hook(void *hook_data, void *call_data) &birth, name, &pl_height, - &Hashed_Process_Data_out); + &hashed_process_data_out); processlist_get_process_pixels(process_list, pid_out, &birth, &y_out, &height, - &Hashed_Process_Data_out); - drawing_insert_square( Event_Request->control_flow_data->Drawing, y_out, height); + &hashed_process_data_out); + drawing_insert_square( event_request->control_flow_data->Drawing, y_out, height); } g_free(name); @@ -200,14 +200,14 @@ int draw_event_hook(void *hook_data, void *call_data) birth = process_in->creation_time; name = strdup(g_quark_to_string(process_in->name)); - HashedProcessData *Hashed_Process_Data_in = NULL; + HashedProcessData *hashed_process_data_in = NULL; if(processlist_get_process_pixels(process_list, pid_in, &birth, &y_in, &height, - &Hashed_Process_Data_in) == 1) + &hashed_process_data_in) == 1) { /* Process not present */ processlist_add(process_list, @@ -215,15 +215,15 @@ int draw_event_hook(void *hook_data, void *call_data) &birth, name, &pl_height, - &Hashed_Process_Data_in); + &hashed_process_data_in); processlist_get_process_pixels(process_list, pid_in, &birth, &y_in, &height, - &Hashed_Process_Data_in); + &hashed_process_data_in); - drawing_insert_square( Event_Request->control_flow_data->Drawing, y_in, height); + drawing_insert_square( event_request->control_flow_data->Drawing, y_in, height); } g_free(name); @@ -231,7 +231,7 @@ int draw_event_hook(void *hook_data, void *call_data) /* Find pixels corresponding to time of the event. If the time does * not fit in the window, show a warning, not supposed to happend. */ guint x = 0; - guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width; + guint width = control_flow_data->Drawing->drawing_area->allocation.width; LttTime time = ltt_event_time(e); @@ -250,12 +250,12 @@ int draw_event_hook(void *hook_data, void *call_data) /* draw what represents the event for outgoing process. */ - DrawContext *draw_context_out = Hashed_Process_Data_out->draw_context; + DrawContext *draw_context_out = hashed_process_data_out->draw_context; draw_context_out->current->modify_over->x = x; draw_context_out->current->modify_over->y = y_out; draw_context_out->drawable = control_flow_data->Drawing->Pixmap; draw_context_out->pango_layout = control_flow_data->Drawing->pango_layout; - GtkWidget *widget = control_flow_data->Drawing->Drawing_Area_V; + GtkWidget *widget = control_flow_data->Drawing->drawing_area; //draw_context_out->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)]; draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap); gdk_gc_copy(draw_context_out->gc, widget->style->black_gc); @@ -294,8 +294,8 @@ int draw_event_hook(void *hook_data, void *call_data) /* Draw the line of the out process */ if(draw_context_out->previous->middle->x == -1) { - draw_context_out->previous->middle->x = Event_Request->x_begin; - g_critical("out middle x_beg : %u",Event_Request->x_begin); + draw_context_out->previous->middle->x = event_request->x_begin; + g_critical("out middle x_beg : %u",event_request->x_begin); } draw_context_out->current->middle->x = x; @@ -364,12 +364,12 @@ int draw_event_hook(void *hook_data, void *call_data) /* Finally, update the drawing context of the pid_in. */ - DrawContext *draw_context_in = Hashed_Process_Data_in->draw_context; + DrawContext *draw_context_in = hashed_process_data_in->draw_context; draw_context_in->current->modify_over->x = x; draw_context_in->current->modify_over->y = y_in; draw_context_in->drawable = control_flow_data->Drawing->Pixmap; draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout; - widget = control_flow_data->Drawing->Drawing_Area_V; + widget = control_flow_data->Drawing->drawing_area; //draw_context_in->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)]; //draw_context_in->gc = widget->style->black_gc; draw_context_in->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap); @@ -408,8 +408,8 @@ int draw_event_hook(void *hook_data, void *call_data) /* Draw the line of the in process */ if(draw_context_in->previous->middle->x == -1) { - draw_context_in->previous->middle->x = Event_Request->x_begin; - g_critical("in middle x_beg : %u",Event_Request->x_begin); + draw_context_in->previous->middle->x = event_request->x_begin; + g_critical("in middle x_beg : %u",event_request->x_begin); } draw_context_in->current->middle->x = x; @@ -503,8 +503,8 @@ int draw_event_hook(void *hook_data, void *call_data) int draw_after_hook(void *hook_data, void *call_data) { - EventRequest *Event_Request = (EventRequest*)hook_data; - ControlFlowData *control_flow_data = Event_Request->control_flow_data; + EventRequest *event_request = (EventRequest*)hook_data; + ControlFlowData *control_flow_data = event_request->control_flow_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -526,7 +526,7 @@ int draw_after_hook(void *hook_data, void *call_data) guint y_in = 0, y_out = 0, height = 0, pl_height = 0; ProcessList *process_list = - guicontrolflow_get_process_list(Event_Request->control_flow_data); + guicontrolflow_get_process_list(event_request->control_flow_data); LttField *f = ltt_event_field(e); @@ -544,14 +544,14 @@ int draw_after_hook(void *hook_data, void *call_data) birth = process_out->creation_time; gchar *name = strdup(g_quark_to_string(process_out->name)); - HashedProcessData *Hashed_Process_Data_out = NULL; + HashedProcessData *hashed_process_data_out = NULL; if(processlist_get_process_pixels(process_list, pid_out, &birth, &y_out, &height, - &Hashed_Process_Data_out) == 1) + &hashed_process_data_out) == 1) { /* Process not present */ processlist_add(process_list, @@ -559,14 +559,14 @@ int draw_after_hook(void *hook_data, void *call_data) &birth, name, &pl_height, - &Hashed_Process_Data_out); + &hashed_process_data_out); processlist_get_process_pixels(process_list, pid_out, &birth, &y_out, &height, - &Hashed_Process_Data_out); - drawing_insert_square( Event_Request->control_flow_data->Drawing, y_out, height); + &hashed_process_data_out); + drawing_insert_square( event_request->control_flow_data->Drawing, y_out, height); } g_free(name); @@ -577,14 +577,14 @@ int draw_after_hook(void *hook_data, void *call_data) birth = process_in->creation_time; name = strdup(g_quark_to_string(process_in->name)); - HashedProcessData *Hashed_Process_Data_in = NULL; + HashedProcessData *hashed_process_data_in = NULL; if(processlist_get_process_pixels(process_list, pid_in, &birth, &y_in, &height, - &Hashed_Process_Data_in) == 1) + &hashed_process_data_in) == 1) { /* Process not present */ processlist_add(process_list, @@ -592,15 +592,15 @@ int draw_after_hook(void *hook_data, void *call_data) &birth, name, &pl_height, - &Hashed_Process_Data_in); + &hashed_process_data_in); processlist_get_process_pixels(process_list, pid_in, &birth, &y_in, &height, - &Hashed_Process_Data_in); + &hashed_process_data_in); - drawing_insert_square( Event_Request->control_flow_data->Drawing, y_in, height); + drawing_insert_square( event_request->control_flow_data->Drawing, y_in, height); } g_free(name); @@ -608,7 +608,7 @@ int draw_after_hook(void *hook_data, void *call_data) /* Find pixels corresponding to time of the event. If the time does * not fit in the window, show a warning, not supposed to happend. */ //guint x = 0; - //guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width; + //guint width = control_flow_data->Drawing->drawing_area->allocation.width; //LttTime time = ltt_event_time(e); @@ -627,12 +627,12 @@ int draw_after_hook(void *hook_data, void *call_data) /* draw what represents the event for outgoing process. */ - DrawContext *draw_context_out = Hashed_Process_Data_out->draw_context; + DrawContext *draw_context_out = hashed_process_data_out->draw_context; //draw_context_out->current->modify_over->x = x; draw_context_out->current->modify_over->y = y_out; draw_context_out->drawable = control_flow_data->Drawing->Pixmap; draw_context_out->pango_layout = control_flow_data->Drawing->pango_layout; - GtkWidget *widget = control_flow_data->Drawing->Drawing_Area_V; + GtkWidget *widget = control_flow_data->Drawing->drawing_area; //draw_context_out->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)]; draw_context_out->gc = widget->style->black_gc; @@ -702,12 +702,12 @@ int draw_after_hook(void *hook_data, void *call_data) /* Finally, update the drawing context of the pid_in. */ - DrawContext *draw_context_in = Hashed_Process_Data_in->draw_context; + DrawContext *draw_context_in = hashed_process_data_in->draw_context; //draw_context_in->current->modify_over->x = x; draw_context_in->current->modify_over->y = y_in; draw_context_in->drawable = control_flow_data->Drawing->Pixmap; draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout; - widget = control_flow_data->Drawing->Drawing_Area_V; + widget = control_flow_data->Drawing->drawing_area; //draw_context_in->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)]; draw_context_in->gc = widget->style->black_gc; @@ -786,9 +786,9 @@ int draw_after_hook(void *hook_data, void *call_data) gint update_time_window_hook(void *hook_data, void *call_data) { ControlFlowData *control_flow_data = (ControlFlowData*) hook_data; - TimeWindow *Old_time_window = + TimeWindow *old_time_window = guicontrolflow_get_time_window(control_flow_data); - TimeWindow *New_time_window = ((TimeWindow*)call_data); + TimeWindow *new_time_window = ((TimeWindow*)call_data); /* Two cases : zoom in/out or scrolling */ @@ -798,28 +798,28 @@ gint update_time_window_hook(void *hook_data, void *call_data) */ g_info("Old time window HOOK : %u, %u to %u, %u", - Old_time_window->start_time.tv_sec, - Old_time_window->start_time.tv_nsec, - Old_time_window->time_width.tv_sec, - Old_time_window->time_width.tv_nsec); + old_time_window->start_time.tv_sec, + old_time_window->start_time.tv_nsec, + old_time_window->time_width.tv_sec, + old_time_window->time_width.tv_nsec); g_info("New time window HOOK : %u, %u to %u, %u", - New_time_window->start_time.tv_sec, - New_time_window->start_time.tv_nsec, - New_time_window->time_width.tv_sec, - New_time_window->time_width.tv_nsec); + new_time_window->start_time.tv_sec, + new_time_window->start_time.tv_nsec, + new_time_window->time_width.tv_sec, + new_time_window->time_width.tv_nsec); - if( New_time_window->time_width.tv_sec == Old_time_window->time_width.tv_sec - && New_time_window->time_width.tv_nsec == Old_time_window->time_width.tv_nsec) + if( new_time_window->time_width.tv_sec == old_time_window->time_width.tv_sec + && new_time_window->time_width.tv_nsec == old_time_window->time_width.tv_nsec) { /* Same scale (scrolling) */ g_info("scrolling"); - LttTime *ns = &New_time_window->start_time; - LttTime *os = &Old_time_window->start_time; - LttTime old_end = ltt_time_add(Old_time_window->start_time, - Old_time_window->time_width); - LttTime new_end = ltt_time_add(New_time_window->start_time, - New_time_window->time_width); + LttTime *ns = &new_time_window->start_time; + LttTime *os = &old_time_window->start_time; + LttTime old_end = ltt_time_add(old_time_window->start_time, + old_time_window->time_width); + LttTime new_end = ltt_time_add(new_time_window->start_time, + new_time_window->time_width); //if(nsDrawing->Drawing_Area_V->allocation.width; + guint width = control_flow_data->Drawing->drawing_area->allocation.width; convert_time_to_pixels( *os, old_end, @@ -839,7 +839,7 @@ gint update_time_window_hook(void *hook_data, void *call_data) /* Copy old data to new location */ gdk_draw_drawable (control_flow_data->Drawing->Pixmap, - control_flow_data->Drawing->Drawing_Area_V->style->white_gc, + control_flow_data->Drawing->drawing_area->style->white_gc, control_flow_data->Drawing->Pixmap, x, 0, 0, 0, @@ -852,10 +852,10 @@ gint update_time_window_hook(void *hook_data, void *call_data) width, &x); - *Old_time_window = *New_time_window; + *old_time_window = *new_time_window; /* Clear the data request background, but not SAFETY */ gdk_draw_rectangle (control_flow_data->Drawing->Pixmap, - control_flow_data->Drawing->Drawing_Area_V->style->white_gc, + control_flow_data->Drawing->drawing_area->style->white_gc, TRUE, x+SAFETY, 0, control_flow_data->Drawing->width - x, // do not overlap @@ -883,7 +883,7 @@ gint update_time_window_hook(void *hook_data, void *call_data) g_info("scrolling near left"); /* Scroll left, keep left part of the screen */ guint x = 0; - guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width; + guint width = control_flow_data->Drawing->drawing_area->allocation.width; convert_time_to_pixels( *ns, new_end, @@ -893,17 +893,17 @@ gint update_time_window_hook(void *hook_data, void *call_data) /* Copy old data to new location */ gdk_draw_drawable (control_flow_data->Drawing->Pixmap, - control_flow_data->Drawing->Drawing_Area_V->style->white_gc, + control_flow_data->Drawing->drawing_area->style->white_gc, control_flow_data->Drawing->Pixmap, 0, 0, x, 0, -1, -1); - *Old_time_window = *New_time_window; + *old_time_window = *new_time_window; /* Clean the data request background */ gdk_draw_rectangle (control_flow_data->Drawing->Pixmap, - control_flow_data->Drawing->Drawing_Area_V->style->white_gc, + control_flow_data->Drawing->drawing_area->style->white_gc, TRUE, 0, 0, x, // do not overlap @@ -923,11 +923,11 @@ gint update_time_window_hook(void *hook_data, void *call_data) } else { g_info("scrolling far"); /* Cannot reuse any part of the screen : far jump */ - *Old_time_window = *New_time_window; + *old_time_window = *new_time_window; gdk_draw_rectangle (control_flow_data->Drawing->Pixmap, - control_flow_data->Drawing->Drawing_Area_V->style->white_gc, + control_flow_data->Drawing->drawing_area->style->white_gc, TRUE, 0, 0, control_flow_data->Drawing->width+SAFETY, // do not overlap @@ -949,10 +949,10 @@ gint update_time_window_hook(void *hook_data, void *call_data) /* Different scale (zoom) */ g_info("zoom"); - *Old_time_window = *New_time_window; + *old_time_window = *new_time_window; gdk_draw_rectangle (control_flow_data->Drawing->Pixmap, - control_flow_data->Drawing->Drawing_Area_V->style->white_gc, + control_flow_data->Drawing->drawing_area->style->white_gc, TRUE, 0, 0, control_flow_data->Drawing->width+SAFETY, // do not overlap @@ -976,7 +976,7 @@ gint update_time_window_hook(void *hook_data, void *call_data) gint update_current_time_hook(void *hook_data, void *call_data) { - ControlFlowData *control_flow_data = (ControlFlowData*) hook_data; + ControlFlowData *control_flow_data = (ControlFlowData*)hook_data; LttTime* current_time = guicontrolflow_get_current_time(control_flow_data); @@ -1036,7 +1036,7 @@ gint update_current_time_hook(void *hook_data, void *call_data) set_time_window(control_flow_data->mw, &time_window); } - gtk_widget_queue_draw(control_flow_data->Drawing->Drawing_Area_V); + gtk_widget_queue_draw(control_flow_data->Drawing->drawing_area); return 0; } @@ -1056,7 +1056,7 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) ControlFlowData *control_flow_data = closure_data->event_request->control_flow_data; - GtkWidget *widget = control_flow_data->Drawing->Drawing_Area_V; + GtkWidget *widget = control_flow_data->Drawing->drawing_area; /* Get y position of process */ gint y=0, height=0; @@ -1188,17 +1188,17 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) */ int after_data_request(void *hook_data, void *call_data) { - EventRequest *Event_Request = (EventRequest*)hook_data; - ControlFlowData *control_flow_data = Event_Request->control_flow_data; + EventRequest *event_request = (EventRequest*)hook_data; + ControlFlowData *control_flow_data = event_request->control_flow_data; ProcessList *process_list = - guicontrolflow_get_process_list(Event_Request->control_flow_data); + guicontrolflow_get_process_list(event_request->control_flow_data); ClosureData closure_data; closure_data.event_request = (EventRequest*)hook_data; closure_data.ts = (LttvTraceState*)call_data; - g_hash_table_foreach(process_list->Process_Hash, draw_closure, + g_hash_table_foreach(process_list->process_hash, draw_closure, (void*)&closure_data); } diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h index d7ca7453..1adcc4c4 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h @@ -37,12 +37,12 @@ typedef struct _EventRequest void send_test_data(ProcessList *process_list, Drawing_t *Drawing); -GtkWidget *h_guicontrolflow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * key); +GtkWidget *h_guicontrolflow(MainWindow *mw, LttvTracesetSelector * s, char * key); int event_selected_hook(void *hook_data, void *call_data); /* Hook called before drawing. Gets the initial context at the beginning of the - * drawing interval and copy it to the context in Event_Request. + * drawing interval and copy it to the context in event_request. */ int draw_before_hook(void *hook_data, void *call_data); diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.c index d86c2ddf..5e75afc9 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.c @@ -195,7 +195,7 @@ ProcessList *processlist_construct(void) PID_COLUMN, GTK_SORT_ASCENDING); - process_list->Process_Hash = g_hash_table_new_full( + process_list->process_hash = g_hash_table_new_full( hash_fct, equ_fct, destroy_hash_key, destroy_hash_data ); @@ -259,8 +259,8 @@ ProcessList *processlist_construct(void) } void processlist_destroy(ProcessList *process_list) { - g_hash_table_destroy(process_list->Process_Hash); - process_list->Process_Hash = NULL; + g_hash_table_destroy(process_list->process_hash); + process_list->process_hash = NULL; g_free(process_list); } @@ -301,60 +301,60 @@ int processlist_add( ProcessList *process_list, LttTime *birth, gchar *name, guint *height, - HashedProcessData **pmHashed_Process_Data) + HashedProcessData **pmhashed_process_data) { GtkTreeIter iter ; ProcessInfo *Process_Info = g_new(ProcessInfo, 1); - HashedProcessData *Hashed_Process_Data = g_new(HashedProcessData, 1); - *pmHashed_Process_Data = Hashed_Process_Data; + HashedProcessData *hashed_process_data = g_new(HashedProcessData, 1); + *pmhashed_process_data = hashed_process_data; Process_Info->pid = pid; Process_Info->birth = *birth; - Hashed_Process_Data->draw_context = g_new(DrawContext, 1); - Hashed_Process_Data->draw_context->drawable = NULL; - Hashed_Process_Data->draw_context->gc = NULL; - Hashed_Process_Data->draw_context->pango_layout = NULL; - Hashed_Process_Data->draw_context->current = g_new(DrawInfo,1); - Hashed_Process_Data->draw_context->current->over = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->current->over->x = -1; - Hashed_Process_Data->draw_context->current->over->y = -1; - Hashed_Process_Data->draw_context->current->middle = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->current->middle->x = -1; - Hashed_Process_Data->draw_context->current->middle->y = -1; - Hashed_Process_Data->draw_context->current->under = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->current->under->x = -1; - Hashed_Process_Data->draw_context->current->under->y = -1; - Hashed_Process_Data->draw_context->current->modify_over = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->current->modify_over->x = -1; - Hashed_Process_Data->draw_context->current->modify_over->y = -1; - Hashed_Process_Data->draw_context->current->modify_middle = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->current->modify_middle->x = -1; - Hashed_Process_Data->draw_context->current->modify_middle->y = -1; - Hashed_Process_Data->draw_context->current->modify_under = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->current->modify_under->x = -1; - Hashed_Process_Data->draw_context->current->modify_under->y = -1; - Hashed_Process_Data->draw_context->current->status = LTTV_STATE_UNNAMED; - Hashed_Process_Data->draw_context->previous = g_new(DrawInfo,1); - Hashed_Process_Data->draw_context->previous->over = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->previous->over->x = -1; - Hashed_Process_Data->draw_context->previous->over->y = -1; - Hashed_Process_Data->draw_context->previous->middle = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->previous->middle->x = -1; - Hashed_Process_Data->draw_context->previous->middle->y = -1; - Hashed_Process_Data->draw_context->previous->under = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->previous->under->x = -1; - Hashed_Process_Data->draw_context->previous->under->y = -1; - Hashed_Process_Data->draw_context->previous->modify_over = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->previous->modify_over->x = -1; - Hashed_Process_Data->draw_context->previous->modify_over->y = -1; - Hashed_Process_Data->draw_context->previous->modify_middle = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->previous->modify_middle->x = -1; - Hashed_Process_Data->draw_context->previous->modify_middle->y = -1; - Hashed_Process_Data->draw_context->previous->modify_under = g_new(ItemInfo,1); - Hashed_Process_Data->draw_context->previous->modify_under->x = -1; - Hashed_Process_Data->draw_context->previous->modify_under->y = -1; - Hashed_Process_Data->draw_context->previous->status = LTTV_STATE_UNNAMED; + hashed_process_data->draw_context = g_new(DrawContext, 1); + hashed_process_data->draw_context->drawable = NULL; + hashed_process_data->draw_context->gc = NULL; + hashed_process_data->draw_context->pango_layout = NULL; + hashed_process_data->draw_context->current = g_new(DrawInfo,1); + hashed_process_data->draw_context->current->over = g_new(ItemInfo,1); + hashed_process_data->draw_context->current->over->x = -1; + hashed_process_data->draw_context->current->over->y = -1; + hashed_process_data->draw_context->current->middle = g_new(ItemInfo,1); + hashed_process_data->draw_context->current->middle->x = -1; + hashed_process_data->draw_context->current->middle->y = -1; + hashed_process_data->draw_context->current->under = g_new(ItemInfo,1); + hashed_process_data->draw_context->current->under->x = -1; + hashed_process_data->draw_context->current->under->y = -1; + hashed_process_data->draw_context->current->modify_over = g_new(ItemInfo,1); + hashed_process_data->draw_context->current->modify_over->x = -1; + hashed_process_data->draw_context->current->modify_over->y = -1; + hashed_process_data->draw_context->current->modify_middle = g_new(ItemInfo,1); + hashed_process_data->draw_context->current->modify_middle->x = -1; + hashed_process_data->draw_context->current->modify_middle->y = -1; + hashed_process_data->draw_context->current->modify_under = g_new(ItemInfo,1); + hashed_process_data->draw_context->current->modify_under->x = -1; + hashed_process_data->draw_context->current->modify_under->y = -1; + hashed_process_data->draw_context->current->status = LTTV_STATE_UNNAMED; + hashed_process_data->draw_context->previous = g_new(DrawInfo,1); + hashed_process_data->draw_context->previous->over = g_new(ItemInfo,1); + hashed_process_data->draw_context->previous->over->x = -1; + hashed_process_data->draw_context->previous->over->y = -1; + hashed_process_data->draw_context->previous->middle = g_new(ItemInfo,1); + hashed_process_data->draw_context->previous->middle->x = -1; + hashed_process_data->draw_context->previous->middle->y = -1; + hashed_process_data->draw_context->previous->under = g_new(ItemInfo,1); + hashed_process_data->draw_context->previous->under->x = -1; + hashed_process_data->draw_context->previous->under->y = -1; + hashed_process_data->draw_context->previous->modify_over = g_new(ItemInfo,1); + hashed_process_data->draw_context->previous->modify_over->x = -1; + hashed_process_data->draw_context->previous->modify_over->y = -1; + hashed_process_data->draw_context->previous->modify_middle = g_new(ItemInfo,1); + hashed_process_data->draw_context->previous->modify_middle->x = -1; + hashed_process_data->draw_context->previous->modify_middle->y = -1; + hashed_process_data->draw_context->previous->modify_under = g_new(ItemInfo,1); + hashed_process_data->draw_context->previous->modify_under->x = -1; + hashed_process_data->draw_context->previous->modify_under->y = -1; + hashed_process_data->draw_context->previous->status = LTTV_STATE_UNNAMED; /* Add a new row to the model */ gtk_list_store_append ( process_list->Store_M, &iter); @@ -368,14 +368,14 @@ int processlist_add( ProcessList *process_list, BIRTH_S_COLUMN, birth->tv_sec, BIRTH_NS_COLUMN, birth->tv_nsec, -1); - Hashed_Process_Data->RowRef = gtk_tree_row_reference_new ( + hashed_process_data->RowRef = gtk_tree_row_reference_new ( GTK_TREE_MODEL(process_list->Store_M), gtk_tree_model_get_path( GTK_TREE_MODEL(process_list->Store_M), &iter)); - g_hash_table_insert( process_list->Process_Hash, + g_hash_table_insert( process_list->process_hash, (gpointer)Process_Info, - (gpointer)Hashed_Process_Data); + (gpointer)hashed_process_data); //g_critical ( "iter after : %s", gtk_tree_path_to_string ( // gtk_tree_model_get_path ( @@ -397,45 +397,45 @@ int processlist_remove( ProcessList *process_list, { ProcessInfo Process_Info; gint *path_indices; - HashedProcessData *Hashed_Process_Data; + HashedProcessData *hashed_process_data; GtkTreeIter iter; Process_Info.pid = pid; Process_Info.birth = *birth; - if(Hashed_Process_Data = + if(hashed_process_data = (HashedProcessData*)g_hash_table_lookup( - process_list->Process_Hash, + process_list->process_hash, &Process_Info)) { gtk_tree_model_get_iter ( GTK_TREE_MODEL(process_list->Store_M), &iter, gtk_tree_row_reference_get_path( - (GtkTreeRowReference*)Hashed_Process_Data->RowRef) + (GtkTreeRowReference*)hashed_process_data->RowRef) ); gtk_list_store_remove (process_list->Store_M, &iter); - g_free(Hashed_Process_Data->draw_context->previous->modify_under); - g_free(Hashed_Process_Data->draw_context->previous->modify_middle); - g_free(Hashed_Process_Data->draw_context->previous->modify_over); - g_free(Hashed_Process_Data->draw_context->previous->under); - g_free(Hashed_Process_Data->draw_context->previous->middle); - g_free(Hashed_Process_Data->draw_context->previous->over); - g_free(Hashed_Process_Data->draw_context->previous); - g_free(Hashed_Process_Data->draw_context->current->modify_under); - g_free(Hashed_Process_Data->draw_context->current->modify_middle); - g_free(Hashed_Process_Data->draw_context->current->modify_over); - g_free(Hashed_Process_Data->draw_context->current->under); - g_free(Hashed_Process_Data->draw_context->current->middle); - g_free(Hashed_Process_Data->draw_context->current->over); - g_free(Hashed_Process_Data->draw_context->current); - g_free(Hashed_Process_Data->draw_context); - g_free(Hashed_Process_Data); - - g_hash_table_remove(process_list->Process_Hash, + g_free(hashed_process_data->draw_context->previous->modify_under); + g_free(hashed_process_data->draw_context->previous->modify_middle); + g_free(hashed_process_data->draw_context->previous->modify_over); + g_free(hashed_process_data->draw_context->previous->under); + g_free(hashed_process_data->draw_context->previous->middle); + g_free(hashed_process_data->draw_context->previous->over); + g_free(hashed_process_data->draw_context->previous); + g_free(hashed_process_data->draw_context->current->modify_under); + g_free(hashed_process_data->draw_context->current->modify_middle); + g_free(hashed_process_data->draw_context->current->modify_over); + g_free(hashed_process_data->draw_context->current->under); + g_free(hashed_process_data->draw_context->current->middle); + g_free(hashed_process_data->draw_context->current->over); + g_free(hashed_process_data->draw_context->current); + g_free(hashed_process_data->draw_context); + g_free(hashed_process_data); + + g_hash_table_remove(process_list->process_hash, &Process_Info); process_list->number_of_process--; @@ -458,32 +458,32 @@ gint processlist_get_process_pixels( ProcessList *process_list, guint pid, LttTime *birth, guint *y, guint *height, - HashedProcessData **pmHashed_Process_Data) + HashedProcessData **pmhashed_process_data) { ProcessInfo Process_Info; gint *path_indices; GtkTreePath *tree_path; - HashedProcessData *Hashed_Process_Data = NULL; + HashedProcessData *hashed_process_data = NULL; Process_Info.pid = pid; Process_Info.birth = *birth; - if(Hashed_Process_Data = + if(hashed_process_data = (HashedProcessData*)g_hash_table_lookup( - process_list->Process_Hash, + process_list->process_hash, &Process_Info)) { tree_path = gtk_tree_row_reference_get_path( - Hashed_Process_Data->RowRef); + hashed_process_data->RowRef); path_indices = gtk_tree_path_get_indices (tree_path); *height = get_cell_height( GTK_TREE_VIEW(process_list->process_list_VC)); *y = *height * path_indices[0]; - *pmHashed_Process_Data = Hashed_Process_Data; + *pmhashed_process_data = hashed_process_data; return 0; } else { - *pmHashed_Process_Data = Hashed_Process_Data; + *pmhashed_process_data = hashed_process_data; return 1; } @@ -492,7 +492,7 @@ gint processlist_get_process_pixels( ProcessList *process_list, gint processlist_get_pixels_from_data( ProcessList *process_list, ProcessInfo *process_info, - HashedProcessData *Hashed_Process_Data, + HashedProcessData *hashed_process_data, guint *y, guint *height) { @@ -500,7 +500,7 @@ gint processlist_get_pixels_from_data( ProcessList *process_list, GtkTreePath *tree_path; tree_path = gtk_tree_row_reference_get_path( - Hashed_Process_Data->RowRef); + hashed_process_data->RowRef); path_indices = gtk_tree_path_get_indices (tree_path); *height = get_cell_height( diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h index bd8f97ee..eef9590f 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h @@ -40,7 +40,7 @@ struct _ProcessList { GtkListStore *Store_M; /* A hash table by PID to speed up process position find in the list */ - GHashTable *Process_Hash; + GHashTable *process_hash; guint number_of_process; gboolean Test_Process_Sent; @@ -57,7 +57,7 @@ GtkWidget *processlist_get_widget(ProcessList *process_list); // out : success (0) and height int processlist_add(ProcessList *process_list, guint pid, LttTime *birth, gchar *name, - guint *height, HashedProcessData **Hashed_Process_Data); + guint *height, HashedProcessData **hashed_process_data); // out : success (0) and height int processlist_remove(ProcessList *process_list, guint pid, LttTime *birth); @@ -67,11 +67,11 @@ guint processlist_get_height(ProcessList *process_list); gint processlist_get_process_pixels(ProcessList *process_list, guint pid, LttTime *birth, guint *y, guint *height, - HashedProcessData **Hashed_Process_Data); + HashedProcessData **hashed_process_data); gint processlist_get_pixels_from_data( ProcessList *process_list, ProcessInfo *process_info, - HashedProcessData *Hashed_Process_Data, + HashedProcessData *hashed_process_data, guint *y, guint *height); diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Widget_Callbacks.c.old b/ltt/branches/poly/lttv/modules/guiControlFlow/Widget_Callbacks.c.old index 9f61f02e..700c5b1a 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Widget_Callbacks.c.old +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Widget_Callbacks.c.old @@ -5,16 +5,16 @@ void expose_event_cb (GtkWidget *widget, GdkEventExpose *expose, gpointer data) { ControlFlowData *control_flow_data = (ControlFlowData*)data; - EventRequest *Event_Request = g_new(sizeof(EventRequest)); + EventRequest *event_request = g_new(sizeof(EventRequest)); - Event_Request->control_flow_data = control_flow_data; + event_request->control_flow_data = control_flow_data; /* Calculate, from pixels in expose, the time interval to get data */ get_time_from_pixels(expose->area.x, expose->area.width, control_flow_data->Drawing_Area_Info.width, &control_flow_data->Begin_Time, &control_flow_data->End_Time, - &Event_Request->time_begin, &Event_Request->time_end) + &event_request->time_begin, &event_request->time_end) /* Look in statistics of the trace the processes present during the * whole time interval _shown on the screen_. Modify the list of @@ -28,8 +28,8 @@ void expose_event_cb (GtkWidget *widget, GdkEventExpose *expose, gpointer data) Draw_Event_Hooks, Draw_After_Hooks, NULL, //FIXME : filter here - Event_Request->time_begin, - Event_Request->time_end); + event_request->time_begin, + event_request->time_end); } diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/guiControlFlow.c.old b/ltt/branches/poly/lttv/modules/guiControlFlow/guiControlFlow.c.old index 20fa275f..5e1d0ab7 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/guiControlFlow.c.old +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/guiControlFlow.c.old @@ -53,7 +53,7 @@ typedef struct _EventRequest * Function prototypes * *****************************************************************************/ //! Control Flow Viewer's constructor hook -GtkWidget *hGuiControlFlow(GtkWidget *pmParentWindow); +GtkWidget *hGuiControlFlow(GtkWidget *mw); //! Control Flow Viewer's constructor ControlFlowData *GuiControlFlow(void); //! Control Flow Viewer's destructor @@ -87,7 +87,7 @@ static void expose_event_cb (GtkWidget *widget, GdkEventExpose *expose, gpointer void add_test_process(ControlFlowData *control_flow_data); -static void get_test_data(guint Event_Number, guint List_Height, +static void get_test_data(guint event_number, guint List_Height, ControlFlowData *control_flow_data); void add_test_data(ControlFlowData *control_flow_data); diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/test.c b/ltt/branches/poly/lttv/modules/guiControlFlow/test.c index 7fcd2fcd..43f7c97c 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/test.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/test.c @@ -207,7 +207,7 @@ void test_draw_item(Drawing_t *Drawing, current.modify_over = &over; draw_context.drawable = Pixmap; - draw_context.gc = Drawing->Drawing_Area_V->style->black_gc; + draw_context.gc = Drawing->drawing_area->style->black_gc; draw_context.current = ¤t; draw_context.previous = NULL; @@ -254,7 +254,7 @@ void send_test_drawing(ProcessList *process_list, gc = gdk_gc_new(Pixmap); /* Sent text data */ - layout = gtk_widget_create_pango_layout(Drawing->Drawing_Area_V, + layout = gtk_widget_create_pango_layout(Drawing->drawing_area, NULL); context = pango_layout_get_context(layout); FontDesc = pango_context_get_font_description(context); @@ -278,10 +278,10 @@ void send_test_drawing(ProcessList *process_list, drawing_draw_line( Drawing, Pixmap, x, y+(height/2), x + width, y+(height/2), - Drawing->Drawing_Area_V->style->black_gc); + Drawing->drawing_area->style->black_gc); pango_layout_set_text(layout, "Test", -1); - gdk_draw_layout(Pixmap, Drawing->Drawing_Area_V->style->black_gc, + gdk_draw_layout(Pixmap, Drawing->drawing_area->style->black_gc, 0, y+height, layout); birth.tv_sec = 14000; @@ -297,7 +297,7 @@ void send_test_drawing(ProcessList *process_list, drawing_draw_line( Drawing, Pixmap, x, y+(height/2), x + width, y+(height/2), - Drawing->Drawing_Area_V->style->black_gc); + Drawing->drawing_area->style->black_gc); g_info("y : %u, height : %u", y, height); @@ -313,7 +313,7 @@ void send_test_drawing(ProcessList *process_list, &height); /* Draw rectangle (background color) */ - gdk_gc_copy(gc, Drawing->Drawing_Area_V->style->black_gc); + gdk_gc_copy(gc, Drawing->drawing_area->style->black_gc); gdk_gc_set_rgb_fg_color(gc, &color); gdk_draw_rectangle(Pixmap, gc, TRUE, @@ -322,11 +322,11 @@ void send_test_drawing(ProcessList *process_list, drawing_draw_line( Drawing, Pixmap, x, y+(height/2), x + width, y+(height/2), - Drawing->Drawing_Area_V->style->black_gc); + Drawing->drawing_area->style->black_gc); /* Draw arc */ - gdk_draw_arc(Pixmap, Drawing->Drawing_Area_V->style->black_gc, + gdk_draw_arc(Pixmap, Drawing->drawing_area->style->black_gc, TRUE, 100, y, height/2, height/2, 0, 360*64); g_info("y : %u, height : %u", y, height); @@ -346,7 +346,7 @@ void send_test_drawing(ProcessList *process_list, drawing_draw_line( Drawing, Pixmap, x, y+(height/2), x + width, y+(height/2), - Drawing->Drawing_Area_V->style->black_gc); + Drawing->drawing_area->style->black_gc); g_critical("y : %u, height : %u", y, height); @@ -365,7 +365,7 @@ void send_test_drawing(ProcessList *process_list, drawing_draw_line( Drawing, Pixmap, x, y+(height/2), x + width, y+(height/2), - Drawing->Drawing_Area_V->style->black_gc); + Drawing->drawing_area->style->black_gc); g_info("y : %u, height : %u", y, height); @@ -375,7 +375,7 @@ void send_test_drawing(ProcessList *process_list, // "/home/compudj/local/share/LinuxTraceToolkit/pixmaps/move_message.xpm"); // "/home/compudj/local/share/LinuxTraceToolkit/pixmaps/mini-display.xpm"); - // gdk_gc_set_clip_mask(Drawing->Drawing_Area_V->style->black_gc, mask); + // gdk_gc_set_clip_mask(Drawing->drawing_area->style->black_gc, mask); // for(i=x;iDrawing_Area_V->style->black_gc); -// gdk_gc_set_clip_origin(Drawing->Drawing_Area_V->style->black_gc, i, j); + //gdk_gc_copy(gc, Drawing->drawing_area->style->black_gc); +// gdk_gc_set_clip_origin(Drawing->drawing_area->style->black_gc, i, j); // gdk_draw_drawable(Pixmap, -// Drawing->Drawing_Area_V->style->black_gc, +// Drawing->drawing_area->style->black_gc, // icon_pixmap, // 0, 0, i, j, -1, -1); @@ -395,8 +395,8 @@ void send_test_drawing(ProcessList *process_list, test_draw_item(Drawing,Pixmap); - //gdk_gc_set_clip_origin(Drawing->Drawing_Area_V->style->black_gc, 0, 0); - //gdk_gc_set_clip_mask(Drawing->Drawing_Area_V->style->black_gc, NULL); + //gdk_gc_set_clip_origin(Drawing->drawing_area->style->black_gc, 0, 0); + //gdk_gc_set_clip_mask(Drawing->drawing_area->style->black_gc, NULL); //g_free(icon_pixmap); //g_free(mask); @@ -539,7 +539,7 @@ void send_test_process(ProcessList *process_list, Drawing_t *Drawing) if(got_RowRef = (GtkTreeRowReference*)g_hash_table_lookup( - process_list->Process_Hash, + process_list->process_hash, &Process_Info)) { g_critical("key found");