]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gtkmathview-bonobo/src/view.c
* added test View interface. It is basically empty but eventually it will host
[helm.git] / helm / gtkmathview-bonobo / src / view.c
diff --git a/helm/gtkmathview-bonobo/src/view.c b/helm/gtkmathview-bonobo/src/view.c
new file mode 100644 (file)
index 0000000..dc8226e
--- /dev/null
@@ -0,0 +1,58 @@
+
+#include <config.h>
+
+#include "view.h"
+
+static GObjectClass* view_parent_class;
+
+static void
+view_object_finalize(GObject* object)
+{
+  View* view = VIEW(object);
+  /* free resources */
+  view_parent_class->finalize(object);
+}
+
+static void
+impl_view_freeze(PortableServer_Servant  servant,
+                CORBA_Environment *ev)
+{
+  View* view = VIEW (bonobo_object (servant));
+  printf("called freeze\n");
+}
+
+static void
+impl_view_thaw(PortableServer_Servant  servant,
+              CORBA_Environment *ev)
+{
+  View* view = VIEW (bonobo_object (servant));
+  printf("called thaw\n");
+}
+
+static void
+view_class_init(ViewClass* klass)
+{
+  GObjectClass* object_class = (GObjectClass *) klass;
+  POA_GNOME_GtkMathView_View__epv* epv = &klass->epv;
+  
+  view_parent_class = g_type_class_peek_parent (klass);
+  object_class->finalize = view_object_finalize;
+  
+  epv->freeze = impl_view_freeze;
+  epv->thaw = impl_view_thaw;
+}
+
+static void
+view_init(View* view)
+{
+  /* do some initialization */
+}
+
+BONOBO_TYPE_FUNC_FULL (View, GNOME_GtkMathView_View, BONOBO_TYPE_OBJECT, view)
+
+View*
+view_new()
+{
+  View* view = g_object_new(VIEW_TYPE, NULL);
+  return view;
+}