plugin.h

Go to the documentation of this file.
00001 /* ES40 emulator.
00002  * Copyright (C) 2007-2008 by the ES40 Emulator Project
00003  *
00004  * WWW    : http://sourceforge.net/projects/es40
00005  * E-mail : camiel@camicom.com
00006  * 
00007  *  Copyright (C) 2002  MandrakeSoft S.A.
00008  *
00009  *    MandrakeSoft S.A.
00010  *    43, rue d'Aboukir
00011  *    75002 Paris - France
00012  *    http://www.linux-mandrake.com/
00013  *    http://www.mandrakesoft.com/
00014  *
00015  *  This library is free software; you can redistribute it and/or
00016  *  modify it under the terms of the GNU Lesser General Public
00017  *  License as published by the Free Software Foundation; either
00018  *  version 2 of the License, or (at your option) any later version.
00019  *
00020  *  This library is distributed in the hope that it will be useful,
00021  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  *  Lesser General Public License for more details.
00024  *
00025  *  You should have received a copy of the GNU Lesser General Public
00026  *  License along with this library; if not, write to the Free Software
00027  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00028  */
00029 
00054 
00055 //
00056 // This file provides macros and types needed for plugins.  It is based on
00057 // the plugin.h file from plex86, but with significant changes to make
00058 // it work in Bochs.
00059 // Plex86 is Copyright (C) 1999-2000  The plex86 developers team
00060 //
00062 #ifndef __PLUGIN_H
00063 #define __PLUGIN_H
00064 
00065 #define PLUG_load_plugin(cfg, name)   \
00066   {                                   \
00067     lib##name##_LTX_plugin_init(cfg); \
00068   }
00069 #define PLUG_unload_plugin(name)   \
00070   {                                \
00071     lib##name##_LTX_plugin_fini(); \
00072   }
00073 
00074 #define DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(mod)        \
00075   int  lib##mod##_LTX_plugin_init(CConfigurator*  cfg); \
00076   void                                                lib##mod##_LTX_plugin_fini(void);
00077 
00078 #if defined(HAVE_SDL)
00079 DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(sdl)
00080 #endif
00081 #if defined(_WIN32)
00082 DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(win32)
00083 #endif
00084 #if defined(HAVE_X11)
00085 DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(x11)
00086 #endif
00087 #endif /* __PLUGIN_H */

SourceForge.net Logo
Project space on SourceForge.net