From 42fcbb715d16ba7c2c0a37aab5add4bd64d96079 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 4 May 2004 23:39:37 +0000 Subject: [PATCH] type name change : lttv_constructor -> lttvwindow_viewer_constructor git-svn-id: http://ltt.polymtl.ca/svn@515 04897980-b3bd-0310-b5e0-8ef037075253 --- .../lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c | 8 ++++---- .../lttv/modules/gui/lttvwindow/lttvwindow/common.h | 5 ++--- .../modules/gui/lttvwindow/lttvwindow/mainwindow.h | 4 ++-- .../poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c | 4 ++-- .../poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h | 10 +++------- .../lttv/modules/gui/lttvwindow/lttvwindow/test_main.c | 2 -- .../lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c | 4 ++-- .../lttv/modules/gui/lttvwindow/lttvwindow/toolbar.h | 10 +++------- .../lttv/modules/gui/lttvwindow/lttvwindow/viewer.c | 8 ++++---- .../lttv/modules/gui/lttvwindow/lttvwindow/viewer.h | 8 ++++---- 10 files changed, 26 insertions(+), 37 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 8a228fba..0a514509 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -61,7 +61,7 @@ gboolean get_filter_selection(LttvTracesetSelector *s, char *title, char * colum void * create_tab(MainWindow * parent, MainWindow * current_window, GtkNotebook * notebook, char * label); -void insert_viewer(GtkWidget* widget, view_constructor constructor); +void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor); void update_filter(LttvTracesetSelector *s, GtkTreeStore *store ); void checkbox_changed(GtkTreeView *treeview, @@ -153,13 +153,13 @@ insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data) { guint val = 20; - insert_viewer((GtkWidget*)menuitem, (view_constructor)user_data); + insert_viewer((GtkWidget*)menuitem, (lttvwindow_viewer_constructor)user_data); // selected_hook(&val); } /* internal functions */ -void insert_viewer(GtkWidget* widget, view_constructor constructor) +void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor) { GtkMultiVPaned * multi_vpaned; MainWindow * mw_data; @@ -1737,7 +1737,7 @@ void insert_menu_toolbar_item(MainWindow * mw, gpointer user_data) { int i; GdkPixbuf *pixbuf; - view_constructor constructor; + lttvwindow_viewer_constructor constructor; LttvMenus * menu; LttvToolbars * toolbar; lttv_menu_closure *menu_item; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/common.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/common.h index e41a7357..81526479 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/common.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/common.h @@ -31,9 +31,8 @@ typedef struct _MainWindow MainWindow; typedef struct _Tab Tab; /* constructor of the viewer */ -typedef GtkWidget * (*lttv_constructor)(MainWindow * main_window, - LttvTracesetSelector * s, char *key); -typedef lttv_constructor view_constructor; +typedef GtkWidget * (*lttvwindow_viewer_constructor) + (MainWindow * main_window, LttvTracesetSelector * s, char *key); typedef struct _TimeWindow { LttTime start_time; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h index 93496872..f0c0e6a1 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h @@ -92,8 +92,8 @@ struct _Tab{ /** * Remove menu and toolbar item when a module unloaded */ -void main_window_remove_menu_item(lttv_constructor view_constructor); -void main_window_remove_toolbar_item(lttv_constructor view_constructor); +void main_window_remove_menu_item(lttvwindow_viewer_constructor view_constructor); +void main_window_remove_toolbar_item(lttvwindow_viewer_constructor view_constructor); #endif /* _MAIN_WINDOW_ */ diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c index 32c35c2c..66033323 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c @@ -32,7 +32,7 @@ inline void lttv_menus_destroy(LttvMenus *h) { g_array_free(h, TRUE); } -inline void lttv_menus_add(LttvMenus *h, lttv_constructor f, char* menuPath, char* menuText) +inline void lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructor f, char* menuPath, char* menuText) { lttv_menu_closure c; @@ -45,7 +45,7 @@ inline void lttv_menus_add(LttvMenus *h, lttv_constructor f, char* menuPath, cha g_array_append_val(h,c); } -gboolean lttv_menus_remove(LttvMenus *h, lttv_constructor f) +gboolean lttv_menus_remove(LttvMenus *h, lttvwindow_viewer_constructor f) { lttv_menu_closure * tmp; gint i; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h index 3253bf75..ae519785 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h @@ -21,14 +21,10 @@ #include -/* constructor of the viewer */ -//typedef GtkWidget* (*lttv_constructor)(void * main_window); - - typedef GArray LttvMenus; typedef struct _lttv_menu_closure { - lttv_constructor con; + lttvwindow_viewer_constructor con; char * menuPath; char * menuText; } lttv_menu_closure; @@ -38,9 +34,9 @@ LttvMenus *lttv_menus_new(); void lttv_menus_destroy(LttvMenus *h); -void lttv_menus_add(LttvMenus *h, lttv_constructor f, char* menuPath, char * menuText); +void lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructor f, char* menuPath, char * menuText); -gboolean lttv_menus_remove(LttvMenus *h, lttv_constructor f); +gboolean lttv_menus_remove(LttvMenus *h, lttvwindow_viewer_constructor f); unsigned lttv_menus_number(LttvMenus *h); diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/test_main.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/test_main.c index 7b31ac63..02ea36c3 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/test_main.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/test_main.c @@ -18,8 +18,6 @@ /* global variable */ systemView * gSysView; -typedef view_constructor (* constructor)(); -constructor get_constructor = NULL; typedef void (*call_Event_Selected_Hook)(void * call_data); call_Event_Selected_Hook selected_hook = NULL; GModule *gm; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c index 2a1dbb10..8a39ae74 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c @@ -32,7 +32,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, char ** pixmap) +inline void lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap) { lttv_toolbar_closure c; @@ -45,7 +45,7 @@ inline void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip g_array_append_val(h,c); } -gboolean lttv_toolbars_remove(LttvToolbars *h, lttv_constructor f) +gboolean lttv_toolbars_remove(LttvToolbars *h, lttvwindow_viewer_constructor f) { lttv_toolbar_closure * tmp; gint i; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.h index 681311b6..7e5df0c4 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.h @@ -21,14 +21,10 @@ #include -/* constructor of the viewer */ -//typedef GtkWidget* (*lttv_constructor)(void * main_window); - - typedef GArray LttvToolbars; typedef struct _lttv_toolbar_closure { - lttv_constructor con; + lttvwindow_viewer_constructor con; char * tooltip; char ** pixmap; } lttv_toolbar_closure; @@ -37,9 +33,9 @@ LttvToolbars *lttv_toolbars_new(); void lttv_toolbars_destroy(LttvToolbars *h); -void lttv_toolbars_add(LttvToolbars *h, lttv_constructor f, char* tooltip, char ** pixmap); +void lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap); -gboolean lttv_toolbars_remove(LttvToolbars *h, lttv_constructor f); +gboolean lttv_toolbars_remove(LttvToolbars *h, lttvwindow_viewer_constructor f); unsigned lttv_toolbars_number(LttvToolbars *h); diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c index 0f109283..16ff5e4d 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.c @@ -97,7 +97,7 @@ void SetFilter(MainWindow * main_win, gpointer filter) * @param view_constructor constructor of the viewer. */ -void toolbar_item_reg(char ** pixmap, char *tooltip, lttv_constructor view_constructor) +void toolbar_item_reg(char ** pixmap, char *tooltip, lttvwindow_viewer_constructor view_constructor) { LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes()); LttvToolbars * toolbar; @@ -123,7 +123,7 @@ void toolbar_item_reg(char ** pixmap, char *tooltip, lttv_constructor view_const * a reference to find out where the pixmap and tooltip are. */ -void toolbar_item_unreg(lttv_constructor view_constructor) +void toolbar_item_unreg(lttvwindow_viewer_constructor view_constructor) { LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes()); LttvToolbars * toolbar; @@ -148,7 +148,7 @@ void toolbar_item_unreg(lttv_constructor view_constructor) * @param view_constructor constructor of the viewer. */ -void menu_item_reg(char *menu_path, char *menu_text, lttv_constructor view_constructor) +void menu_item_reg(char *menu_path, char *menu_text, lttvwindow_viewer_constructor view_constructor) { LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes()); LttvMenus * menu; @@ -173,7 +173,7 @@ void menu_item_reg(char *menu_path, char *menu_text, lttv_constructor view_const * a reference to find out where the menu_path and menu_text are. */ -void menu_item_unreg(lttv_constructor view_constructor) +void menu_item_unreg(lttvwindow_viewer_constructor view_constructor) { LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes()); LttvMenus * menu; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h index 906093aa..c244b7a0 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h @@ -116,7 +116,7 @@ set_hpane_dividor * @param view_constructor constructor of the viewer. */ -void toolbar_item_reg(char ** pixmap, char *tooltip, lttv_constructor view_constructor); +void lttvwindow_viewer_register_toolbar_item(char ** pixmap, char *tooltip, lttvwindow_viewer_constructor view_constructor); /** @@ -127,7 +127,7 @@ void toolbar_item_reg(char ** pixmap, char *tooltip, lttv_constructor view_const * a reference to find out where the pixmap and tooltip are. */ -void toolbar_item_unreg(lttv_constructor view_constructor); +void toolbar_item_unreg(lttvwindow_viewer_constructor view_constructor); /** @@ -139,7 +139,7 @@ void toolbar_item_unreg(lttv_constructor view_constructor); * @param view_constructor constructor of the viewer. */ -void menu_item_reg(char *menu_path, char *menu_text, lttv_constructor view_constructor); +void menu_item_reg(char *menu_path, char *menu_text, lttvwindow_viewer_constructor view_constructor); /** @@ -150,7 +150,7 @@ void menu_item_reg(char *menu_path, char *menu_text, lttv_constructor view_const * a reference to find out where the menu_path and menu_text are. */ -void menu_item_unreg(lttv_constructor view_constructor); +void menu_item_unreg(lttvwindow_viewer_constructor view_constructor); /** -- 2.34.1