1 /** 2 * @file gtkplugin.h GTK+ Plugin API 3 * @ingroup pidgin 4 */ 5 6 /* pidgin 7 * 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. 11 * 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. 16 * 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. 21 * 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 25 */ 26 #ifndef _PIDGINPLUGIN_H_ 27 #define _PIDGINPLUGIN_H_ 28 29 #include "pidgin.h" 30 #include "plugin.h" 31 32 typedef struct _PidginPluginUiInfo PidginPluginUiInfo; 33 34 /** 35 * A GTK+ UI structure for plugins. 36 */ 37 struct _PidginPluginUiInfo 38 { 39 GtkWidget *(*get_config_frame)(PurplePlugin *plugin); 40 41 int page_num; /**< Reserved */ 42 43 /* padding */ 44 void (*_pidgin_reserved1)(void); 45 void (*_pidgin_reserved2)(void); 46 void (*_pidgin_reserved3)(void); 47 void (*_pidgin_reserved4)(void); 48 }; 49 50 #define PIDGIN_PLUGIN_TYPE PIDGIN_UI 51 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)) 55 56 #define PIDGIN_PLUGIN_UI_INFO(plugin) \ 57 ((PidginPluginUiInfo *)(plugin)->info->ui_info) 58 59 /** 60 * Returns the configuration frame widget for a GTK+ plugin, if one 61 * exists. 62 * 63 * @param plugin The plugin. 64 * 65 * @return The frame, if the plugin is a GTK+ plugin and provides a 66 * configuration frame. 67 */ 68 GtkWidget *pidgin_plugin_get_config_frame(PurplePlugin *plugin); 69 70 /** 71 * Saves all loaded plugins. 72 */ 73 void pidgin_plugins_save(void); 74 75 /** 76 * Shows the Plugins dialog 77 */ 78 void pidgin_plugin_dialog_show(void); 79 80 #endif /* _PIDGINPLUGIN_H_ */ 81