|
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\include\d32video.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __D32VIDEO_H__ |
|
19 #define __D32VIDEO_H__ |
|
20 #include <e32std.h> |
|
21 #include <e32ver.h> |
|
22 #include <e32twin.h> |
|
23 // |
|
24 enum TColour {EWhite=0xf, EWhite1=0xe, EWhite2=0xd, EWhite3=0xc, EWhite4=0xb, |
|
25 ELightGrey=0xa, ELightGrey1=9, ELightGrey2=8, ELightGrey3=7, ELightGrey4=6, |
|
26 EDarkGrey=5, EDarkGrey1=4, EDarkGrey2=3, EDarkGrey3=2, EDarkGrey4=1, |
|
27 EBlack=0 |
|
28 }; |
|
29 // |
|
30 const TUint KCapsHues2=0x00000001; |
|
31 const TUint KCapsHues4=0x00000002; |
|
32 const TUint KCapsHues16=0x00000004; |
|
33 const TUint KCapsWidth640=0x01; |
|
34 const TUint KCapsHeight240=0x01; |
|
35 // |
|
36 class TVideoCapsV01 |
|
37 { |
|
38 public: |
|
39 TInt iNumHues; |
|
40 TInt iWidth; |
|
41 TInt iHeight; |
|
42 }; |
|
43 typedef TPckgBuf<TVideoCapsV01> TVideoCaps; |
|
44 class TCapsDevVideoV01 |
|
45 { |
|
46 public: |
|
47 TVersion version; |
|
48 }; |
|
49 // |
|
50 class TBlitInfo |
|
51 { |
|
52 public: |
|
53 inline TBlitInfo(const TText* aBuffer,const TColour aColour, const TInt aLength,const TInt aX, const TInt aY); |
|
54 inline TBlitInfo(); |
|
55 public: |
|
56 const TText* iBuffer; |
|
57 const TColour iColour; |
|
58 TInt iLength; |
|
59 const TInt iX; |
|
60 const TInt iY; |
|
61 private: |
|
62 TBlitInfo& operator =(TBlitInfo & aBlitInfo); |
|
63 }; |
|
64 |
|
65 class TPixelInfo |
|
66 { |
|
67 public: |
|
68 inline TPixelInfo(const TInt aX, const TInt aY, const TColour aColour); |
|
69 inline TPixelInfo(); |
|
70 public: |
|
71 const TColour iColour; |
|
72 const TInt iX; |
|
73 const TInt iY; |
|
74 private: |
|
75 TPixelInfo& operator =(TPixelInfo & aPixelInfo); |
|
76 }; |
|
77 |
|
78 struct TPixelLine |
|
79 { |
|
80 TDes8* iPixels; |
|
81 TInt iNoOfPixels; |
|
82 }; |
|
83 |
|
84 class RDeviceVideo : public RBusLogicalChannel |
|
85 { |
|
86 public: |
|
87 enum TVer {EMajorVersionNumber=1,EMinorVersionNumber=0,EBuildVersionNumber=KE32BuildVersionNumber}; |
|
88 enum TControl {EControlStart,EControlMode,EControlSetMode,EControlCaps,EControlSetPaletteEntry, |
|
89 EControlBlit,EControlSetPixel,EControlGetPixel,EControlSetWord,EControlGetWord, |
|
90 EControlSetLine,EControlGetLine,EControlScrollUp,EControlClear}; |
|
91 public: |
|
92 inline TInt Open(); |
|
93 inline void Start(); |
|
94 inline TVersion VersionRequired() const; |
|
95 inline void Caps(TDes8 &aCaps); |
|
96 inline void SetPaletteEntry(TInt aIndex,TUint aEntry); |
|
97 inline void Blit(TDes8 &aBlitInfo); |
|
98 inline void SetPixel(TDes8 &aPixelInfo); |
|
99 inline TInt SetMode(TVideoMode aMode); |
|
100 inline void Mode(TVideoMode *aMode); |
|
101 inline void ScrollUp(const TRect& aRect); |
|
102 inline void Clear(const TRect& aRect); |
|
103 inline TInt GetPixel(const TPoint& aPoint); |
|
104 inline void SetWord(const TPoint& aPoint,TInt& aWord); |
|
105 inline TInt GetWord(const TPoint &aPoint); |
|
106 inline void SetLine(const TPoint& aPoint,const TPixelLine& aPixelLine); |
|
107 inline void GetLine(const TPoint& aPoint,TPixelLine& aPixelLine); |
|
108 }; |
|
109 #include "d32video.inl" |
|
110 #endif |
|
111 |