Copies from older experiments which should not have been checked in.
[lttv.git] / ltt / branches / poly / lttv / plugins / guiEvents.c
CommitLineData
5c7463ed 1/*! \defgroup guiEvents libguiEvents: The GUI Events display plugin */
2/*\@{*/
3
4/*! \file guiEvents.c
5 * \brief Graphical plugin for showing events.
6 *
17abcce3 7 * This plugin lists all the events contained in the current time interval
8 * in a list.
9 *
5c7463ed 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 *
5c7463ed 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
5c7463ed 27#include "icons/guiEventsInsert.xpm"
28
29//! Event Viewer's constructor
30GtkWidget *guiEvents(GtkWidget *ParentWindow);
31
5c7463ed 32/**
33 * plugin's init function
34 *
35 * This function initializes the Event Viewer functionnality through the
36 * gtkTraceSet API.
37 */
38G_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 */
55G_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 */
73static GtkWidget *
74guiEvents(GtkWidget *ParentWindow)
5c7463ed 75{
76
77
78}
79
80
17abcce3 81
5c7463ed 82/*\@}*/
This page took 0.029642 seconds and 4 git commands to generate.