]> matita.cs.unibo.it Git - helm.git/blob - 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
1
2 #include <config.h>
3
4 #include "view.h"
5
6 static GObjectClass* view_parent_class;
7
8 static void
9 view_object_finalize(GObject* object)
10 {
11   View* view = VIEW(object);
12   /* free resources */
13   view_parent_class->finalize(object);
14 }
15
16 static void
17 impl_view_freeze(PortableServer_Servant  servant,
18                  CORBA_Environment *ev)
19 {
20   View* view = VIEW (bonobo_object (servant));
21   printf("called freeze\n");
22 }
23
24 static void
25 impl_view_thaw(PortableServer_Servant  servant,
26                CORBA_Environment *ev)
27 {
28   View* view = VIEW (bonobo_object (servant));
29   printf("called thaw\n");
30 }
31
32 static void
33 view_class_init(ViewClass* klass)
34 {
35   GObjectClass* object_class = (GObjectClass *) klass;
36   POA_GNOME_GtkMathView_View__epv* epv = &klass->epv;
37   
38   view_parent_class = g_type_class_peek_parent (klass);
39   object_class->finalize = view_object_finalize;
40   
41   epv->freeze = impl_view_freeze;
42   epv->thaw = impl_view_thaw;
43 }
44
45 static void
46 view_init(View* view)
47 {
48   /* do some initialization */
49 }
50
51 BONOBO_TYPE_FUNC_FULL (View, GNOME_GtkMathView_View, BONOBO_TYPE_OBJECT, view)
52
53 View*
54 view_new()
55 {
56   View* view = g_object_new(VIEW_TYPE, NULL);
57   return view;
58 }