pane = multi_vpaned->first_pane;
while(1){
- if((GtkWidget*)pane == (GtkWidget*)user_data){
+ if((GtkWidget*)pane == GTK_WIDGET(paned)){
multi_vpaned->focused_pane = pane;
break;
}
if(first_time){
- time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info->
- traceset_context)->Time_Span ;
+ time_span = <TV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->
+ traceset_info->traceset_context)->time_span ;
- multi_vpaned->hadjust->lower = ltt_time_to_double(time_span->startTime) *
+ multi_vpaned->hadjust->lower = ltt_time_to_double(time_span->start_time) *
NANOSECONDS_PER_SECOND;
multi_vpaned->hadjust->value = multi_vpaned->hadjust->lower;
- multi_vpaned->hadjust->upper = ltt_time_to_double(time_span->endTime) *
+ multi_vpaned->hadjust->upper = ltt_time_to_double(time_span->end_time) *
NANOSECONDS_PER_SECOND;
}
time_window = multi_vpaned->mw->current_tab->time_window;
- time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info->
- traceset_context)->Time_Span ;
+ time_span = <TV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info->
+ traceset_context)->time_span ;
lower = multi_vpaned->hadjust->lower;
upper = multi_vpaned->hadjust->upper;
ratio = (value - lower) / (upper - lower);
- time = ltt_time_sub(time_span->endTime, time_span->startTime);
+ time = ltt_time_sub(time_span->end_time, time_span->start_time);
time = ltt_time_mul(time, (float)ratio);
- time = ltt_time_add(time_span->startTime, time);
+ time = ltt_time_add(time_span->start_time, time);
time_window.start_time = time;
- time = ltt_time_sub(time_span->endTime, time);
+ time = ltt_time_sub(time_span->end_time, time);
if(ltt_time_compare(time,time_window.time_width) < 0){
time_window.time_width = time;
}
}
-void
-main_window_free(MainWindow * mw)
-{
- if(mw){
- while(mw->tab){
- lttv_state_remove_event_hooks(
- (LttvTracesetState*)mw->tab->traceset_info->traceset_context);
- mw->tab = mw->tab->next;
- }
- g_object_unref(mw->attributes);
- g_main_window_list = g_slist_remove(g_main_window_list, mw);
-
- g_hash_table_destroy(mw->hash_menu_item);
- g_hash_table_destroy(mw->hash_toolbar_item);
-
- g_free(mw);
- mw = NULL;
- }
-}
-
void
main_window_destructor(MainWindow * mw)
{
if(GTK_IS_WIDGET(mw->mwindow)){
gtk_widget_destroy(mw->mwindow);
- // gtk_widget_destroy(mw->HelpContents);
- // gtk_widget_destroy(mw->AboutBox);
mw = NULL;
}
- //main_window_free called when the object mw in the widget is unref.
- //main_window_free(mw);
}
Tab * tab;
Tab * current_tab;
- GHashTable * hash_menu_item;
- GHashTable * hash_toolbar_item;
};
gboolean time_request_pending;
};
-/**
- * Remove menu and toolbar item when a module unloaded
- */
-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_ */
#ifndef MENU_H
#define MENU_H
-#include <lttvwindow/common.h>
#include <gtk/gtk.h>
+#include <lttvwindow/common.h>
+#include <lttvwindow/viewer.h>
typedef GArray LttvMenus;
g_array_free(h, TRUE);
}
-inline LttvToolbarClosure void lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget)
+inline LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget)
{
LttvToolbarClosure c;
void lttvwindow_report_focus(MainWindow *main_win,
GtkWidget *top_widget);
-
-
/* Structure sent to the time request hook */
/* Value considered as empty */
typedef struct _EventsRequest {
- LttTime start_time, /* Unset : { 0, 0 } */
- LttvTracesetContextPosition start_position, /* Unset : num_traces = 0 */
- gboolean stop_flag, /* Continue:TRUE Stop:FALSE */
- LttTime end_time, /* Unset : { 0, 0 } */
- guint num_events, /* Unset : G_MAXUINT */
- LttvTracesetContextPosition end_position, /* Unset : num_traces = 0 */
- LttvHooks *before_traceset, /* Unset : NULL */
- LttvHooks *before_trace, /* Unset : NULL */
- LttvHooks *before_tracefile, /* Unset : NULL */
- LttvHooks *event, /* Unset : NULL */
- LttvHooksById *event_by_id, /* Unset : NULL */
- LttvHooks *after_tracefile, /* Unset : NULL */
- LttvHooks *after_trace, /* Unset : NULL */
- LttvHooks *after_traceset /* Unset : NULL */
+ LttTime start_time; /* Unset : { 0, 0 } */
+ LttvTracesetContextPosition *start_position; /* Unset : num_traces = 0 */
+ gboolean stop_flag; /* Continue:TRUE Stop:FALSE */
+ LttTime end_time; /* Unset : { 0, 0 } */
+ guint num_events; /* Unset : G_MAXUINT */
+ LttvTracesetContextPosition *end_position; /* Unset : num_traces = 0 */
+ LttvHooks *before_traceset; /* Unset : NULL */
+ LttvHooks *before_trace; /* Unset : NULL */
+ LttvHooks *before_tracefile; /* Unset : NULL */
+ LttvHooks *event; /* Unset : NULL */
+ LttvHooksById *event_by_id; /* Unset : NULL */
+ LttvHooks *after_tracefile; /* Unset : NULL */
+ LttvHooks *after_trace; /* Unset : NULL */
+ LttvHooks *after_traceset; /* Unset : NULL */
} EventsRequest;