fix build with recent changes/gcc 6.3.0
[AROS-Contrib.git] / arospdf / xpdf / XPDFApp.h
blobd53d83cd4a84f1115ca7b1f897b3624af314c7df
1 //========================================================================
2 //
3 // XPDFApp.h
4 //
5 // Copyright 2002-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef XPDFAPP_H
10 #define XPDFAPP_H
12 #include <aconf.h>
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
18 #define xObject XtObject
19 #include <Xm/XmAll.h>
20 #undef xObject
21 #include "gtypes.h"
22 #include "SplashTypes.h"
24 class GString;
25 class GList;
26 class PDFDoc;
27 class XPDFViewer;
29 //------------------------------------------------------------------------
31 #define xpdfAppName "Xpdf"
33 //------------------------------------------------------------------------
34 // XPDFApp
35 //------------------------------------------------------------------------
37 class XPDFApp {
38 public:
40 XPDFApp(int *argc, char *argv[]);
41 ~XPDFApp();
43 XPDFViewer *open(GString *fileName, int page = 1,
44 GString *ownerPassword = NULL,
45 GString *userPassword = NULL);
46 XPDFViewer *openAtDest(GString *fileName, GString *dest,
47 GString *ownerPassword = NULL,
48 GString *userPassword = NULL);
49 XPDFViewer *reopen(XPDFViewer *viewer, PDFDoc *doc, int page,
50 GBool fullScreenA);
51 void close(XPDFViewer *viewer, GBool closeLast);
52 void quit();
54 void run();
56 //----- remote server
57 void setRemoteName(char *remoteName);
58 GBool remoteServerRunning();
59 void remoteExec(char *cmd);
60 void remoteOpen(GString *fileName, int page, GBool raise);
61 void remoteOpenAtDest(GString *fileName, GString *dest, GBool raise);
62 void remoteReload(GBool raise);
63 void remoteRaise();
64 void remoteQuit();
66 //----- resource/option values
67 GString *getGeometry() { return geometry; }
68 GString *getTitle() { return title; }
69 GBool getInstallCmap() { return installCmap; }
70 int getRGBCubeSize() { return rgbCubeSize; }
71 GBool getReverseVideo() { return reverseVideo; }
72 SplashColorPtr getPaperRGB() { return paperRGB; }
73 Gulong getPaperPixel() { return paperPixel; }
74 Gulong getMattePixel(GBool fullScreenA)
75 { return fullScreenA ? fullScreenMattePixel : mattePixel; }
76 GString *getInitialZoom() { return initialZoom; }
77 void setFullScreen(GBool fullScreenA) { fullScreen = fullScreenA; }
78 GBool getFullScreen() { return fullScreen; }
80 XtAppContext getAppContext() { return appContext; }
81 Widget getAppShell() { return appShell; }
83 private:
85 void getResources();
86 static void remoteMsgCbk(Widget widget, XtPointer ptr,
87 XEvent *event, Boolean *cont);
89 Display *display;
90 int screenNum;
91 XtAppContext appContext;
92 Widget appShell;
93 GList *viewers; // [XPDFViewer]
95 Atom remoteAtom;
96 Window remoteXWin;
97 XPDFViewer *remoteViewer;
98 Widget remoteWin;
100 //----- resource/option values
101 GString *geometry;
102 GString *title;
103 GBool installCmap;
104 int rgbCubeSize;
105 GBool reverseVideo;
106 SplashColor paperRGB;
107 Gulong paperPixel;
108 Gulong mattePixel;
109 Gulong fullScreenMattePixel;
110 GString *initialZoom;
111 GBool fullScreen;
114 #endif