control flow viewer, work in progress
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 28 Sep 2003 01:12:47 +0000 (01:12 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 28 Sep 2003 01:12:47 +0000 (01:12 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@269 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c
ltt/branches/poly/lttv/modules/guiControlFlow/CFV.h
ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c
ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h
ltt/branches/poly/lttv/modules/guiControlFlow/Makefile.am
ltt/branches/poly/lttv/modules/guiControlFlow/module.c

index fe6160482922b00fc647de02c74d38d9a3d512bf..9cea4bc913481d46d86c60a9018e8035eabe802a 100644 (file)
@@ -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 ;
 }
 
index 85eade5698e80de8abf39a4fd4590bb6a23fbe0c..9088e6e1328eb9d5d7759c9f9f5095f1c082f2f4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _CFV_H
 #define _CFV_H
 
+#include <gtk/gtk.h>
+
 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
index df7eb66390e5a2e9d85d9720cc3c8d81446b11cf..781f772bceed0187dac58efe48c914e76c57bd0c 100644 (file)
@@ -8,6 +8,7 @@
 #include <lttv/hook.h>
 #include <lttv/common.h>
 
+#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) ;
        
index 7b68c7a57dc90a64fbb99ced6108d1616ecd0f81..441a4a5138b79f64c335dcb02ba8cc602da011df 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef _EVENT_HOOKS_H
 #define _EVENT_HOOKS_H
 
+#include <gtk/gtk.h>
+#include <lttv/mainWindow.h>
+
 GtkWidget *hGuiControlFlow(mainWindow *pmParentWindow);
 
 int Event_Selected_Hook(void *hook_data, void *call_data);
index 569f92c8368232b372a0494bb2540924343c3ac3..9de1c42b98c97fabe18c15adab17d5aaa3a4dec8 100644 (file)
@@ -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
index 058c5b1cffea325b90e76ab83b0f2671ac3eadcb..41b77a6d983d9cd573803b0e4ba1fd9fb915b522 100644 (file)
 #include <glib.h>
 #include <gmodule.h>
 #include <lttv/module.h>
-//#include <lttv/gtkTraceSet.h>
+#include <lttv/gtkTraceSet.h>
 
-//#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);
        
 }
This page took 0.027826 seconds and 4 git commands to generate.