diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-03-01 22:24:10 (GMT) |
---|---|---|
committer | Kristian Høgsberg <krh@src.gnome.org> | 2005-03-01 22:24:10 (GMT) |
commit | 02eb16fef45712a91e24f6471b9e2f31249c888e (patch) | |
tree | d5579258f1d7fbd5a280fb2f1b97b74004b1dea9 /pdf/GDKSplashOutputDev.h | |
parent | 332afee84ff4eb7df326d96f07efd6f82a87c0a2 (diff) |
Use poppler instead of including xpdf source code. Poppler is a fork of
2005-03-01 Kristian Høgsberg <krh@redhat.com>
Use poppler instead of including xpdf source code. Poppler is a
fork of xpdf to build it as a shared library. See
http://freedesktop.org/wiki/Software/poppler.
* pdf/xpdf/*, pdf/goo/*, pdf/splash/*, pdf/fofi/*: Remove included
xpdf fork.
* pdf/Makefile.am: Build libpdfdocument.a here.
* pdf/GDKSplashOutputDev.cc:
* pdf/GDKSplashOutputDev.h:
* pdf/GnomeVFSStream.cc:
* pdf/GnomeVFSStream.h:
* pdf-document.cc:
* pdf-document.h:
* test-gdk-output-dev.cc
* Thumb.cc:
* Thumb.h: Pull these files out of pdf/xpdf and adjust to compile
against poppler.
Diffstat (limited to 'pdf/GDKSplashOutputDev.h')
-rw-r--r-- | pdf/GDKSplashOutputDev.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/pdf/GDKSplashOutputDev.h b/pdf/GDKSplashOutputDev.h new file mode 100644 index 0000000..197beb5 --- /dev/null +++ b/pdf/GDKSplashOutputDev.h @@ -0,0 +1,100 @@ +//======================================================================== +// +// GDKSplashOutputDev.h +// +// Copyright 2003 Glyph & Cog, LLC +// Copyright 2004 Red Hat, Inc. (GDK port) +// +//======================================================================== + +#ifndef XSPLASHOUTPUTDEV_H +#define XSPLASHOUTPUTDEV_H + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include <gdk/gdk.h> +#include <splash/SplashTypes.h> +#include <SplashOutputDev.h> +#include <TextOutputDev.h> + +//------------------------------------------------------------------------ + +#define xOutMaxRGBCube 6 // max size of RGB color cube + +//------------------------------------------------------------------------ +// GDKSplashOutputDev +//------------------------------------------------------------------------ + +class GDKSplashOutputDev: public SplashOutputDev { +public: + + GDKSplashOutputDev(GdkScreen *screen, + void (*redrawCbkA)(void *data), + void *redrawCbkDataA); + + virtual ~GDKSplashOutputDev(); + + //----- initialization and control + + // Start a page. + virtual void startPage(int pageNum, GfxState *state); + + // End a page. + virtual void endPage(); + + // Dump page contents to display. + virtual void dump(); + + //----- update text state + virtual void updateFont(GfxState *state); + + //----- text drawing + virtual void drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode code, Unicode *u, int uLen); + virtual GBool beginType3Char(GfxState *state, double x, double y, + double dx, double dy, + CharCode code, Unicode *u, int uLen); + + //----- special access + + // Clear out the document (used when displaying an empty window). + void clear(); + + // Copy the rectangle (srcX, srcY, width, height) to (destX, destY) + // in destDC. + void redraw(int srcX, int srcY, + GdkDrawable *drawable, + int destX, int destY, + int width, int height); + + void drawToPixbuf(GdkPixbuf *pixbuf, int pageNum); + + // Find a string. If <startAtTop> is true, starts looking at the + // top of the page; else if <startAtLast> is true, starts looking + // immediately after the last find result; else starts looking at + // <xMin>,<yMin>. If <stopAtBottom> is true, stops looking at the + // bottom of the page; else if <stopAtLast> is true, stops looking + // just before the last find result; else stops looking at + // <xMax>,<yMax>. + GBool findText(Unicode *s, int len, + GBool startAtTop, GBool stopAtBottom, + GBool startAtLast, GBool stopAtLast, + int *xMin, int *yMin, + int *xMax, int *yMax); + + // Get the text which is inside the specified rectangle. + GooString *getText(int xMin, int yMin, int xMax, int yMax); + +private: + + int incrementalUpdate; + void (*redrawCbk)(void *data); + void *redrawCbkData; + TextPage *text; // text from the current page +}; + +#endif |