PopplerAction

## PopplerAction PopplerAction — Action links |

## Synopsis

    #include <poppler.h>

    union               PopplerAction;
                        PopplerDest;
    struct              PopplerActionAny;
    struct              PopplerActionGotoDest;
    struct              PopplerActionGotoRemote;
    struct              PopplerActionLaunch;
    struct              PopplerActionUri;
    struct              PopplerActionNamed;
    struct              PopplerActionMovie;
    struct              PopplerActionRendition;
    struct              PopplerActionOCGState;
    enum                PopplerActionType;
    enum                PopplerDestType;
    enum                PopplerActionMovieOperation;
                        PopplerActionLayer;
    enum                PopplerActionLayerAction;
    PopplerAction *     poppler_action_copy                 (PopplerAction *action);
    void                poppler_action_free                 (PopplerAction *action);
    PopplerDest *       poppler_dest_copy                   (PopplerDest *dest);
    void                poppler_dest_free                   (PopplerDest *dest);

## Description

## Details

### union PopplerAction

A data structure for holding actions

### PopplerDest

    typedef struct {
    	PopplerDestType type;

    	int page_num;
    	double left;
    	double bottom;
    	double right;
    	double top;
    	double zoom;
    	gchar *named_dest;
    	guint change_left : 1;
    	guint change_top : 1;
    	guint change_zoom : 1;
    } PopplerDest;

Data structure for holding a destination

PopplerDestType `type`; | type of destination
int `page_num`; | page number
double `left`; | left coordinate
double `bottom`; | bottom coordinate
double `right`; | right coordinate
double `top`; | top coordinate
double `zoom`; | scale factor
gchar *`named_dest`; | name of the destination (POPPLER_DEST_NAMED only)
guint `change_left` : 1; | whether left coordinate should be changed
guint `change_top` : 1; | whether top coordinate should be changed
guint `change_zoom` : 1; | whether scale factor should be changed

### struct PopplerActionAny

    struct PopplerActionAny {
    	PopplerActionType type;
    	gchar *title;
    };

### struct PopplerActionGotoDest

    struct PopplerActionGotoDest {
    	PopplerActionType type;
    	gchar *title;

    	PopplerDest *dest;
    };

### struct PopplerActionGotoRemote

    struct PopplerActionGotoRemote {
    	PopplerActionType type;
    	gchar *title;

    	gchar *file_name;
    	PopplerDest *dest;
    };

### struct PopplerActionLaunch

    struct PopplerActionLaunch {
    	PopplerActionType type;
    	gchar *title;

    	gchar *file_name;
    	gchar *params;
    };

### struct PopplerActionUri

    struct PopplerActionUri {
    	PopplerActionType type;
    	gchar *title;

    	char *uri;
    };

### struct PopplerActionNamed

    struct PopplerActionNamed {
    	PopplerActionType type;
    	gchar *title;

    	gchar *named_dest;
    };

### struct PopplerActionMovie

    struct PopplerActionMovie {
            PopplerActionType           type;
            gchar                      *title;

            PopplerActionMovieOperation operation;
    	PopplerMovie               *movie;
    };

### struct PopplerActionRendition

    struct PopplerActionRendition {
    	PopplerActionType type;
    	gchar            *title;

    	gint               op;
    	PopplerMedia      *media;
    };

### struct PopplerActionOCGState

    struct PopplerActionOCGState {
    	PopplerActionType type;
    	gchar            *title;

    	GList            *state_list;
    };

### enum PopplerActionType

    typedef enum
    {
    	POPPLER_ACTION_UNKNOWN,		/* unknown action */
    	POPPLER_ACTION_NONE,            /* no action specified */
    	POPPLER_ACTION_GOTO_DEST, /* go to destination */
    	POPPLER_ACTION_GOTO_REMOTE, /* go to destination in new file */
    	POPPLER_ACTION_LAUNCH,		/* launch app (or open document) */
    	POPPLER_ACTION_URI,		/* URI */
    	POPPLER_ACTION_NAMED,		/* named action*/
    	POPPLER_ACTION_MOVIE,		/* movie action */
    	POPPLER_ACTION_RENDITION,       /* rendition action */
    	POPPLER_ACTION_OCG_STATE        /* Set-OCG-State action */
    } PopplerActionType;

Action types

