Sun, 18 May 2003 21:54:11 +0000
[gaim-migrate @ 5823]
this would be helpful
| 5205 | 1 | /** |
| 2 | * @file gtkplugin.h GTK+ Plugin API | |
| 3 | * @ingroup gtkui | |
| 4 | * | |
| 5 | * gaim | |
| 6 | * | |
| 7 | * Copyright (C) 2002-2003, Christian Hammond <chipx86@gnupdate.org> | |
| 8 | * | |
| 9 | * This program is free software; you can redistribute it and/or modify | |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
| 20 | * along with this program; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | */ | |
| 23 | #ifndef _GAIM_GTK_PLUGIN_H_ | |
| 24 | #define _GAIM_GTK_PLUGIN_H_ | |
| 25 | ||
| 26 | #include <gtk/gtk.h> | |
| 27 | #include "plugin.h" | |
| 28 | ||
| 29 | typedef struct _GaimGtkPluginUiInfo GaimGtkPluginUiInfo; | |
| 30 | ||
| 31 | /** | |
| 32 | * A GTK+ UI structure for plugins. | |
| 33 | */ | |
| 34 | struct _GaimGtkPluginUiInfo | |
| 35 | { | |
| 36 | GtkWidget *(*get_config_frame)(GaimPlugin *plugin); | |
| 37 | ||
| 38 | void *iter; /**< Reserved */ | |
| 39 | }; | |
| 40 | ||
| 41 | #define GAIM_GTK_PLUGIN_TYPE "gtk" | |
| 42 | ||
| 43 | #define GAIM_IS_GTK_PLUGIN(plugin) \ | |
| 44 | ((plugin)->info != NULL && (plugin)->info->ui_info != NULL && \ | |
| 45 | !strcmp((plugin)->info->ui_requirement, GAIM_GTK_PLUGIN_TYPE)) | |
| 46 | ||
| 47 | #define GAIM_GTK_PLUGIN_UI_INFO(plugin) \ | |
| 48 | ((GaimGtkPluginUiInfo *)(plugin)->info->ui_info) | |
| 49 | ||
| 50 | /** | |
| 51 | * Returns the configuration frame widget for a GTK+ plugin, if one | |
| 52 | * exists. | |
| 53 | * | |
| 54 | * @param plugin The plugin. | |
| 55 | * | |
| 56 | * @return The frame, if the plugin is a GTK+ plugin and provides a | |
| 57 | * configuration frame. | |
| 58 | */ | |
| 59 | GtkWidget *gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin); | |
| 60 | ||
| 61 | #endif /* _GAIM_GTK_PLUGIN_H_ */ |