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,
{
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;
{
int i;
GdkPixbuf *pixbuf;
- view_constructor constructor;
+ lttvwindow_viewer_constructor constructor;
LttvMenus * menu;
LttvToolbars * toolbar;
lttv_menu_closure *menu_item;
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;
/**
* 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_ */
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;
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;
#include <lttvwindow/common.h>
-/* 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;
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);
/* 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;
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;
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;
#include <lttvwindow/common.h>
-/* 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;
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);
* @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;
* 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;
* @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;
* 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;
* @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);
/**
* 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);
/**
* @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);
/**
* 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);
/**