]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/XPDFApp.h
Import of Xpdf 2.01 for merge
[evince.git] / pdf / xpdf / XPDFApp.h
1 //========================================================================
2 //
3 // XPDFApp.h
4 //
5 // Copyright 2002 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef XPDFAPP_H
10 #define XPDFAPP_H
11
12 #include <aconf.h>
13
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
17
18 #define Object XtObject
19 #include <Xm/XmAll.h>
20 #undef Object
21 #include "gtypes.h"
22
23 class GString;
24 class GList;
25 class XPDFViewer;
26
27 //------------------------------------------------------------------------
28
29 #define xpdfAppName "Xpdf"
30
31 //------------------------------------------------------------------------
32 // XPDFApp
33 //------------------------------------------------------------------------
34
35 class XPDFApp {
36 public:
37
38   XPDFApp(int *argc, char *argv[]);
39   ~XPDFApp();
40
41   XPDFViewer *open(GString *fileName, int page = 1,
42                    GString *ownerPassword = NULL,
43                    GString *userPassword = NULL);
44   XPDFViewer *openAtDest(GString *fileName, GString *dest,
45                          GString *ownerPassword = NULL,
46                          GString *userPassword = NULL);
47   void close(XPDFViewer *viewer, GBool closeLast);
48   void quit();
49
50   void run();
51
52   //----- remote server
53   void setRemoteName(char *remoteName);
54   GBool remoteServerRunning();
55   void remoteOpen(GString *fileName, int page, GBool raise);
56   void remoteOpenAtDest(GString *fileName, GString *dest, GBool raise);
57   void remoteReload(GBool raise);
58   void remoteRaise();
59   void remoteQuit();
60
61   //----- resource/option values
62   GString *getGeometry() { return geometry; }
63   GString *getTitle() { return title; }
64   GBool getInstallCmap() { return installCmap; }
65   int getRGBCubeSize() { return rgbCubeSize; }
66   GBool getReverseVideo() { return reverseVideo; }
67   Gulong getPaperColor() { return paperColor; }
68   GString *getInitialZoom() { return initialZoom; }
69   GBool getViKeys() { return viKeys; }
70   void setFullScreen(GBool fullScreenA) { fullScreen = fullScreenA; }
71   GBool getFullScreen() { return fullScreen; }
72
73   XtAppContext getAppContext() { return appContext; }
74   Widget getAppShell() { return appShell; }
75
76 private:
77
78   void getResources();
79   static void remoteMsgCbk(Widget widget, XtPointer ptr,
80                            XEvent *event, Boolean *cont);
81
82   Display *display;
83   int screenNum;
84   XtAppContext appContext;
85   Widget appShell;
86   GList *viewers;               // [XPDFViewer]
87
88   Atom remoteAtom;
89   Window remoteXWin;
90   XPDFViewer *remoteViewer;
91   Widget remoteWin;
92
93   //----- resource/option values
94   GString *geometry;
95   GString *title;
96   GBool installCmap;
97   int rgbCubeSize;
98   GBool reverseVideo;
99   Gulong paperColor;
100   GString *initialZoom;
101   GBool viKeys;
102   GBool fullScreen;
103 };
104
105 #endif