X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FProcess_List.h;h=781d85e2b5751a4453365b154c27e25ea441dddd;hb=a6b3623edf87fccfbaf201e70c720d52f89a77fe;hp=b4924ce2733b194e15c3acfd22347080025a801c;hpb=f0d936c08dae39e9a913357a49885b4937aca847;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h index b4924ce2..781d85e2 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h @@ -1,12 +1,63 @@ #ifndef _PROCESS_LIST_H #define _PROCESS_LIST_H +#include +#include +#include + +/* The process list + * + * Tasks : + * Create a process list + * contains the data for the process list + * tells the height of the process list widget + * provides methods to add/remove process from the list + * note : the sync with drawing is left to the caller. + * provides helper function to convert a process unique identifier to + * pixels (in height). + * + * //FIXME : connect the scrolled window adjustment with the list. + */ + +typedef struct _ProcessInfo { + + guint pid; + LttTime birth; + +} ProcessInfo; + + + +struct _ProcessList { + + GtkWidget *Process_List_VC; + GtkListStore *Store_M; + + /* A hash table by PID to speed up process position find in the list */ + GHashTable *Process_Hash; + + guint Number_Of_Process; + gboolean Test_Process_Sent; + +}; + + typedef struct _ProcessList ProcessList; -ProcessList *ProcessList(void); -void ProcessList_destroy(ProcessList *Process_List); -GtkWidget *ProcessList_getWidget(ProcessList *Process_List); +ProcessList *processlist_construct(void); +void processlist_destroy(ProcessList *Process_List); +GtkWidget *processlist_get_widget(ProcessList *Process_List); + +// out : success (0) and height +int processlist_add(ProcessList *Process_List, guint pid, LttTime *birth, + guint *height); +// out : success (0) and height +int processlist_remove(ProcessList *Process_List, guint pid, LttTime *birth); + +guint processlist_get_height(ProcessList *Process_List); -int ProcessList_add(Process *myproc, ProcessList *Process_List, guint *height); -int ProcessList_remove(Process *myproc, ProcessList *Process_List); +// Returns 0 on success +gint processlist_get_process_pixels(ProcessList *Process_List, + guint pid, LttTime *birth, + guint *y, guint *height); #endif // _PROCESS_LIST_H