f0d936c0 |
1 | #ifndef _PROCESS_LIST_H |
2 | #define _PROCESS_LIST_H |
3 | |
fa2c4dbe |
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 | |
f0d936c0 |
20 | typedef struct _ProcessList ProcessList; |
21 | |
558aa013 |
22 | ProcessList *ProcessList_construct(void); |
f0d936c0 |
23 | void ProcessList_destroy(ProcessList *Process_List); |
24 | GtkWidget *ProcessList_getWidget(ProcessList *Process_List); |
25 | |
fa2c4dbe |
26 | // out : success (0) and height |
27 | int ProcessList_add(ProcessList *Process_List, guint pid, LttTime *birth, |
28 | guint *height); |
29 | // out : success (0) and height |
30 | int ProcessList_remove(ProcessList *Process_List, guint pid, LttTime *birth); |
31 | |
32 | guint ProcessList_get_pixels(ProcessList *Process_List); |
33 | |
34 | // Returns 0 on success |
35 | gint ProcessList_get_process_pixels(ProcessList *Process_List, |
36 | guint pid, LttTime *birth, |
37 | guint *x, guint *height); |
f0d936c0 |
38 | #endif // _PROCESS_LIST_H |