+/**
+ * Adds a filter option line on the module tab
+ * @param fvd The filter module structure
+ * @return The line structure
+ */
+FilterViewerDataLine*
+gui_filter_add_line(FilterViewerData* fvd) {
+
+ FilterViewerDataLine* fvdl = g_new(FilterViewerDataLine,1);
+
+ fvdl->row = fvd->rows;
+ fvdl->visible = TRUE;
+
+ fvdl->f_struct_box = gtk_combo_box_new_text();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_struct_box), "");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_struct_box), "event");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_struct_box), "tracefile");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_struct_box), "trace");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_struct_box), "state");
+ gtk_widget_show(fvdl->f_struct_box);
+
+ fvdl->f_subfield_box = gtk_combo_box_new_text();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "name");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "category");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "time");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "tsc");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "pid");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "ppid");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "creation time");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "insertion time");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "process name");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "execution mode");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "execution submode");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "process status");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_subfield_box), "cpu");
+ gtk_widget_show(fvdl->f_subfield_box);
+
+ fvdl->f_math_op_box = gtk_combo_box_new_text();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), "");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), "=");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), "!=");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), "<");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), "<=");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), ">");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_math_op_box), ">=");
+ gtk_widget_show(fvdl->f_math_op_box);
+
+ fvdl->f_value_field = gtk_entry_new();
+ gtk_widget_show(fvdl->f_value_field);
+
+ fvdl->f_logical_op_box = gtk_combo_box_new_text();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_logical_op_box), "");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_logical_op_box), "&");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_logical_op_box), "|");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_logical_op_box), "^");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (fvdl->f_logical_op_box), "!");
+ gtk_widget_show(fvdl->f_logical_op_box);
+
+ gtk_widget_set_events(fvdl->f_logical_op_box,
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_FOCUS_CHANGE_MASK);
+
+ g_signal_connect (G_OBJECT (fvdl->f_logical_op_box), "changed",
+ G_CALLBACK (callback_logical_op_box), (gpointer) fvd);
+
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvdl->f_struct_box,0,1,fvd->rows+1,fvd->rows+2,GTK_SHRINK,GTK_FILL,0,0);
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvdl->f_subfield_box,1,2,fvd->rows+1,fvd->rows+2,GTK_SHRINK,GTK_FILL,0,0);
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvdl->f_math_op_box,2,3,fvd->rows+1,fvd->rows+2,GTK_SHRINK,GTK_FILL,0,0);
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvdl->f_value_field,3,4,fvd->rows+1,fvd->rows+2,GTK_SHRINK,GTK_FILL,0,0);
+ gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvdl->f_logical_op_box,4,5,fvd->rows+1,fvd->rows+2,GTK_SHRINK,GTK_FILL,0,0);
+
+ return fvdl;
+}
+
+void gui_filter_line_set_visible(FilterViewerDataLine *fvdl, gboolean v) {
+
+ fvdl->visible = v;
+ if(v) {
+ gtk_widget_show(fvdl->f_struct_box);
+ gtk_widget_show(fvdl->f_subfield_box);
+ gtk_widget_show(fvdl->f_math_op_box);
+ gtk_widget_show(fvdl->f_value_field);
+ gtk_widget_show(fvdl->f_logical_op_box);
+ } else {
+ gtk_widget_hide(fvdl->f_struct_box);
+ gtk_widget_hide(fvdl->f_subfield_box);
+ gtk_widget_hide(fvdl->f_math_op_box);
+ gtk_widget_hide(fvdl->f_value_field);
+ gtk_widget_hide(fvdl->f_logical_op_box);
+ }
+
+}
+
+void gui_filter_line_reset(FilterViewerDataLine *fvdl) {
+
+ gtk_combo_box_set_active(GTK_COMBO_BOX(fvdl->f_struct_box),0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(fvdl->f_subfield_box),0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(fvdl->f_math_op_box),0);
+ gtk_entry_set_text(GTK_COMBO_BOX(fvdl->f_value_field),"");
+ gtk_combo_box_set_active(GTK_COMBO_BOX(fvdl->f_logical_op_box),0);
+}
+
+/**
+ * Destructor for the filter gui module
+ * @param fvd The module structure
+ */