X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FEvent_Hooks.c;h=ba123f415cc97ca988d0380aac1b0af4082a1e0b;hb=41a769851adc36c024821e859ed6569409f71d8f;hp=12cf5c4d9dcb9d724ecb270c58ec3e19b03c8af2;hpb=f7afe191fd58f0bf4bab9c9514c261535b99d32b;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 12cf5c4d..ba123f41 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c @@ -3,10 +3,13 @@ *****************************************************************************/ +//#define PANGO_ENABLE_BACKEND #include #include #include +//#include + #include #include @@ -30,7 +33,22 @@ void send_test_drawing(ProcessList *Process_List, ProcessInfo Process_Info = {10000, 12000, 55600}; //ProcessInfo Process_Info = {156, 14000, 55500}; GtkTreeRowReference *got_RowRef; + PangoContext *context; + PangoLayout *layout; + PangoFontDescription *FontDesc;// = pango_font_description_new(); + gint Font_Size; + + /* Sent text data */ + layout = gtk_widget_create_pango_layout(Drawing->Drawing_Area_V, + NULL); + context = pango_layout_get_context(layout); + FontDesc = pango_context_get_font_description(context); + Font_Size = pango_font_description_get_size(FontDesc); + pango_font_description_set_size(FontDesc, Font_Size-3*PANGO_SCALE); + + + LttTime birth; birth.tv_sec = 12000; birth.tv_nsec = 55500; @@ -47,6 +65,10 @@ void send_test_drawing(ProcessList *Process_List, y+(height/2), x + width, y+(height/2), Drawing->Drawing_Area_V->style->black_gc); + pango_layout_set_text(layout, "Test", -1); + gdk_draw_layout(Pixmap, Drawing->Drawing_Area_V->style->black_gc, + 0, y+height, layout); + birth.tv_sec = 14000; birth.tv_nsec = 55500; @@ -118,7 +140,11 @@ void send_test_drawing(ProcessList *Process_List, Drawing->Drawing_Area_V->style->black_gc); g_critical("y : %u, height : %u", y, height); - + + + pango_font_description_set_size(FontDesc, Font_Size); + g_free(layout); + //g_free(context); } void send_test_process(ProcessList *Process_List, Drawing_t *Drawing) @@ -276,20 +302,20 @@ void send_test_process(ProcessList *Process_List, Drawing_t *Drawing) * @return The widget created. */ GtkWidget * -hGuiControlFlow(mainWindow *pmParentWindow) +hGuiControlFlow(MainWindow *pmParentWindow) { g_critical("hGuiControlFlow"); ControlFlowData *Control_Flow_Data = GuiControlFlow() ; - GetTimeWindow(pmParentWindow, + get_time_window(pmParentWindow, GuiControlFlow_get_Time_Window(Control_Flow_Data)); - GetCurrentTime(pmParentWindow, + get_current_time(pmParentWindow, GuiControlFlow_get_Current_Time(Control_Flow_Data)); // Unreg done in the GuiControlFlow_Destructor - RegUpdateTimeWindow(Update_Time_Window_Hook, Control_Flow_Data, + reg_update_time_window(Update_Time_Window_Hook, Control_Flow_Data, pmParentWindow); - RegUpdateCurrentTime(Update_Current_Time_Hook, Control_Flow_Data, + reg_update_current_time(Update_Current_Time_Hook, Control_Flow_Data, pmParentWindow); return GuiControlFlow_get_Widget(Control_Flow_Data) ; @@ -377,10 +403,10 @@ void Update_Time_Window_Hook(void *hook_data, void *call_data) *Time_Window = *New_Time_Window; g_critical("New time window HOOK : %u, %u to %u, %u", - Time_Window->startTime.tv_sec, - Time_Window->startTime.tv_nsec, - Time_Window->Time_Width.tv_sec, - Time_Window->Time_Width.tv_nsec); + Time_Window->start_time.tv_sec, + Time_Window->start_time.tv_nsec, + Time_Window->time_width.tv_sec, + Time_Window->time_width.tv_nsec); Drawing_Data_Request(Control_Flow_Data->Drawing, &Control_Flow_Data->Drawing->Pixmap,