2 * Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef GPLATE_LIBRARY_H
18 #define GPLATE_LIBRARY_H
22 #include <gplate/gplate-function.h>
23 #include <gplate/gplate-tag.h>
27 typedef void (*GPlateLibraryTagsForeachFunc)(GType tag, const gchar *prefix, const gchar *suffix, gpointer data);
29 gboolean gplate_library_add_function(const gchar *name, GType function, GError **error);
30 gboolean gplate_library_remove_function(const gchar *name, GError **error);
32 gboolean gplate_library_add_tag(GType tag, GError **error);
33 gboolean gplate_library_remove_tag(GType tag, GError **error);
35 gboolean gplate_library_bind_function(const gchar *name, GType tag, GError **error);
36 gboolean gplate_library_unbind_function(const gchar *name, GError **error);
38 gboolean gplate_library_add_bound_function(const gchar *name, GType function, GType tag, GError **error);
40 gboolean gplate_library_lookup_function(const gchar *name, GType *function, GType *tag, GError **error);
41 GType gplate_library_lookup_function_for_tag(const gchar *name, GType tag, GError **error);
43 gboolean gplate_library_lookup_tag(GType tag, gchar **prefix, gchar **suffix, GError **error);
44 GType gplate_library_get_default_tag(void);
46 gboolean gplate_library_set_default_function_for_tag(const gchar *name, GType tag, GError **error);
47 GType gplate_library_get_default_function_for_tag(GType tag, GError **error);
49 void gplate_library_tags_foreach(GPlateLibraryTagsForeachFunc func, gpointer data);
53 #endif /* GPLATE_LIBRARY_H */