1 /*! \defgroup guiEvents libguiControlFlow: The GUI ControlFlow display plugin */
4 /*! \file guiControlFlow.c
5 * \brief Graphical plugin for showing control flow of a trace.
7 * This plugin adds a Control Flow Viewer functionnality to Linux TraceToolkit
8 * GUI when this plugin is loaded. The init and destroy functions add the
9 * viewer's insertion menu item and toolbar icon by calling gtkTraceSet's
10 * API functions. Then, when a viewer's object is created, the constructor
11 * creates ans register through API functions what is needed to interact
12 * with the TraceSet window.
14 * This plugin uses the gdk library to draw the events and gtk to interact
17 * Author : Mathieu Desnoyers, June 2003
25 #include <lttv/module.h>
27 #include "guiControlFlow.h"
28 #include "icons/guiControlFlowInsert.xpm"
30 //! Event Viewer's constructor
31 GtkWidget
*guiControlFlow(GtkWidget
*ParentWindow
);
34 * plugin's init function
36 * This function initializes the Control Flow Viewer functionnality through the
39 G_MODULE_EXPORT
void init() {
40 g_critical("GUI ControlFlow Viewer init()");
42 /* Register the toolbar insert button */
43 ToolbarItemReg(guiEventsInsert_xpm
, "Insert Control Flow Viewer", guiEvent
);
45 /* Register the menu item insert entry */
46 MenuItemReg("/", "Insert Control Flow Viewer", guiEvent
);
51 * plugin's destroy function
53 * This function releases the memory reserved by the module and unregisters
54 * everything that has been registered in the gtkTraceSet API.
56 G_MODULE_EXPORT
void destroy() {
57 g_critical("GUI Control Flow Viewer destroy()");
59 /* Unregister the toolbar insert button */
60 ToolbarItemUnreg(guiEvent
);
62 /* Unregister the menu item insert entry */
63 MenuItemUnreg(guiEvents
);
67 * Control Flow Viewer's constructor
69 * This constructor is given as a parameter to the menuitem and toolbar button
70 * registration. It creates the drawing widget.
71 * @param ParentWindow A pointer to the parent window.
72 * @return The widget created.
75 guiEvents(GtkWidget
*ParentWindow
)
77 GtkWidget
*drawing_area
= gtk_drawing_area_new ();
79 g_signal_connect (G_OBJECT (drawing_area
), "expose_event",
80 G_CALLBACK (expose_event_callback
), NULL
);
This page took 0.053521 seconds and 4 git commands to generate.