diff options
author | Martin Kretzschmar <mkretzschmar@src.gnome.org> | 2003-03-31 16:45:09 (GMT) |
---|---|---|
committer | Martin Kretzschmar <mkretzschmar@src.gnome.org> | 2003-03-31 16:45:09 (GMT) |
commit | 6112dfe4b45b0305c7a6f61bd8a847f69f892cbb (patch) | |
tree | f75410ae7f3554f92ac89c4a42a0a8bc2da53f57 /pdf/xpdf/XPDFApp.h | |
parent | 0152000b294f88a4e659fdbce1ee7558ba29111a (diff) |
Initial revision
Diffstat (limited to 'pdf/xpdf/XPDFApp.h')
-rw-r--r-- | pdf/xpdf/XPDFApp.h | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/pdf/xpdf/XPDFApp.h b/pdf/xpdf/XPDFApp.h new file mode 100644 index 0000000..4875456 --- /dev/null +++ b/pdf/xpdf/XPDFApp.h @@ -0,0 +1,104 @@ +//======================================================================== +// +// XPDFApp.h +// +// Copyright 2002 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef XPDFAPP_H +#define XPDFAPP_H + +#include <aconf.h> + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#define Object XtObject +#include <Xm/XmAll.h> +#undef Object +#include "gtypes.h" + +class GString; +class GList; +class XPDFViewer; + +//------------------------------------------------------------------------ + +#define xpdfAppName "Xpdf" + +//------------------------------------------------------------------------ +// XPDFApp +//------------------------------------------------------------------------ + +class XPDFApp { +public: + + XPDFApp(int *argc, char *argv[]); + ~XPDFApp(); + + XPDFViewer *open(GString *fileName, int page = 1, + GString *ownerPassword = NULL, + GString *userPassword = NULL); + XPDFViewer *openAtDest(GString *fileName, GString *dest, + GString *ownerPassword = NULL, + GString *userPassword = NULL); + void close(XPDFViewer *viewer, GBool closeLast); + void quit(); + + void run(); + + //----- remote server + void setRemoteName(char *remoteName); + GBool remoteServerRunning(); + void remoteOpen(GString *fileName, int page, GBool raise); + void remoteOpenAtDest(GString *fileName, GString *dest, GBool raise); + void remoteRaise(); + void remoteQuit(); + + //----- resource/option values + GString *getGeometry() { return geometry; } + GString *getTitle() { return title; } + GBool getInstallCmap() { return installCmap; } + int getRGBCubeSize() { return rgbCubeSize; } + GBool getReverseVideo() { return reverseVideo; } + Gulong getPaperColor() { return paperColor; } + GString *getInitialZoom() { return initialZoom; } + GBool getViKeys() { return viKeys; } + void setFullScreen(GBool fullScreenA) { fullScreen = fullScreenA; } + GBool 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; + GList *viewers; // [XPDFViewer] + + Atom remoteAtom; + Window remoteXWin; + XPDFViewer *remoteViewer; + Widget remoteWin; + + //----- resource/option values + GString *geometry; + GString *title; + GBool installCmap; + int rgbCubeSize; + GBool reverseVideo; + Gulong paperColor; + GString *initialZoom; + GBool viKeys; + GBool fullScreen; +}; + +#endif |