1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus-core - m64p_common.h *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2009 Richard Goedeken *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
22 /* This header file defines typedefs for function pointers to common Core
23 * and plugin functions, for use by the front-end and plugin modules to attach
24 * to the dynamic libraries.
27 #if !defined(M64P_COMMON_H)
30 #include "m64p_types.h"
38 * This function retrieves version information from a library. This
39 * function is the same for the core library and the plugins.
41 typedef m64p_error (*ptr_PluginGetVersion)(m64p_plugin_type *, int *, int *, const char **, int *);
42 #if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES)
43 EXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *, int *, int *, const char **, int *);
46 /* CoreGetAPIVersions()
48 * This function retrieves API version information from the core.
50 typedef m64p_error (*ptr_CoreGetAPIVersions)(int *, int *, int *, int *);
51 #if defined(M64P_CORE_PROTOTYPES)
52 EXPORT m64p_error CALL CoreGetAPIVersions(int *, int *, int *, int *);
57 * This function returns a pointer to a NULL-terminated string giving a
58 * human-readable description of the error.
60 typedef const char * (*ptr_CoreErrorMessage)(m64p_error);
61 #if defined(M64P_CORE_PROTOTYPES)
62 EXPORT const char * CALL CoreErrorMessage(m64p_error);
67 * This function initializes a plugin for use by allocating memory, creating
68 * data structures, and loading the configuration data.
70 typedef m64p_error (*ptr_PluginStartup)(m64p_dynlib_handle, void *, void (*)(void *, int, const char *));
71 #if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES)
72 EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle, void *, void (*)(void *, int, const char *));
77 * This function destroys data structures and releases memory allocated by
80 typedef m64p_error (*ptr_PluginShutdown)(void);
81 #if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES)
82 EXPORT m64p_error CALL PluginShutdown(void);
89 #endif /* #define M64P_COMMON_H */