From: yangxx Date: Wed, 3 Sep 2003 16:32:40 +0000 (+0000) Subject: small change of main window API X-Git-Tag: v0.12.20~3273 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c4c15b5edc7c90041add373336ab19ce87c05e0b;p=lttv.git small change of main window API git-svn-id: http://ltt.polymtl.ca/svn@216 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/API/Makefile.am b/ltt/branches/poly/lttv/modules/gui/API/Makefile.am index 099b98d1..f6d40e8b 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/Makefile.am +++ b/ltt/branches/poly/lttv/modules/gui/API/Makefile.am @@ -11,6 +11,6 @@ AM_CFLAGS += $(GTK_CFLAGS) LIBS += $(GLIB_LIBS) LIBS += $(GTK_LIBS) -lib_LTLIBRARIES = libmainwindowapi.la -libmainwindowapi_la_SOURCES = toolbar.c menu.c gtkTraceSet.c +lib_LTLIBRARIES = libmainWinApi.la +libmainWinApi_la_SOURCES = toolbar.c menu.c gtkTraceSet.c EXTRA_DIST = diff --git a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c index 35199378..f53b068f 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c +++ b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c @@ -16,8 +16,8 @@ #include #include #include -#include "toolbar.h" -#include "menu.h" +#include +#include /** * Internal function parts @@ -28,7 +28,7 @@ * @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"); } @@ -38,7 +38,7 @@ void RemoveToolbar(void *view_constructor) * @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"); } @@ -97,7 +97,7 @@ void SetFilter(mainWindow * main_win, gpointer filter) * @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; @@ -123,7 +123,7 @@ void ToolbarItemReg(GdkPixmap * pixmap, char *tooltip, void *view_constructor) * 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; @@ -147,7 +147,7 @@ void ToolbarItemUnreg(void *view_constructor) * @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; @@ -172,14 +172,14 @@ void MenuItemReg(char *menu_path, char *menu_text, void *view_constructor) * 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)) diff --git a/ltt/branches/poly/lttv/modules/gui/API/menu.c b/ltt/branches/poly/lttv/modules/gui/API/menu.c index e4e0ed8e..acaba636 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/menu.c +++ b/ltt/branches/poly/lttv/modules/gui/API/menu.c @@ -1,5 +1,4 @@ -//#include -#include "menu.h" +#include inline LttvMenus *lttv_menus_new() { diff --git a/ltt/branches/poly/lttv/modules/gui/API/menu.h b/ltt/branches/poly/lttv/modules/gui/API/menu.h deleted file mode 100644 index 599dff2d..00000000 --- a/ltt/branches/poly/lttv/modules/gui/API/menu.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef MENU_H -#define MENU_H - -#include - -/* 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 diff --git a/ltt/branches/poly/lttv/modules/gui/API/toolbar.c b/ltt/branches/poly/lttv/modules/gui/API/toolbar.c index 263e5c04..48dc5947 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/toolbar.c +++ b/ltt/branches/poly/lttv/modules/gui/API/toolbar.c @@ -1,5 +1,4 @@ -//#include -#include "toolbar.h" +#include inline LttvToolbars *lttv_toolbars_new() { @@ -13,7 +12,7 @@ inline void lttv_toolbars_destroy(LttvToolbars *h) { g_array_free(h, TRUE); } -inline void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip, GdkPixmap * pixmap) +inline void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip, char ** pixmap) { lttv_toolbar_closure c; diff --git a/ltt/branches/poly/lttv/modules/gui/API/toolbar.h b/ltt/branches/poly/lttv/modules/gui/API/toolbar.h deleted file mode 100644 index 28119adc..00000000 --- a/ltt/branches/poly/lttv/modules/gui/API/toolbar.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef TOOLBAR_H -#define TOOLBAR_H - -#include - -/* 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