Work around a `-Wformat-overflow` warning
[geany-mirror.git] / src / pluginutils.h
blobccc0a400b577e44bf14884892b3bc18fcea3a5d1
1 /*
2 * pluginutils.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2009-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
5 * Copyright 2009-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef GEANY_PLUGIN_UTILS_H
24 #define GEANY_PLUGIN_UTILS_H 1
26 #ifdef HAVE_PLUGINS
28 #include "keybindings.h" /* GeanyKeyGroupCallback */
30 #include "gtkcompat.h"
32 G_BEGIN_DECLS
34 /* avoid including plugindata.h otherwise this redefines the GEANY() macro */
35 struct GeanyPlugin;
36 struct GeanyDocument;
38 gint geany_api_version(void);
40 void plugin_add_toolbar_item(struct GeanyPlugin *plugin, GtkToolItem *item);
42 void plugin_module_make_resident(struct GeanyPlugin *plugin);
44 void plugin_signal_connect(struct GeanyPlugin *plugin,
45 GObject *object, const gchar *signal_name, gboolean after,
46 GCallback callback, gpointer user_data);
48 guint plugin_timeout_add(struct GeanyPlugin *plugin, guint interval, GSourceFunc function,
49 gpointer data);
51 guint plugin_timeout_add_seconds(struct GeanyPlugin *plugin, guint interval, GSourceFunc function,
52 gpointer data);
54 guint plugin_idle_add(struct GeanyPlugin *plugin, GSourceFunc function, gpointer data);
56 struct GeanyKeyGroup *plugin_set_key_group(struct GeanyPlugin *plugin,
57 const gchar *section_name, gsize count, GeanyKeyGroupCallback callback);
59 GeanyKeyGroup *plugin_set_key_group_full(struct GeanyPlugin *plugin,
60 const gchar *section_name, gsize count, GeanyKeyGroupFunc cb, gpointer pdata, GDestroyNotify destroy_notify);
62 void plugin_show_configure(struct GeanyPlugin *plugin);
64 void plugin_builder_connect_signals(struct GeanyPlugin *plugin,
65 GtkBuilder *builder, gpointer user_data);
67 gpointer plugin_get_document_data(struct GeanyPlugin *plugin,
68 struct GeanyDocument *doc, const gchar *key);
70 void plugin_set_document_data(struct GeanyPlugin *plugin, struct GeanyDocument *doc,
71 const gchar *key, gpointer data);
73 void plugin_set_document_data_full(struct GeanyPlugin *plugin,
74 struct GeanyDocument *doc, const gchar *key, gpointer data,
75 GDestroyNotify free_func);
77 G_END_DECLS
79 #endif /* HAVE_PLUGINS */
80 #endif /* GEANY_PLUGIN_UTILS_H */