1 /* module.h: API for Fuse modules 2 Copyright (c) 2007 Philip Kendall 3 4 $Id: module.h 4696 2012-05-07 02:05:13Z fredm $ 5 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. 10 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. 15 16 You should have received a copy of the GNU General Public License along 17 with this program; if not, write to the Free Software Foundation, Inc., 18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 20 Author contact information: 21 22 E-mail: Philip Kendall <philip-fuse@shadowmagic.org.uk> 23 24 */ 25 26 #ifndef FUSE_MODULE_H 27 #define FUSE_MODULE_H 28 29 #include <libspectrum.h> 30 31 typedef void (*module_reset_fn)( int hard_reset ); 32 typedef void (*module_romcs_fn)( void ); 33 typedef void (*module_snapshot_enabled_fn)( libspectrum_snap *snap ); 34 typedef void (*module_snapshot_from_fn)( libspectrum_snap *snap ); 35 typedef void (*module_snapshot_to_fn)( libspectrum_snap *snap ); 36 37 typedef struct module_info_t 38 { 39 40 module_reset_fn reset; 41 module_romcs_fn romcs; 42 module_snapshot_enabled_fn snapshot_enabled; 43 module_snapshot_from_fn snapshot_from; 44 module_snapshot_to_fn snapshot_to; 45 46 } module_info_t; 47 48 int module_register( module_info_t *module ); 49 void module_end( void ); 50 51 void module_reset( int hard_reset ); 52 void module_romcs( void ); 53 void module_snapshot_enabled( libspectrum_snap *snap ); 54 void module_snapshot_from( libspectrum_snap *snap ); 55 void module_snapshot_to( libspectrum_snap *snap ); 56 57 #endif /* #ifndef FUSE_MODULE_H */ 58