4 typedef struct _DrawContext DrawContext
;
5 typedef struct _DrawInfo DrawInfo
;
6 typedef struct _ItemInfo ItemInfo
;
8 typedef struct _IconStruct IconStruct
;
10 typedef struct _DrawOperation DrawOperation
;
13 typedef struct _PropertiesText PropertiesText
;
14 typedef struct _PropertiesIcon PropertiesIcon
;
15 typedef struct _PropertiesLine PropertiesLine
;
16 typedef struct _PropertiesArc PropertiesArc
;
17 typedef struct _PropertiesBG PropertiesBG
;
19 typedef enum _DrawableItems DrawableItems
;
21 ITEM_TEXT
, ITEM_ICON
, ITEM_LINE
, ITEM_POINT
, ITEM_BACKGROUND
25 typedef enum _RelPos
{
30 void draw_item( GdkDrawable
*drawable
,
34 LttvTracefileState
*tfs
,
35 LttvIAttribute
*attributes
);
38 * The tree of attributes used to store drawing operations goes like this :
41 * "facility-event_type"
51 * So if, for example, we want to add a hook to get called each time we
52 * receive an event that is in state LTTV_STATE_SYSCALL, we put the
53 * pointer to the GArray of DrawOperation in
54 * process_states/ "name associated with LTTV_STATE_SYSCALL"
58 * The add_operation has to do a quick sort by priority to keep the operations
61 void add_operation( LttvIAttribute
*attributes
,
63 DrawOperation
*Operation
);
66 * The del_operation seeks the array present at pathname (if any) and
67 * removes the DrawOperation if present. It returns 0 on success, -1
70 gint
del_operation( LttvIAttribute
*attributes
,
72 DrawOperation
*Operation
);
75 * The clean_operations removes all operations present at a pathname.
76 * returns 0 on success, -1 if it fails.
78 gint
clean_operations( LttvIAttribute
*attributes
,
83 * The list_operations gives a pointer to the operation array associated
84 * with the pathname. It will be NULL if no operation is present.
86 void list_operations( LttvIAttribute
*attributes
,
93 * exec_operation executes the operations if present in the attributes, or
94 * do nothing if not present.
96 void exec_operations( LttvIAttribute
*attributes
,
101 * Functions to create Properties structures.
104 PropertiesText
*properties_text_create(
105 GdkColor
*foreground
,
106 GdkColor
*background
,
111 PropertiesIcon
*properties_icon_create(
117 PropertiesLine
*properties_line_create(
123 PropertiesArc
*properties_arc_create(
129 PropertiesBG
*properties_bg_create(
136 * Here follow the prototypes of the hook functions used to draw the
140 gboolean
draw_text( void *hook_data
, void *call_data
);
141 gboolean
draw_icon( void *hook_data
, void *call_data
);
142 gboolean
draw_line( void *hook_data
, void *call_data
);
143 gboolean
draw_arc( void *hook_data
, void *call_data
);
144 gboolean
draw_bg( void *hook_data
, void *call_data
);
147 #endif // _DRAW_ITEM_H