1 //========================================================================
3 // AROSSplashOutputDev.h
5 // Derived from XSplashOutputDev.h
6 // Copyright 2005 Vijay Kumar B <vijaykumar@bravegnu.org>
7 // Copyright 2003 Glyph & Cog, LLC
9 //========================================================================
11 #ifndef AROSSPLASHOUTPUTDEV_H
12 #define AROSSPLASHOUTPUTDEV_H
14 #ifdef USE_GCC_PRAGMAS
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
{
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
55 virtual void startPage(int pageNum
, GfxState
*state
);
58 virtual void endPage();
60 // Dump page contents to display.
63 //----- update text state
64 virtual void updateFont(GfxState
*state
);
67 virtual void drawChar(GfxState
*state
, double x
, double y
,
69 double originX
, double originY
,
70 CharCode code
, int nBytes
, Unicode
*u
, int uLen
);
71 virtual GBool
beginType3Char(GfxState
*state
, double x
, double y
,
73 CharCode code
, int nBytes
,
74 Unicode
*u
, int uLen
);
76 //----- special access
78 // Clear out the document (used when displaying an empty window).
81 // Copy the rectangle (srcX, srcY, width, height) to (destX, destY)
83 void redraw(int srcX
, int srcY
,
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
95 GBool
findText(Unicode
*s
, int len
,
96 GBool startAtTop
, GBool stopAtBottom
,
97 GBool startAtLast
, GBool stopAtLast
,
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
);
106 GBool incrementalUpdate
; // incrementally update the display?
107 void (*redrawCbk
)(void *data
);
109 TextPage
*text
; // text from the current page
111 struct RastPort
*visual
; // AROS visual pointer