* erase drawing already present (SAFETY).
*/
void drawing_data_request(Drawing_t *Drawing,
- GdkPixmap **Pixmap,
+ GdkPixmap **pixmap,
gint x, gint y,
gint width,
gint height)
//Drawing);
//send_test_drawing(
//guicontrolflow_get_process_list(Drawing->control_flow_data),
- //Drawing, *Pixmap, x, y, width, height);
+ //Drawing, *pixmap, x, y, width, height);
// Let's call processTrace() !!
EventRequest event_request; // Variable freed at the end of the function.
get_time_window(Drawing->control_flow_data->mw,
&Drawing->control_flow_data->time_window);
- /* New Pixmap, size of the configure event */
- //GdkPixmap *Pixmap = gdk_pixmap_new(widget->window,
+ /* New pixmap, size of the configure event */
+ //GdkPixmap *pixmap = gdk_pixmap_new(widget->window,
// widget->allocation.width + SAFETY,
// widget->allocation.height + SAFETY,
// -1);
g_critical("New draw size : %i by %i",widget->allocation.width, widget->allocation.height);
- if (Drawing->Pixmap)
- gdk_pixmap_unref(Drawing->Pixmap);
+ if (Drawing->pixmap)
+ gdk_pixmap_unref(Drawing->pixmap);
- /* If no old Pixmap present */
- //if(Drawing->Pixmap == NULL)
+ /* If no old pixmap present */
+ //if(Drawing->pixmap == NULL)
{
- Drawing->Pixmap = gdk_pixmap_new(
+ Drawing->pixmap = gdk_pixmap_new(
widget->window,
widget->allocation.width + SAFETY,
widget->allocation.height + SAFETY,
// Clear the image
- gdk_draw_rectangle (Drawing->Pixmap,
+ gdk_draw_rectangle (Drawing->pixmap,
widget->style->white_gc,
TRUE,
0, 0,
/* Initial data request */
// Do not need to ask for data of 1 pixel : not synchronized with
// main window time at this moment.
- drawing_data_request(Drawing, &Drawing->Pixmap, 0, 0,
+ drawing_data_request(Drawing, &Drawing->pixmap, 0, 0,
widget->allocation.width,
widget->allocation.height);
}
#ifdef NOTUSE
// /* Draw empty background */
-// gdk_draw_rectangle (Pixmap,
+// gdk_draw_rectangle (pixmap,
// widget->style->black_gc,
// TRUE,
// 0, 0,
// widget->allocation.height);
/* Copy old data to new pixmap */
- gdk_draw_drawable (Pixmap,
+ gdk_draw_drawable (pixmap,
widget->style->white_gc,
- Drawing->Pixmap,
+ Drawing->pixmap,
0, 0,
0, 0,
-1, -1);
- if (Drawing->Pixmap)
- gdk_pixmap_unref(Drawing->Pixmap);
+ if (Drawing->pixmap)
+ gdk_pixmap_unref(Drawing->pixmap);
- Drawing->Pixmap = Pixmap;
+ Drawing->pixmap = pixmap;
// Clear the bottom part of the image (SAFETY)
- gdk_draw_rectangle (Pixmap,
+ gdk_draw_rectangle (pixmap,
widget->style->white_gc,
TRUE,
0, Drawing->height+SAFETY,
(widget->allocation.height) - Drawing->height);
// Clear the right part of the image (SAFETY)
- gdk_draw_rectangle (Pixmap,
+ gdk_draw_rectangle (pixmap,
widget->style->white_gc,
TRUE,
Drawing->width+SAFETY, 0,
Drawing->height+SAFETY);
/* Clear the backgound for data request, but not SAFETY */
- gdk_draw_rectangle (Pixmap,
+ gdk_draw_rectangle (pixmap,
Drawing->drawing_area->style->white_gc,
TRUE,
Drawing->width + SAFETY, 0,
/* Request data for missing space */
g_info("missing data request");
- drawing_data_request(Drawing, &Pixmap, Drawing->width, 0,
+ drawing_data_request(Drawing, &pixmap, Drawing->width, 0,
widget->allocation.width - Drawing->width,
widget->allocation.height);
gdk_draw_pixmap(widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
- Drawing->Pixmap,
+ Drawing->pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,
event->area.width, event->area.height);
if(x >= event->area.x && x <= event->area.x+event->area.width)
{
- GdkGC *gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
+ GdkGC *gc = gdk_gc_new(control_flow_data->Drawing->pixmap);
gdk_gc_copy(gc, widget->style->black_gc);
drawing_draw_line(NULL, widget->window,
// &(Drawing->height),
// -1);
- //Drawing->Pixmap = gdk_pixmap_new(
+ //Drawing->pixmap = gdk_pixmap_new(
// Drawing->drawing_area->window,
// Drawing->width,
// Drawing->height,
// Drawing->depth);
- Drawing->Pixmap = NULL;
+ Drawing->pixmap = NULL;
-// Drawing->Pixmap = gdk_pixmap_new(Drawing->drawing_area->window,
+// Drawing->pixmap = gdk_pixmap_new(Drawing->drawing_area->window,
// Drawing->drawing_area->allocation.width,
// Drawing->drawing_area->allocation.height,
// -1);
Drawing->drawing_area->window,
Drawing->drawing_area->
style->fg_gc[GTK_WIDGET_STATE (Drawing->drawing_area)],
- GDK_DRAWABLE(Drawing->Pixmap),
+ GDK_DRAWABLE(Drawing->pixmap),
x, y,
x, y,
width, height);
void drawing_draw_line( Drawing_t *Drawing,
- GdkPixmap *Pixmap,
+ GdkPixmap *pixmap,
guint x1, guint y1,
guint x2, guint y2,
GdkGC *GC)
{
- gdk_draw_line (Pixmap,
+ gdk_draw_line (pixmap,
GC,
x1, y1, x2, y2);
}
//GdkRectangle update_rect;
/* Allocate a new pixmap with new height */
- GdkPixmap *Pixmap = gdk_pixmap_new(Drawing->drawing_area->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,
+ gdk_draw_drawable (pixmap,
Drawing->drawing_area->style->black_gc,
- Drawing->Pixmap,
+ Drawing->pixmap,
0, 0,
0, 0,
Drawing->width + SAFETY, y);
/* add an empty square */
- gdk_draw_rectangle (Pixmap,
+ gdk_draw_rectangle (pixmap,
Drawing->drawing_area->style->white_gc,
TRUE,
0, y,
/* copy the bottom of the region */
- gdk_draw_drawable (Pixmap,
+ gdk_draw_drawable (pixmap,
Drawing->drawing_area->style->black_gc,
- Drawing->Pixmap,
+ Drawing->pixmap,
0, y,
0, y + height,
Drawing->width+SAFETY, Drawing->height - y + SAFETY);
- if (Drawing->Pixmap)
- gdk_pixmap_unref(Drawing->Pixmap);
+ if (Drawing->pixmap)
+ gdk_pixmap_unref(Drawing->pixmap);
- Drawing->Pixmap = Pixmap;
+ Drawing->pixmap = pixmap;
Drawing->height+=height;
//GdkRectangle update_rect;
/* Allocate a new pixmap with new height */
- GdkPixmap *Pixmap = gdk_pixmap_new(
+ 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,
+ gdk_draw_drawable (pixmap,
Drawing->drawing_area->style->black_gc,
- Drawing->Pixmap,
+ Drawing->pixmap,
0, 0,
0, 0,
Drawing->width + SAFETY, y);
/* Copy up the bottom of the region */
- gdk_draw_drawable (Pixmap,
+ gdk_draw_drawable (pixmap,
Drawing->drawing_area->style->black_gc,
- Drawing->Pixmap,
+ Drawing->pixmap,
0, y + height,
0, y,
Drawing->width, Drawing->height - y - height + SAFETY);
- if (Drawing->Pixmap)
- gdk_pixmap_unref(Drawing->Pixmap);
+ if (Drawing->pixmap)
+ gdk_pixmap_unref(Drawing->pixmap);
- Drawing->Pixmap = Pixmap;
+ Drawing->pixmap = pixmap;
Drawing->height-=height;
struct _Drawing_t {
GtkWidget *drawing_area;
- GdkPixmap *Pixmap;
+ GdkPixmap *pixmap;
ControlFlowData *control_flow_data;
PangoLayout *pango_layout;
// guint width, guint height);
void drawing_draw_line( Drawing_t *Drawing,
- GdkPixmap *Pixmap,
+ GdkPixmap *pixmap,
guint x1, guint y1,
guint x2, guint y2,
GdkGC *GC);
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->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;
//draw_context_out->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)];
- draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
+ draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->pixmap);
gdk_gc_copy(draw_context_out->gc, widget->style->black_gc);
//draw_context_out->gc = widget->style->black_gc;
//draw_arc((void*)&prop_arc, (void*)draw_context_out);
- //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
+ //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->pixmap);
GdkColor colorfg_out = { 0, 0xffff, 0x0000, 0x0000 };
GdkColor colorbg_out = { 0, 0xffff, 0xffff, 0xffff };
draw_context_out->current->middle->x = x;
draw_context_out->current->middle->y = y_out + height/2;
draw_context_out->previous->middle->y = y_out + height/2;
- draw_context_out->drawable = control_flow_data->Drawing->Pixmap;
+ draw_context_out->drawable = control_flow_data->Drawing->pixmap;
draw_context_out->pango_layout = control_flow_data->Drawing->pango_layout;
//draw_context_out->gc = widget->style->black_gc;
- draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
+ draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->pixmap);
gdk_gc_copy(draw_context_out->gc, widget->style->black_gc);
PropertiesLine prop_line_out;
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->drawable = control_flow_data->Drawing->pixmap;
draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout;
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);
+ draw_context_in->gc = gdk_gc_new(control_flow_data->Drawing->pixmap);
gdk_gc_copy(draw_context_in->gc, widget->style->black_gc);
//draw_arc((void*)&prop_arc, (void*)draw_context_in);
- //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
+ //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->pixmap);
GdkColor colorfg_in = { 0, 0x0000, 0xffff, 0x0000 };
GdkColor colorbg_in = { 0, 0xffff, 0xffff, 0xffff };
draw_context_in->current->middle->x = x;
draw_context_in->previous->middle->y = y_in + height/2;
draw_context_in->current->middle->y = y_in + height/2;
- draw_context_in->drawable = control_flow_data->Drawing->Pixmap;
+ draw_context_in->drawable = control_flow_data->Drawing->pixmap;
draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout;
//draw_context_in->gc = widget->style->black_gc;
- draw_context_in->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
+ draw_context_in->gc = gdk_gc_new(control_flow_data->Drawing->pixmap);
gdk_gc_copy(draw_context_in->gc, widget->style->black_gc);
PropertiesLine prop_line_in;
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->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;
//draw_context_out->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)];
draw_context_out->gc = widget->style->black_gc;
//draw_arc((void*)&prop_arc, (void*)draw_context_out);
- //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
+ //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->pixmap);
GdkColor colorfg_out = { 0, 0xffff, 0x0000, 0x0000 };
GdkColor colorbg_out = { 0, 0xffff, 0xffff, 0xffff };
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->drawable = control_flow_data->Drawing->pixmap;
draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout;
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_arc((void*)&prop_arc, (void*)draw_context_in);
- //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
+ //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->pixmap);
GdkColor colorfg_in = { 0, 0x0000, 0xffff, 0x0000 };
GdkColor colorbg_in = { 0, 0xffff, 0xffff, 0xffff };
&x);
/* Copy old data to new location */
- gdk_draw_drawable (control_flow_data->Drawing->Pixmap,
+ gdk_draw_drawable (control_flow_data->Drawing->pixmap,
control_flow_data->Drawing->drawing_area->style->white_gc,
- control_flow_data->Drawing->Pixmap,
+ control_flow_data->Drawing->pixmap,
x, 0,
0, 0,
-1, -1);
*old_time_window = *new_time_window;
/* Clear the data request background, but not SAFETY */
- gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
+ gdk_draw_rectangle (control_flow_data->Drawing->pixmap,
control_flow_data->Drawing->drawing_area->style->white_gc,
TRUE,
x+SAFETY, 0,
control_flow_data->Drawing->height+SAFETY);
/* Get new data for the rest. */
drawing_data_request(control_flow_data->Drawing,
- &control_flow_data->Drawing->Pixmap,
+ &control_flow_data->Drawing->pixmap,
x, 0,
control_flow_data->Drawing->width - x,
control_flow_data->Drawing->height);
&x);
/* Copy old data to new location */
- gdk_draw_drawable (control_flow_data->Drawing->Pixmap,
+ gdk_draw_drawable (control_flow_data->Drawing->pixmap,
control_flow_data->Drawing->drawing_area->style->white_gc,
- control_flow_data->Drawing->Pixmap,
+ control_flow_data->Drawing->pixmap,
0, 0,
x, 0,
-1, -1);
*old_time_window = *new_time_window;
/* Clean the data request background */
- gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
+ gdk_draw_rectangle (control_flow_data->Drawing->pixmap,
control_flow_data->Drawing->drawing_area->style->white_gc,
TRUE,
0, 0,
control_flow_data->Drawing->height+SAFETY);
/* Get new data for the rest. */
drawing_data_request(control_flow_data->Drawing,
- &control_flow_data->Drawing->Pixmap,
+ &control_flow_data->Drawing->pixmap,
0, 0,
x,
control_flow_data->Drawing->height);
*old_time_window = *new_time_window;
- gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
+ gdk_draw_rectangle (control_flow_data->Drawing->pixmap,
control_flow_data->Drawing->drawing_area->style->white_gc,
TRUE,
0, 0,
control_flow_data->Drawing->height+SAFETY);
drawing_data_request(control_flow_data->Drawing,
- &control_flow_data->Drawing->Pixmap,
+ &control_flow_data->Drawing->pixmap,
0, 0,
control_flow_data->Drawing->width,
control_flow_data->Drawing->height);
*old_time_window = *new_time_window;
- gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
+ gdk_draw_rectangle (control_flow_data->Drawing->pixmap,
control_flow_data->Drawing->drawing_area->style->white_gc,
TRUE,
0, 0,
drawing_data_request(control_flow_data->Drawing,
- &control_flow_data->Drawing->Pixmap,
+ &control_flow_data->Drawing->pixmap,
0, 0,
control_flow_data->Drawing->width,
control_flow_data->Drawing->height);
draw_context->current->middle->x = closure_data->event_request->x_end;
draw_context->current->middle->y = y + height/2;
draw_context->previous->middle->y = y + height/2;
- draw_context->drawable = control_flow_data->Drawing->Pixmap;
+ draw_context->drawable = control_flow_data->Drawing->pixmap;
draw_context->pango_layout = control_flow_data->Drawing->pango_layout;
//draw_context->gc = widget->style->black_gc;
- draw_context->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
+ draw_context->gc = gdk_gc_new(control_flow_data->Drawing->pixmap);
gdk_gc_copy(draw_context->gc, widget->style->black_gc);
PropertiesLine prop_line;
/* Event_Hook.c tests */
void test_draw_item(Drawing_t *Drawing,
- GdkPixmap *Pixmap)
+ GdkPixmap *pixmap)
{
PropertiesIcon properties_icon;
DrawContext draw_context;
current.modify_over = &over;
- draw_context.drawable = Pixmap;
+ draw_context.drawable = pixmap;
draw_context.gc = Drawing->drawing_area->style->black_gc;
draw_context.current = ¤t;
* has not been initialized */
void send_test_drawing(ProcessList *process_list,
Drawing_t *Drawing,
- GdkPixmap *Pixmap,
+ GdkPixmap *pixmap,
gint x, gint y, // y not used here?
gint width,
gint height) // height won't be used here ?
// 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,
NULL);
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);
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);
/* Draw rectangle (background color) */
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);
/* 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_draw_line(
- Drawing, Pixmap, x,
+ Drawing, pixmap, x,
y+(height/2), x + width, y+(height/2),
Drawing->drawing_area->style->black_gc);
/* 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");
/* 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,
+// 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);