From a1a2b6492b9e18506e9429b71a90fcfff9da7f99 Mon Sep 17 00:00:00 2001 From: compudj Date: Sat, 19 Jun 2004 19:35:43 +0000 Subject: [PATCH] global traces works, interaction with mainwindow seems ok git-svn-id: http://ltt.polymtl.ca/svn@600 04897980-b3bd-0310-b5e0-8ef037075253 --- .../gui/lttvwindow/lttvwindow/Makefile.am | 2 + .../gui/lttvwindow/lttvwindow/callbacks.c | 60 ++- .../gui/lttvwindow/lttvwindow/init_module.c | 32 +- .../gui/lttvwindow/lttvwindow/lttvwindow.h | 42 -- .../lttvwindow/lttvwindow/lttvwindowtraces.c | 403 ++++++++++++++++++ .../lttvwindow/lttvwindow/lttvwindowtraces.h | 140 ++++++ .../gui/lttvwindow/lttvwindow/mainwindow.h | 2 - 7 files changed, 610 insertions(+), 71 deletions(-) create mode 100644 ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c create mode 100644 ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am index 77a82ecf..a5cddfb9 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am @@ -24,6 +24,7 @@ liblttvwindow_la_SOURCES = \ gtkdirsel.c\ gtkmultivpaned.c\ lttvwindow.c \ + lttvwindowtraces.c \ init_module.c \ support.c \ interface.c \ @@ -40,6 +41,7 @@ lttvwindowinclude_HEADERS = \ gtkdirsel.h\ gtkmultivpaned.h\ lttvwindow.h\ + lttvwindowtraces.h\ lttvfilter.h\ mainwindow.h\ menu.h\ 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 300b4406..c6f574d4 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -20,6 +20,9 @@ # include #endif +#include // for PATH_MAX +#include + #include #include "callbacks.h" @@ -38,10 +41,11 @@ #include #include #include +#include #include #include -#define PATH_LENGTH 256 + #define DEFAULT_TIME_WIDTH_S 1 extern LttvTrace *g_init_trace ; @@ -51,8 +55,8 @@ extern LttvTrace *g_init_trace ; extern GSList * g_main_window_list; /** MD : keep old directory. */ -static char remember_plugins_dir[PATH_LENGTH] = ""; -static char remember_trace_dir[PATH_LENGTH] = ""; +static char remember_plugins_dir[PATH_MAX] = ""; +static char remember_trace_dir[PATH_MAX] = ""; MainWindow * get_window_data_struct(GtkWidget * widget); @@ -871,7 +875,9 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) EventsRequest *events_request = (EventsRequest *)iter->data; /* 1.1. Use current postition as start position */ - g_free(events_request->start_position); + if(events_request->start_position != NULL) + lttv_traceset_context_position_destroy(events_request->start_position); + events_request->start_position = ltt_traceset_context_position_new(); lttv_traceset_context_position_save(tsc, events_request->start_position); /* 1.2. Remove start time */ @@ -975,6 +981,14 @@ static void lttvwindow_add_trace(Tab *tab, LttvTrace *trace_v) LttvTraceset *traceset = tab->traceset_info->traceset; guint i; + //Verify if trace is already present. + for(i=0; itraceset_info->traceset_context); lttv_traceset_add(traceset, trace_v); + lttv_trace_ref(trace_v); /* local ref */ /* Create new context */ tab->traceset_info->traceset_context = @@ -1023,6 +1038,7 @@ void add_trace(GtkWidget * widget, gpointer user_data) LttvTrace * trace_v; LttvTraceset * traceset; const char * dir; + char abs_path[PATH_MAX]; gint id; gint i; MainWindow * mw_data = get_window_data_struct(widget); @@ -1049,14 +1065,19 @@ void add_trace(GtkWidget * widget, gpointer user_data) case GTK_RESPONSE_ACCEPT: case GTK_RESPONSE_OK: dir = gtk_dir_selection_get_dir (file_selector); - strncpy(remember_trace_dir, dir, PATH_LENGTH); + strncpy(remember_trace_dir, dir, PATH_MAX); if(!dir || strlen(dir) == 0){ gtk_widget_destroy((GtkWidget*)file_selector); break; } - trace = ltt_trace_open(dir); - if(trace == NULL) g_critical("cannot open trace %s", dir); - trace_v = lttv_trace_new(trace); + get_absolute_pathname(dir, abs_path); + trace_v = lttvwindowtraces_get_trace_by_name(abs_path); + if(trace_v == NULL) { + trace = ltt_trace_open(abs_path); + if(trace == NULL) g_critical("cannot open trace %s", abs_path); + trace_v = lttv_trace_new(trace); + lttvwindowtraces_add_trace(trace_v); + } lttvwindow_add_trace(tab, trace_v); @@ -1195,8 +1216,11 @@ void remove_trace(GtkWidget * widget, gpointer user_data) trace_v = lttv_traceset_get(traceset, i); - if(lttv_trace_get_ref_number(trace_v) <= 1) + if(lttv_trace_get_ref_number(trace_v) <= 2) { + /* ref 2 : traceset, local */ + lttvwindowtraces_remove_trace(trace_v); ltt_trace_close(lttv_trace(trace_v)); + } lttv_traceset_remove(traceset, i); lttv_trace_unref(trace_v); // Remove local reference @@ -1232,7 +1256,7 @@ void remove_trace(GtkWidget * widget, gpointer user_data) }else{ if(tab){ while(tab->multi_vpaned->num_children){ - gtk_multi_vpaned_widget_delete(tab->multi_vpaned); + gtk_multi_vpaned_widget_delete(tab->multi_vpaned); } } } @@ -1402,7 +1426,7 @@ on_clone_traceset_activate (GtkMenuItem *menuitem, */ Tab *create_new_tab(GtkWidget* widget, gpointer user_data){ - gchar label[PATH_LENGTH]; + gchar label[PATH_MAX]; MainWindow * mw_data = get_window_data_struct(widget); GtkNotebook * notebook = (GtkNotebook *)lookup_widget(widget, "MNotebook"); @@ -1662,7 +1686,7 @@ on_load_module_activate (GtkMenuItem *menuitem, { char ** dir; gint id; - char str[PATH_LENGTH], *str1; + char str[PATH_MAX], *str1; MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem); GtkFileSelection * file_selector = (GtkFileSelection *)gtk_file_selection_new("Select a module"); if(remember_plugins_dir[0] != '\0') @@ -1675,8 +1699,8 @@ on_load_module_activate (GtkMenuItem *menuitem, case GTK_RESPONSE_ACCEPT: case GTK_RESPONSE_OK: dir = gtk_file_selection_get_selections (file_selector); - strncpy(str,dir[0],PATH_LENGTH); - strncpy(remember_plugins_dir,dir[0],PATH_LENGTH); + strncpy(str,dir[0],PATH_MAX); + strncpy(remember_plugins_dir,dir[0],PATH_MAX); str1 = strrchr(str,'/'); if(str1)str1++; else{ @@ -1757,8 +1781,8 @@ on_add_module_search_path_activate (GtkMenuItem *menuitem, case GTK_RESPONSE_ACCEPT: case GTK_RESPONSE_OK: dir = gtk_dir_selection_get_dir (file_selector); - strncpy(remember_plugins_dir,dir,PATH_LENGTH); - strncat(remember_plugins_dir,"/",PATH_LENGTH); + strncpy(remember_plugins_dir,dir,PATH_MAX); + strncat(remember_plugins_dir,"/",PATH_MAX); lttv_library_path_add(dir); case GTK_RESPONSE_REJECT: case GTK_RESPONSE_CANCEL: @@ -2535,10 +2559,8 @@ void tab_destructor(Tab * tab_instance) trace = lttv_traceset_get(tab_instance->traceset_info->traceset, i); ref_count = lttv_trace_get_ref_number(trace); if(ref_count <= 1){ - ltt_trace_close(lttv_trace(trace)); - lttv_trace_destroy(trace); + ltt_trace_close(lttv_trace(trace)); } - // lttv_trace_destroy(trace); } } lttv_traceset_destroy(tab_instance->traceset_info->traceset); diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c index 505cc86d..604af308 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c @@ -26,6 +26,7 @@ #endif #include +#include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include #include "interface.h" #include "support.h" @@ -46,7 +48,12 @@ #include -GQuark LTTV_TRACES; +LttvTraceInfo LTTV_TRACES, + LTTV_COMPUTATION, + LTTV_REQUESTS_QUEUE, + LTTV_REQUESTS_CURRENT, + LTTV_NOTIFY_QUEUE, + LTTV_NOTIFY_CURRENT; /** Array containing instanced objects. */ GSList * g_main_window_list = NULL ; @@ -63,12 +70,16 @@ static char *a_trace; void lttv_trace_option(void *hook_data) { LttTrace *trace; - gchar *path; - - trace = ltt_trace_open(a_trace); - if(trace == NULL) g_critical("cannot open trace %s", a_trace); - g_init_trace = lttv_trace_new(trace); - + gchar *abs_path; + + get_absolute_pathname(a_trace, abs_path); + g_init_trace = lttvwindowtraces_get_trace_by_name(abs_path); + if(g_init_trace == NULL) { + trace = ltt_trace_open(abs_path); + if(trace == NULL) g_critical("cannot open trace %s", abs_path); + g_init_trace = lttv_trace_new(trace); + lttvwindowtraces_add_trace(g_init_trace); + } } /***************************************************************************** @@ -110,7 +121,12 @@ static void init() { // Global attributes only used for interaction with main() here. LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes()); - LTTV_TRACES = g_quark_from_string("traces/"); + LTTV_TRACES = g_quark_from_string("traces"); + LTTV_COMPUTATION = g_quark_from_string("computation"); + LTTV_REQUESTS_QUEUE = g_quark_from_string("requests_queue"); + LTTV_REQUESTS_CURRENT = g_quark_from_string("requests_current"); + LTTV_NOTIFY_QUEUE = g_quark_from_string("notify_queue"); + LTTV_NOTIFY_CURRENT = g_quark_from_string("notify_current"); g_debug("GUI init()"); diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h index cbc2ced2..83a67d02 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h @@ -631,48 +631,6 @@ void lttvwindow_events_request_remove_all(Tab *tab, gconstpointer viewer); -typedef struct _BackgroundRequest { - gchar *hook_path; /* Hook path in global attributes, where all standard hooks - are : i.e. /TraceState/Statistics/ModuleName */ - gchar *trace_path; /* path_to_trace */ -} BackgroundRequest; - -typedef struct _BackgroundNotify { - gchar *trace_path; /* path_to_trace */ - LttTime notify_time; - LttvTracesetContextPosition *notify_position; - LttvHooks *notify; /* Hook to call when the notify is - passed, or at the end of trace */ -} BackgroundNotify; - -/** - * Function to request data from a specific trace - * - * @param bg_request Request specification - */ - -void lttvwindow_background_request_queue(const BackgroundRequest *bg_request); - -/** - * Register a callback to be called when requested data is passed in the next - * queued background processing. - * - * @param bg_request Request specification - */ - -void lttvwindow_background_notify_queue(const BackgroundNotify *bg_notify); - - -/** - * Register a callback to be called when requested data is passed in the current - * background processing. - * - * @param bg_request Request specification - */ - -void lttvwindow_background_notify_current(const BackgroundNotify *bg_notify); - - /** * Function to get the current time window of the current tab. * diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c new file mode 100644 index 00000000..3a190006 --- /dev/null +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c @@ -0,0 +1,403 @@ +/* This file is part of the Linux Trace Toolkit Graphic User Interface + * Copyright (C) 2003-2004 Mathieu Desnoyers + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +/* This file is the API used to launch any background computation on a trace */ + +/* Here is the implementation of the API */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef struct _BackgroundRequest { + LttvAttributeName module_name; /* Hook path in global attributes, + where all standard hooks under computation/. + i.e. modulename */ + LttvTrace *trace; /* trace concerned */ +} BackgroundRequest; + +typedef struct _BackgroundNotify { + gpointer owner; + LttvTrace *trace; /* trace */ + LttTime notify_time; + LttvTracesetContextPosition *notify_position; + LttvHooks *notify; /* Hook to call when the notify is + passed, or at the end of trace */ +} BackgroundNotify; + + + +/* Get a trace by its path name. + * + * @param path path of the trace on the virtual file system. + * @return Pointer to trace if found + * NULL is returned if the trace is not present + */ + +LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path) +{ + LttvAttribute *attribute = lttv_global_attributes(); + guint i; + + for(i=0;imodule_name = g_quark_from_string(module_name); + bg_req->trace = trace; + + *slist = g_slist_append(*slist, bg_req); +} + +/** + * Remove a background request from a trace. + * + * This should ONLY be used by the modules which registered the global hooks + * (module_name). If this is called by the viewers, it may lead to incomplete + * and incoherent background processing information. + * + * Even if the module which deals with the hooks removes the background + * requests, it may cause a problem if the module gets loaded again in the + * session : the data will be partially calculated. The calculation function + * must deal with this case correctly. + * + * @param trace the trace to compute + * @param module_name the name of the module which registered global computation + * hooks. + */ + +void lttvwindowtraces_background_request_remove + (LttvTrace *trace, gchar *module_name) +{ + LttvAttribute *attribute = lttv_trace_attribute(trace); + LttvAttributeValue value; + GSList *iter = NULL; + GSList **slist; + + g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(attribute), + LTTV_REQUESTS_QUEUE, + LTTV_POINTER, + &value)); + slist = (GSList**)(value.v_pointer); + + for(iter=*slist;iter!=NULL;) { + BackgroundRequest *bg_req = + (BackgroundRequest *)iter->data; + + if(bg_req->module_name == g_quark_from_string(module_name)) { + GSList *rem_iter = iter; + iter=g_slist_next(iter); + g_free(bg_req); + *slist = g_slist_delete_link(*slist, rem_iter); + } else { + iter=g_slist_next(iter); + } + } +} + + +/** + * Register a callback to be called when requested data is passed in the next + * queued background processing. + * + * @param owner owner of the background notification + * @param trace the trace computed + * @param notify_time time when notification hooks must be called + * @param notify_position position when notification hooks must be called + * @param notify Hook to call when the notify position is passed + */ + +void lttvwindowtraces_background_notify_queue + (gpointer owner, + LttvTrace *trace, + LttTime notify_time, + const LttvTracesetContextPosition *notify_position, + const LttvHooks *notify) +{ + BackgroundNotify *bg_notify; + LttvAttribute *attribute = lttv_trace_attribute(trace); + LttvAttributeValue value; + GSList **slist; + + g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(attribute), + LTTV_NOTIFY_QUEUE, + LTTV_POINTER, + &value)); + slist = (GSList**)(value.v_pointer); + + + bg_notify = g_new(BackgroundNotify,1); + + bg_notify->owner = owner; + bg_notify->trace = trace; + bg_notify->notify_time = notify_time; + bg_notify->notify_position = ltt_traceset_context_position_new(); + lttv_traceset_context_position_copy(bg_notify->notify_position, + notify_position); + bg_notify->notify = lttv_hooks_new(); + lttv_hooks_add_list(bg_notify->notify, notify); + + *slist = g_slist_append(*slist, bg_notify); +} + +/** + * Register a callback to be called when requested data is passed in the current + * background processing. + * + * @param owner owner of the background notification + * @param trace the trace computed + * @param notify_time time when notification hooks must be called + * @param notify_position position when notification hooks must be called + * @param notify Hook to call when the notify position is passed + */ + +void lttvwindowtraces_background_notify_current + (gpointer owner, + LttvTrace *trace, + LttTime notify_time, + const LttvTracesetContextPosition *notify_position, + const LttvHooks *notify) +{ + BackgroundNotify *bg_notify; + LttvAttribute *attribute = lttv_trace_attribute(trace); + LttvAttributeValue value; + GSList **slist; + + g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(attribute), + LTTV_NOTIFY_CURRENT, + LTTV_POINTER, + &value)); + slist = (GSList**)(value.v_pointer); + + bg_notify = g_new(BackgroundNotify,1); + + bg_notify->owner = owner; + bg_notify->trace = trace; + bg_notify->notify_time = notify_time; + bg_notify->notify_position = ltt_traceset_context_position_new(); + lttv_traceset_context_position_copy(bg_notify->notify_position, + notify_position); + bg_notify->notify = lttv_hooks_new(); + lttv_hooks_add_list(bg_notify->notify, notify); + + *slist = g_slist_append(*slist, bg_notify); +} + +/** + * Removes all the notifications requests from a specific viewer. + * + * @param owner owner of the background notification + */ + +void lttvwindowtraces_background_notify_remove(gpointer owner) +{ + guint i; + + for(i=0;idata; + + if(bg_notify->owner == owner) { + GSList *rem_iter = iter; + iter=g_slist_next(iter); + lttv_traceset_context_position_destroy( + bg_notify->notify_position); + lttv_hooks_destroy(bg_notify->notify); + g_free(bg_notify); + g_slist_remove_link(*slist, rem_iter); + } else { + iter=g_slist_next(iter); + } + } + + g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(attribute), + LTTV_NOTIFY_CURRENT, + LTTV_POINTER, + &value)); + slist = (GSList**)(value.v_pointer); + + for(iter=*slist;iter!=NULL;) { + + BackgroundNotify *bg_notify = (BackgroundNotify*)iter->data; + + if(bg_notify->owner == owner) { + GSList *rem_iter = iter; + iter=g_slist_next(iter); + lttv_traceset_context_position_destroy( + bg_notify->notify_position); + lttv_hooks_destroy(bg_notify->notify); + g_free(bg_notify); + g_slist_remove_link(*slist, rem_iter); + } else { + iter=g_slist_next(iter); + } + } + } +} + diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h new file mode 100644 index 00000000..2a1c335b --- /dev/null +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h @@ -0,0 +1,140 @@ +/* This file is part of the Linux Trace Toolkit Graphic User Interface + * Copyright (C) 2003-2004 Mathieu Desnoyers + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +/* This file is the API used to launch any background computation on a trace */ + +#ifndef LTTVWINDOWTRACES_H +#define LTTVWINDOWTRACES_H + +#include +#include + +typedef GQuark LttvTraceInfo; + +extern LttvTraceInfo LTTV_TRACES, + LTTV_COMPUTATION, + LTTV_REQUESTS_QUEUE, + LTTV_REQUESTS_CURRENT, + LTTV_NOTIFY_QUEUE, + LTTV_NOTIFY_CURRENT; + +/* Get a trace by its path name. + * + * @param path path of the trace on the virtual file system. + * @return Pointer to trace if found + * NULL is returned if the trace is not present + */ + +LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path); + +/* Get a trace by its number identifier */ + +LttvTrace *lttvwindowtraces_get_trace(guint num); + +/* Total number of traces */ + +guint lttvwindowtraces_get_number(); + +/* Add a trace to the global attributes */ + +void lttvwindowtraces_add_trace(LttvTrace *trace); + +/* Remove a trace from the global attributes */ + +void lttvwindowtraces_remove_trace(LttvTrace *trace); + + +/** + * Function to request data from a specific trace + * + * The memory allocated for the request will be managed by the API. + * + * @param trace the trace to compute + * @param module_name the name of the module which registered global computation + * hooks. + */ + +void lttvwindowtraces_background_request_queue + (LttvTrace *trace, gchar *module_name); + +/** + * Remove a background request from a trace. + * + * This should ONLY be used by the modules which registered the global hooks + * (module_name). If this is called by the viewers, it may lead to incomplete + * and incoherent background processing information. + * + * Even if the module which deals with the hooks removes the background + * requests, it may cause a problem if the module gets loaded again in the + * session : the data will be partially calculated. The calculation function + * must deal with this case correctly. + * + * @param trace the trace to compute + * @param module_name the name of the module which registered global computation + * hooks. + */ + +void lttvwindowtraces_background_request_remove + (LttvTrace *trace, gchar *module_name); + +/** + * Register a callback to be called when requested data is passed in the next + * queued background processing. + * + * @param owner owner of the background notification + * @param trace the trace computed + * @param notify_time time when notification hooks must be called + * @param notify_position position when notification hooks must be called + * @param notify Hook to call when the notify position is passed + */ + +void lttvwindowtraces_background_notify_queue + (gpointer owner, + LttvTrace *trace, + LttTime notify_time, + const LttvTracesetContextPosition *notify_position, + const LttvHooks *notify); + +/** + * Register a callback to be called when requested data is passed in the current + * background processing. + * + * @param owner owner of the background notification + * @param trace the trace computed + * @param notify_time time when notification hooks must be called + * @param notify_position position when notification hooks must be called + * @param notify Hook to call when the notify position is passed + */ + +void lttvwindowtraces_background_notify_current + (gpointer owner, + LttvTrace *trace, + LttTime notify_time, + const LttvTracesetContextPosition *notify_position, + const LttvHooks *notify); + +/** + * Removes all the notifications requests from a specific viewer. + * + * @param owner owner of the background notification + */ + +void lttvwindowtraces_background_notify_remove(gpointer owner); + + +#endif //LTTVWINDOWTRACES_H 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 6278814d..d46969b2 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h @@ -22,8 +22,6 @@ #include #include -extern GQuark LTTV_TRACES; - typedef struct _MainWindow MainWindow; typedef struct _TimeWindow TimeWindow; typedef struct _Tab Tab; -- 2.34.1