geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pluginutils.h
Go to the documentation of this file.
1/*
2 * pluginutils.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2009 The Geany contributors
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21
22#ifndef GEANY_PLUGIN_UTILS_H
23#define GEANY_PLUGIN_UTILS_H 1
24
25#ifdef HAVE_PLUGINS
26
27#include "keybindings.h" /* GeanyKeyGroupCallback */
28
29#include "gtkcompat.h"
30
31G_BEGIN_DECLS
32
33/* avoid including plugindata.h otherwise this redefines the GEANY() macro */
34struct GeanyPlugin;
35struct GeanyDocument;
36
37gint geany_api_version(void);
38
39void plugin_add_toolbar_item(struct GeanyPlugin *plugin, GtkToolItem *item);
40
41void plugin_module_make_resident(struct GeanyPlugin *plugin);
42
43void plugin_signal_connect(struct GeanyPlugin *plugin,
44 GObject *object, const gchar *signal_name, gboolean after,
45 GCallback callback, gpointer user_data);
46
47guint plugin_timeout_add(struct GeanyPlugin *plugin, guint interval, GSourceFunc function,
48 gpointer data);
49
50guint plugin_timeout_add_seconds(struct GeanyPlugin *plugin, guint interval, GSourceFunc function,
51 gpointer data);
52
53guint plugin_idle_add(struct GeanyPlugin *plugin, GSourceFunc function, gpointer data);
54
56 const gchar *section_name, gsize count, GeanyKeyGroupCallback callback);
57
59 const gchar *section_name, gsize count, GeanyKeyGroupFunc cb, gpointer pdata, GDestroyNotify destroy_notify);
60
62
64 GtkBuilder *builder, gpointer user_data);
65
67 struct GeanyDocument *doc, const gchar *key);
68
70 const gchar *key, gpointer data);
71
73 struct GeanyDocument *doc, const gchar *key, gpointer data,
74 GDestroyNotify free_func);
75
76G_END_DECLS
77
78#endif /* HAVE_PLUGINS */
79#endif /* GEANY_PLUGIN_UTILS_H */
unsigned int count
Configurable keyboard shortcuts.
gboolean(* GeanyKeyGroupCallback)(guint key_id)
Function pointer type used for keybinding group callbacks.
Definition: keybindings.h:48
gboolean(* GeanyKeyGroupFunc)(GeanyKeyGroup *group, guint key_id, gpointer user_data)
Function pointer type used for keybinding group callbacks, with userdata for passing context.
Definition: keybindings.h:57
void plugin_signal_connect(struct GeanyPlugin *plugin, GObject *object, const gchar *signal_name, gboolean after, GCallback callback, gpointer user_data)
<simplesect kind="geany:skip"></simplesect> Connects a signal which will be disconnected on unloading...
Definition: pluginutils.c:158
guint plugin_timeout_add_seconds(struct GeanyPlugin *plugin, guint interval, GSourceFunc function, gpointer data)
<simplesect kind="geany:skip"></simplesect> Adds a GLib main loop timeout callback that will be remov...
Definition: pluginutils.c:293
void plugin_set_document_data_full(struct GeanyPlugin *plugin, struct GeanyDocument *doc, const gchar *key, gpointer data, GDestroyNotify free_func)
Attach plugin-specific data and a free function to a document.
Definition: pluginutils.c:766
void plugin_show_configure(struct GeanyPlugin *plugin)
Shows the plugin's configure dialog.
Definition: pluginutils.c:474
void plugin_set_document_data(struct GeanyPlugin *plugin, struct GeanyDocument *doc, const gchar *key, gpointer data)
Attach plugin-specific data to a document.
Definition: pluginutils.c:699
void plugin_add_toolbar_item(struct GeanyPlugin *plugin, GtkToolItem *item)
Inserts a toolbar item before the Quit button, or after the previous plugin toolbar item.
Definition: pluginutils.c:77
gpointer plugin_get_document_data(struct GeanyPlugin *plugin, struct GeanyDocument *doc, const gchar *key)
Retrieve plugin-specific data attached to a document.
Definition: pluginutils.c:669
struct GeanyKeyGroup * plugin_set_key_group(struct GeanyPlugin *plugin, const gchar *section_name, gsize count, GeanyKeyGroupCallback callback)
<simplesect kind="geany:skip"></simplesect> Sets up or resizes a keybinding group for the plugin.
Definition: pluginutils.c:331
void plugin_builder_connect_signals(struct GeanyPlugin *plugin, GtkBuilder *builder, gpointer user_data)
Allows auto-connecting Glade/GtkBuilder signals in plugins.
Definition: pluginutils.c:557
gint geany_api_version(void)
Returns the runtime API version Geany was compiled with.
Definition: pluginutils.c:65
void plugin_module_make_resident(struct GeanyPlugin *plugin)
Ensures that a plugin's module (*.so) will never be unloaded.
Definition: pluginutils.c:121
guint plugin_idle_add(struct GeanyPlugin *plugin, GSourceFunc function, gpointer data)
<simplesect kind="geany:skip"></simplesect> Adds a GLib main loop IDLE callback that will be removed ...
Definition: pluginutils.c:314
guint plugin_timeout_add(struct GeanyPlugin *plugin, guint interval, GSourceFunc function, gpointer data)
<simplesect kind="geany:skip"></simplesect> Adds a GLib main loop timeout callback that will be remov...
Definition: pluginutils.c:272
GeanyKeyGroup * plugin_set_key_group_full(struct GeanyPlugin *plugin, const gchar *section_name, gsize count, GeanyKeyGroupFunc cb, gpointer pdata, GDestroyNotify destroy_notify)
Sets up or resizes a keybinding group for the plugin.
Definition: pluginutils.c:358
Structure for representing an open tab with all its properties.
Definition: document.h:81
GeanyKeyGroupCallback callback
Basic information for the plugin and identification.
Definition: plugindata.h:233
static GtkBuilder * builder
Definition: ui_utils.c:77