]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/GlobalParams.h
Reused eog HIG dialog in GPdf.
[evince.git] / pdf / xpdf / GlobalParams.h
index b65111091a95d0b4cb418b6da74bec376a0b9dd6..dee9e25c62979ba127fed63e431e9a3e06261b84 100644 (file)
@@ -2,14 +2,16 @@
 //
 // GlobalParams.h
 //
-// Copyright 2001-2002 Glyph & Cog, LLC
+// Copyright 2001-2003 Glyph & Cog, LLC
 //
 //========================================================================
 
 #ifndef GLOBALPARAMS_H
 #define GLOBALPARAMS_H
 
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
 #pragma interface
 #endif
 
 #include "gtypes.h"
 #include "CharTypes.h"
 
+#if MULTITHREADED
+#include "GMutex.h"
+#endif
+
 class GString;
 class GList;
 class GHash;
@@ -135,28 +141,30 @@ public:
   FILE *findToUnicodeFile(GString *name);
   DisplayFontParam *getDisplayFont(GString *fontName);
   DisplayFontParam *getDisplayCIDFont(GString *fontName, GString *collection);
-  GString *getPSFile() { return psFile; }
-  int getPSPaperWidth() { return psPaperWidth; }
-  int getPSPaperHeight() { return psPaperHeight; }
-  GBool getPSDuplex() { return psDuplex; }
-  PSLevel getPSLevel() { return psLevel; }
+  GString *getPSFile();
+  int getPSPaperWidth();
+  int getPSPaperHeight();
+  GBool getPSDuplex();
+  PSLevel getPSLevel();
   PSFontParam *getPSFont(GString *fontName);
   PSFontParam *getPSFont16(GString *fontName, GString *collection, int wMode);
-  GBool getPSEmbedType1() { return psEmbedType1; }
-  GBool getPSEmbedTrueType() { return psEmbedTrueType; }
-  GBool getPSEmbedCIDPostScript() { return psEmbedCIDPostScript; }
-  GBool getPSEmbedCIDTrueType() { return psEmbedCIDTrueType; }
-  GBool getPSOPI() { return psOPI; }
-  GBool getPSASCIIHex() { return psASCIIHex; }
-  GString *getTextEncodingName() { return textEncoding; }
-  EndOfLineKind getTextEOL() { return textEOL; }
-  GString *findFontFile(GString *fontName, char *ext1, char *ext2);
-  GString *getInitialZoom() { return initialZoom; }
-  FontRastControl getT1libControl() { return t1libControl; }
-  FontRastControl getFreeTypeControl() { return freetypeControl; }
+  GBool getPSEmbedType1();
+  GBool getPSEmbedTrueType();
+  GBool getPSEmbedCIDPostScript();
+  GBool getPSEmbedCIDTrueType();
+  GBool getPSOPI();
+  GBool getPSASCIIHex();
+  EndOfLineKind getTextEOL();
+  GBool getTextKeepTinyChars();
+  GString *findFontFile(GString *fontName, char **exts);
+  GString *getInitialZoom();
+  FontRastControl getT1libControl();
+  FontRastControl getFreeTypeControl();
   GString *getURLCommand() { return urlCommand; }
-  GBool getMapNumericCharNames() { return mapNumericCharNames; }
-  GBool getErrQuiet() { return errQuiet; }
+  GString *getMovieCommand() { return movieCommand; }
+  GBool getMapNumericCharNames();
+  GBool getPrintCommands();
+  GBool getErrQuiet();
 
   CharCodeToUnicode *getCIDToUnicode(GString *collection);
   UnicodeMap *getUnicodeMap(GString *encodingName);
@@ -165,6 +173,7 @@ public:
 
   //----- functions to set parameters
 
+  void addDisplayFont(DisplayFontParam *param);
   void setPSFile(char *file);
   GBool setPSPaperSize(char *size);
   void setPSPaperWidth(int width);
@@ -179,9 +188,12 @@ public:
   void setPSASCIIHex(GBool hex);
   void setTextEncoding(char *encodingName);
   GBool setTextEOL(char *s);
+  void setTextKeepTinyChars(GBool keep);
   void setInitialZoom(char *s);
   GBool setT1libControl(char *s);
   GBool setFreeTypeControl(char *s);
+  void setMapNumericCharNames(GBool map);
+  void setPrintCommands(GBool printCommandsA);
   void setErrQuiet(GBool errQuietA);
 
 private:
@@ -207,9 +219,11 @@ private:
   void parseInitialZoom(GList *tokens, GString *fileName, int line);
   void parseFontRastControl(char *cmdName, FontRastControl *val,
                            GList *tokens, GString *fileName, int line);
-  void parseURLCommand(GList *tokens, GString *fileName, int line);
+  void parseCommand(char *cmdName, GString **val,
+                   GList *tokens, GString *fileName, int line);
   void parseYesNo(char *cmdName, GBool *flag,
                  GList *tokens, GString *fileName, int line);
+  UnicodeMap *getUnicodeMap2(GString *encodingName);
   GBool setFontRastControl(FontRastControl *val, char *s);
 
   //----- static tables
@@ -256,18 +270,25 @@ private:
                                //   output
   EndOfLineKind textEOL;       // type of EOL marker to use for text
                                //   output
+  GBool textKeepTinyChars;     // keep all characters in text output
   GList *fontDirs;             // list of font dirs [GString]
   GString *initialZoom;                // initial zoom level
   FontRastControl t1libControl;        // t1lib rasterization mode
   FontRastControl              // FreeType rasterization mode
     freetypeControl;
   GString *urlCommand;         // command executed for URL links
+  GString *movieCommand;       // command executed for movie annotations
   GBool mapNumericCharNames;   // map numeric char names (from font subsets)?
+  GBool printCommands;         // print the drawing commands
   GBool errQuiet;              // suppress error messages?
 
   CIDToUnicodeCache *cidToUnicodeCache;
   UnicodeMapCache *unicodeMapCache;
   CMapCache *cMapCache;
+
+#ifdef MULTITHREADED
+  GMutex mutex;
+#endif
 };
 
 #endif