Convert Finch plugins to libsoup.
[pidgin-git.git] / finch / gntplugin.h
blob3f2897dce827795d6a35d4272ca1b61c95543f8d
1 /*
2 * finch
4 * Finch is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
6 * source distribution.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef FINCH_PLUGIN_H
24 #define FINCH_PLUGIN_H
26 /**
27 * SECTION:gntplugin
28 * @section_id: finch-gntplugin
29 * @short_description: <filename>gntplugin.h</filename>
30 * @title: Plugin API
33 #include <gnt.h>
35 #include <plugins.h>
36 #include <pluginpref.h>
38 #include <string.h>
40 #include "finch.h"
42 #define FINCH_TYPE_PLUGIN_INFO (finch_plugin_info_get_type())
43 #define FINCH_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FINCH_TYPE_PLUGIN_INFO, FinchPluginInfo))
44 #define FINCH_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FINCH_TYPE_PLUGIN_INFO, FinchPluginInfoClass))
45 #define FINCH_IS_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FINCH_TYPE_PLUGIN_INFO))
46 #define FINCH_IS_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FINCH_TYPE_PLUGIN_INFO))
47 #define FINCH_PLUGIN_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FINCH_TYPE_PLUGIN_INFO, FinchPluginInfoClass))
49 typedef struct _FinchPluginInfo FinchPluginInfo;
50 typedef struct _FinchPluginInfoClass FinchPluginInfoClass;
52 typedef GntWidget* (*FinchPluginPrefFrameCb) (void);
54 /**
55 * FinchPluginInfo:
57 * Extends #PurplePluginInfo to hold UI information for finch.
59 struct _FinchPluginInfo {
60 PurplePluginInfo parent;
63 /**
64 * FinchPluginInfoClass:
66 * The base class for all #FinchPluginInfo's.
68 struct _FinchPluginInfoClass {
69 PurplePluginInfoClass parent_class;
71 /*< private >*/
72 void (*_gnt_reserved1)(void);
73 void (*_gnt_reserved2)(void);
74 void (*_gnt_reserved3)(void);
75 void (*_gnt_reserved4)(void);
78 /**********************************************************************
79 * Plugin Info API
80 **********************************************************************/
82 /**
83 * finch_plugin_info_get_type:
85 * Returns: The #GType for the #FinchPluginInfo object.
87 GType finch_plugin_info_get_type(void);
89 /**
90 * finch_plugin_info_new:
91 * @first_property: The first property name
92 * @...: The value of the first property, followed optionally by more
93 * name/value pairs, followed by %NULL
95 * Creates a new #FinchPluginInfo instance to be returned from
96 * #plugin_query of a finch plugin, using the provided name/value
97 * pairs.
99 * See purple_plugin_info_new() for a list of available property names.
100 * Additionally, you can provide the property
101 * <literal>"gnt-pref-frame-cb"</literal>, which should be a callback that
102 * returns a #GntWidget for the plugin's preferences
103 * (see #FinchPluginPrefFrameCb).
105 * See purple_plugin_info_new().
107 * Returns: A new #FinchPluginInfo instance.
109 FinchPluginInfo *finch_plugin_info_new(const char *first_property, ...)
110 G_GNUC_NULL_TERMINATED;
112 /**********************************************************************
113 * GNT Plugins API
114 **********************************************************************/
117 * finch_plugins_show_all:
119 * Show a list of plugins.
121 void finch_plugins_show_all(void);
124 * finch_plugins_save_loaded:
126 * Save the list of loaded plugins.
128 void finch_plugins_save_loaded(void);
130 #endif /* FINCH_PLUGIN_H */