1 #ifndef _PROCESS_LIST_H
2 #define _PROCESS_LIST_H
5 #include <lttv/state.h>
13 * Create a process list
14 * contains the data for the process list
15 * tells the height of the process list widget
16 * provides methods to add/remove process from the list
17 * note : the sync with drawing is left to the caller.
18 * provides helper function to convert a process unique identifier to
21 * //FIXME : connect the scrolled window adjustment with the list.
24 typedef struct _ProcessInfo
{
31 typedef struct _HashedProcessData
{
33 GtkTreeRowReference
*row_ref
;
34 DrawContext
*draw_context
;
40 GtkWidget
*process_list_widget
;
41 GtkListStore
*list_store
;
43 /* A hash table by PID to speed up process position find in the list */
44 GHashTable
*process_hash
;
46 guint number_of_process
;
50 typedef struct _ProcessList ProcessList
;
52 ProcessList
*processlist_construct(void);
53 void processlist_destroy(ProcessList
*process_list
);
54 GtkWidget
*processlist_get_widget(ProcessList
*process_list
);
56 // out : success (0) and height
57 int processlist_add(ProcessList
*process_list
, guint pid
, LttTime
*birth
,
58 gchar
*name
, guint
*height
, HashedProcessData
**hashed_process_data
);
59 // out : success (0) and height
60 int processlist_remove(ProcessList
*process_list
, guint pid
, LttTime
*birth
);
62 guint
processlist_get_height(ProcessList
*process_list
);
64 // Returns 0 on success
65 gint
processlist_get_process_pixels(ProcessList
*process_list
,
66 guint pid
, LttTime
*birth
,
67 guint
*y
, guint
*height
,
68 HashedProcessData
**hashed_process_data
);
70 gint
processlist_get_pixels_from_data( ProcessList
*process_list
,
71 ProcessInfo
*process_info
,
72 HashedProcessData
*hashed_process_data
,
76 #endif // _PROCESS_LIST_H
This page took 0.031039 seconds and 5 git commands to generate.