Various Datatypes.
[AROS-Contrib.git] / arospdf / xpdf / AROSSplashOutputDev.h
blob4bf6d533a8c3338468a6079a00ff3ad7d3aeb6aa
1 //========================================================================
2 //
3 // AROSSplashOutputDev.h
4 //
5 // Derived from XSplashOutputDev.h
6 // Copyright 2005 Vijay Kumar B <vijaykumar@bravegnu.org>
7 // Copyright 2003 Glyph & Cog, LLC
8 //
9 //========================================================================
11 #ifndef AROSSPLASHOUTPUTDEV_H
12 #define AROSSPLASHOUTPUTDEV_H
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
18 #include <proto/muimaster.h>
19 #include <proto/intuition.h>
20 #include <proto/graphics.h>
21 #include <proto/utility.h>
22 #include <proto/cybergraphics.h>
24 #include <exec/types.h>
25 #include <libraries/mui.h>
26 #include <utility/hooks.h>
27 #include <aros/debug.h>
28 #include <clib/gadtools_protos.h>
30 #include "SplashTypes.h"
31 #include "SplashOutputDev.h"
32 #include "TextOutputDev.h"
34 //------------------------------------------------------------------------
36 #define xOutMaxRGBCube 6 // max size of RGB color cube
38 //------------------------------------------------------------------------
39 // AROSSplashOutputDev
40 //------------------------------------------------------------------------
42 class AROSSplashOutputDev: public SplashOutputDev {
43 public:
45 AROSSplashOutputDev(struct RastPort *visualA,GBool reverseVideoA,
46 SplashColor paperColorA,
47 GBool incrementalUpdateA,
48 void (*redrawCbkA)(void *data),
49 void *redrawCbkDataA);
50 virtual ~AROSSplashOutputDev();
52 //----- initialization and control
54 // Start a page.
55 virtual void startPage(int pageNum, GfxState *state);
57 // End a page.
58 virtual void endPage();
60 // Dump page contents to display.
61 virtual void dump();
63 //----- update text state
64 virtual void updateFont(GfxState *state);
66 //----- text drawing
67 virtual void drawChar(GfxState *state, double x, double y,
68 double dx, double dy,
69 double originX, double originY,
70 CharCode code, int nBytes, Unicode *u, int uLen);
71 virtual GBool beginType3Char(GfxState *state, double x, double y,
72 double dx, double dy,
73 CharCode code, int nBytes,
74 Unicode *u, int uLen);
76 //----- special access
78 // Clear out the document (used when displaying an empty window).
79 void clear();
81 // Copy the rectangle (srcX, srcY, width, height) to (destX, destY)
82 // in destDC.
83 void redraw(int srcX, int srcY,
84 int destX, int destY,
85 int width, int height,
86 int destW, int destH);
88 // Find a string. If <startAtTop> is true, starts looking at the
89 // top of the page; else if <startAtLast> is true, starts looking
90 // immediately after the last find result; else starts looking at
91 // <xMin>,<yMin>. If <stopAtBottom> is true, stops looking at the
92 // bottom of the page; else if <stopAtLast> is true, stops looking
93 // just before the last find result; else stops looking at
94 // <xMax>,<yMax>.
95 GBool findText(Unicode *s, int len,
96 GBool startAtTop, GBool stopAtBottom,
97 GBool startAtLast, GBool stopAtLast,
98 int *xMin, int *yMin,
99 int *xMax, int *yMax);
101 // Get the text which is inside the specified rectangle.
102 GString *getText(int xMin, int yMin, int xMax, int yMax);
104 private:
106 GBool incrementalUpdate; // incrementally update the display?
107 void (*redrawCbk)(void *data);
108 void *redrawCbkData;
109 TextPage *text; // text from the current page
111 struct RastPort *visual; // AROS visual pointer
114 #endif