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