Draw_Item .h and .c design complete. Now, needs to be implemented.
[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
18void Draw_Item( GdkDrawable *drawable,
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/*
46 * The AddOperation has to do a quick sort by priority to keep the operations
47 * in the right order.
48 */
49void AddOperation( LttvIAttribute *attributes,
50 gchar *pathname,
51 DrawOperation *Operation);
52
53/*
54 * The DelOperation seeks the array present at pathname (if any) and
55 * removes the DrawOperation if present. It returns 0 on success, -1
56 * if it fails.
57 */
58gint DelOperation( LttvIAttribute *attributes,
59 gchar *pathname,
60 DrawOperation *Operation);
61
62/*
63 * The CleanOperations removes all operations present at a pathname.
64 * returns 0 on success, -1 if it fails.
65 */
66gint DelOperations( LttvIAttribute *attributes,
67 gchar *pathname );
68
69
70/*
71 * The ListOperation gives a pointer to the operation array associated
72 * with the pathname. It will be NULL if no operation is present.
73 */
74void ListOperations( LttvIAttribute *attributes,
75 gchar *pathname,
76 GArray **Operation);
77
78
79
80/*
81 * ExecOperation executes the operations if present in the attributes, or
82 * do nothing if not present.
83 */
84void ExecOperations( LttvIAttribute *attributes,
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
128gboolean DrawText( void *hook_data, void *call_data);
129gboolean DrawIcon( void *hook_data, void *call_data);
130gboolean DrawLine( void *hook_data, void *call_data);
131gboolean DrawArc( void *hook_data, void *call_data);
132gboolean DrawBG( void *hook_data, void *call_data);
133
134
135#endif // _DRAW_ITEM_H
This page took 0.031339 seconds and 4 git commands to generate.