From: compudj Date: Mon, 29 Sep 2003 01:31:14 +0000 (+0000) Subject: comments on next additions X-Git-Tag: v0.12.20~3214 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=831a876d7dfdc276c54067a27a955981a8e0d974;p=lttv.git comments on next additions git-svn-id: http://ltt.polymtl.ca/svn@275 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 82240306..e1a439a0 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c @@ -3,10 +3,13 @@ #include #include +#include + /***************************************************************************** * Drawing functions * *****************************************************************************/ +//FIXME Colors will need to be dynamic. Graphic context part not done so far. typedef enum { RED, @@ -36,36 +39,9 @@ struct _Drawing_t { }; -void test_draw(Drawing_t *Drawing) -{ - GdkRectangle update_rect; -// GdkColor color = { 0, 65535, 65535, 65535 }; - -// gdk_colormap_alloc_color(gdk_rgb_get_cmap(), &color, 0, 1); - -// GdkGC *gc = -// Drawing->Drawing_Area_V-> -// style->fg_gc[GTK_WIDGET_STATE (Drawing->Drawing_Area_V)]; -// gdk_gc_set_foreground(gc, &color); - update_rect.x = 50; - update_rect.y = 50; - update_rect.width = 1000; - update_rect.height = 1000; - gdk_draw_rectangle (Drawing->Pixmap, - Drawing->Drawing_Area_V->style->black_gc, - TRUE, - 50, 50, - 1000, - 1000); - - - //Drawing_draw_line(Drawing, 10, 10, 50, 10, - // Drawing->Drawing_Area_V->style->black_gc); - gtk_widget_draw (Drawing->Drawing_Area_V, &update_rect); - -// Drawing_Refresh( Drawing, 0, 0, 30, 30); -} - +/* Function responsible for updating the exposed area. + * It must call processTrace() to ask for this update. + */ void Drawing_Data_Request(Drawing_t *Drawing, GdkPixmap *Pixmap, gint x, gint y, @@ -82,6 +58,7 @@ void Drawing_Data_Request(Drawing_t *Drawing, Drawing_draw_line(Drawing, Pixmap, 10, 10, 50, 10, Drawing->Drawing_Area_V->style->black_gc); + } /* Callbacks */ diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h index 441a4a51..ef430875 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h @@ -1,3 +1,8 @@ +/* Event_hooks.c defines the hooks that are given to processTrace as parameter. + * These hooks call the Drawing API to draw the information on the screen, + * using information from Context, but mostly state (running, waiting...). + */ + #ifndef _EVENT_HOOKS_H #define _EVENT_HOOKS_H