test data sent from hook file, square insert implemented
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Process_List.h
1 #ifndef _PROCESS_LIST_H
2 #define _PROCESS_LIST_H
3
4 #include <gtk/gtk.h>
5 #include <lttv/state.h>
6 #include <ltt/ltt.h>
7
8 /* The process list
9 *
10 * Tasks :
11 * Create a process list
12 * contains the data for the process list
13 * tells the height of the process list widget
14 * provides methods to add/remove process from the list
15 * note : the sync with drawing is left to the caller.
16 * provides helper function to convert a process unique identifier to
17 * pixels (in height).
18 *
19 * //FIXME : connect the scrolled window adjustment with the list.
20 */
21
22 typedef struct _ProcessInfo {
23
24 guint pid;
25 LttTime birth;
26
27 } ProcessInfo;
28
29
30
31 struct _ProcessList {
32
33 GtkWidget *Process_List_VC;
34 GtkListStore *Store_M;
35
36 /* A hash table by PID to speed up process position find in the list */
37 GHashTable *Process_Hash;
38
39 guint Number_Of_Process;
40
41 };
42
43
44 typedef struct _ProcessList ProcessList;
45
46 ProcessList *ProcessList_construct(void);
47 void ProcessList_destroy(ProcessList *Process_List);
48 GtkWidget *ProcessList_getWidget(ProcessList *Process_List);
49
50 // out : success (0) and height
51 int ProcessList_add(ProcessList *Process_List, guint pid, LttTime *birth,
52 guint *height);
53 // out : success (0) and height
54 int ProcessList_remove(ProcessList *Process_List, guint pid, LttTime *birth);
55
56 guint ProcessList_get_pixels(ProcessList *Process_List);
57
58 // Returns 0 on success
59 gint ProcessList_get_process_pixels(ProcessList *Process_List,
60 guint pid, LttTime *birth,
61 guint *x, guint *height);
62 #endif // _PROCESS_LIST_H
This page took 0.029637 seconds and 4 git commands to generate.