|
Packit Service |
2781ba |
/* This file is part of GEGL
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* GEGL is free software; you can redistribute it and/or
|
|
Packit Service |
2781ba |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
2781ba |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
2781ba |
* version 3 of the License, or (at your option) any later version.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* GEGL is distributed in the hope that it will be useful,
|
|
Packit Service |
2781ba |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
2781ba |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
2781ba |
* Lesser General Public License for more details.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
2781ba |
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* Copyright 2003 Calvin Williamson
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include "config.h"
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include <string.h>
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include <glib-object.h>
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include "gegl-types-internal.h"
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include "gegl-visitable.h"
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
GType
|
|
Packit Service |
2781ba |
gegl_visitable_get_type (void)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
static GType type = 0;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
if (!type)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
static const GTypeInfo type_info =
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
sizeof (GeglVisitableClass),
|
|
Packit Service |
2781ba |
(GBaseInitFunc) NULL,
|
|
Packit Service |
2781ba |
(GBaseFinalizeFunc) NULL,
|
|
Packit Service |
2781ba |
(GClassInitFunc) NULL,
|
|
Packit Service |
2781ba |
(GClassFinalizeFunc) NULL,
|
|
Packit Service |
2781ba |
NULL,
|
|
Packit Service |
2781ba |
0,
|
|
Packit Service |
2781ba |
0,
|
|
Packit Service |
2781ba |
(GInstanceInitFunc) NULL,
|
|
Packit Service |
2781ba |
NULL,
|
|
Packit Service |
2781ba |
};
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
type = g_type_register_static (G_TYPE_INTERFACE, "GeglVisitable",
|
|
Packit Service |
2781ba |
&type_info, 0);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
return type;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
void
|
|
Packit Service |
2781ba |
gegl_visitable_accept (GeglVisitable *interface,
|
|
Packit Service |
2781ba |
GeglVisitor *visitor)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglVisitableClass *interface_class;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_return_if_fail (GEGL_IS_VISITABLE (interface));
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
interface_class = GEGL_VISITABLE_GET_CLASS (interface);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
interface_class->accept (interface, visitor);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
GSList *
|
|
Packit Service |
2781ba |
gegl_visitable_depends_on (GeglVisitable *interface)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglVisitableClass *interface_class;
|
|
Packit Service |
2781ba |
GSList *depends_on = NULL;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
interface_class = GEGL_VISITABLE_GET_CLASS (interface);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
depends_on = interface_class->depends_on (interface);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
return depends_on;
|
|
Packit Service |
2781ba |
}
|