|
1 Fully Tested |
|
2 ============ |
|
3 class RWindow : public RWindowBase |
|
4 { |
|
5 IMPORT_C void Scroll(const TPoint &aOffset); |
|
6 IMPORT_C void Scroll(const TPoint &aOffset, const TRect &aRect); |
|
7 IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset); |
|
8 IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect); |
|
9 IMPORT_C TInt OrdinalPosition() const; |
|
10 IMPORT_C void SetOrdinalPosition(TInt aPos); |
|
11 IMPORT_C void SetOrdinalPosition(TInt aPos,TOrdinalPriority aOrdinalPriority); |
|
12 } |
|
13 |
|
14 class RWs : public RSessionBase |
|
15 { |
|
16 } |
|
17 |
|
18 class RBitmap : public RDrawBase |
|
19 { |
|
20 } |
|
21 |
|
22 class RWindowBase : public RDrawBase |
|
23 { |
|
24 } |
|
25 |
|
26 class RRootWindow : public RWindowBase |
|
27 { |
|
28 } |
|
29 |
|
30 class RFont : public RFontBase |
|
31 { |
|
32 } |
|
33 |
|
34 class RBrush : public RBrushBase |
|
35 { |
|
36 } |
|
37 |
|
38 class RPalette : public RPaletteBase |
|
39 { |
|
40 } |
|
41 |
|
42 class RGc : public RGdiBase |
|
43 { |
|
44 IMPORT_C void GetPixels(const TPoint &aPoint,TInt aNumOfPixels,TPtr8 &aScanLine)const; |
|
45 IMPORT_C void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2); |
|
46 IMPORT_C void ClearDI(TRgb aColour); |
|
47 IMPORT_C void ClearDI(TRgb aColour,const TRect &aRect); |
|
48 IMPORT_C void ClearTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
49 IMPORT_C void DrawDottedLine(const TPoint &aPoint1,const TPoint &aPoint2,TUint aDashPattern,TInt aDashedLength); |
|
50 IMPORT_C void DrawTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
51 IMPORT_C void FillTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
52 IMPORT_C void GdiBltMasked(const TPoint &aDestination,const RDrawBase &aDrawPtr,const TRect &aSource,const RDrawBase &aMask,TRgb aCutoff,TBool aLowMasked); |
|
53 IMPORT_C void DrawParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
54 IMPORT_C void ClearParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
55 IMPORT_C void FillParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
56 IMPORT_C void PaintParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
57 IMPORT_C void PaintTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); |
|
58 IMPORT_C void ResetDotParam(); |
|
59 } |
|
60 |
|
61 Partially tested |
|
62 ================ |
|
63 class RWindow : public RWindowBase |
|
64 { |
|
65 } |
|
66 |
|
67 class RWs : public RSessionBase |
|
68 { |
|
69 } |
|
70 |
|
71 class RBitmap : public RDrawBase |
|
72 { |
|
73 } |
|
74 |
|
75 class RWindowBase : public RDrawBase |
|
76 { |
|
77 } |
|
78 |
|
79 class RRootWindow : public RWindowBase |
|
80 { |
|
81 } |
|
82 |
|
83 class RFont : public RFontBase |
|
84 { |
|
85 } |
|
86 |
|
87 class RBrush : public RBrushBase |
|
88 { |
|
89 } |
|
90 |
|
91 class RPalette : public RPaletteBase |
|
92 { |
|
93 } |
|
94 |
|
95 class RGc : public RGdiBase |
|
96 { |
|
97 } |
|
98 |
|
99 |
|
100 Not tested |
|
101 ========== |
|
102 class RWs : public RSessionBase |
|
103 { |
|
104 IMPORT_C RWs(); |
|
105 IMPORT_C TInt Connect(TUint32 aHandle); |
|
106 IMPORT_C void Disconnect(); |
|
107 IMPORT_C TVersion Version(); |
|
108 IMPORT_C TInt SetHotKey(THotKeyType aType, TUint aKeycode, TUint aModifier, TUint aModifierMask); |
|
109 IMPORT_C TInt CaptureKey(TUint keyCode,TUint mod_mask,TUint modifiers); |
|
110 IMPORT_C void CancelHotKey(TInt aHotKey); |
|
111 IMPORT_C void CancelCaptureKey(TInt aCaptureKey); |
|
112 IMPORT_C void DisplayInfo(TUint aMode, TDisplayInfo *aInfo); |
|
113 IMPORT_C void ComputeMode(TComputeMode mode); |
|
114 IMPORT_C void Info(TInt aClientHandle,TxInfo &aInfo); |
|
115 IMPORT_C void ReadEvent(TPckgBuf<TWsEvent> &aEvent,TInt *stat,TUint blocks=0); |
|
116 IMPORT_C void ReadEventUpdate(TUint blocks); |
|
117 IMPORT_C void ReadEventCancel(); |
|
118 IMPORT_C TInt BufferSize(TInt aBufSize); |
|
119 IMPORT_C void Flush(); |
|
120 IMPORT_C TBool SetAutoFlush(TBool aState); |
|
121 IMPORT_C TInt HeapCount() const; |
|
122 IMPORT_C void SetTextCursor(RWindow &aWin, const TPoint &aPos, const TTextCursor &aCursor); |
|
123 IMPORT_C void CancelTextCursor(); |
|
124 IMPORT_C void MarkStart(); |
|
125 IMPORT_C void CheckNum(TUint aCount); |
|
126 IMPORT_C void MarkEnd(TUint aCount); |
|
127 IMPORT_C TInt ResourceCount(); |
|
128 inline RBuffer *Buffer() const; |
|
129 }; |
|
130 |
|
131 class RBitmap : public RDrawBase |
|
132 { |
|
133 IMPORT_C RBitmap(); |
|
134 IMPORT_C RBitmap(RWs &aWs); |
|
135 IMPORT_C void Close(); |
|
136 IMPORT_C void Destroy(); |
|
137 // IMPORT_C void Construct(TSize &size,TInt colourBits); |
|
138 IMPORT_C TInt Construct(TSize &size); |
|
139 IMPORT_C TInt Load(const TDesC &aFileName,TReadWrite access=EReadOnly); |
|
140 IMPORT_C void Attributes(TAttributes *attrib); |
|
141 IMPORT_C TUint Handle() const; |
|
142 IMPORT_C TGdiAttributes Attributes()const; |
|
143 IMPORT_C TSize Size()const; |
|
144 }; |
|
145 |
|
146 class RWindowBase : public RDrawBase |
|
147 { |
|
148 IMPORT_C RWindowBase(); |
|
149 IMPORT_C RWindowBase(RWs &aWs); |
|
150 IMPORT_C void Close(); |
|
151 IMPORT_C void Destroy(); |
|
152 IMPORT_C TAttributes Attributes(TInt handle); |
|
153 IMPORT_C TUint32 Parent() const; |
|
154 IMPORT_C TUint32 PrevSibling() const; |
|
155 IMPORT_C TUint32 NextSibling() const; |
|
156 IMPORT_C TUint32 Child() const; |
|
157 IMPORT_C TPoint InquireOffset(const RWindowBase &aWindow) const; |
|
158 IMPORT_C TGdiAttributes Attributes() const; |
|
159 IMPORT_C TUint Handle() const; |
|
160 IMPORT_C TSize Size() const; |
|
161 IMPORT_C TPoint Position() const; |
|
162 }; |
|
163 |
|
164 class RWindow : public RWindowBase |
|
165 { |
|
166 IMPORT_C RWindow(); |
|
167 IMPORT_C RWindow(RWs &aWs); |
|
168 IMPORT_C TInt Construct(const RWindowBase &parent,TUint32 handle); |
|
169 IMPORT_C void Activate(); |
|
170 IMPORT_C TAttributes Attributes(); |
|
171 IMPORT_C void BeginRedraw(); |
|
172 IMPORT_C void BeginRedraw(const TRect &rect); |
|
173 IMPORT_C void EndRedraw(); |
|
174 IMPORT_C void Invalidate(); |
|
175 IMPORT_C void Invalidate(const TRect &rect); |
|
176 IMPORT_C void Validate(); |
|
177 IMPORT_C void Validate(const TRect &rect); |
|
178 IMPORT_C void SetPosition(const TPoint &point); |
|
179 IMPORT_C TInt SetSize(const TSize &size); |
|
180 IMPORT_C TInt SetExtent(const TPoint &point,const TSize &size); |
|
181 IMPORT_C TInt SetExtent(TInt tlx,TInt tly,TInt width, TInt height); |
|
182 IMPORT_C void SetAttributes(TUint flags,const TAttributes &windata); |
|
183 IMPORT_C void SetTextCursor(const TTextCursor cursor); |
|
184 IMPORT_C void CancelTextCursor(); |
|
185 IMPORT_C void PointerFilter(TUint32 aFilter); |
|
186 IMPORT_C void SetPointerGrab(TBool aState); |
|
187 IMPORT_C void SetPointerCapture(TBool aState); |
|
188 IMPORT_C void SetBackgroundColour(TRgb aColour); |
|
189 IMPORT_C void SetVisible(TBool aState); |
|
190 IMPORT_C TInt SetCurrentRegion(const TRegion &aRegion); |
|
191 IMPORT_C void CancelCurrentRegion(); |
|
192 }; |
|
193 |
|
194 class RRootWindow : public RWindowBase |
|
195 { |
|
196 IMPORT_C RRootWindow(); |
|
197 IMPORT_C RRootWindow(RWs &aWs); |
|
198 IMPORT_C TInt Construct(TUint32 clientHandle); |
|
199 }; |
|
200 |
|
201 class RFont : public RFontBase |
|
202 { |
|
203 IMPORT_C RFont(); |
|
204 IMPORT_C RFont(RWs &aWs); |
|
205 IMPORT_C void Close(); |
|
206 IMPORT_C void Destroy(); |
|
207 IMPORT_C TInt Construct(const TFont &aFont); |
|
208 IMPORT_C TUint Handle()const; |
|
209 IMPORT_C TInt Height()const; |
|
210 IMPORT_C TInt Ascent()const; |
|
211 IMPORT_C TInt Descent()const; |
|
212 IMPORT_C TInt AverageWidth()const; |
|
213 IMPORT_C TInt MaximumWidth()const; |
|
214 IMPORT_C TBool Bold()const; |
|
215 IMPORT_C TBool Italic()const; |
|
216 IMPORT_C TBool Underline()const; |
|
217 IMPORT_C TBool CrossOut()const; |
|
218 IMPORT_C void WidthTable(TUint aStartChar,TUint aFinishChar,TPtr8 &)const; |
|
219 IMPORT_C TInt TextWidth(const TDesC &aBuf)const; |
|
220 IMPORT_C TInt TextCount(const TDesC &aBuf,TInt aPixelCount)const; |
|
221 IMPORT_C TInt TextCount(const TDesC &aBuf,TInt aPixelCount,TInt &aWidth)const; |
|
222 }; |
|
223 |
|
224 class RBrush : public RBrushBase |
|
225 { |
|
226 public: |
|
227 IMPORT_C RBrush(); |
|
228 IMPORT_C RBrush(RWs &aWs); |
|
229 IMPORT_C void Close(); |
|
230 IMPORT_C void Destroy(); |
|
231 IMPORT_C TInt Construct(const TDesC &aFileName,RFs &aFileSys); |
|
232 IMPORT_C TUint Handle()const; |
|
233 IMPORT_C TSize Size()const; |
|
234 IMPORT_C TRgb Pixel(const TPoint &aPoint)const; |
|
235 IMPORT_C void GetPixels(const TPoint &aPoint,TInt aPelLength,TInt aMode,TPtr8 &aBuffer)const; |
|
236 IMPORT_C void SetThreshold(TUint aThreshold); |
|
237 private: |
|
238 TInt32 iHandle; |
|
239 RBuffer *iBuffer; |
|
240 }; |
|
241 |
|
242 class RPalette : public RPaletteBase |
|
243 { |
|
244 IMPORT_C RPalette(); |
|
245 IMPORT_C RPalette(RWs &aWs); |
|
246 IMPORT_C void Close(); |
|
247 IMPORT_C void Destroy(); |
|
248 IMPORT_C void Clear(); |
|
249 IMPORT_C void SetEntry(TInt aPaletteIndex,TRgb aPaletteEntry); |
|
250 IMPORT_C void SetBlock(TInt aStartIndex,TInt aNumberOfEntries,TPtr8 &aBufferOfEntries); |
|
251 IMPORT_C TRgb GetEntry(TInt aPaletteIndex) const; |
|
252 IMPORT_C void GetBlock(TInt aStartIndex,TInt aNumberOfEntries,TPtr8 &aBuffer) const; |
|
253 IMPORT_C TInt Entries() const; |
|
254 IMPORT_C TUint Handle()const; |
|
255 }; |
|
256 |
|
257 class RGc : public RGdiBase |
|
258 { |
|
259 IMPORT_C RGc(); |
|
260 IMPORT_C RGc(RWs &aWs); |
|
261 IMPORT_C void Close(); |
|
262 IMPORT_C void Destroy(); |
|
263 IMPORT_C TInt Construct(); |
|
264 IMPORT_C void Activate(const RDrawBase &aDrawable); |
|
265 IMPORT_C void Deactivate(); |
|
266 IMPORT_C void FillRect(const TRect &aRect); |
|
267 IMPORT_C void PrintText(const TPoint &aPosition,const TDesC &aString); |
|
268 IMPORT_C void PrintText(const TDesC &aString); |
|
269 IMPORT_C void SetPenGrey4(TUint aGrey4); |
|
270 IMPORT_C void SetPenGrey16(TUint aGrey16); |
|
271 IMPORT_C void SetPenGrey256(TUint aGrey256); |
|
272 IMPORT_C void Clear(); |
|
273 IMPORT_C void CopyRect(const TPoint &anOffset,const TRect &aRect); |
|
274 IMPORT_C void DrawEllipse(const TRect &aRect); |
|
275 IMPORT_C void DrawRect(const TRect &aRect); |
|
276 IMPORT_C void ClearRect(const TRect &aRect); |
|
277 IMPORT_C void FillEllipse(const TRect &aRect); |
|
278 IMPORT_C void PaintEllipse(const TRect &aRect); |
|
279 IMPORT_C void ClearEllipse(const TRect &aRect); |
|
280 IMPORT_C void PaintRect(const TRect &aRect); |
|
281 IMPORT_C void GdiBlt(const RDrawBase &aDevice); |
|
282 IMPORT_C void GdiBlt(const TPoint &aDestination,const RDrawBase &aDevice); |
|
283 IMPORT_C void GdiBlt(const TPoint &aDestination,const RDrawBase &aDevice,const TRect &aSource); |
|
284 IMPORT_C TInt DisplayMode()const; |
|
285 IMPORT_C TGdiDrawMode DrawMode()const; |
|
286 // IMPORT_C TUint DisplayModesAvailable()const; |
|
287 IMPORT_C TRgb Pixel(const TPoint &aPixel)const; |
|
288 IMPORT_C TSize Size()const; |
|
289 IMPORT_C RBrushBase *PatternBrush()const; |
|
290 IMPORT_C TRgb PenColour()const; |
|
291 IMPORT_C TRgb BrushColour()const; |
|
292 IMPORT_C TTextBackGround TextBackGround()const; |
|
293 IMPORT_C void Plot(const TPoint &aPoint); |
|
294 IMPORT_C void SetBrushGrey4(TUint aGrey4); |
|
295 IMPORT_C void SetBrushGrey16(TUint aGrey16); |
|
296 IMPORT_C void SetBrushGrey256(TUint aGrey256); |
|
297 IMPORT_C void SetPenColour(const TRgb &aColour); |
|
298 IMPORT_C void SetBrushColour(const TRgb &aColour); |
|
299 IMPORT_C TInt SetDisplayMode(TUint aDisplayMode); |
|
300 IMPORT_C void SetDrawMode(TGdiDrawMode aDrawingMode); |
|
301 IMPORT_C void SetLineWidth(TInt aWidth); |
|
302 IMPORT_C void SetPatternBrushOrigin(const TPoint &aOrigin); |
|
303 IMPORT_C void SetTextBackGround(TTextBackGround aBackGroundSetting); |
|
304 IMPORT_C RFont Font()const; |
|
305 IMPORT_C void UseFont(const RFontBase &aFont); |
|
306 IMPORT_C void UsePalette(const RPaletteBase &aPalette); |
|
307 IMPORT_C void UsePatternBrush(const RBrushBase &aBrush); |
|
308 IMPORT_C void DiscardFont(); |
|
309 IMPORT_C void DiscardPalette(); |
|
310 IMPORT_C void DiscardPatternBrush(); |
|
311 IMPORT_C TUint Handle() const; |
|
312 IMPORT_C TInt LoadBitmap(const TDesC &aFileName, RFs &aFileSys); |
|
313 IMPORT_C TInt LoadBitmapDI(const TDesC &aFileName,RFs &aFileSys); |
|
314 IMPORT_C TGdiAttributes Attributes()const; |
|
315 IMPORT_C void RefreshPalette(); |
|
316 } |