applied diff between xpdf-3.00-orig and xpdf-3.00-swftools
[swftools.git] / pdf2swf / xpdf / GlobalParams.h
index 0982036..e14ad4f 100644 (file)
@@ -33,6 +33,7 @@ class UnicodeMap;
 class UnicodeMapCache;
 class CMap;
 class CMapCache;
+struct XpdfSecurityHandler;
 class GlobalParams;
 
 //------------------------------------------------------------------------
@@ -47,6 +48,14 @@ enum DisplayFontParamKind {
   displayFontTT
 };
 
+struct DisplayFontParamT1 {
+  GString *fileName;
+};
+
+struct DisplayFontParamTT {
+  GString *fileName;
+};
+
 class DisplayFontParam {
 public:
 
@@ -55,12 +64,8 @@ public:
                                //   generic CID fonts
   DisplayFontParamKind kind;
   union {
-    struct {
-      GString *fileName;
-    } t1;
-    struct {
-      GString *fileName;
-    } tt;
+    DisplayFontParamT1 t1;
+    DisplayFontParamTT tt;
   };
 
   DisplayFontParam(GString *nameA, DisplayFontParamKind kindA);
@@ -115,12 +120,14 @@ public:
 
   ~GlobalParams();
 
+  void setBaseDir(char *dir);
   void setupBaseFonts(char *dir);
 
   //----- accessors
 
   CharCode getMacRomanCharCode(char *charName);
 
+  GString *getBaseDir();
   Unicode mapNameToUnicode(char *charName);
   UnicodeMap *getResidentUnicodeMap(GString *encodingName);
   FILE *getUnicodeMapFile(GString *encodingName);
@@ -152,6 +159,7 @@ public:
   GBool getTextKeepTinyChars();
   GString *findFontFile(GString *fontName, char **exts);
   GString *getInitialZoom();
+  GBool getContinuousView();
   GBool getEnableT1lib();
   GBool getEnableFreeType();
   GBool getAntialias();
@@ -192,12 +200,18 @@ public:
   void setTextPageBreaks(GBool pageBreaks);
   void setTextKeepTinyChars(GBool keep);
   void setInitialZoom(char *s);
+  void setContinuousView(GBool cont);
   GBool setEnableT1lib(char *s);
   GBool setEnableFreeType(char *s);
   GBool setAntialias(char *s);
   void setMapNumericCharNames(GBool map);
   void setPrintCommands(GBool printCommandsA);
   void setErrQuiet(GBool errQuietA);
+
+  //----- security handlers
+
+  void addSecurityHandler(XpdfSecurityHandler *handler);
+  XpdfSecurityHandler *getSecurityHandler(char *name);
   void parseFile(GString *fileName, FILE *f);
 
 private:
@@ -228,7 +242,10 @@ private:
                  GList *tokens, GString *fileName, int line);
   GBool parseYesNo2(char *token, GBool *flag);
   UnicodeMap *getUnicodeMap2(GString *encodingName);
-  
+#ifdef ENABLE_PLUGINS
+  GBool loadPlugin(char *type, char *name);
+#endif
+
   //----- config file base path
 
   GString*path;
@@ -240,6 +257,7 @@ private:
 
   //----- user-modifiable settings
 
+  GString *baseDir;            // base directory - for plugins, etc.
   NameToCharCode *             // mapping from char name to Unicode
     nameToUnicode;
   GHash *cidToUnicodes;                // files for mappings from char collections
@@ -291,6 +309,7 @@ private:
   GBool textKeepTinyChars;     // keep all characters in text output
   GList *fontDirs;             // list of font dirs [GString]
   GString *initialZoom;                // initial zoom level
+  GBool continuousView;                // continuous view mode
   GBool enableT1lib;           // t1lib enable flag
   GBool enableFreeType;                // FreeType enable flag
   GBool antialias;             // anti-aliasing enable flag
@@ -305,6 +324,12 @@ private:
   UnicodeMapCache *unicodeMapCache;
   CMapCache *cMapCache;
 
+#ifdef ENABLE_PLUGINS
+  GList *plugins;              // list of plugins [Plugin]
+  GList *securityHandlers;     // list of loaded security handlers
+                               //   [XpdfSecurityHandler]
+#endif
+
 #if MULTITHREADED
   GMutex mutex;
   GMutex unicodeMapCacheMutex;