X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FProcess_List.h;h=a02e7ab28bcfe3e20221a353fe5ec6bda06d673f;hb=90ffd2adca8a23a36f3a9b7279f40797907723de;hp=ef38a9a2b7abffdd746c2bd562c05cfcb5fc0631;hpb=fa2c4dbef9d6f7f509a1d13ca8b7d16f95236100;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 ef38a9a2..a02e7ab2 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Process_List.h @@ -4,6 +4,7 @@ #include #include #include +#include "Draw_Item.h" /* The process list * @@ -15,24 +16,56 @@ * 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; + +typedef struct _HashedProcessData { + + GtkTreeRowReference *RowRef; + DrawContext *draw_context; + +} HashedProcessData; + +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_construct(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); +int processlist_add(ProcessList *Process_List, guint pid, LttTime *birth, + gchar *name, + guint *height, HashedProcessData **Hashed_Process_Data); // out : success (0) and height -int ProcessList_remove(ProcessList *Process_List, guint pid, LttTime *birth); +int processlist_remove(ProcessList *Process_List, guint pid, LttTime *birth); -guint ProcessList_get_pixels(ProcessList *Process_List); +guint processlist_get_height(ProcessList *Process_List); // Returns 0 on success -gint ProcessList_get_process_pixels(ProcessList *Process_List, +gint processlist_get_process_pixels(ProcessList *Process_List, guint pid, LttTime *birth, - guint *x, guint *height); + guint *y, guint *height, + HashedProcessData **Hashed_Process_Data); #endif // _PROCESS_LIST_H