X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FProcess_List.h;h=d3272160e4fd6ee2ee9222f2ba60e6b6af233030;hb=8d70e03bc0026687c050287b3dc9b3ec42281191;hp=f2fa69cb3c39998780fa1b0b08189e9f175b825e;hpb=f7afe191fd58f0bf4bab9c9514c261535b99d32b;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 f2fa69cb..d3272160 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 * @@ -12,52 +13,63 @@ * 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. + * note : the sync with drawing is left to the caller. * provides helper function to convert a process unique identifier to - * pixels (in height). + * pixels (in height). * * //FIXME : connect the scrolled window adjustment with the list. */ typedef struct _ProcessInfo { - - guint pid; - LttTime birth; + + guint pid; + LttTime birth; } ProcessInfo; +typedef struct _HashedProcessData { + + GtkTreeRowReference *row_ref; + 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; + + GtkWidget *process_list_widget; + GtkListStore *list_store; + /* A hash table by PID to speed up process position find in the list */ + GHashTable *process_hash; + + guint number_of_process; }; 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_height(ProcessList *Process_List); +guint processlist_get_height(ProcessList *process_list); // Returns 0 on success -gint ProcessList_get_process_pixels(ProcessList *Process_List, - guint pid, LttTime *birth, - guint *y, guint *height); +gint processlist_get_process_pixels(ProcessList *process_list, + guint pid, LttTime *birth, + guint *y, guint *height, + HashedProcessData **hashed_process_data); + +gint processlist_get_pixels_from_data( ProcessList *process_list, + ProcessInfo *process_info, + HashedProcessData *hashed_process_data, + guint *y, + guint *height); + #endif // _PROCESS_LIST_H