X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FEvent_Hooks.c;h=bc278874d8561e79752a8bd4a5dd8b232f2c6dbd;hb=5f16133f507054edf95e61cefdc3fd04552b0925;hp=9a86826bc92d77aa1de2718e54200a48eb1ec564;hpb=f0d936c08dae39e9a913357a49885b4937aca847;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c index 9a86826b..bc278874 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c @@ -2,10 +2,105 @@ * Hooks to be called by the main window * *****************************************************************************/ -#include +#include +#include +#include + +#include +#include +#include "Event_Hooks.h" #include "CFV.h" +#include "Process_List.h" + +void send_test_data(ProcessList *Process_List) +{ + guint height; + int i; + ProcessInfo Process_Info = {10000, 12000, 55600}; + //ProcessInfo Process_Info = {156, 14000, 55500}; + GtkTreeRowReference *got_RowRef; + + LttTime birth; + birth.tv_sec = 12000; + birth.tv_nsec = 55500; + + ProcessList_add(Process_List, + 1, + &birth, + &height); + + g_critical("height : %u", height); + + birth.tv_sec = 14000; + birth.tv_nsec = 55500; + + ProcessList_add(Process_List, + 156, + &birth, + &height); + + g_critical("height : %u", height); + + birth.tv_sec = 12000; + birth.tv_nsec = 55700; + + ProcessList_add(Process_List, + 10, + &birth, + &height); + + for(i=0; i<10; i++) + { + birth.tv_sec = i*12000; + birth.tv_nsec = i*55700; + + ProcessList_add(Process_List, + i, + &birth, + &height); + + } + g_critical("height : %u", height); + + birth.tv_sec = 12000; + birth.tv_nsec = 55600; + + ProcessList_add(Process_List, + 10, + &birth, + &height); + g_critical("height : %u", height); + + ProcessList_add(Process_List, + 10000, + &birth, + &height); + g_critical("height : %u", height); + + + ProcessList_remove( Process_List, + 10000, + &birth); + + if(got_RowRef = + (GtkTreeRowReference*)g_hash_table_lookup( + Process_List->Process_Hash, + &Process_Info)) + { + g_critical("key found"); + g_critical("position in the list : %s", + gtk_tree_path_to_string ( + gtk_tree_row_reference_get_path( + (GtkTreeRowReference*)got_RowRef) + )); + + } + +} + + /** * Event Viewer's constructor hook @@ -16,11 +111,12 @@ * @return The widget created. */ GtkWidget * -hGuiControlFlow(GtkWidget *pmParentWindow) +hGuiControlFlow(mainWindow *pmParentWindow) { - ControlFlowData* Control_Flow_Data = GuiControlFlow() ; + g_critical("hGuiControlFlow"); + ControlFlowData *Control_Flow_Data = GuiControlFlow() ; - return Control_Flow_Data->HBox_V ; + return GuiControlFlow_get_Widget(Control_Flow_Data) ; } @@ -38,7 +134,7 @@ int Event_Selected_Hook(void *hook_data, void *call_data) } - +#ifdef DEBUG /* Hook called before drawing. Gets the initial context at the beginning of the * drawing interval and copy it to the context in Event_Request. */ @@ -87,4 +183,4 @@ int Draw_After_Hook(void *hook_data, void *call_data) g_free(Event_Request); return 0; } - +#endif