From 1ab818de1d890bf716413090d943858bfef8d3d3 Mon Sep 17 00:00:00 2001 From: compudj Date: Sun, 28 Sep 2003 01:12:47 +0000 Subject: [PATCH] control flow viewer, work in progress git-svn-id: http://ltt.polymtl.ca/svn@269 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/modules/guiControlFlow/CFV.c | 19 ++++++------ .../poly/lttv/modules/guiControlFlow/CFV.h | 3 ++ .../lttv/modules/guiControlFlow/Event_Hooks.c | 4 ++- .../lttv/modules/guiControlFlow/Event_Hooks.h | 3 ++ .../lttv/modules/guiControlFlow/Makefile.am | 3 +- .../poly/lttv/modules/guiControlFlow/module.c | 29 +++++++++---------- 6 files changed, 33 insertions(+), 28 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c index fe616048..9cea4bc9 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c @@ -23,7 +23,7 @@ struct _ControlFlowData { ProcessList *Process_List; Drawing_t *Drawing; - GtkWidget *HBox_V; + //GtkWidget *HBox_V; GtkWidget *Inside_HBox_V; GtkAdjustment *VAdjust_C ; @@ -98,7 +98,6 @@ GuiControlFlow(void) 0.0, /* Page inc. */ 0.0)); /* page size */ - Control_Flow_Data->Scrolled_Window_VC = gtk_scrolled_window_new (NULL, Control_Flow_Data->VAdjust_C); @@ -133,13 +132,13 @@ GuiControlFlow(void) //Control_Flow_Data->Trace_Statistics = get_trace_statistics(Trace); - gtk_widget_show(Control_Flow_Data->Drawing_Area_V); - gtk_widget_show(Process_List_Widget); + //gtk_widget_show(Control_Flow_Data->Drawing_Area_V); + //gtk_widget_show(Process_List_Widget); gtk_widget_show(Control_Flow_Data->Inside_HBox_V); gtk_widget_show(Control_Flow_Data->Scrolled_Window_VC); - + g_object_set_data_full( - G_OBJECT(Control_Flow_Data->HBox_V), + G_OBJECT(Control_Flow_Data->Scrolled_Window_VC), "Control_Flow_Data", Control_Flow_Data, (GDestroyNotify)GuiControlFlow_Destructor); @@ -156,10 +155,10 @@ GuiControlFlow_Destructor(ControlFlowData *Control_Flow_Data) guint index; /* May already been done by GTK window closing */ - if(GTK_IS_WIDGET(Control_Flow_Data->HBox_V)) - gtk_widget_destroy(Control_Flow_Data->HBox_V); + if(GTK_IS_WIDGET(Control_Flow_Data->Scrolled_Window_VC)) + gtk_widget_destroy(Control_Flow_Data->Scrolled_Window_VC); - ProcessList_destroy(Control_Flow_Data->Process_List); + //ProcessList_destroy(Control_Flow_Data->Process_List); g_slist_remove(gControl_Flow_Data_List,Control_Flow_Data); } @@ -168,6 +167,6 @@ GuiControlFlow_Destructor(ControlFlowData *Control_Flow_Data) GtkWidget *GuiControlFlow_get_Widget(ControlFlowData *Control_Flow_Data) { - return Control_Flow_Data->HBox_V ; + return Control_Flow_Data->Scrolled_Window_VC ; } diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.h b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.h index 85eade56..9088e6e1 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.h @@ -1,6 +1,8 @@ #ifndef _CFV_H #define _CFV_H +#include + typedef struct _ControlFlowData ControlFlowData; /* Control Flow Data constructor */ @@ -8,4 +10,5 @@ ControlFlowData *GuiControlFlow(void); void GuiControlFlow_Destructor(ControlFlowData *Control_Flow_Data); GtkWidget *GuiControlFlow_get_Widget(ControlFlowData *Control_Flow_Data); + #endif // _CFV_H diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c index df7eb663..781f772b 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c @@ -8,6 +8,7 @@ #include #include +#include "Event_Hooks.h" #include "CFV.h" /** @@ -21,7 +22,8 @@ GtkWidget * hGuiControlFlow(mainWindow *pmParentWindow) { - ControlFlowData* Control_Flow_Data = GuiControlFlow() ; + g_critical("hGuiControlFlow"); + ControlFlowData *Control_Flow_Data = GuiControlFlow() ; return GuiControlFlow_get_Widget(Control_Flow_Data) ; diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h index 7b68c7a5..441a4a51 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h @@ -2,6 +2,9 @@ #ifndef _EVENT_HOOKS_H #define _EVENT_HOOKS_H +#include +#include + GtkWidget *hGuiControlFlow(mainWindow *pmParentWindow); int Event_Selected_Hook(void *hook_data, void *call_data); diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Makefile.am b/ltt/branches/poly/lttv/modules/guiControlFlow/Makefile.am index 569f92c8..9de1c42b 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Makefile.am +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Makefile.am @@ -13,7 +13,6 @@ libdir = ${lttvplugindir} lib_LTLIBRARIES = libguiControlFlow.la libguiControlFlow_la_LDFLAGS = -module -libguiControlFlow_la_SOURCES = module.c -# CFV.c Event_Hooks.c +libguiControlFlow_la_SOURCES = module.c Event_Hooks.c CFV.c #libguiControlFlow_la_DEPENDENCIES = CFV.h \ # Event_Hooks.h diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/module.c b/ltt/branches/poly/lttv/modules/guiControlFlow/module.c index 058c5b1c..41b77a6d 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/module.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/module.c @@ -20,18 +20,18 @@ #include #include #include -//#include +#include -//#include "CFV.h" -//#include "Event_Hooks.h" +#include "CFV.h" +#include "Event_Hooks.h" -// #include "../icons/hGuiControlFlowInsert.xpm" + #include "../icons/hGuiControlFlowInsert.xpm" static LttvModule *Main_Win_Module; /** Array containing instanced objects. Used when module is unloaded */ -//GSList *gControl_Flow_Data_List = NULL ; +GSList *gControl_Flow_Data_List = NULL ; @@ -58,17 +58,18 @@ G_MODULE_EXPORT void init(LttvModule *self, int argc, char *argv[]) { g_critical("GUI ControlFlow Viewer init()"); /* Register the toolbar insert button */ - //ToolbarItemReg(hGuiControlFlowInsert_xpm, "Insert Control Flow Viewer", - // hGuiControlFlow); + ToolbarItemReg(hGuiControlFlowInsert_xpm, "Insert Control Flow Viewer", + hGuiControlFlow); /* Register the menu item insert entry */ - //MenuItemReg("/", "Insert Control Flow Viewer", hGuiControlFlow); + MenuItemReg("/", "Insert Control Flow Viewer", hGuiControlFlow); } void destroy_walk(gpointer data, gpointer user_data) { -// GuiControlFlow_Destructor((ControlFlowData*)data); + GuiControlFlow_Destructor((ControlFlowData*)data); + g_critical("Walk destroy GUI Control Flow Viewer"); } @@ -83,16 +84,14 @@ G_MODULE_EXPORT void destroy() { g_critical("GUI Control Flow Viewer destroy()"); int i; -// ControlFlowData *Control_Flow_Data; + ControlFlowData *Control_Flow_Data; - g_critical("GUI Event Viewer destroy()"); - -// g_slist_foreach(gControl_Flow_Data_List, destroy_walk, NULL ); + g_slist_foreach(gControl_Flow_Data_List, destroy_walk, NULL ); /* Unregister the toolbar insert button */ - //ToolbarItemUnreg(hGuiControlFlow); + ToolbarItemUnreg(hGuiControlFlow); /* Unregister the menu item insert entry */ - //MenuItemUnreg(hGuiControlFlow); + MenuItemUnreg(hGuiControlFlow); } -- 2.34.1