2
* GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
* Released under the GNU LGPL license. See COPYING for details.
5
* goocanvasmodel.c - interface for canvas model.
9
* SECTION:goocanvasmodel
10
* @Title: GooCanvasModel
11
* @Short_Description: the canvas model interface.
13
* GooCanvasModel defines the interface that canvas models must implement.
15
* Currently it consists of a single method which returns the root canvas
20
#include "goocanvasmodel.h"
23
static void goo_canvas_model_base_init (gpointer g_class);
27
goo_canvas_model_get_type (void)
29
static GType canvas_model_type = 0;
31
if (!canvas_model_type)
33
static const GTypeInfo canvas_model_info =
35
sizeof (GooCanvasModelIface), /* class_size */
36
goo_canvas_model_base_init, /* base_init */
37
NULL, /* base_finalize */
40
canvas_model_type = g_type_register_static (G_TYPE_INTERFACE,
42
&canvas_model_info, 0);
44
g_type_interface_add_prerequisite (canvas_model_type, G_TYPE_OBJECT);
47
return canvas_model_type;
52
goo_canvas_model_base_init (gpointer g_class)
59
* goo_canvas_model_get_root_item:
60
* @model: a #GooCanvasModel.
62
* Returns the root canvas item of the model.
64
* Returns: the root canvas item.
67
goo_canvas_model_get_root_item (GooCanvasModel *model)
69
return GOO_CANVAS_MODEL_GET_IFACE (model)->get_root_item (model);