+
+#include "control-data.h"
+
+GtkMathViewControlData*
+gtk_math_view_control_data_new(GtkMathView *math_view)
+{
+ GtkMathViewControlData *cd = g_new(GtkMathViewControlData,1);
+ cd->math_view = math_view;
+ cd->semantic_selection = FALSE;
+ cd->first_selected = NULL;
+ cd->root_selected = NULL;
+ return cd;
+}
+
+void
+gtk_math_view_control_data_destroy(GtkMathViewControlData* cd)
+{
+ GdomeException exc = 0;
+ //gtk_object_unref(cd->math_view);
+ cd->math_view = NULL;
+ if (cd->first_selected != NULL)
+ {
+ gdome_el_unref(cd->first_selected, &exc);
+ g_assert(exc == 0);
+ cd->first_selected = NULL;
+ }
+ if (cd->root_selected != NULL)
+ {
+ gdome_el_unref(cd->root_selected, &exc);
+ g_assert(exc == 0);
+ cd->root_selected = NULL;
+ }
+ g_free(cd);
+}
+