X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FGlobalParams.h;h=1fdef63e11dc843a5b1ccd5a1b9e3f484056fade;hb=f72fd5c03fec8c8d7220c4da964929442962d168;hp=93ec06aa7d77041d90b44a47a0a3df929ad3a672;hpb=c7432833fe3a6469d63fad135151a92e12877b94;p=swftools.git diff --git a/pdf2swf/xpdf/GlobalParams.h b/pdf2swf/xpdf/GlobalParams.h index 93ec06a..1fdef63 100644 --- a/pdf2swf/xpdf/GlobalParams.h +++ b/pdf2swf/xpdf/GlobalParams.h @@ -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,6 +200,7 @@ 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); @@ -199,6 +208,11 @@ public: void setPrintCommands(GBool printCommandsA); void setErrQuiet(GBool errQuietA); + //----- security handlers + + void addSecurityHandler(XpdfSecurityHandler *handler); + XpdfSecurityHandler *getSecurityHandler(char *name); + private: void parseFile(GString *fileName, FILE *f); @@ -228,6 +242,9 @@ 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 //----- static tables @@ -236,6 +253,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 @@ -287,6 +305,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 @@ -301,6 +320,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;