Merged in default (pull request #594)
[pidgin-git.git] / pidgin / gtkplugin.h
blobc71a8c3c6da8b85d13b2c6c1caaa1dbec14832af
1 /* pidgin
3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
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
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef _PIDGINPLUGIN_H_
23 #define _PIDGINPLUGIN_H_
24 /**
25 * SECTION:gtkplugin
26 * @section_id: pidgin-gtkplugin
27 * @short_description: <filename>gtkplugin.h</filename>
28 * @title: Plugin API
31 #include "pidgin.h"
32 #include "plugins.h"
34 #define PIDGIN_TYPE_PLUGIN_INFO (pidgin_plugin_info_get_type())
35 #define PIDGIN_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PIDGIN_TYPE_PLUGIN_INFO, PidginPluginInfo))
36 #define PIDGIN_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_PLUGIN_INFO, PidginPluginInfoClass))
37 #define PIDGIN_IS_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PIDGIN_TYPE_PLUGIN_INFO))
38 #define PIDGIN_IS_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_PLUGIN_INFO))
39 #define PIDGIN_PLUGIN_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_PLUGIN_INFO, PidginPluginInfoClass))
41 typedef struct _PidginPluginInfo PidginPluginInfo;
42 typedef struct _PidginPluginInfoClass PidginPluginInfoClass;
44 typedef GtkWidget *(*PidginPluginConfigFrameCb)(PurplePlugin *plugin);
46 /**
47 * PidginPluginInfo:
49 * Extends #PurplePluginInfo to hold UI information for pidgin.
51 struct _PidginPluginInfo {
52 PurplePluginInfo parent;
55 /**
56 * PidginPluginInfoClass:
58 * The base class for all #PidginPluginInfo's.
60 struct _PidginPluginInfoClass {
61 PurplePluginInfoClass parent_class;
63 /*< private >*/
64 void (*_pidgin_reserved1)(void);
65 void (*_pidgin_reserved2)(void);
66 void (*_pidgin_reserved3)(void);
67 void (*_pidgin_reserved4)(void);
70 G_BEGIN_DECLS
72 /**
73 * pidgin_plugin_info_get_type:
75 * Returns: The #GType for the #PidginPluginInfo object.
77 GType pidgin_plugin_info_get_type(void);
79 /**
80 * pidgin_plugin_info_new:
81 * @first_property: The first property name
82 * @...: The value of the first property, followed optionally by more
83 * name/value pairs, followed by %NULL
85 * Creates a new #PidginPluginInfo instance to be returned from
86 * #plugin_query of a pidgin plugin, using the provided name/value
87 * pairs.
89 * See purple_plugin_info_new() for a list of available property names.
90 * Additionally, you can provide the property
91 * <literal>"gtk-config-frame-cb"</literal>, which should be a callback that
92 * returns a #GtkWidget for the plugin's configuration
93 * (see #PidginPluginConfigFrameCb).
95 * See purple_plugin_info_new().
97 * Returns: A new #PidginPluginInfo instance.
99 PidginPluginInfo *pidgin_plugin_info_new(const char *first_property, ...)
100 G_GNUC_NULL_TERMINATED;
103 * pidgin_plugins_save:
105 * Saves all loaded plugins.
107 void pidgin_plugins_save(void);
110 * pidgin_plugin_dialog_show:
112 * Shows the Plugins dialog
114 void pidgin_plugin_dialog_show(void);
116 G_END_DECLS
118 #endif /* _PIDGINPLUGIN_H_ */