grim/gplate
Clone
Summary
Browse
Changes
Graph
changelogged the glib requirement
default
tip
2013-09-21, Gary Kramlich
169f55edb6a4
changelogged the glib requirement
/*
* GPlate - GObject based templating library
* Copyright (C) 2007-2012 Gary Kramlich <grim@reaperworld.com>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GPLATE_FUNCTION_H
#define GPLATE_FUNCTION_H
#include
<glib.h>
#include
<glib-object.h>
#include
<gplate/gplate-template.h>
#define GPLATE_TYPE_FUNCTION (gplate_function_get_type())
/**
* SECTION:gplate-function
* @short_description: The base class for all functions.
*
* #GPlateFunction defines the behavior for all functions.
*/
#define GPLATE_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLATE_TYPE_FUNCTION, GPlateFunction))
#define GPLATE_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GPLATE_TYPE_FUNCTION, GPlateFunctionClass))
#define GPLATE_IS_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLATE_TYPE_FUNCTION))
#define GPLATE_IS_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GPLATE_TYPE_FUNCTION))
#define GPLATE_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLATE_TYPE_FUNCTION, GPlateFunctionClass))
/**
* GPlateFunction:
*
* #GPlateFunction is an opaque data structure that should not be used
* directly.
*/
typedef
struct
_GPlateFunction
GPlateFunction
;
typedef
struct
_GPlateFunctionClass
GPlateFunctionClass
;
struct
_GPlateFunction
{
GObject
gparent
;
/*< private >*/
void
(
*
_gplate_reserved1
)(
void
);
void
(
*
_gplate_reserved2
)(
void
);
void
(
*
_gplate_reserved3
)(
void
);
void
(
*
_gplate_reserved4
)(
void
);
};
/**
* GPlateFunctionClass:
* @parent: The parent class (#GObjectClass) structure.
* @evaluate: The function called to evaluate the function's result.
*
* The class for #GPlateFunction.
*/
struct
_GPlateFunctionClass
{
GObjectClass
parent
;
gchar
*
(
*
evaluate
)(
GPlateFunction
*
function
,
GPlateTemplate
*
tplate
,
const
gchar
*
contents
);
/*< private >*/
void
(
*
_gplate_reserved1
)(
void
);
void
(
*
_gplate_reserved2
)(
void
);
void
(
*
_gplate_reserved3
)(
void
);
void
(
*
_gplate_reserved4
)(
void
);
};
G_BEGIN_DECLS
GType
gplate_function_get_type
(
void
);
gchar
*
gplate_function_evaluate
(
GPlateFunction
*
function
,
GPlateTemplate
*
tplate
,
const
gchar
*
contents
);
G_END_DECLS
#endif
/* GPLATE_FUNCTION_H */