X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fcontrolflow%2Fdrawitem.h;h=85fc837aac4f41a7479f6ab3aef7593cced6c825;hb=90ef7e4a2c6a41ec36bd2530b187cc1ef2cf0025;hp=1fca9ae7482283a0003e9b4fcf017d1ab8e9d0a8;hpb=ce0214a66f4e1c6f4d94d53c1ead65b58157c60d;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.h b/ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.h index 1fca9ae7..85fc837a 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.h +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.h @@ -42,10 +42,13 @@ enum _DrawableItems { ITEM_TEXT, ITEM_ICON, ITEM_LINE, ITEM_POINT, ITEM_BACKGROUND }; +typedef enum _RelPosX { + POS_START, POS_END +} RelPosX; -typedef enum _RelPos { +typedef enum _RelPosY { OVER, MIDDLE, UNDER -} RelPos; +} RelPosY; /* The DrawContext keeps information about the current drawing position and @@ -59,6 +62,8 @@ typedef enum _RelPos { * when we draw a text, an arc or an icon, while it's unneeded when we * draw a line or background. * + * The modify_* positions are altered by the draw item functions. + * */ @@ -67,41 +72,36 @@ struct _DrawContext { GdkGC *gc; PangoLayout *pango_layout; - DrawInfo *current; - DrawInfo *previous; + struct { + struct { + gint x; + struct { + gint over; + gint middle; + gint under; + } offset; + } start; + + struct { + gint x; + struct { + gint over; + gint middle; + gint under; + } offset; + } end; + + struct { + gint over; + gint middle; + gint under; + } y; + + } drawinfo; }; -/* LttvExecutionState is accessible through the LttvTracefileState. Is has - * a pointer to the LttvProcessState which points to the top of stack - * execution state : LttvExecutionState *state. - * - * LttvExecutionState contains (useful here): - * LttvExecutionMode t, - * LttvExecutionSubmode n, - * LttvProcessStatus s - * - * - * LttvTraceState will be used in the case we need the string of the - * different processes, eventtype_names, syscall_names, trap_names, irq_names. - * - * LttvTracefileState also gives the cpu_name and, as it herits from - * LttvTracefileContext, it gives the LttEvent structure, which is needed - * to get facility name and event name. - */ -struct _DrawInfo { - ItemInfo *over; - ItemInfo *middle; - ItemInfo *under; - - ItemInfo *modify_over; - ItemInfo *modify_middle; - ItemInfo *modify_under; - LttvProcessStatus status; -}; -struct _ItemInfo { - gint x, y; -}; + /* * Structure used to keep information about icons. @@ -149,9 +149,12 @@ static int Items_Priorities[] = { struct _PropertiesText { GdkColor *foreground; GdkColor *background; - gint size; - gchar *text; - RelPos position; + gint size; + gchar *text; + struct { + RelPosX x; + RelPosY y; + } position; }; @@ -159,21 +162,27 @@ struct _PropertiesIcon { gchar *icon_name; gint width; gint height; - RelPos position; + struct { + RelPosX x; + RelPosY y; + } position; }; struct _PropertiesLine { - GdkColor *color; + GdkColor color; gint line_width; GdkLineStyle style; - RelPos position; + RelPosY y; }; struct _PropertiesArc { GdkColor *color; gint size; /* We force circle by width = height */ gboolean filled; - RelPos position; + struct { + RelPosX x; + RelPosY y; + } position; }; struct _PropertiesBG { @@ -209,6 +218,8 @@ void draw_item( GdkDrawable *drawable, * process_states/ "name associated with LTTV_STATE_SYSCALL" */ + +#if 0 /* * The add_operation has to do a quick sort by priority to keep the operations * in the right order. @@ -250,53 +261,18 @@ void list_operations( LttvIAttribute *attributes, */ void exec_operations( LttvIAttribute *attributes, gchar *pathname); - - -/* - * Functions to create Properties structures. - */ - -PropertiesText *properties_text_create( - GdkColor *foreground, - GdkColor *background, - gint size, - gchar *text, - RelPos position); - -PropertiesIcon *properties_icon_create( - gchar *icon_name, - gint width, - gint height, - RelPos position); - -PropertiesLine *properties_line_create( - GdkColor *color, - gint line_width, - GdkLineStyle style, - RelPos position); - -PropertiesArc *properties_arc_create( - GdkColor *color, - gint size, - gboolean filled, - RelPos position); - -PropertiesBG *properties_bg_create( - GdkColor *color); - - - +#endif //0 /* * Here follow the prototypes of the hook functions used to draw the * different items. */ -gboolean draw_text( void *hook_data, void *call_data); -gboolean draw_icon( void *hook_data, void *call_data); -gboolean draw_line( void *hook_data, void *call_data); -gboolean draw_arc( void *hook_data, void *call_data); -gboolean draw_bg( void *hook_data, void *call_data); +__inline gboolean draw_text( void *hook_data, void *call_data); +__inline gboolean draw_icon( void *hook_data, void *call_data); +__inline gboolean draw_line( void *hook_data, void *call_data); +__inline gboolean draw_arc( void *hook_data, void *call_data); +__inline gboolean draw_bg( void *hook_data, void *call_data); #endif // _DRAW_ITEM_H