os/graphics/windowing/windowserver/test/tauto/AUTOTEST.TXT
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/AUTOTEST.TXT	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,316 @@
     1.4 +Fully Tested
     1.5 +============
     1.6 +class RWindow : public RWindowBase
     1.7 +	{
     1.8 +	IMPORT_C void Scroll(const TPoint &aOffset);
     1.9 +	IMPORT_C void Scroll(const TPoint &aOffset, const TRect &aRect);
    1.10 +	IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset);
    1.11 +	IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect);
    1.12 +	IMPORT_C TInt OrdinalPosition() const;
    1.13 +	IMPORT_C void SetOrdinalPosition(TInt aPos);
    1.14 +	IMPORT_C void SetOrdinalPosition(TInt aPos,TOrdinalPriority aOrdinalPriority);
    1.15 +	}
    1.16 +
    1.17 +class RWs : public RSessionBase
    1.18 +	{
    1.19 +	}
    1.20 +
    1.21 +class RBitmap : public RDrawBase
    1.22 +	{
    1.23 +	}
    1.24 +
    1.25 +class RWindowBase : public RDrawBase
    1.26 +	{
    1.27 +	}
    1.28 +
    1.29 +class RRootWindow : public RWindowBase
    1.30 +	{
    1.31 +	}
    1.32 +
    1.33 +class RFont : public RFontBase
    1.34 +	{
    1.35 +	}
    1.36 +
    1.37 +class RBrush : public RBrushBase
    1.38 +	{
    1.39 +	}
    1.40 +
    1.41 +class RPalette : public RPaletteBase
    1.42 +	{
    1.43 +	}
    1.44 +
    1.45 +class RGc : public RGdiBase
    1.46 +	{
    1.47 +	IMPORT_C void GetPixels(const TPoint &aPoint,TInt aNumOfPixels,TPtr8 &aScanLine)const;
    1.48 +	IMPORT_C void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2);
    1.49 +	IMPORT_C void ClearDI(TRgb aColour);
    1.50 +	IMPORT_C void ClearDI(TRgb aColour,const TRect &aRect);
    1.51 +	IMPORT_C void ClearTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.52 +	IMPORT_C void DrawDottedLine(const TPoint &aPoint1,const TPoint &aPoint2,TUint aDashPattern,TInt aDashedLength);
    1.53 +	IMPORT_C void DrawTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.54 +	IMPORT_C void FillTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.55 +	IMPORT_C void GdiBltMasked(const TPoint &aDestination,const RDrawBase &aDrawPtr,const TRect &aSource,const RDrawBase &aMask,TRgb aCutoff,TBool aLowMasked);
    1.56 +	IMPORT_C void DrawParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.57 +	IMPORT_C void ClearParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.58 +	IMPORT_C void FillParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.59 +	IMPORT_C void PaintParallelogram(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.60 +	IMPORT_C void PaintTrapezium(const TRect &aRect,TInt aSkew,TBool aHorizontal);
    1.61 +	IMPORT_C void ResetDotParam();
    1.62 +	}
    1.63 +
    1.64 +Partially tested
    1.65 +================
    1.66 +class RWindow : public RWindowBase
    1.67 +	{
    1.68 +	}
    1.69 +
    1.70 +class RWs : public RSessionBase
    1.71 +	{
    1.72 +	}
    1.73 +
    1.74 +class RBitmap : public RDrawBase
    1.75 +	{
    1.76 +	}
    1.77 +
    1.78 +class RWindowBase : public RDrawBase
    1.79 +	{
    1.80 +	}
    1.81 +
    1.82 +class RRootWindow : public RWindowBase
    1.83 +	{
    1.84 +	}
    1.85 +
    1.86 +class RFont : public RFontBase
    1.87 +	{
    1.88 +	}
    1.89 +
    1.90 +class RBrush : public RBrushBase
    1.91 +	{
    1.92 +	}
    1.93 +
    1.94 +class RPalette : public RPaletteBase
    1.95 +	{
    1.96 +	}
    1.97 +
    1.98 +class RGc : public RGdiBase
    1.99 +	{
   1.100 +	}
   1.101 +
   1.102 +
   1.103 +Not tested
   1.104 +==========
   1.105 +class RWs : public RSessionBase
   1.106 +	{
   1.107 +	IMPORT_C RWs();
   1.108 +	IMPORT_C TInt Connect(TUint32 aHandle);
   1.109 +	IMPORT_C void Disconnect();
   1.110 +	IMPORT_C TVersion Version();
   1.111 +	IMPORT_C TInt SetHotKey(THotKeyType aType, TUint aKeycode, TUint aModifier, TUint aModifierMask);
   1.112 +	IMPORT_C TInt CaptureKey(TUint keyCode,TUint mod_mask,TUint modifiers);
   1.113 +	IMPORT_C void CancelHotKey(TInt aHotKey);
   1.114 +	IMPORT_C void CancelCaptureKey(TInt aCaptureKey);
   1.115 +	IMPORT_C void DisplayInfo(TUint aMode, TDisplayInfo *aInfo);
   1.116 +	IMPORT_C void ComputeMode(TComputeMode mode);
   1.117 +	IMPORT_C void Info(TInt aClientHandle,TxInfo &aInfo);
   1.118 +	IMPORT_C void ReadEvent(TPckgBuf<TWsEvent> &aEvent,TInt *stat,TUint blocks=0);
   1.119 +	IMPORT_C void ReadEventUpdate(TUint blocks);
   1.120 +	IMPORT_C void ReadEventCancel();
   1.121 +	IMPORT_C TInt BufferSize(TInt aBufSize);
   1.122 +	IMPORT_C void Flush();
   1.123 +	IMPORT_C TBool SetAutoFlush(TBool aState);
   1.124 +	IMPORT_C TInt HeapCount() const;
   1.125 +	IMPORT_C void SetTextCursor(RWindow &aWin, const TPoint &aPos, const TTextCursor &aCursor);
   1.126 +	IMPORT_C void CancelTextCursor();
   1.127 +	IMPORT_C void MarkStart();
   1.128 +	IMPORT_C void CheckNum(TUint aCount);
   1.129 +	IMPORT_C void MarkEnd(TUint aCount);
   1.130 +	IMPORT_C TInt ResourceCount();
   1.131 +	inline RBuffer *Buffer() const;
   1.132 +	};
   1.133 +
   1.134 +class RBitmap : public RDrawBase
   1.135 +	{
   1.136 +	IMPORT_C RBitmap();
   1.137 +	IMPORT_C RBitmap(RWs &aWs);
   1.138 +	IMPORT_C void Close();
   1.139 +	IMPORT_C void Destroy();
   1.140 +//	IMPORT_C void Construct(TSize &size,TInt colourBits);
   1.141 +	IMPORT_C TInt Construct(TSize &size);
   1.142 +	IMPORT_C TInt Load(const TDesC &aFileName,TReadWrite access=EReadOnly);
   1.143 +	IMPORT_C void Attributes(TAttributes *attrib);
   1.144 +	IMPORT_C TUint Handle() const;
   1.145 +	IMPORT_C TGdiAttributes Attributes()const;
   1.146 +	IMPORT_C TSize Size()const;
   1.147 +	};
   1.148 +
   1.149 +class RWindowBase : public RDrawBase
   1.150 +	{
   1.151 +	IMPORT_C RWindowBase();
   1.152 +	IMPORT_C RWindowBase(RWs &aWs);
   1.153 +	IMPORT_C void Close();
   1.154 +	IMPORT_C void Destroy();
   1.155 +	IMPORT_C TAttributes Attributes(TInt handle);
   1.156 +	IMPORT_C TUint32 Parent() const;
   1.157 +	IMPORT_C TUint32 PrevSibling() const;
   1.158 +	IMPORT_C TUint32 NextSibling() const;
   1.159 +	IMPORT_C TUint32 Child() const;
   1.160 +	IMPORT_C TPoint InquireOffset(const RWindowBase &aWindow) const;
   1.161 +	IMPORT_C TGdiAttributes Attributes() const;
   1.162 +	IMPORT_C TUint Handle() const;
   1.163 +	IMPORT_C TSize Size() const;
   1.164 +	IMPORT_C TPoint Position() const;
   1.165 +	};
   1.166 +
   1.167 +class RWindow : public RWindowBase
   1.168 +	{
   1.169 +	IMPORT_C RWindow();
   1.170 +	IMPORT_C RWindow(RWs &aWs);
   1.171 +	IMPORT_C TInt Construct(const RWindowBase &parent,TUint32 handle);
   1.172 +	IMPORT_C void Activate();
   1.173 +	IMPORT_C TAttributes Attributes();
   1.174 +	IMPORT_C void BeginRedraw();
   1.175 +	IMPORT_C void BeginRedraw(const TRect &rect);
   1.176 +	IMPORT_C void EndRedraw();
   1.177 +	IMPORT_C void Invalidate();
   1.178 +	IMPORT_C void Invalidate(const TRect &rect);
   1.179 +	IMPORT_C void Validate();
   1.180 +	IMPORT_C void Validate(const TRect &rect);
   1.181 +	IMPORT_C void SetPosition(const TPoint &point);
   1.182 +	IMPORT_C TInt SetSize(const TSize &size);
   1.183 +	IMPORT_C TInt SetExtent(const TPoint &point,const TSize &size);
   1.184 +	IMPORT_C TInt SetExtent(TInt tlx,TInt tly,TInt width, TInt height);
   1.185 +	IMPORT_C void SetAttributes(TUint flags,const TAttributes &windata);
   1.186 +	IMPORT_C void SetTextCursor(const TTextCursor cursor);
   1.187 +	IMPORT_C void CancelTextCursor();
   1.188 +	IMPORT_C void PointerFilter(TUint32 aFilter);
   1.189 +	IMPORT_C void SetPointerGrab(TBool aState);
   1.190 +	IMPORT_C void SetPointerCapture(TBool aState);
   1.191 +	IMPORT_C void SetBackgroundColour(TRgb aColour);
   1.192 +	IMPORT_C void SetVisible(TBool aState);
   1.193 +	IMPORT_C TInt SetCurrentRegion(const TRegion &aRegion);
   1.194 +	IMPORT_C void CancelCurrentRegion();
   1.195 +	};
   1.196 +
   1.197 +class RRootWindow : public RWindowBase
   1.198 +	{
   1.199 +	IMPORT_C RRootWindow();
   1.200 +	IMPORT_C RRootWindow(RWs &aWs);
   1.201 +	IMPORT_C TInt Construct(TUint32 clientHandle);
   1.202 +	};
   1.203 +
   1.204 +class RFont : public RFontBase
   1.205 +	{
   1.206 +	IMPORT_C RFont();
   1.207 +	IMPORT_C RFont(RWs &aWs);
   1.208 +	IMPORT_C void Close();
   1.209 +	IMPORT_C void Destroy();
   1.210 +	IMPORT_C TInt Construct(const TFont &aFont);
   1.211 +	IMPORT_C TUint Handle()const;
   1.212 +	IMPORT_C TInt Height()const;
   1.213 +	IMPORT_C TInt Ascent()const;
   1.214 +	IMPORT_C TInt Descent()const;
   1.215 +	IMPORT_C TInt AverageWidth()const;
   1.216 +	IMPORT_C TInt MaximumWidth()const;
   1.217 +	IMPORT_C TBool Bold()const;
   1.218 +	IMPORT_C TBool Italic()const;
   1.219 +	IMPORT_C TBool Underline()const;
   1.220 +	IMPORT_C TBool CrossOut()const;
   1.221 +	IMPORT_C void WidthTable(TUint aStartChar,TUint aFinishChar,TPtr8 &)const;
   1.222 +	IMPORT_C TInt TextWidth(const TDesC &aBuf)const;
   1.223 +	IMPORT_C TInt TextCount(const TDesC &aBuf,TInt aPixelCount)const;
   1.224 +	IMPORT_C TInt TextCount(const TDesC &aBuf,TInt aPixelCount,TInt &aWidth)const;
   1.225 +	};
   1.226 +
   1.227 +class RBrush : public RBrushBase
   1.228 +	{
   1.229 +public:
   1.230 +	IMPORT_C RBrush();
   1.231 +	IMPORT_C RBrush(RWs &aWs);
   1.232 +	IMPORT_C void Close();
   1.233 +	IMPORT_C void Destroy();
   1.234 +	IMPORT_C TInt Construct(const TDesC &aFileName,RFs &aFileSys);
   1.235 +	IMPORT_C TUint Handle()const;
   1.236 +	IMPORT_C TSize Size()const;
   1.237 +	IMPORT_C TRgb Pixel(const TPoint &aPoint)const;
   1.238 +	IMPORT_C void GetPixels(const TPoint &aPoint,TInt aPelLength,TInt aMode,TPtr8 &aBuffer)const;
   1.239 +	IMPORT_C void SetThreshold(TUint aThreshold);
   1.240 +private:
   1.241 +	TInt32 iHandle;
   1.242 +	RBuffer *iBuffer;
   1.243 +	};
   1.244 +
   1.245 +class RPalette : public RPaletteBase
   1.246 +	{
   1.247 +	IMPORT_C RPalette();
   1.248 +	IMPORT_C RPalette(RWs &aWs);
   1.249 +	IMPORT_C void Close();
   1.250 +	IMPORT_C void Destroy();
   1.251 +	IMPORT_C void Clear();
   1.252 +	IMPORT_C void SetEntry(TInt aPaletteIndex,TRgb aPaletteEntry);
   1.253 +	IMPORT_C void SetBlock(TInt aStartIndex,TInt aNumberOfEntries,TPtr8 &aBufferOfEntries);
   1.254 +	IMPORT_C TRgb GetEntry(TInt aPaletteIndex) const;
   1.255 +	IMPORT_C void GetBlock(TInt aStartIndex,TInt aNumberOfEntries,TPtr8 &aBuffer) const;
   1.256 +	IMPORT_C TInt Entries() const;
   1.257 +	IMPORT_C TUint Handle()const;
   1.258 +	};
   1.259 +
   1.260 +class RGc : public RGdiBase
   1.261 +	{
   1.262 +	IMPORT_C RGc();
   1.263 +	IMPORT_C RGc(RWs &aWs);
   1.264 +	IMPORT_C void Close();
   1.265 +	IMPORT_C void Destroy();
   1.266 +	IMPORT_C TInt Construct();
   1.267 +	IMPORT_C void Activate(const RDrawBase &aDrawable);
   1.268 +	IMPORT_C void Deactivate();
   1.269 +	IMPORT_C void FillRect(const TRect &aRect);
   1.270 +	IMPORT_C void PrintText(const TPoint &aPosition,const TDesC &aString);
   1.271 +	IMPORT_C void PrintText(const TDesC &aString);
   1.272 +	IMPORT_C void SetPenGrey4(TUint aGrey4);
   1.273 +	IMPORT_C void SetPenGrey16(TUint aGrey16);
   1.274 +	IMPORT_C void SetPenGrey256(TUint aGrey256);
   1.275 +	IMPORT_C void Clear();
   1.276 +	IMPORT_C void CopyRect(const TPoint &anOffset,const TRect &aRect);
   1.277 +	IMPORT_C void DrawEllipse(const TRect &aRect);
   1.278 +	IMPORT_C void DrawRect(const TRect &aRect);
   1.279 +	IMPORT_C void ClearRect(const TRect &aRect);
   1.280 +	IMPORT_C void FillEllipse(const TRect &aRect);
   1.281 +	IMPORT_C void PaintEllipse(const TRect &aRect);
   1.282 +	IMPORT_C void ClearEllipse(const TRect &aRect);
   1.283 +	IMPORT_C void PaintRect(const TRect &aRect);
   1.284 +	IMPORT_C void GdiBlt(const RDrawBase &aDevice);
   1.285 +	IMPORT_C void GdiBlt(const TPoint &aDestination,const RDrawBase &aDevice);
   1.286 +	IMPORT_C void GdiBlt(const TPoint &aDestination,const RDrawBase &aDevice,const TRect &aSource);
   1.287 +	IMPORT_C TInt DisplayMode()const;
   1.288 +	IMPORT_C TGdiDrawMode DrawMode()const;
   1.289 +//	IMPORT_C TUint DisplayModesAvailable()const;
   1.290 +	IMPORT_C TRgb Pixel(const TPoint &aPixel)const;
   1.291 +	IMPORT_C TSize Size()const;
   1.292 +	IMPORT_C RBrushBase *PatternBrush()const;
   1.293 +	IMPORT_C TRgb PenColour()const;
   1.294 +	IMPORT_C TRgb BrushColour()const;
   1.295 +	IMPORT_C TTextBackGround TextBackGround()const;
   1.296 +	IMPORT_C void Plot(const TPoint &aPoint);
   1.297 +	IMPORT_C void SetBrushGrey4(TUint aGrey4);
   1.298 +	IMPORT_C void SetBrushGrey16(TUint aGrey16);
   1.299 +	IMPORT_C void SetBrushGrey256(TUint aGrey256);
   1.300 +	IMPORT_C void SetPenColour(const TRgb &aColour);
   1.301 +	IMPORT_C void SetBrushColour(const TRgb &aColour);
   1.302 +	IMPORT_C TInt SetDisplayMode(TUint aDisplayMode);
   1.303 +	IMPORT_C void SetDrawMode(TGdiDrawMode aDrawingMode);
   1.304 +	IMPORT_C void SetLineWidth(TInt aWidth);
   1.305 +	IMPORT_C void SetPatternBrushOrigin(const TPoint &aOrigin);
   1.306 +	IMPORT_C void SetTextBackGround(TTextBackGround aBackGroundSetting);
   1.307 +	IMPORT_C RFont Font()const;
   1.308 +	IMPORT_C void UseFont(const RFontBase &aFont);
   1.309 +	IMPORT_C void UsePalette(const RPaletteBase &aPalette);
   1.310 +	IMPORT_C void UsePatternBrush(const RBrushBase &aBrush);
   1.311 +	IMPORT_C void DiscardFont();
   1.312 +	IMPORT_C void DiscardPalette();
   1.313 +	IMPORT_C void DiscardPatternBrush();
   1.314 +	IMPORT_C TUint Handle() const;
   1.315 +	IMPORT_C TInt LoadBitmap(const TDesC &aFileName, RFs &aFileSys);
   1.316 +	IMPORT_C TInt LoadBitmapDI(const TDesC &aFileName,RFs &aFileSys);
   1.317 +	IMPORT_C TGdiAttributes Attributes()const;
   1.318 +	IMPORT_C void RefreshPalette();
   1.319 +	}