| 1 | /*! \defgroup guiEvents libguiEvents: The GUI Events display plugin */ |
| 2 | /*\@{*/ |
| 3 | |
| 4 | /*! \file guiEvents.c |
| 5 | * \brief Graphical plugin for showing events. |
| 6 | * |
| 7 | * This plugin lists all the events contained in the current time interval |
| 8 | * in a list. |
| 9 | * |
| 10 | * This plugin adds a Events Viewer functionnality to Linux TraceToolkit |
| 11 | * GUI when this plugin is loaded. The init and destroy functions add the |
| 12 | * viewer's insertion menu item and toolbar icon by calling gtkTraceSet's |
| 13 | * API functions. Then, when a viewer's object is created, the constructor |
| 14 | * creates ans register through API functions what is needed to interact |
| 15 | * with the TraceSet window. |
| 16 | * |
| 17 | * Author : Mathieu Desnoyers, June 2003 |
| 18 | */ |
| 19 | |
| 20 | #include <glib.h> |
| 21 | #include <gmodule.h> |
| 22 | #include <gtk.h> |
| 23 | #include <gdk.h> |
| 24 | |
| 25 | #include <lttv/module.h> |
| 26 | |
| 27 | #include "icons/guiEventsInsert.xpm" |
| 28 | |
| 29 | //! Event Viewer's constructor |
| 30 | GtkWidget *guiEvents(GtkWidget *ParentWindow); |
| 31 | |
| 32 | /** |
| 33 | * plugin's init function |
| 34 | * |
| 35 | * This function initializes the Event Viewer functionnality through the |
| 36 | * gtkTraceSet API. |
| 37 | */ |
| 38 | G_MODULE_EXPORT void init() { |
| 39 | g_critical("GUI Event Viewer init()"); |
| 40 | |
| 41 | /* Register the toolbar insert button */ |
| 42 | ToolbarItemReg(guiEventsInsert_xpm, "Insert Event Viewer", guiEvent); |
| 43 | |
| 44 | /* Register the menu item insert entry */ |
| 45 | MenuItemReg("/", "Insert Event Viewer", guiEvent); |
| 46 | |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * plugin's destroy function |
| 51 | * |
| 52 | * This function releases the memory reserved by the module and unregisters |
| 53 | * everything that has been registered in the gtkTraceSet API. |
| 54 | */ |
| 55 | G_MODULE_EXPORT void destroy() { |
| 56 | g_critical("GUI Event Viewer destroy()"); |
| 57 | |
| 58 | /* Unregister the toolbar insert button */ |
| 59 | ToolbarItemUnreg(guiEvent); |
| 60 | |
| 61 | /* Unregister the menu item insert entry */ |
| 62 | MenuItemUnreg(guiEvents); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Event Viewer's constructor |
| 67 | * |
| 68 | * This constructor is given as a parameter to the menuitem and toolbar button |
| 69 | * registration. It creates the drawing widget. |
| 70 | * @param ParentWindow A pointer to the parent window. |
| 71 | * @return The widget created. |
| 72 | */ |
| 73 | static GtkWidget * |
| 74 | guiEvents(GtkWidget *ParentWindow) |
| 75 | { |
| 76 | |
| 77 | |
| 78 | } |
| 79 | |
| 80 | |
| 81 | |
| 82 | /*\@}*/ |