Replace strcmp() with purple_strequal()
[pidgin-git.git] / pidgin / gtkplugin.h
blobba4f350216b753cc7272319ffb5a3c5bc56b0125
1 /**
2 * @file gtkplugin.h GTK+ Plugin API
3 * @ingroup pidgin
4 */
6 /* pidgin
8 * Pidgin is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 #ifndef _PIDGINPLUGIN_H_
27 #define _PIDGINPLUGIN_H_
29 #include "pidgin.h"
30 #include "plugin.h"
32 typedef struct _PidginPluginUiInfo PidginPluginUiInfo;
34 /**
35 * A GTK+ UI structure for plugins.
37 struct _PidginPluginUiInfo
39 GtkWidget *(*get_config_frame)(PurplePlugin *plugin);
41 int page_num; /**< Reserved */
43 /* padding */
44 void (*_pidgin_reserved1)(void);
45 void (*_pidgin_reserved2)(void);
46 void (*_pidgin_reserved3)(void);
47 void (*_pidgin_reserved4)(void);
50 #define PIDGIN_PLUGIN_TYPE PIDGIN_UI
52 #define PIDGIN_IS_PIDGIN_PLUGIN(plugin) \
53 ((plugin)->info != NULL && (plugin)->info->ui_info != NULL && \
54 purple_strequal((plugin)->info->ui_requirement, PIDGIN_PLUGIN_TYPE))
56 #define PIDGIN_PLUGIN_UI_INFO(plugin) \
57 ((PidginPluginUiInfo *)(plugin)->info->ui_info)
59 /**
60 * Returns the configuration frame widget for a GTK+ plugin, if one
61 * exists.
63 * @param plugin The plugin.
65 * @return The frame, if the plugin is a GTK+ plugin and provides a
66 * configuration frame.
68 GtkWidget *pidgin_plugin_get_config_frame(PurplePlugin *plugin);
70 /**
71 * Saves all loaded plugins.
73 void pidgin_plugins_save(void);
75 /**
76 * Shows the Plugins dialog
78 void pidgin_plugin_dialog_show(void);
80 #endif /* _PIDGINPLUGIN_H_ */