drawing arc larger
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Draw_Item.h
CommitLineData
b782dd11 1#ifndef _DRAW_ITEM_H
2#define _DRAW_ITEM_H
3
4typedef struct _DrawContext DrawContext;
5typedef struct _DrawInfo DrawInfo;
6typedef struct _ItemInfo ItemInfo;
7
8typedef struct _DrawOperation DrawOperation;
9
10
11typedef struct _PropertiesText PropertiesText;
12typedef struct _PropertiesIcon PropertiesIcon;
13typedef struct _PropertiesLine PropertiesLine;
14typedef struct _PropertiesArc PropertiesArc;
15typedef struct _PropertiesBG PropertiesBG;
16
17
4c69e0cc 18void draw_item( GdkDrawable *drawable,
b782dd11 19 gint x,
20 gint y,
21 LttvTraceState *ts,
22 LttvTracefileState *tfs,
23 LttvIAttribute *attributes);
24
25/*
26 * The tree of attributes used to store drawing operations goes like this :
27 *
28 * event_types/
29 * "facility-event_type"
30 * cpus/
31 * "cpu name"
32 * mode_types/
33 * "execution mode"/
34 * submodes/
35 * "submode"
36 * process_states/
37 * "state name"
38 *
39 * So if, for example, we want to add a hook to get called each time we
40 * receive an event that is in state LTTV_STATE_SYSCALL, we put the
41 * pointer to the GArray of DrawOperation in
42 * process_states/ "name associated with LTTV_STATE_SYSCALL"
43 */
44
45/*
4c69e0cc 46 * The add_operation has to do a quick sort by priority to keep the operations
b782dd11 47 * in the right order.
48 */
4c69e0cc 49void add_operation( LttvIAttribute *attributes,
b782dd11 50 gchar *pathname,
51 DrawOperation *Operation);
52
53/*
4c69e0cc 54 * The del_operation seeks the array present at pathname (if any) and
b782dd11 55 * removes the DrawOperation if present. It returns 0 on success, -1
56 * if it fails.
57 */
4c69e0cc 58gint del_operation( LttvIAttribute *attributes,
b782dd11 59 gchar *pathname,
60 DrawOperation *Operation);
61
62/*
4c69e0cc 63 * The clean_operations removes all operations present at a pathname.
b782dd11 64 * returns 0 on success, -1 if it fails.
65 */
4c69e0cc 66gint clean_operations( LttvIAttribute *attributes,
b782dd11 67 gchar *pathname );
68
69
70/*
4c69e0cc 71 * The list_operations gives a pointer to the operation array associated
b782dd11 72 * with the pathname. It will be NULL if no operation is present.
73 */
4c69e0cc 74void list_operations( LttvIAttribute *attributes,
b782dd11 75 gchar *pathname,
76 GArray **Operation);
77
78
79
80/*
4c69e0cc 81 * exec_operation executes the operations if present in the attributes, or
b782dd11 82 * do nothing if not present.
83 */
4c69e0cc 84void exec_operations( LttvIAttribute *attributes,
b782dd11 85 gchar *pathname);
86
87
88/*
89 * Functions to create Properties structures.
90 */
91
92PropertiesText *properties_text_create(
93 GdkColor *foreground,
94 GdkColor *background,
95 gint size,
96 gchar *Text,
97 RelPos position);
98
99PropertiesIcon *properties_icon_create(
100 gchar *icon_name,
101 gint width,
102 gint height,
103 RelPos position),
104
105PropertiesLine *properties_line_create(
106 GdkColor *color,
107 gint line_width,
108 GdkLineStyle style,
109 RelPos position),
110
111PropertiesArc *properties_arc_create(
112 GdkColor *color,
113 gint size,
114 gboolean filled,
115 RelPos position),
116
117PropertiesBG *properties_bg_create(
118 GdkColor *color);
119
120
121
122
123/*
124 * Here follow the prototypes of the hook functions used to draw the
125 * different items.
126 */
127
4c69e0cc 128gboolean draw_text( void *hook_data, void *call_data);
129gboolean draw_icon( void *hook_data, void *call_data);
130gboolean draw_line( void *hook_data, void *call_data);
131gboolean draw_arc( void *hook_data, void *call_data);
132gboolean draw_bg( void *hook_data, void *call_data);
b782dd11 133
134
135#endif // _DRAW_ITEM_H
This page took 0.027844 seconds and 4 git commands to generate.