forked from rbrito/xpdf-poppler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
XPDFApp.h
113 lines (92 loc) · 2.95 KB
/
XPDFApp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//========================================================================
//
// XPDFApp.h
//
// Copyright 2002-2003 Glyph & Cog, LLC
//
//========================================================================
#ifndef XPDFAPP_H
#define XPDFAPP_H
#include <poppler-config.h>
#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#define Object XtObject
#include <Xm/XmAll.h>
#undef Object
#include "poppler/splash/SplashTypes.h"
class GooString;
class GooList;
class PDFDoc;
class XPDFViewer;
//------------------------------------------------------------------------
#define xpdfAppName "Xpdf"
//------------------------------------------------------------------------
// XPDFApp
//------------------------------------------------------------------------
class XPDFApp {
public:
XPDFApp(int *argc, char *argv[]);
~XPDFApp();
XPDFViewer *open(GooString *fileName, int page = 1,
GooString *ownerPassword = NULL,
GooString *userPassword = NULL);
XPDFViewer *openAtDest(GooString *fileName, GooString *dest,
GooString *ownerPassword = NULL,
GooString *userPassword = NULL);
XPDFViewer *reopen(XPDFViewer *viewer, PDFDoc *doc, int page,
bool fullScreenA);
void close(XPDFViewer *viewer, bool closeLast);
void quit();
void run();
//----- remote server
void setRemoteName(char *remoteName);
bool remoteServerRunning();
void remoteExec(char *cmd);
void remoteOpen(GooString *fileName, int page, bool raise);
void remoteOpenAtDest(GooString *fileName, GooString *dest, bool raise);
void remoteReload(bool raise);
void remoteRaise();
void remoteQuit();
//----- resource/option values
GooString *getGeometry() { return geometry; }
GooString *getTitle() { return title; }
bool getInstallCmap() { return installCmap; }
int getRGBCubeSize() { return rgbCubeSize; }
bool getReverseVideo() { return reverseVideo; }
SplashColorPtr getPaperRGB() { return paperRGB; }
unsigned long getPaperPixel() { return paperPixel; }
unsigned long getMattePixel(bool fullScreenA)
{ return fullScreenA ? fullScreenMattePixel : mattePixel; }
GooString *getInitialZoom() { return initialZoom; }
void setFullScreen(bool fullScreenA) { fullScreen = fullScreenA; }
bool getFullScreen() { return fullScreen; }
XtAppContext getAppContext() { return appContext; }
Widget getAppShell() { return appShell; }
private:
void getResources();
static void remoteMsgCbk(Widget widget, XtPointer ptr,
XEvent *event, Boolean *cont);
Display *display;
int screenNum;
XtAppContext appContext;
Widget appShell;
GooList *viewers; // [XPDFViewer]
Atom remoteAtom;
Window remoteXWin;
XPDFViewer *remoteViewer;
Widget remoteWin;
//----- resource/option values
GooString *geometry;
GooString *title;
bool installCmap;
int rgbCubeSize;
bool reverseVideo;
SplashColor paperRGB;
unsigned long paperPixel;
unsigned long mattePixel;
unsigned long fullScreenMattePixel;
GooString *initialZoom;
bool fullScreen;
};
#endif