#include <lttv/mainWindow.h>
#include <lttv/gtkTraceSet.h>
#include <lttv/processTrace.h>
-#include "toolbar.h"
-#include "menu.h"
+#include <lttv/toolbar.h>
+#include <lttv/menu.h>
/**
* Internal function parts
* @param view_constructor constructor of the viewer.
*/
-void RemoveToolbar(void *view_constructor)
+void RemoveToolbar(lttv_constructor view_constructor)
{
g_printf("Toolbar for the viewer will be removed\n");
}
* @param view_constructor constructor of the viewer.
*/
-void RemoveMenu(void *view_constructor)
+void RemoveMenu(lttv_constructor view_constructor)
{
g_printf("Menu entry for the viewer will be removed\n");
}
* @param view_constructor constructor of the viewer.
*/
-void ToolbarItemReg(GdkPixmap * pixmap, char *tooltip, void *view_constructor)
+void ToolbarItemReg(char ** pixmap, char *tooltip, lttv_constructor view_constructor)
{
LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvToolbars * toolbar;
* a reference to find out where the pixmap and tooltip are.
*/
-void ToolbarItemUnreg(void *view_constructor)
+void ToolbarItemUnreg(lttv_constructor view_constructor)
{
LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvToolbars * toolbar;
* @param view_constructor constructor of the viewer.
*/
-void MenuItemReg(char *menu_path, char *menu_text, void *view_constructor)
+void MenuItemReg(char *menu_path, char *menu_text, lttv_constructor view_constructor)
{
LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvMenus * menu;
* a reference to find out where the menu_path and menu_text are.
*/
-void MenuItemUnreg(void *view_constructor)
+void MenuItemUnreg(lttv_constructor view_constructor)
{
LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvMenus * menu;
LttvAttributeValue value;
g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/menu", LTTV_POINTER, &value));
+ "viewers/menu", LTTV_POINTER, &value));
menu = (LttvMenus*)*(value.v_pointer);
if(lttv_menus_remove(menu, view_constructor))
+++ /dev/null
-#ifndef MENU_H
-#define MENU_H
-
-#include <lttv/common.h>
-
-/* constructor of the viewer */
-//typedef GtkWidget* (*lttv_constructor)(void * main_window);
-
-
-typedef GArray LttvMenus;
-
-typedef struct _lttv_menu_closure {
- lttv_constructor con;
- char * menuPath;
- char * menuText;
-} lttv_menu_closure;
-
-
-LttvMenus *lttv_menus_new();
-
-void lttv_menus_destroy(LttvMenus *h);
-
-void lttv_menus_add(LttvMenus *h, lttv_constructor f, char* menuPath, char * menuText);
-
-gboolean lttv_menus_remove(LttvMenus *h, lttv_constructor f);
-
-unsigned lttv_menus_number(LttvMenus *h);
-
-#endif // MENU_H
+++ /dev/null
-#ifndef TOOLBAR_H
-#define TOOLBAR_H
-
-#include <lttv/common.h>
-
-/* constructor of the viewer */
-//typedef GtkWidget* (*lttv_constructor)(void * main_window);
-
-
-typedef GArray LttvToolbars;
-
-typedef struct _lttv_toolbar_closure {
- lttv_constructor con;
- char * tooltip;
- GdkPixmap * pixmap;
-} lttv_toolbar_closure;
-
-LttvToolbars *lttv_toolbars_new();
-
-void lttv_toolbars_destroy(LttvToolbars *h);
-
-void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip, GdkPixmap * pixmap);
-
-gboolean lttv_toolbars_remove(LttvToolbars *h, lttv_constructor f);
-
-unsigned lttv_toolbars_number(LttvToolbars *h);
-
-#endif // TOOLBAR_H