]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gtkmathview-bonobo/src/view.c
* snapshot
[helm.git] / helm / gtkmathview-bonobo / src / view.c
index dc8226e39c97c22970a51af2a3db22b86c4dc815..95848730fba12caa963e93ff728e63175042e31c 100644 (file)
@@ -14,19 +14,28 @@ view_object_finalize(GObject* object)
 }
 
 static void
-impl_view_freeze(PortableServer_Servant  servant,
+impl_view_freeze(PortableServer_Servant servant,
                 CORBA_Environment *ev)
 {
   View* view = VIEW (bonobo_object (servant));
-  printf("called freeze\n");
+  gtk_math_view_freeze(view->control_data->math_view);
 }
 
 static void
-impl_view_thaw(PortableServer_Servant  servant,
+impl_view_thaw(PortableServer_Servant servant,
               CORBA_Environment *ev)
 {
   View* view = VIEW (bonobo_object (servant));
-  printf("called thaw\n");
+  gtk_math_view_thaw(view->control_data->math_view);
+}
+
+static void
+impl_view_load(PortableServer_Servant servant,
+              const CORBA_char *uri,
+              CORBA_Environment *ev)
+{
+  View* view = VIEW (bonobo_object (servant));
+  gtk_math_view_load_uri(view->control_data->math_view, uri);
 }
 
 static void
@@ -51,8 +60,11 @@ view_init(View* view)
 BONOBO_TYPE_FUNC_FULL (View, GNOME_GtkMathView_View, BONOBO_TYPE_OBJECT, view)
 
 View*
-view_new()
+view_new(GtkMathViewControlData* control_data)
 {
-  View* view = g_object_new(VIEW_TYPE, NULL);
+  View* view;
+  g_return_val_if_fail(control_data != NULL, NULL);
+  view = g_object_new(VIEW_TYPE, NULL);
+  view->control_data = control_data;
   return view;
 }