sl@0: Fully Tested sl@0: ============ sl@0: class RWindow : public RWindowBase sl@0: { sl@0: IMPORT_C void Scroll(const TPoint &aOffset); sl@0: IMPORT_C void Scroll(const TPoint &aOffset, const TRect &aRect); sl@0: IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset); sl@0: IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect); sl@0: IMPORT_C TInt OrdinalPosition() const; sl@0: IMPORT_C void SetOrdinalPosition(TInt aPos); sl@0: IMPORT_C void SetOrdinalPosition(TInt aPos,TOrdinalPriority aOrdinalPriority); sl@0: } sl@0: sl@0: class RWs : public RSessionBase sl@0: { sl@0: } sl@0: sl@0: class RBitmap : public RDrawBase sl@0: { sl@0: } sl@0: sl@0: class RWindowBase : public RDrawBase sl@0: { sl@0: } sl@0: sl@0: class RRootWindow : public RWindowBase sl@0: { sl@0: } sl@0: sl@0: class RFont : public RFontBase sl@0: { sl@0: } sl@0: sl@0: class RBrush : public RBrushBase sl@0: { sl@0: } sl@0: sl@0: class RPalette : public RPaletteBase sl@0: { sl@0: } sl@0: sl@0: class RGc : public RGdiBase sl@0: { sl@0: IMPORT_C void GetPixels(const TPoint &aPoint,TInt aNumOfPixels,TPtr8 &aScanLine)const; sl@0: IMPORT_C void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2); sl@0: IMPORT_C void ClearDI(TRgb aColour); sl@0: IMPORT_C void ClearDI(TRgb aColour,const TRect &aRect); sl@0: IMPORT_C void ClearTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void DrawDottedLine(const TPoint &aPoint1,const TPoint &aPoint2,TUint aDashPattern,TInt aDashedLength); sl@0: IMPORT_C void DrawTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void FillTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void GdiBltMasked(const TPoint &aDestination,const RDrawBase &aDrawPtr,const TRect &aSource,const RDrawBase &aMask,TRgb aCutoff,TBool aLowMasked); sl@0: IMPORT_C void DrawParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void ClearParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void FillParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void PaintParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void PaintTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal); sl@0: IMPORT_C void ResetDotParam(); sl@0: } sl@0: sl@0: Partially tested sl@0: ================ sl@0: class RWindow : public RWindowBase sl@0: { sl@0: } sl@0: sl@0: class RWs : public RSessionBase sl@0: { sl@0: } sl@0: sl@0: class RBitmap : public RDrawBase sl@0: { sl@0: } sl@0: sl@0: class RWindowBase : public RDrawBase sl@0: { sl@0: } sl@0: sl@0: class RRootWindow : public RWindowBase sl@0: { sl@0: } sl@0: sl@0: class RFont : public RFontBase sl@0: { sl@0: } sl@0: sl@0: class RBrush : public RBrushBase sl@0: { sl@0: } sl@0: sl@0: class RPalette : public RPaletteBase sl@0: { sl@0: } sl@0: sl@0: class RGc : public RGdiBase sl@0: { sl@0: } sl@0: sl@0: sl@0: Not tested sl@0: ========== sl@0: class RWs : public RSessionBase sl@0: { sl@0: IMPORT_C RWs(); sl@0: IMPORT_C TInt Connect(TUint32 aHandle); sl@0: IMPORT_C void Disconnect(); sl@0: IMPORT_C TVersion Version(); sl@0: IMPORT_C TInt SetHotKey(THotKeyType aType, TUint aKeycode, TUint aModifier, TUint aModifierMask); sl@0: IMPORT_C TInt CaptureKey(TUint keyCode,TUint mod_mask,TUint modifiers); sl@0: IMPORT_C void CancelHotKey(TInt aHotKey); sl@0: IMPORT_C void CancelCaptureKey(TInt aCaptureKey); sl@0: IMPORT_C void DisplayInfo(TUint aMode, TDisplayInfo *aInfo); sl@0: IMPORT_C void ComputeMode(TComputeMode mode); sl@0: IMPORT_C void Info(TInt aClientHandle,TxInfo &aInfo); sl@0: IMPORT_C void ReadEvent(TPckgBuf &aEvent,TInt *stat,TUint blocks=0); sl@0: IMPORT_C void ReadEventUpdate(TUint blocks); sl@0: IMPORT_C void ReadEventCancel(); sl@0: IMPORT_C TInt BufferSize(TInt aBufSize); sl@0: IMPORT_C void Flush(); sl@0: IMPORT_C TBool SetAutoFlush(TBool aState); sl@0: IMPORT_C TInt HeapCount() const; sl@0: IMPORT_C void SetTextCursor(RWindow &aWin, const TPoint &aPos, const TTextCursor &aCursor); sl@0: IMPORT_C void CancelTextCursor(); sl@0: IMPORT_C void MarkStart(); sl@0: IMPORT_C void CheckNum(TUint aCount); sl@0: IMPORT_C void MarkEnd(TUint aCount); sl@0: IMPORT_C TInt ResourceCount(); sl@0: inline RBuffer *Buffer() const; sl@0: }; sl@0: sl@0: class RBitmap : public RDrawBase sl@0: { sl@0: IMPORT_C RBitmap(); sl@0: IMPORT_C RBitmap(RWs &aWs); sl@0: IMPORT_C void Close(); sl@0: IMPORT_C void Destroy(); sl@0: // IMPORT_C void Construct(TSize &size,TInt colourBits); sl@0: IMPORT_C TInt Construct(TSize &size); sl@0: IMPORT_C TInt Load(const TDesC &aFileName,TReadWrite access=EReadOnly); sl@0: IMPORT_C void Attributes(TAttributes *attrib); sl@0: IMPORT_C TUint Handle() const; sl@0: IMPORT_C TGdiAttributes Attributes()const; sl@0: IMPORT_C TSize Size()const; sl@0: }; sl@0: sl@0: class RWindowBase : public RDrawBase sl@0: { sl@0: IMPORT_C RWindowBase(); sl@0: IMPORT_C RWindowBase(RWs &aWs); sl@0: IMPORT_C void Close(); sl@0: IMPORT_C void Destroy(); sl@0: IMPORT_C TAttributes Attributes(TInt handle); sl@0: IMPORT_C TUint32 Parent() const; sl@0: IMPORT_C TUint32 PrevSibling() const; sl@0: IMPORT_C TUint32 NextSibling() const; sl@0: IMPORT_C TUint32 Child() const; sl@0: IMPORT_C TPoint InquireOffset(const RWindowBase &aWindow) const; sl@0: IMPORT_C TGdiAttributes Attributes() const; sl@0: IMPORT_C TUint Handle() const; sl@0: IMPORT_C TSize Size() const; sl@0: IMPORT_C TPoint Position() const; sl@0: }; sl@0: sl@0: class RWindow : public RWindowBase sl@0: { sl@0: IMPORT_C RWindow(); sl@0: IMPORT_C RWindow(RWs &aWs); sl@0: IMPORT_C TInt Construct(const RWindowBase &parent,TUint32 handle); sl@0: IMPORT_C void Activate(); sl@0: IMPORT_C TAttributes Attributes(); sl@0: IMPORT_C void BeginRedraw(); sl@0: IMPORT_C void BeginRedraw(const TRect &rect); sl@0: IMPORT_C void EndRedraw(); sl@0: IMPORT_C void Invalidate(); sl@0: IMPORT_C void Invalidate(const TRect &rect); sl@0: IMPORT_C void Validate(); sl@0: IMPORT_C void Validate(const TRect &rect); sl@0: IMPORT_C void SetPosition(const TPoint &point); sl@0: IMPORT_C TInt SetSize(const TSize &size); sl@0: IMPORT_C TInt SetExtent(const TPoint &point,const TSize &size); sl@0: IMPORT_C TInt SetExtent(TInt tlx,TInt tly,TInt width, TInt height); sl@0: IMPORT_C void SetAttributes(TUint flags,const TAttributes &windata); sl@0: IMPORT_C void SetTextCursor(const TTextCursor cursor); sl@0: IMPORT_C void CancelTextCursor(); sl@0: IMPORT_C void PointerFilter(TUint32 aFilter); sl@0: IMPORT_C void SetPointerGrab(TBool aState); sl@0: IMPORT_C void SetPointerCapture(TBool aState); sl@0: IMPORT_C void SetBackgroundColour(TRgb aColour); sl@0: IMPORT_C void SetVisible(TBool aState); sl@0: IMPORT_C TInt SetCurrentRegion(const TRegion &aRegion); sl@0: IMPORT_C void CancelCurrentRegion(); sl@0: }; sl@0: sl@0: class RRootWindow : public RWindowBase sl@0: { sl@0: IMPORT_C RRootWindow(); sl@0: IMPORT_C RRootWindow(RWs &aWs); sl@0: IMPORT_C TInt Construct(TUint32 clientHandle); sl@0: }; sl@0: sl@0: class RFont : public RFontBase sl@0: { sl@0: IMPORT_C RFont(); sl@0: IMPORT_C RFont(RWs &aWs); sl@0: IMPORT_C void Close(); sl@0: IMPORT_C void Destroy(); sl@0: IMPORT_C TInt Construct(const TFont &aFont); sl@0: IMPORT_C TUint Handle()const; sl@0: IMPORT_C TInt Height()const; sl@0: IMPORT_C TInt Ascent()const; sl@0: IMPORT_C TInt Descent()const; sl@0: IMPORT_C TInt AverageWidth()const; sl@0: IMPORT_C TInt MaximumWidth()const; sl@0: IMPORT_C TBool Bold()const; sl@0: IMPORT_C TBool Italic()const; sl@0: IMPORT_C TBool Underline()const; sl@0: IMPORT_C TBool CrossOut()const; sl@0: IMPORT_C void WidthTable(TUint aStartChar,TUint aFinishChar,TPtr8 &)const; sl@0: IMPORT_C TInt TextWidth(const TDesC &aBuf)const; sl@0: IMPORT_C TInt TextCount(const TDesC &aBuf,TInt aPixelCount)const; sl@0: IMPORT_C TInt TextCount(const TDesC &aBuf,TInt aPixelCount,TInt &aWidth)const; sl@0: }; sl@0: sl@0: class RBrush : public RBrushBase sl@0: { sl@0: public: sl@0: IMPORT_C RBrush(); sl@0: IMPORT_C RBrush(RWs &aWs); sl@0: IMPORT_C void Close(); sl@0: IMPORT_C void Destroy(); sl@0: IMPORT_C TInt Construct(const TDesC &aFileName,RFs &aFileSys); sl@0: IMPORT_C TUint Handle()const; sl@0: IMPORT_C TSize Size()const; sl@0: IMPORT_C TRgb Pixel(const TPoint &aPoint)const; sl@0: IMPORT_C void GetPixels(const TPoint &aPoint,TInt aPelLength,TInt aMode,TPtr8 &aBuffer)const; sl@0: IMPORT_C void SetThreshold(TUint aThreshold); sl@0: private: sl@0: TInt32 iHandle; sl@0: RBuffer *iBuffer; sl@0: }; sl@0: sl@0: class RPalette : public RPaletteBase sl@0: { sl@0: IMPORT_C RPalette(); sl@0: IMPORT_C RPalette(RWs &aWs); sl@0: IMPORT_C void Close(); sl@0: IMPORT_C void Destroy(); sl@0: IMPORT_C void Clear(); sl@0: IMPORT_C void SetEntry(TInt aPaletteIndex,TRgb aPaletteEntry); sl@0: IMPORT_C void SetBlock(TInt aStartIndex,TInt aNumberOfEntries,TPtr8 &aBufferOfEntries); sl@0: IMPORT_C TRgb GetEntry(TInt aPaletteIndex) const; sl@0: IMPORT_C void GetBlock(TInt aStartIndex,TInt aNumberOfEntries,TPtr8 &aBuffer) const; sl@0: IMPORT_C TInt Entries() const; sl@0: IMPORT_C TUint Handle()const; sl@0: }; sl@0: sl@0: class RGc : public RGdiBase sl@0: { sl@0: IMPORT_C RGc(); sl@0: IMPORT_C RGc(RWs &aWs); sl@0: IMPORT_C void Close(); sl@0: IMPORT_C void Destroy(); sl@0: IMPORT_C TInt Construct(); sl@0: IMPORT_C void Activate(const RDrawBase &aDrawable); sl@0: IMPORT_C void Deactivate(); sl@0: IMPORT_C void FillRect(const TRect &aRect); sl@0: IMPORT_C void PrintText(const TPoint &aPosition,const TDesC &aString); sl@0: IMPORT_C void PrintText(const TDesC &aString); sl@0: IMPORT_C void SetPenGrey4(TUint aGrey4); sl@0: IMPORT_C void SetPenGrey16(TUint aGrey16); sl@0: IMPORT_C void SetPenGrey256(TUint aGrey256); sl@0: IMPORT_C void Clear(); sl@0: IMPORT_C void CopyRect(const TPoint &anOffset,const TRect &aRect); sl@0: IMPORT_C void DrawEllipse(const TRect &aRect); sl@0: IMPORT_C void DrawRect(const TRect &aRect); sl@0: IMPORT_C void ClearRect(const TRect &aRect); sl@0: IMPORT_C void FillEllipse(const TRect &aRect); sl@0: IMPORT_C void PaintEllipse(const TRect &aRect); sl@0: IMPORT_C void ClearEllipse(const TRect &aRect); sl@0: IMPORT_C void PaintRect(const TRect &aRect); sl@0: IMPORT_C void GdiBlt(const RDrawBase &aDevice); sl@0: IMPORT_C void GdiBlt(const TPoint &aDestination,const RDrawBase &aDevice); sl@0: IMPORT_C void GdiBlt(const TPoint &aDestination,const RDrawBase &aDevice,const TRect &aSource); sl@0: IMPORT_C TInt DisplayMode()const; sl@0: IMPORT_C TGdiDrawMode DrawMode()const; sl@0: // IMPORT_C TUint DisplayModesAvailable()const; sl@0: IMPORT_C TRgb Pixel(const TPoint &aPixel)const; sl@0: IMPORT_C TSize Size()const; sl@0: IMPORT_C RBrushBase *PatternBrush()const; sl@0: IMPORT_C TRgb PenColour()const; sl@0: IMPORT_C TRgb BrushColour()const; sl@0: IMPORT_C TTextBackGround TextBackGround()const; sl@0: IMPORT_C void Plot(const TPoint &aPoint); sl@0: IMPORT_C void SetBrushGrey4(TUint aGrey4); sl@0: IMPORT_C void SetBrushGrey16(TUint aGrey16); sl@0: IMPORT_C void SetBrushGrey256(TUint aGrey256); sl@0: IMPORT_C void SetPenColour(const TRgb &aColour); sl@0: IMPORT_C void SetBrushColour(const TRgb &aColour); sl@0: IMPORT_C TInt SetDisplayMode(TUint aDisplayMode); sl@0: IMPORT_C void SetDrawMode(TGdiDrawMode aDrawingMode); sl@0: IMPORT_C void SetLineWidth(TInt aWidth); sl@0: IMPORT_C void SetPatternBrushOrigin(const TPoint &aOrigin); sl@0: IMPORT_C void SetTextBackGround(TTextBackGround aBackGroundSetting); sl@0: IMPORT_C RFont Font()const; sl@0: IMPORT_C void UseFont(const RFontBase &aFont); sl@0: IMPORT_C void UsePalette(const RPaletteBase &aPalette); sl@0: IMPORT_C void UsePatternBrush(const RBrushBase &aBrush); sl@0: IMPORT_C void DiscardFont(); sl@0: IMPORT_C void DiscardPalette(); sl@0: IMPORT_C void DiscardPatternBrush(); sl@0: IMPORT_C TUint Handle() const; sl@0: IMPORT_C TInt LoadBitmap(const TDesC &aFileName, RFs &aFileSys); sl@0: IMPORT_C TInt LoadBitmapDI(const TDesC &aFileName,RFs &aFileSys); sl@0: IMPORT_C TGdiAttributes Attributes()const; sl@0: IMPORT_C void RefreshPalette(); sl@0: }