`POPPLER_ACTION_UNKNOWN` | unknown action
`POPPLER_ACTION_NONE` | no action specified
`POPPLER_ACTION_GOTO_DEST` | go to destination
`POPPLER_ACTION_GOTO_REMOTE` | go to destination in another document
`POPPLER_ACTION_LAUNCH` | launch app (or open document
`POPPLER_ACTION_URI` | URI
`POPPLER_ACTION_NAMED` | predefined action
`POPPLER_ACTION_MOVIE` | play movies. Since 0.14
`POPPLER_ACTION_RENDITION` | play multimedia content. Since 0.14
`POPPLER_ACTION_OCG_STATE` | state of layer. Since 0.14

### enum PopplerDestType

    typedef enum
    {
    	POPPLER_DEST_UNKNOWN,
    	POPPLER_DEST_XYZ,
    	POPPLER_DEST_FIT,
    	POPPLER_DEST_FITH,
    	POPPLER_DEST_FITV,
    	POPPLER_DEST_FITR,
    	POPPLER_DEST_FITB,
    	POPPLER_DEST_FITBH,
    	POPPLER_DEST_FITBV,
    	POPPLER_DEST_NAMED
    } PopplerDestType;

Destination types

`POPPLER_DEST_UNKNOWN` | unknown destination
`POPPLER_DEST_XYZ` | go to page with coordinates (left, top) positioned at the upper-left corner of the window and the contents of the page magnified by the factor zoom
`POPPLER_DEST_FIT` | go to page with its contents magnified just enough to fit the entire page within the window both horizontally and vertically
`POPPLER_DEST_FITH` | go to page with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window
`POPPLER_DEST_FITV` | go to page with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window
`POPPLER_DEST_FITR` | go to page with its contents magnified just enough to fit the rectangle specified by the coordinates left, bottom, right, and top entirely within the window both horizontally and vertically
`POPPLER_DEST_FITB` | go to page with its contents magnified just enough to fit its bounding box entirely within the window both horizontally and vertically
`POPPLER_DEST_FITBH` | go to page with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of its bounding box within the window
`POPPLER_DEST_FITBV` | go to page with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of its bounding box within the window
`POPPLER_DEST_NAMED` | got to page specified by a name. See `poppler_document_find_dest()`

### enum PopplerActionMovieOperation

    typedef enum
    {
            POPPLER_ACTION_MOVIE_PLAY,
    	POPPLER_ACTION_MOVIE_PAUSE,
    	POPPLER_ACTION_MOVIE_RESUME,
    	POPPLER_ACTION_MOVIE_STOP
    } PopplerActionMovieOperation;

Movie operations

`POPPLER_ACTION_MOVIE_PLAY` | play movie
`POPPLER_ACTION_MOVIE_PAUSE` | pause playing movie
`POPPLER_ACTION_MOVIE_RESUME` | resume paused movie
`POPPLER_ACTION_MOVIE_STOP` | stop playing movie

Since 0.14

### PopplerActionLayer

    typedef struct {
    	PopplerActionLayerAction action;
    	GList *layers;
    } PopplerActionLayer;

Action to perform over a list of layers

PopplerActionLayerAction `action`; | a PopplerActionLayerAction
GList *`layers`; | list of PopplerLayers

### enum PopplerActionLayerAction

    typedef enum
    {
    	POPPLER_ACTION_LAYER_ON,
    	POPPLER_ACTION_LAYER_OFF,
    	POPPLER_ACTION_LAYER_TOGGLE
    } PopplerActionLayerAction;

Layer actions

`POPPLER_ACTION_LAYER_ON` | set layer visibility on
`POPPLER_ACTION_LAYER_OFF` | set layer visibility off
`POPPLER_ACTION_LAYER_TOGGLE` | reverse the layer visibility state

Since 0.14

### poppler_action_copy ()

    PopplerAction *     poppler_action_copy                 (PopplerAction *action);

Copies `action`, creating an identical PopplerAction.

`action` : | a PopplerAction
Returns : | a new action identical to `action`

### poppler_action_free ()

    void                poppler_action_free                 (PopplerAction *action);

Frees `action`

`action` : | a PopplerAction

### poppler_dest_copy ()

    PopplerDest *       poppler_dest_copy                   (PopplerDest *dest);

Copies `dest`, creating an identical PopplerDest.

`dest` : | a PopplerDest
Returns : | a new destination identical to `dest`

### poppler_dest_free ()

    void                poppler_dest_free                   (PopplerDest *dest);

Frees `dest`

`dest` : | a PopplerDest