diff options
Diffstat (limited to 'pdf/xpdf/Link.h')
-rw-r--r-- | pdf/xpdf/Link.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/pdf/xpdf/Link.h b/pdf/xpdf/Link.h index e5b15e3..e19c3c0 100644 --- a/pdf/xpdf/Link.h +++ b/pdf/xpdf/Link.h @@ -9,7 +9,9 @@ #ifndef LINK_H #define LINK_H -#ifdef __GNUC__ +#include <aconf.h> + +#ifdef USE_GCC_PRAGMAS #pragma interface #endif @@ -29,6 +31,7 @@ enum LinkActionKind { actionLaunch, // launch app (or open document) actionURI, // URI actionNamed, // named action + actionMovie, // movie action actionUnknown // anything else }; @@ -43,6 +46,16 @@ public: // Check link action type. virtual LinkActionKind getKind() = 0; + + // Parse a destination (old-style action) name, string, or array. + static LinkAction *parseDest(Object *obj); + + // Parse an action dictionary. + static LinkAction *parseAction(Object *obj, GString *baseURI = NULL); + + // Extract a file name from a file specification (string or + // dictionary). + static GString *getFileSpecName(Object *fileSpecObj); }; //------------------------------------------------------------------------ @@ -240,6 +253,30 @@ private: }; //------------------------------------------------------------------------ +// LinkMovie +//------------------------------------------------------------------------ + +class LinkMovie: public LinkAction { +public: + + LinkMovie(Object *annotObj, Object *titleObj); + + virtual ~LinkMovie(); + + virtual GBool isOk() { return annotRef.num >= 0 || title != NULL; } + + virtual LinkActionKind getKind() { return actionMovie; } + GBool hasAnnotRef() { return annotRef.num >= 0; } + Ref *getAnnotRef() { return &annotRef; } + GString *getTitle() { return title; } + +private: + + Ref annotRef; + GString *title; +}; + +//------------------------------------------------------------------------ // LinkUnknown //------------------------------------------------------------------------ |