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