# WARNING : ltt must come before lttv, so that the traceread library is
# up to date
+
SUBDIRS = ltt include lttv lttd
for(i = 0 ; i < modulesPaths->len ; i++) {
pathname = g_module_build_path(modulesPaths->pdata[i],name);
- gm = g_module_open(pathname,0);
+ gm = g_module_open(pathname,G_MODULE_BIND_LAZY);
+ g_critical("module : %s", pathname);
+ g_critical("erreur : %s", g_module_error());
g_free(pathname);
if(gm != NULL) break;
if(gm == NULL) {
pathname = g_module_build_path(NULL,name);
- gm = g_module_open(pathname,0);
+ gm = g_module_open(pathname,G_MODULE_BIND_LAZY);
+ g_critical("module : %s", pathname);
g_free(pathname);
}
/* Module cannot be found */
-
+ if(gm==NULL)
+ g_critical("module est null");
if(gm == NULL) return NULL;
/* Check if the module was already opened using the hopefully canonical name
lttv_module_load(const char *name, int argc, char **argv)
{
LttvModule *m = module_load(name, argc, argv);
-
if(m != NULL) m->load_count++;
return m;
}
#
# the gui subdir comes first : dependency
-SUBDIRS = gui # guiControlFlow
+SUBDIRS = gui guiControlFlow
AM_CFLAGS = $(GLIB_CFLAGS)
AM_CFLAGS += $(GTK_CFLAGS)
LIBS += $(GLIB_LIBS)
-LIBS += $(GTK_LIBS) -L${srcdir}/gui/API -lmainWinApi
+LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/API -lmainWinApi
libdir = ${lttvplugindir}
LIBS += $(GLIB_LIBS)
LIBS += $(GTK_LIBS)
-lib_LTLIBRARIES = libmainWinApi.la libcustomBox.la
-libmainWinApi_la_SOURCES = toolbar.c menu.c gtkTraceSet.c
+lib_LTLIBRARIES = libcustomBox.la libmainWinApi.la
libcustomBox_la_SOURCES = gtkcustomhbox.c
+libmainWinApi_la_SOURCES = toolbar.c menu.c gtkTraceSet.c
+#libmainWinApi_la_LDFLAGS = -L${top_srcdir}/lttv/modules/gui/API -lcustomBox
+
EXTRA_DIST =
/* Add the object's information to the module's array */
Main_Window_List = g_slist_append(Main_Window_List, mw);
- g_critical("GUI init()");
+ g_critical("GUI Window_Creation_Hook()");
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ g_critical("GUI init()");
+
lttv_option_add("trace", 't',
"add a trace to the trace set to analyse",
"pathname of the directory containing the trace",
#include "Drawing.h"
#include "Process_List.h"
-#include "../icons/hGuiControlFlowInsert.xpm"
+extern GSList *gControl_Flow_Data_List;
/*****************************************************************************
* Control Flow Viewer class implementation *
*****************************************************************************/
-typedef struct _ControlFlowData {
+struct _ControlFlowData {
GtkWidget *Drawing_Area_V;
GtkWidget *Scrolled_Window_VC;
GtkAdjustment *VAdjust_C ;
/* Trace information */
- TraceSet *Trace_Set;
- TraceStatistics *Trace_Statistics;
+ //TraceSet *Trace_Set;
+ //TraceStatistics *Trace_Statistics;
/* Shown events information */
guint First_Event, Last_Event;
gboolean Selected_Event ;
guint Number_Of_Process;
-} ControlFlowData ;
-
-
-/** Array containing instanced objects. Used when module is unloaded */
-static GSList *sControl_Flow_Data_List = NULL ;
+} ;
/**
/* Create the Process list */
- //Control_Flow_Data->Process_List = ProcessList();
+ //Control_Flow_Data->Process_List = ProcessList_contruct();
//Process_List_Widget =
// ProcessList_getWidget(Control_Flow_Data->Process_List);
G_OBJECT(Control_Flow_Data->HBox_V),
"Control_Flow_Data",
Control_Flow_Data,
- GuiControlFlow_Destructor);
+ (GDestroyNotify)GuiControlFlow_Destructor);
+ g_slist_append(gControl_Flow_Data_List,Control_Flow_Data);
return Control_Flow_Data;
ProcessList_destroy(Control_Flow_Data->Process_List);
- g_slist_remove(sControl_Flow_Data_List,Control_Flow_Data);
+ g_slist_remove(gControl_Flow_Data_List,Control_Flow_Data);
}
//FIXME : call hGuiEvents_Destructor for corresponding data upon widget destroy
+GtkWidget *GuiControlFlow_get_Widget(ControlFlowData *Control_Flow_Data)
+{
+ return Control_Flow_Data->HBox_V ;
+}
/* Control Flow Data constructor */
ControlFlowData *GuiControlFlow(void);
-
-
+void
+GuiControlFlow_Destructor(ControlFlowData *Control_Flow_Data);
+GtkWidget *GuiControlFlow_get_Widget(ControlFlowData *Control_Flow_Data);
#endif // _CFV_H
guint area_x,
guint area_width,
guint window_width,
- ltt_time &window_time_begin,
- ltt_time &window_time_end,
- ltt_time &time_begin,
- ltt_time &time_end)
+ ltt_time *window_time_begin,
+ ltt_time *window_time_end,
+ ltt_time *time_begin,
+ ltt_time *time_end)
{
ltt_time window_time_interval;
#define _DRAWING_H
#include <time.h>
+#include <glib.h>
typedef time_t ltt_time;
Drawing_t *Drawing(void);
void Drawing_destroy(Drawing_t *Drawing);
-void Drawing_Resize(Drawing_t *Drawing, guint h, guint, w);
+void Drawing_Resize(Drawing_t *Drawing, guint h, guint w);
guint area_x,
guint area_width,
guint window_width,
- ltt_time &window_time_begin,
- ltt_time &window_time_end,
- ltt_time &time_begin,
- ltt_time &time_end);
+ ltt_time *window_time_begin,
+ ltt_time *window_time_end,
+ ltt_time *time_begin,
+ ltt_time *time_end);
#endif // _DRAWING_H
* Hooks to be called by the main window *
*****************************************************************************/
-#include <lttv/hook.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <lttv/hook.h>
+#include <lttv/common.h>
#include "CFV.h"
* @return The widget created.
*/
GtkWidget *
-hGuiControlFlow(GtkWidget *pmParentWindow)
+hGuiControlFlow(mainWindow *pmParentWindow)
{
ControlFlowData* Control_Flow_Data = GuiControlFlow() ;
- return Control_Flow_Data->HBox_V ;
+ return GuiControlFlow_get_Widget(Control_Flow_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.
*/
g_free(Event_Request);
return 0;
}
-
+#endif
#ifndef _EVENT_HOOKS_H
#define _EVENT_HOOKS_H
-GtkWidget *hGuiControlFlow(GtkWidget *pmParentWindow);
+GtkWidget *hGuiControlFlow(mainWindow *pmParentWindow);
int Event_Selected_Hook(void *hook_data, void *call_data);
AM_CFLAGS = $(GLIB_CFLAGS)
AM_CFLAGS += $(GTK_CFLAGS)
LIBS += $(GLIB_LIBS)
-LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/API -lmainWinApi -lcustomBox
+LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/API -lmainWinApi
libdir = ${lttvplugindir}
lib_LTLIBRARIES = libguiControlFlow.la
libguiControlFlow_la_LDFLAGS = -module
-libguiControlFlow_la_SOURCES = guiControlFlow.c
+libguiControlFlow_la_SOURCES = module.c
+# CFV.c Event_Hooks.c
+#libguiControlFlow_la_DEPENDENCIES = CFV.h \
+# Event_Hooks.h
};
-ProcessList *ProcessList(void)
+ProcessList *ProcessList_construct(void)
{
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
return height;
}
-
+#ifdef 0
int ProcessList_add(Process *myproc, ProcessList *Process_List, guint *height)
{
// add proc to container
return 0;
}
+#endif
typedef struct _ProcessList ProcessList;
-ProcessList *ProcessList(void);
+ProcessList *ProcessList_construct(void);
void ProcessList_destroy(ProcessList *Process_List);
GtkWidget *ProcessList_getWidget(ProcessList *Process_List);
-int ProcessList_add(Process *myproc, ProcessList *Process_List, guint *height);
-int ProcessList_remove(Process *myproc, ProcessList *Process_List);
+//int ProcessList_add(Process *myproc, ProcessList *Process_List, guint *height);
+//int ProcessList_remove(Process *myproc, ProcessList *Process_List);
#endif // _PROCESS_LIST_H
* Author : Mathieu Desnoyers, June 2003
*/
+#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 "../icons/hGuiControlFlowInsert.xpm"
+
+LttvModule *Main_Win_Module;
+
+
+/** Array containing instanced objects. Used when module is unloaded */
+//GSList *gControl_Flow_Data_List = NULL ;
+
+
-#include "CFV.h"
-#include "Event_Hooks.h"
/*****************************************************************************
* Functions for module loading/unloading *
* This function initializes the Control Flow Viewer functionnality through the
* gtkTraceSet API.
*/
-G_MODULE_EXPORT void init() {
+G_MODULE_EXPORT void init(LttvModule *self, int argc, char *argv[]) {
+
+ Main_Win_Module = lttv_module_require(self, "mainwin", argc, argv);
+
+ if(Main_Win_Module == NULL)
+ {
+ g_critical("Can't load Control Flow Viewer : missing mainwin\n");
+ return;
+ }
+
g_critical("GUI ControlFlow Viewer init()");
/* Register the toolbar insert button */
- ToolbarItemReg(guiEventsInsert_xpm, "Insert Control Flow Viewer", guiEvent);
+ //ToolbarItemReg(hGuiControlFlowInsert_xpm, "Insert Control Flow Viewer",
+ // hGuiControlFlow);
/* Register the menu item insert entry */
- MenuItemReg("/", "Insert Control Flow Viewer", guiEvent);
+ //MenuItemReg("/", "Insert Control Flow Viewer", hGuiControlFlow);
}
void destroy_walk(gpointer data, gpointer user_data)
{
- GuiControlFlow_Destructor((ControlFlowData*)data);
+// GuiControlFlow_Destructor((ControlFlowData*)data);
}
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(sControl_Flow_Data_List, destroy_walk, NULL );
+// g_slist_foreach(gControl_Flow_Data_List, destroy_walk, NULL );
/* Unregister the toolbar insert button */
- //ToolbarItemUnreg(hGuiEvents);
+ //ToolbarItemUnreg(hGuiControlFlow);
/* Unregister the menu item insert entry */
- //MenuItemUnreg(hGuiEvents);
-}
+ //MenuItemUnreg(hGuiControlFlow);
+
+ lttv_module_unload(Main_Win_Module);
+
+}
/* XPM */
-static char *hGuiEventsInsert_xpm[] = {
+static char *hGuiControlFlowInsert_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 16 1",
/* colors */