{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
TimeWindowNotifyData time_window_notify_data;
TimeWindow old_time_window = tab->time_window;
time_window_notify_data.new_time_window =
&(tab->time_window);
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetimewindow", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimewindow", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL) lttv_hooks_call(tmp, &time_window_notify_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
tab->current_time = *current_time;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrenttime", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrenttime", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL) lttv_hooks_call(tmp, &tab->current_time);
}
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
tab->current_time = lttv_traceset_context_position_get_time(pos);
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrentposition", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrentposition", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
- if(tmp != NULL) lttv_hooks_call(tmp, pos);
+ if (tmp != NULL) {
+ lttv_hooks_call(tmp, (void *) pos);
+ }
}
void add_toolbar_constructor(MainWindow *mw, LttvToolbarClosure *toolbar_c)
lttvwindow_viewer_constructor constructor;
GtkWidget * tool_menu_title_menu, *new_widget, *pixmap;
GdkPixbuf *pixbuf;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_toolbars_new();
instance_toolbar = (LttvToolbars*)*(value.v_pointer);
LttvToolbars * instance_menu;
lttvwindow_viewer_constructor constructor;
GtkWidget * tool_menu_title_menu, *new_widget;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_menus_new();
instance_menu = (LttvMenus*)*(value.v_pointer);
LttvAttributeValue value;
LttvToolbars * instance_toolbar;
GtkWidget * tool_menu_title_menu, *widget;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_toolbars_new();
instance_toolbar = (LttvToolbars*)*(value.v_pointer);
LttvAttributeValue value;
LttvMenus * instance_menu;
GtkWidget * tool_menu_title_menu, *widget;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_menus_new();
instance_menu = (LttvMenus*)*(value.v_pointer);
LttvToolbarClosure toolbar_c;
LttvMenuClosure menu_c;
LttvAttributeValue value;
+ gboolean retval;
if(view_constructor == NULL) return;
if(pixmap != NULL) {
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
toolbar = (LttvToolbars*)*(value.v_pointer);
if(toolbar == NULL) {
}
if(menu_path != NULL) {
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
menu = (LttvMenus*)*(value.v_pointer);
if(menu == NULL) {
LttvToolbars * toolbar;
LttvMenus * menu;
LttvAttributeValue value;
- gboolean is_named;
+ gboolean is_named;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
toolbar = (LttvToolbars*)*(value.v_pointer);
if(toolbar != NULL) {
lttv_toolbars_remove(toolbar, view_constructor);
}
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
menu = (LttvMenus*)*(value.v_pointer);
if(menu != NULL) {
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetimewindow", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimewindow", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetimewindow", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimewindow", LTTV_POINTER, &value);
+ g_assert(retval);
+ tmp = (LttvHooks*)*(value.v_pointer);
+ if(tmp == NULL) return;
+ lttv_hooks_remove_data(tmp, hook, hook_data);
+}
+
+/**
+ * Function to register a hook function for a viewer to set/update its
+ * allowed time span.
+ * @param tab viewer's tab
+ * @param hook hook function of the viewer.
+ * @param hook_data hook data associated with the hook function.
+ */
+__EXPORT void lttvwindow_register_timespan_notify(Tab *tab,
+ LttvHook hook, gpointer hook_data)
+{
+ LttvAttributeValue value;
+ LttvHooks * tmp;
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimespan", LTTV_POINTER, &value);
+ g_assert(retval);
+ tmp = (LttvHooks*)*(value.v_pointer);
+ if(tmp == NULL){
+ tmp = lttv_hooks_new();
+ *(value.v_pointer) = tmp;
+ }
+ lttv_hooks_add(tmp, hook,hook_data, LTTV_PRIO_DEFAULT);
+}
+/**
+ * Function to unregister a viewer's hook function which is used to
+ * set/update the time span allowed for the viewer.
+ * @param tab viewer's tab
+ * @param hook hook function of the viewer.
+ * @param hook_data hook data associated with the hook function.
+ */
+
+__EXPORT void lttvwindow_unregister_timespan_notify(Tab *tab,
+ LttvHook hook, gpointer hook_data)
+{
+ LttvAttributeValue value;
+ LttvHooks * tmp;
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimespan", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetraceset", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetraceset", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetraceset", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetraceset", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/redraw", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/redraw",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/redraw", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/redraw",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/continue", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/continue",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/continue", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/continue",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatefilter", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/updatefilter",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatefilter", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/updatefilter",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrenttime", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrenttime", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrenttime", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrenttime", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrentposition", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrentposition", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrentposition", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrentposition", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/showviewer", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/showviewer",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/showviewer", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/showviewer",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/hpanedividor", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/hpanedividor",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/hpanedividor", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/hpanedividor",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/hpanedividor", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/hpanedividor",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_call(tmp, &position);
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
//lttv_filter_destroy(tab->filter);
//tab->filter = filter;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatefilter", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/updatefilter",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_call(tmp, filter);