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