1 #ifndef _PROCESS_LIST_H
2 #define _PROCESS_LIST_H
5 #include <lttv/state.h>
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
19 * //FIXME : connect the scrolled window adjustment with the list.
22 typedef struct _ProcessInfo
{
33 GtkWidget
*Process_List_VC
;
34 GtkListStore
*Store_M
;
36 /* A hash table by PID to speed up process position find in the list */
37 GHashTable
*Process_Hash
;
39 guint Number_Of_Process
;
40 gboolean Test_Process_Sent
;
45 typedef struct _ProcessList ProcessList
;
47 ProcessList
*processlist_construct(void);
48 void processlist_destroy(ProcessList
*Process_List
);
49 GtkWidget
*processlist_get_widget(ProcessList
*Process_List
);
51 // out : success (0) and height
52 int processlist_add(ProcessList
*Process_List
, guint pid
, LttTime
*birth
,
54 // out : success (0) and height
55 int processlist_remove(ProcessList
*Process_List
, guint pid
, LttTime
*birth
);
57 guint
processlist_get_height(ProcessList
*Process_List
);
59 // Returns 0 on success
60 gint
processlist_get_process_pixels(ProcessList
*Process_List
,
61 guint pid
, LttTime
*birth
,
62 guint
*y
, guint
*height
);
63 #endif // _PROCESS_LIST_H