1
/* $Id: plugins.h 4225 2004-11-18 22:29:53Z jasper $
3
* Copyright 2002-2004 Jasper Huijsmans (jasper@xfce.org)
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef _XFCE_PLUGINS_H
21
#define _XFCE_PLUGINS_H
26
#include <panel/xfce.h>
28
#define XFCE_PLUGIN_API_VERSION 7
32
/* prototype for plugin init function
33
* (must be implemented by plugin) */
34
G_MODULE_IMPORT void xfce_control_class_init (ControlClass * control);
36
/* plugin version check function (implemented by xfce4 in controls.c) */
37
G_MODULE_IMPORT gchar *xfce_plugin_check_version (gint version);
39
/* nifty idea, I think from dia:
40
* every module just has to include this header and put
41
* XFCE_PLUGIN_CHECK_INIT
42
* somewhere in the file (e.g. at the end :), and the API version will
43
* be checked on opening the GModule.
45
#define XFCE_PLUGIN_CHECK_INIT \
46
G_MODULE_EXPORT const gchar *g_module_check_init(GModule *gmodule); \
48
g_module_check_init(GModule *gmodule) \
50
return xfce_plugin_check_version(XFCE_PLUGIN_API_VERSION); \
55
#endif /* _XFCE_PLUGIN_H */