1 /* -*- Mode: C; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3 -*- */ 2 3 /* 4 * GImageView 5 * Copyright (C) 2001 Takuro Ashie 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: spi.h,v 1.5 2003/06/13 09:43:03 makeinu Exp $ 22 */ 23 24 #ifndef __SPI_H__ 25 #define __SPI_H__ 26 27 #ifdef HAVE_CONFIG_H 28 # include "config.h" 29 #endif 30 31 #ifdef ENABLE_SPI 32 33 #include <glib.h> 34 35 #define SPI_DEFAULT_SEARCH_DIR_LIST \ 36 PLUGINDIR "/" "spi" 37 38 #ifndef G_PLATFORM_WIN32 39 #include "dllloader/pe_image.h" 40 #else 41 #include "gmodule.h" 42 #define PE_image GModule 43 #define peimage_create() (NULL) 44 #define peimage_load(image, filename) \ 45 (image = g_module_open(filename, G_MODULE_BIND_LAZY)) 46 #define peimage_destroy(image) (g_module_close(image)) 47 #endif 48 49 #include "spi-private.h" 50 51 typedef struct SusiePlugin_Tag 52 { 53 PE_image *pe; 54 GetPluginInfoFunc get_plugin_info; 55 gchar *description; 56 GList *formats; 57 } SusiePlugin; 58 59 60 typedef struct SpiImportFilter_Tag 61 { 62 SusiePlugin parent; 63 64 IsSupportedFunc is_supported; 65 GetPictureInfoFunc get_pic_info; 66 GetPictureFunc get_pic; 67 } SpiImportFilter; 68 69 70 typedef struct SpiExportFilter_Tag 71 { 72 SusiePlugin parent; 73 } SpiExportFilter; 74 75 76 typedef struct SpiArchiveExtractor_Tag 77 { 78 SusiePlugin parent; 79 80 IsSupportedFunc is_supported; 81 GetArchiveInfoFunc get_archive_info; 82 GetFileInfoFunc get_file_info; 83 GetFileFunc get_file; 84 } SpiArchiveExtractor; 85 86 87 void spi_init (void); 88 GList *spi_get_search_dir_list (void); 89 GList *spi_get_import_filter_list (void); 90 GList *spi_get_export_filter_list (void); 91 GList *spi_get_archive_extractor_list (void); 92 93 #endif 94 95 #endif /* __SPI_H__ */ 96