finch/gntplugin.h

changeset 42678
0b9b81b6ff18
parent 42677
66b49e545c53
child 42679
192a8112562f
equal deleted inserted replaced
42677:66b49e545c53 42678:0b9b81b6ff18
1 /*
2 * finch
3 *
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.
7 *
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.
12 *
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.
17 *
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
21 */
22
23 #if !defined(FINCH_GLOBAL_HEADER_INSIDE) && !defined(FINCH_COMPILATION)
24 # error "only <finch.h> may be included directly"
25 #endif
26
27 #ifndef FINCH_PLUGIN_H
28 #define FINCH_PLUGIN_H
29
30 #include <gnt.h>
31
32 #include <purple.h>
33
34 #include <string.h>
35
36 #define FINCH_TYPE_PLUGIN_INFO (finch_plugin_info_get_type())
37 #define FINCH_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FINCH_TYPE_PLUGIN_INFO, FinchPluginInfo))
38 #define FINCH_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FINCH_TYPE_PLUGIN_INFO, FinchPluginInfoClass))
39 #define FINCH_IS_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FINCH_TYPE_PLUGIN_INFO))
40 #define FINCH_IS_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FINCH_TYPE_PLUGIN_INFO))
41 #define FINCH_PLUGIN_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FINCH_TYPE_PLUGIN_INFO, FinchPluginInfoClass))
42
43 typedef struct _FinchPluginInfo FinchPluginInfo;
44 typedef struct _FinchPluginInfoClass FinchPluginInfoClass;
45
46 typedef GntWidget* (*FinchPluginPrefFrameCb) (void);
47
48 /**
49 * FinchPluginInfo:
50 *
51 * Extends #PurplePluginInfo to hold UI information for finch.
52 */
53 struct _FinchPluginInfo {
54 PurplePluginInfo parent;
55 };
56
57 /**
58 * FinchPluginInfoClass:
59 *
60 * The base class for all #FinchPluginInfo's.
61 */
62 struct _FinchPluginInfoClass {
63 PurplePluginInfoClass parent_class;
64
65 /*< private >*/
66 void (*_gnt_reserved1)(void);
67 void (*_gnt_reserved2)(void);
68 void (*_gnt_reserved3)(void);
69 void (*_gnt_reserved4)(void);
70 };
71
72 /**********************************************************************
73 * Plugin Info API
74 **********************************************************************/
75
76 GType finch_plugin_info_get_type(void);
77
78 /**
79 * finch_plugin_info_new:
80 * @first_property: The first property name
81 * @...: The value of the first property, followed optionally by more
82 * name/value pairs, followed by %NULL
83 *
84 * Creates a new #FinchPluginInfo instance to be returned from
85 * #plugin_query of a finch plugin, using the provided name/value
86 * pairs.
87 *
88 * See purple_plugin_info_new() for a list of available property names.
89 * Additionally, you can provide the property
90 * <literal>"gnt-pref-frame-cb"</literal>, which should be a callback that
91 * returns a #GntWidget for the plugin's preferences
92 * (see #FinchPluginPrefFrameCb).
93 *
94 * See purple_plugin_info_new().
95 *
96 * Returns: A new #FinchPluginInfo instance.
97 */
98 GPluginPluginInfo *finch_plugin_info_new(const char *first_property, ...) G_GNUC_NULL_TERMINATED;
99
100 /**********************************************************************
101 * GNT Plugins API
102 **********************************************************************/
103
104 /**
105 * finch_plugins_show_all:
106 *
107 * Show a list of plugins.
108 */
109 void finch_plugins_show_all(void);
110
111 /**
112 * finch_plugins_save_loaded:
113 *
114 * Save the list of loaded plugins.
115 */
116 void finch_plugins_save_loaded(void);
117
118 #endif /* FINCH_PLUGIN_H */
119

mercurial