| 32 |
32 |
| 33 typedef struct _GaimPlugin GaimPlugin; |
33 typedef struct _GaimPlugin GaimPlugin; |
| 34 typedef struct _GaimPluginInfo GaimPluginInfo; |
34 typedef struct _GaimPluginInfo GaimPluginInfo; |
| 35 typedef struct _GaimPluginUiInfo GaimPluginUiInfo; |
35 typedef struct _GaimPluginUiInfo GaimPluginUiInfo; |
| 36 typedef struct _GaimPluginLoaderInfo GaimPluginLoaderInfo; |
36 typedef struct _GaimPluginLoaderInfo GaimPluginLoaderInfo; |
| |
37 |
| |
38 typedef struct _GaimPluginAction GaimPluginAction; |
| 37 |
39 |
| 38 typedef int GaimPluginPriority; /**< Plugin priority. */ |
40 typedef int GaimPluginPriority; /**< Plugin priority. */ |
| 39 |
41 |
| 40 #include "pluginpref.h" |
42 #include "pluginpref.h" |
| 41 |
43 |
| 135 #define GAIM_PLUGIN_HAS_PREF_FRAME(plugin) \ |
137 #define GAIM_PLUGIN_HAS_PREF_FRAME(plugin) \ |
| 136 ((plugin)->info != NULL && (plugin)->info->prefs_info != NULL) |
138 ((plugin)->info != NULL && (plugin)->info->prefs_info != NULL) |
| 137 |
139 |
| 138 #define GAIM_PLUGIN_UI_INFO(plugin) \ |
140 #define GAIM_PLUGIN_UI_INFO(plugin) \ |
| 139 ((GaimPluginUiInfo*)(plugin)->info->prefs_info) |
141 ((GaimPluginUiInfo*)(plugin)->info->prefs_info) |
| |
142 |
| |
143 |
| |
144 /** |
| |
145 * The structure used in the actions member of GaimPluginInfo |
| |
146 */ |
| |
147 struct _GaimPluginAction { |
| |
148 char *label; |
| |
149 void (*callback)(GaimPluginAction *); |
| |
150 |
| |
151 /** set to the owning plugin */ |
| |
152 GaimPlugin *plugin; |
| |
153 |
| |
154 /** NULL for plugin actions menu, set to the GaimConnection for |
| |
155 account actions menu */ |
| |
156 gpointer context; |
| |
157 }; |
| |
158 |
| |
159 #define GAIM_PLUGIN_HAS_ACTIONS(plugin) \ |
| |
160 ((plugin)->info != NULL && (plugin)->info->actions != NULL) |
| |
161 |
| |
162 #define GAIM_PLUGIN_ACTIONS(plugin, context) \ |
| |
163 (GAIM_PLUGIN_HAS_ACTIONS(plugin)? \ |
| |
164 (plugin)->info->actions(plugin, context): NULL) |
| |
165 |
| 140 |
166 |
| 141 /** |
167 /** |
| 142 * Handles the initialization of modules. |
168 * Handles the initialization of modules. |
| 143 */ |
169 */ |
| 144 #if !defined(GAIM_PLUGINS) || defined(GAIM_STATIC_PRPL) |
170 #if !defined(GAIM_PLUGINS) || defined(GAIM_STATIC_PRPL) |