• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ie_types.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef IE_TYPES_H
00023 #define IE_TYPES_H
00024 
00025 /*
00026   NOTE:  File filters can support one or MORE of the following
00027   NOTE:  file types.  However, each of these file types can be
00028   NOTE:  handled by only ONE filter.  So, the number of file types
00029   NOTE:  supported by all the filters combined should be equal
00030   NOTE:  to (or less than) the number below.
00031 */
00032 
00033 #if defined(__MINGW32__)
00034 #  undef snprintf
00035 #  if __GNUC__ <= 3
00036 #    define _GLIBCXX_USE_C99_DYNAMIC 1
00037 #  endif
00038 #endif
00039 
00040 #include <string>
00041 #include <glib.h>
00042 #include "ut_types.h"
00043 
00044 typedef UT_sint32 IEFileType;
00045 #define IEFT_Bogus   static_cast<IEFileType>(-1)
00046 #define IEFT_Unknown static_cast<IEFileType>(0)
00047 
00048 typedef UT_sint32 IEGraphicFileType;
00049 #define IEGFT_Bogus static_cast<IEGraphicFileType>(-1)
00050 #define IEGFT_Unknown static_cast<IEGraphicFileType>(0)
00051 
00052 // temporary hack so that we don't bust too many things - DOM
00053 #define IEGFT_PNG IE_ImpGraphic::fileTypeForSuffix(".png")
00054 #define IEGFT_SVG IE_ImpGraphic::fileTypeForSuffix(".svg")
00055 #define IEGFT_BMP IE_ImpGraphic::fileTypeForSuffix(".bmp")
00056 #define IEGFT_DIB IEGFT_BMP
00057 #define IEGFT_JPEG IE_ImpGraphic::fileTypeForSuffix(".jpg")
00058 #define IEGFT_WMF IE_ImpGraphic::fileTypeForSuffix(".wmf")
00059 #define IEGFT_EMF IE_ImpGraphic::fileTypeForSuffix(".emf")
00060 
00061 /* plug-ins adding new importers/exporters should give them names
00062  * such as "<plug-in name>::<format description>"
00063  */
00064 #define IE_IMPEXPNAME_AWML11        "AbiWord::AWML-1.1"
00065 #define IE_IMPEXPNAME_AWML11AWT     "AbiWord::AWML-1.1/template"
00066 #define IE_IMPEXPNAME_AWML11GZ      "AbiWord::AWML-1.1/compressed"
00067 #define IE_IMPEXPNAME_AWML11GZB64   "AbiWord::AWML-1.1/compressed/base64"
00068 #define IE_IMPEXPNAME_MSWORD97      "AbiWord::MS Word (97)"
00069 #define IE_IMPEXPNAME_RTF           "AbiWord::RTF"
00070 #define IE_IMPEXPNAME_RTFATTIC      "AbiWord::RTF (attic)"
00071 #define IE_IMPEXPNAME_RTFMSDOC      "AbiWord::RTF (!MSWord)"
00072 #define IE_IMPEXPNAME_TEXT          "AbiWord::Text"
00073 #define IE_IMPEXPNAME_TEXTENC       "AbiWord::Text/encoded"
00074 #define IE_IMPEXPNAME_HTML          "AbiWord::HTML"
00075 #define IE_IMPEXPNAME_MATHML        "AbiWord::MathML"
00076 #define IE_IMPEXPNAME_GOCHART       "AbiWord::GNOME Office Chart"
00077 #define IE_IMPEXPNAME_GOCOMPONENT   "AbiWord::GNOME Office Component"
00078 
00082 enum IE_MimeMatch {
00083     IE_MIME_MATCH_BOGUS,    
00084     IE_MIME_MATCH_CLASS,    
00085     IE_MIME_MATCH_FULL      
00086 };
00087 
00091 struct IE_MimeConfidence {
00092     IE_MimeMatch     match;         
00093     std::string      mimetype;      
00094     UT_Confidence_t  confidence;    
00095 };
00096 
00100 struct IE_SuffixConfidence {
00101     std::string      suffix;        
00102     UT_Confidence_t  confidence;    
00103 };
00104 
00105 #endif /* IE_TYPES_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1