+ fvd->f_logical_op_options = g_ptr_array_new(); //g_array_new(FALSE,FALSE,sizeof(gchar));
+ g_ptr_array_add(fvd->f_logical_op_options,(gpointer) g_string_new(""));
+ g_ptr_array_add(fvd->f_logical_op_options,(gpointer) g_string_new("&"));
+ g_ptr_array_add(fvd->f_logical_op_options,(gpointer) g_string_new("|"));
+ g_ptr_array_add(fvd->f_logical_op_options,(gpointer) g_string_new("!"));
+ g_ptr_array_add(fvd->f_logical_op_options,(gpointer) g_string_new("^"));
+
+ fvd->f_field_options = g_ptr_array_new(); //g_array_new(FALSE,FALSE,16);
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new(""));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.name"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.category"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.time"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.tsc"));
+ /*
+ * TODO: Add core.xml fields here !
+ */
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("tracefile.name"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("trace.name"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.process_name"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.pid"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.ppid"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.creation_time"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.insertion_time"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.execution_mode"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.execution_submode"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.process_status"));
+ g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("state.cpu"));
+
+ fvd->f_math_op_options = g_ptr_array_new(); //g_array_new(FALSE,FALSE,7);
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new(""));
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new("="));
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new("!="));
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new("<"));
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new("<="));
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new(">"));
+ g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new(">="));
+
+
+ fvd->f_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+ /*
+ * Initiating GtkTable layout
+ * starts with 2 rows and 5 columns and
+ * expands when expressions added
+ */
+ fvd->f_main_box = gtk_table_new(3,7,FALSE);
+ gtk_table_set_row_spacings(GTK_TABLE(fvd->f_main_box),5);
+ gtk_table_set_col_spacings(GTK_TABLE(fvd->f_main_box),5);
+
+ gtk_container_add(GTK_CONTAINER(fvd->f_window), GTK_WIDGET(fvd->f_main_box));
+
+ /*
+ * First half of the filter window
+ * - textual entry of filter expression
+ * - processing button
+ */
+ fvd->f_expression_field = gtk_entry_new(); //gtk_scrolled_window_new (NULL, NULL);
+// gtk_entry_set_text(GTK_ENTRY(fvd->f_expression_field),"state.cpu>0");
+ gtk_widget_show (fvd->f_expression_field);
+
+ g_signal_connect (G_OBJECT (fvd->f_expression_field), "changed",
+ G_CALLBACK (callback_expression_field), (gpointer) fvd);
+
+ fvd->f_process_button = gtk_button_new_with_label("Process");
+ gtk_widget_show (fvd->f_process_button);
+
+ g_signal_connect (G_OBJECT (fvd->f_process_button), "clicked",
+ G_CALLBACK (callback_process_button), (gpointer) fvd);
+
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvd->f_expression_field,0,6,0,1,GTK_FILL,GTK_FILL,0,0);
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvd->f_process_button,6,7,0,1,GTK_FILL,GTK_FILL,0,0);
+
+
+
+ /*
+ * Second half of the filter window
+ * - combo boxes featuring filtering options added to the expression
+ */
+ fvd->f_add_button = gtk_button_new_with_label("Add Expression");
+ gtk_widget_show (fvd->f_add_button);
+
+ g_signal_connect (G_OBJECT (fvd->f_add_button), "clicked",
+ G_CALLBACK (callback_add_button), (gpointer) fvd);
+
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvd->f_add_button,6,7,1,2,GTK_FILL,GTK_FILL,0,0);
+
+ fvd->f_logical_op_junction_box = gtk_combo_box_new_text();
+ for(i=0;i<fvd->f_logical_op_options->len;i++) {
+ GString* s = g_ptr_array_index(fvd->f_logical_op_options,i);
+ gtk_combo_box_append_text(GTK_COMBO_BOX(fvd->f_logical_op_junction_box), s->str);
+ }
+ gtk_combo_box_set_active(GTK_COMBO_BOX(fvd->f_logical_op_junction_box),0);
+
+ //gtk_widget_show(fvd->f_logical_op_box);