for(i=0; i<control_flow_data->number_of_process; i++)
{
/* Add a new row to the model */
- gtk_list_store_append (control_flow_data->Store_M, &iter);
- gtk_list_store_set ( control_flow_data->Store_M, &iter,
+ gtk_list_store_append (control_flow_data->list_store, &iter);
+ gtk_list_store_set ( control_flow_data->list_store, &iter,
PROCESS_COLUMN, process[i],
-1);
}
* This function calls the reading library to get the draw_hook called
* for the desired period of time. */
- DrawingAreaInfo *Drawing_Area_Info = &control_flow_data->Drawing_Area_Info;
+ drawingAreaInfo *drawing_Area_Info = &control_flow_data->drawing_Area_Info;
}
#ifdef DEBUG
void test_draw() {
- gint cell_height = get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list_VC));
+ gint cell_height = get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list_widget));
GdkGC *GC = gdk_gc_new(widget->window);
GdkColor color = CF_Colors[GREEN];
/* When redrawing, use widget->allocation.width to get the width of
* drawable area. */
- control_flow_data->Drawing_Area_Info.width = widget->allocation.width;
+ control_flow_data->drawing_Area_Info.width = widget->allocation.width;
test_draw(control_flow_data);
// TRUE,
// //0, 0, widget->allocation.width, widget->allocation.height,
// 0, 0, widget->allocation.width,
- // control_flow_data->Drawing_Area_Info.height,
+ // control_flow_data->drawing_Area_Info.height,
// 0, 64 * 360);
- //Drawing_Area_Init(control_flow_data);
+ //drawing_Area_Init(control_flow_data);
// 2 pixels for the box around the drawing area, 1 pixel for off-by-one
// (starting from 0)
/* Event_Hook.c tests */
-void test_draw_item(Drawing_t *Drawing,
- GdkPixmap *Pixmap)
+void test_draw_item(Drawing_t *drawing,
+ GdkPixmap *pixmap)
{
PropertiesIcon properties_icon;
DrawContext draw_context;
current.modify_over = &over;
- draw_context.drawable = Pixmap;
- draw_context.gc = Drawing->drawing_area->style->black_gc;
+ draw_context.drawable = pixmap;
+ draw_context.gc = drawing->drawing_area->style->black_gc;
draw_context.current = ¤t;
draw_context.previous = NULL;
/* NOTE : no drawing data should be sent there, since the drawing widget
* has not been initialized */
void send_test_drawing(ProcessList *process_list,
- Drawing_t *Drawing,
- GdkPixmap *Pixmap,
+ Drawing_t *drawing,
+ GdkPixmap *pixmap,
gint x, gint y, // y not used here?
gint width,
gint height) // height won't be used here ?
int i,j;
ProcessInfo Process_Info = {10000, 12000, 55600};
//ProcessInfo Process_Info = {156, 14000, 55500};
- GtkTreeRowReference *got_RowRef;
+ GtkTreeRowReference *row_ref;
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *FontDesc;// = pango_font_description_new();
// rectangle
GdkColor color = { 0, 0xffff, 0x0000, 0x0000 };
- gc = gdk_gc_new(Pixmap);
+ gc = gdk_gc_new(pixmap);
/* Sent text data */
- layout = gtk_widget_create_pango_layout(Drawing->drawing_area,
+ layout = gtk_widget_create_pango_layout(drawing->drawing_area,
NULL);
context = pango_layout_get_context(layout);
FontDesc = pango_context_get_font_description(context);
g_info("we draw : x : %u, y : %u, width : %u, height : %u", x, y, width, height);
drawing_draw_line(
- Drawing, Pixmap, x,
+ drawing, pixmap, x,
y+(height/2), x + width, y+(height/2),
- Drawing->drawing_area->style->black_gc);
+ drawing->drawing_area->style->black_gc);
pango_layout_set_text(layout, "Test", -1);
- gdk_draw_layout(Pixmap, Drawing->drawing_area->style->black_gc,
+ gdk_draw_layout(pixmap, drawing->drawing_area->style->black_gc,
0, y+height, layout);
birth.tv_sec = 14000;
drawing_draw_line(
- Drawing, Pixmap, x,
+ drawing, pixmap, x,
y+(height/2), x + width, y+(height/2),
- Drawing->drawing_area->style->black_gc);
+ drawing->drawing_area->style->black_gc);
g_info("y : %u, height : %u", y, height);
&height);
/* Draw rectangle (background color) */
- gdk_gc_copy(gc, Drawing->drawing_area->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,
+ gdk_draw_rectangle(pixmap, gc,
TRUE,
x, y, width, height);
drawing_draw_line(
- Drawing, Pixmap, x,
+ drawing, pixmap, x,
y+(height/2), x + width, y+(height/2),
- Drawing->drawing_area->style->black_gc);
+ drawing->drawing_area->style->black_gc);
/* Draw arc */
- gdk_draw_arc(Pixmap, Drawing->drawing_area->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);
drawing_draw_line(
- Drawing, Pixmap, x,
+ drawing, pixmap, x,
y+(height/2), x + width, y+(height/2),
- Drawing->drawing_area->style->black_gc);
+ drawing->drawing_area->style->black_gc);
g_critical("y : %u, height : %u", y, height);
drawing_draw_line(
- Drawing, Pixmap, x,
+ drawing, pixmap, x,
y+(height/2), x + width, y+(height/2),
- Drawing->drawing_area->style->black_gc);
+ drawing->drawing_area->style->black_gc);
g_info("y : %u, height : %u", y, height);
/* IMPORTANT : This action uses the cpu heavily! */
- //icon_pixmap = gdk_pixmap_create_from_xpm(Pixmap, &mask, NULL,
+ //icon_pixmap = gdk_pixmap_create_from_xpm(pixmap, &mask, NULL,
// "/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->style->black_gc, mask);
+ // gdk_gc_set_clip_mask(drawing->drawing_area->style->black_gc, mask);
// for(i=x;i<x+width;i=i+15)
// {
// {
/* Draw icon */
- //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->style->black_gc,
+ //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->style->black_gc,
// icon_pixmap,
// 0, 0, i, j, -1, -1);
// }
// }
- test_draw_item(Drawing,Pixmap);
+ test_draw_item(drawing,pixmap);
- //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);
+ //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);
g_free(gc);
}
-void send_test_process(ProcessList *process_list, Drawing_t *Drawing)
+void send_test_process(ProcessList *process_list, Drawing_t *drawing)
{
guint height, y;
int i;
ProcessInfo Process_Info = {10000, 12000, 55600};
//ProcessInfo Process_Info = {156, 14000, 55500};
- GtkTreeRowReference *got_RowRef;
+ GtkTreeRowReference *row_ref;
LttTime birth;
&birth,
&y,
&height);
- drawing_insert_square( Drawing, y, height);
+ drawing_insert_square( drawing, y, height);
//g_critical("y : %u, height : %u", y, height);
&birth,
&y,
&height);
- drawing_insert_square( Drawing, y, height);
+ drawing_insert_square( drawing, y, height);
//g_critical("y : %u, height : %u", y, height);
&birth,
&y,
&height);
- drawing_insert_square( Drawing, y, height);
+ drawing_insert_square( drawing, y, height);
//g_critical("y : %u, height : %u", y, height);
- //drawing_insert_square( Drawing, height, 5);
+ //drawing_insert_square( drawing, height, 5);
for(i=0; i<10; i++)
{
&birth,
&y,
&height);
- drawing_insert_square( Drawing, y, height);
+ drawing_insert_square( drawing, y, height);
// g_critical("y : %u, height : %u", y, height);
&birth,
&y,
&height);
- drawing_insert_square( Drawing, y, height);
+ drawing_insert_square( drawing, y, height);
//g_critical("y : %u, height : %u", y, height);
&birth,
&y,
&height);
- drawing_insert_square( Drawing, y, height);
+ drawing_insert_square( drawing, y, height);
//g_critical("y : %u, height : %u", y, height);
- //drawing_insert_square( Drawing, height, 5);
+ //drawing_insert_square( drawing, height, 5);
//g_critical("height : %u", height);
10000,
&birth);
- drawing_remove_square( Drawing, y, height);
+ drawing_remove_square( drawing, y, height);
- if(got_RowRef =
+ if(row_ref =
(GtkTreeRowReference*)g_hash_table_lookup(
process_list->process_hash,
&Process_Info))
g_critical("position in the list : %s",
gtk_tree_path_to_string (
gtk_tree_row_reference_get_path(
- (GtkTreeRowReference*)got_RowRef)
+ (GtkTreeRowReference*)row_ref)
));
}