Minor optimization
[pidgin-git.git] / finch / gntplugin.h
blobb97b54d74c19989e52c3df91396ef397a9eb3192
1 /**
2 * @file gntplugin.h GNT Plugins API
3 * @ingroup finch
4 */
6 /* finch
8 * Finch 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 _GNT_PLUGIN_H
27 #define _GNT_PLUGIN_H
29 #include <gnt.h>
31 #include <plugin.h>
32 #include <pluginpref.h>
34 #include <string.h>
36 #include "finch.h"
38 /**********************************************************************
39 * @name GNT Plugins API
40 **********************************************************************/
41 /*@{*/
43 typedef GntWidget* (*FinchPluginFrame) (void);
45 /* Guess where these came from */
46 #define FINCH_PLUGIN_TYPE FINCH_UI
48 /**
49 * Decide whether a plugin is a GNT-plugin.
51 #define PURPLE_IS_GNT_PLUGIN(plugin) \
52 ((plugin)->info != NULL && (plugin)->info->ui_info != NULL && \
53 !strcmp((plugin)->info->ui_requirement, FINCH_PLUGIN_TYPE))
55 /**
56 * Get the ui-info from GNT-plugins.
58 #define FINCH_PLUGIN_UI_INFO(plugin) \
59 (FinchPluginFrame)((plugin)->info->ui_info)
61 /**
62 * Show a list of plugins.
64 void finch_plugins_show_all(void);
66 /**
67 * Save the list of loaded plugins.
69 void finch_plugins_save_loaded(void);
71 /*@}*/
73 #endif