grim/gplate

some more testing migration stuff.

2012-09-04, Gary Kramlich
7f8e0e4f250f
some more testing migration stuff.
Variables aren't done yet
/*
* 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_TEMPLATE_H
#define GPLATE_TEMPLATE_H
#include <glib.h>
#include <glib-object.h>
#define GPLATE_TYPE_TEMPLATE (gplate_template_get_gtype())
#define GPLATE_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLATE_TYPE_TEMPLATE, GPlateTemplate))
#define GPLATE_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GPLATE_TYPE_TEMPLATE, GPlateTemplateClass))
#define GPLATE_IS_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLATE_TYPE_TEMPLATE))
#define GPLATE_IS_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GPLATE_TYPE_TEMPLATE))
#define GPLATE_TEMPLATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLATE_TYPE_TEMPLATE, GPlateTemplateClass))
typedef struct _GPlateTemplate GPlateTemplate;
typedef struct _GPlateTemplateClass GPlateTemplateClass;
#include <gplate/gplate-tag.h>
struct _GPlateTemplate {
GObject gparent;
void (*_gplate_reserved1)(void);
void (*_gplate_reserved2)(void);
void (*_gplate_reserved3)(void);
void (*_gplate_reserved4)(void);
};
struct _GPlateTemplateClass {
GObjectClass parent;
GList *(*tokenize)(GPlateTemplate *tplate, const gchar *tplate_string, GError **error);
gchar *(*render)(GPlateTemplate *tplate, const gchar *tplate_string, GError **error);
GPlateTag *(*first_tag)(GPlateTemplate *tplate);
GPlateTag *(*last_tag)(GPlateTemplate *tplate);
GPlateTag *(*current_tag)(GPlateTemplate *tplate);
GPlateTag *(*next_tag)(GPlateTemplate *tplate);
GPlateTag *(*previous_tag)(GPlateTemplate *tplate);
GPlateTag *(*nth_tag)(GPlateTemplate *tplate, guint nth);
GPlateTag *(*nth_previous_tag)(GPlateTemplate *tplate, guint nth);
void (*insert_tags)(GPlateTemplate *tplate, GList *tags);
void (*_gplate_reserved1)(void);
void (*_gplate_reserved2)(void);
void (*_gplate_reserved3)(void);
void (*_gplate_reserved4)(void);
};
G_BEGIN_DECLS
GType gplate_template_get_gtype(void);
GPlateTemplate *gplate_template_new(void);
GList *gplate_template_tokenize(GPlateTemplate *tplate, const gchar *tplate_string, GError **error);
gchar *gplate_template_render(GPlateTemplate *tplate, const gchar *tplate_string, GError **error);
gchar *gplate_template_render_file(GPlateTemplate *tplate, const gchar *filename, GError **error);
gchar *gplate_template_render_until(GPlateTemplate *tplate, guint *ntags, ...);
void gplate_template_jump_to(GPlateTemplate *tplate, guint *ntags, ...);
GPlateTag *gplate_template_first_tag(GPlateTemplate *tplate);
GPlateTag *gplate_template_last_tag(GPlateTemplate *tplate);
GPlateTag *gplate_template_current_tag(GPlateTemplate *tplate);
GPlateTag *gplate_template_next_tag(GPlateTemplate *tplate);
GPlateTag *gplate_template_previous_tag(GPlateTemplate *tplate);
GPlateTag *gplate_template_nth_tag(GPlateTemplate *tplate, guint nth);
GPlateTag *gplate_template_nth_previous_tag(GPlateTemplate *tplate, guint nth);
void gplate_template_insert_tags(GPlateTemplate *tplate, GList *tags);
gchar *gplate_template_render_tag(GPlateTemplate *tplate, const GPlateTag *tag);
void gplate_template_set_working_directory(GPlateTemplate *tplate, const gchar *wd);
const gchar *gplate_template_get_working_directory(const GPlateTemplate *tplate);
G_END_DECLS
#endif /* GPLATE_TEMPLATE_H */