|
1 // Copyright (c) 2010 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 "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 |
|
15 #ifndef OPENVGREMOTEFUNCTIONCALL_H_ |
|
16 #define OPENVGREMOTEFUNCTIONCALL_H_ |
|
17 |
|
18 #include "remotefunctioncall.h" |
|
19 |
|
20 #ifdef __SYMBIAN32__ |
|
21 #define __VG_OPENVG_H_ |
|
22 #include <VG/1.1/openvg.h> |
|
23 #include <VG/vgu.h> |
|
24 #else |
|
25 #define __OPENVGHEADERS_USE_VG_1_1 |
|
26 #include <VG/openvg.h> |
|
27 #include "VG/vgu.h" |
|
28 #endif |
|
29 |
|
30 //OpenVG remote function call |
|
31 // Represents a function call and contains information about |
|
32 // parameters but does not serialize the data |
|
33 NONSHARABLE_CLASS(OpenVgRFC): public RemoteFunctionCall |
|
34 { |
|
35 public: |
|
36 |
|
37 //Openvg pperation code |
|
38 enum TOperationCode |
|
39 { |
|
40 EvgGetError, |
|
41 EvgGetPaint, |
|
42 EvgCreatePaint, |
|
43 EvgInterpolatePath, |
|
44 EvgPathLength, |
|
45 EvgGetPathCapabilities, |
|
46 EvgCreatePath, |
|
47 EvgGetf, |
|
48 EvgGeti, |
|
49 EvgGetVectorSize, |
|
50 EvgGetParameterf, //10 |
|
51 EvgGetParameteri, |
|
52 EvgGetParameterVectorSize, |
|
53 EvgCreateMaskLayer, |
|
54 EvgGetColor, |
|
55 EvgCreateImage, |
|
56 EvgChildImage, |
|
57 EvgGetParent, // now handled in Client DLL |
|
58 EvgCreateFont, |
|
59 EvgHardwareQuery, |
|
60 EvgGetParameterfv, //20 |
|
61 EvgGetParameteriv, |
|
62 EvgGetString, |
|
63 EvgGetfv, |
|
64 EvgGetiv, |
|
65 EvgGetMatrix, |
|
66 EvgGetImageSubData, |
|
67 EvgReadPixels, |
|
68 EvgFlush, |
|
69 EvgFinish, |
|
70 EvgSetf, //30 |
|
71 EvgSeti, |
|
72 EvgSetfv, |
|
73 EvgSetiv, |
|
74 EvgSetParameterf, |
|
75 EvgSetParameteri, |
|
76 EvgSetParameterfv, |
|
77 EvgSetParameteriv, |
|
78 EvgLoadIdentity, |
|
79 EvgLoadMatrix, |
|
80 EvgMultMatrix, //40 |
|
81 EvgTranslate, |
|
82 EvgScale, |
|
83 EvgShear, |
|
84 EvgRotate, |
|
85 EvgMask, |
|
86 EvgRenderToMask, |
|
87 EvgDestroyMaskLayer, |
|
88 EvgFillMaskLayer, |
|
89 EvgCopyMask, |
|
90 EvgClear, //50 |
|
91 EvgClearPath, |
|
92 EvgDestroyPath, |
|
93 EvgRemovePathCapabilities, |
|
94 EvgAppendPath, |
|
95 EvgAppendPathData, //55 |
|
96 EvgModifyPathCoords, |
|
97 EvgTransformPath, |
|
98 EvgPointAlongPath, |
|
99 EvgPathBounds, |
|
100 EvgPathTransformedBounds, //60 |
|
101 EvgDrawPath, |
|
102 EvgDestroyPaint, |
|
103 EvgSetPaint, |
|
104 EvgSetColor, |
|
105 EvgPaintPattern, |
|
106 EvgDestroyImage, |
|
107 EvgClearImage, |
|
108 EvgImageSubData, |
|
109 EvgCopyImage, |
|
110 EvgDrawImage, |
|
111 EvgSetPixels, |
|
112 EvgWritePixels, |
|
113 EvgGetPixels, |
|
114 EvgCopyPixels, |
|
115 EvgDestroyFont, |
|
116 EvgSetGlyphToPath, |
|
117 EvgSetGlyphToImage, |
|
118 EvgClearGlyph, |
|
119 EvgDrawGlyph, |
|
120 EvgDrawGlyphs, //80 |
|
121 EvgColorMatrix, |
|
122 EvgConvolve, |
|
123 EvgSeparableConvolve, |
|
124 EvgGaussianBlur, |
|
125 EvgLookup, |
|
126 EvgLookupSingle, |
|
127 EvgePathCoordsSizeInBytes, //Not part of OpenVG 1.1 |
|
128 //Openvgu 1.1 |
|
129 EvguLine, |
|
130 EvguPolygon, |
|
131 EvguRect, |
|
132 EvguRoundRect, |
|
133 EvguEllipse, |
|
134 EvguArc, |
|
135 EvguComputeWarpQuadToSquare, |
|
136 EvguComputeWarpSquareToQuad, |
|
137 EvguComputeWarpQuadToQuad, |
|
138 EClientShutdown, |
|
139 // /* OpenVG extension #4, KHR_EGL_image */ |
|
140 EvgCreateEGLImageTargetKHR, |
|
141 }; |
|
142 |
|
143 //Parameter data type |
|
144 enum TParamType |
|
145 { |
|
146 EVGfloat, |
|
147 EVGbyte, |
|
148 EVGubyte, |
|
149 EVGshort, |
|
150 EVGint, |
|
151 EVGuint, |
|
152 EVGbitfield, |
|
153 EVGboolean, |
|
154 EVGHandle, |
|
155 EVGErrorCode, |
|
156 EVGParamType, //10 |
|
157 EVGRenderingQuality, |
|
158 EVGPixelLayout, |
|
159 EVGMatrixMode, |
|
160 EVGMaskOperation, |
|
161 EVGPathDatatype, |
|
162 EVGPathAbsRel, |
|
163 EVGPathSegment, |
|
164 EVGPathCommand, |
|
165 EVGPath, |
|
166 EVGPathCapabilities, //20 |
|
167 EVGPathParamType, |
|
168 EVGCapStyle, |
|
169 EVGJoinStyle, |
|
170 EVGFillRule, |
|
171 EVGPaintMode, |
|
172 EVGPaint, |
|
173 EVGPaintParamType, |
|
174 EVGPaintType, |
|
175 EVGColorRampSpreadMode, |
|
176 EVGTilingMode, //30 |
|
177 EVGImageFormat, |
|
178 EVGImage, |
|
179 EVGImageQuality, |
|
180 EVGImageParamType, |
|
181 EVGImageMode, |
|
182 EVGImageChannel, |
|
183 EVGBlendMode, |
|
184 EVGHardwareQueryType, |
|
185 EVGHardwareQueryResult, |
|
186 EVGStringID, //40 |
|
187 EVGvoid, |
|
188 EVGUArcType, |
|
189 EVGeglImageKHR, |
|
190 ETUint64 |
|
191 }; |
|
192 |
|
193 OpenVgRFC( RemoteFunctionCallData& aData ); |
|
194 |
|
195 //Appends a simple parameter to the parameter array |
|
196 // Does not serialize any data |
|
197 inline void AppendTUint64( const TUint64& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
198 inline void AppendParam( const VGfloat& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
199 inline void AppendParam( const VGbyte& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
200 inline void AppendParam( const VGubyte& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
201 inline void AppendParam( const VGshort& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
202 inline void AppendParam( const VGint& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
203 inline void AppendParam( const VGuint& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
204 inline void AppendParam( const VGboolean& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
205 inline void AppendParam( const VGErrorCode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
206 inline void AppendParam( const VGParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
207 inline void AppendParam( const VGRenderingQuality& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
208 inline void AppendParam( const VGPixelLayout& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
209 inline void AppendParam( const VGMatrixMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
210 inline void AppendParam( const VGMaskOperation& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
211 inline void AppendParam( const VGPathDatatype& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
212 inline void AppendParam( const VGPathAbsRel& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
213 inline void AppendParam( const VGPathSegment& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
214 inline void AppendParam( const VGPathCommand& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
215 inline void AppendParam( const VGPathCapabilities& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
216 inline void AppendParam( const VGPathParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
217 inline void AppendParam( const VGCapStyle& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
218 inline void AppendParam( const VGJoinStyle& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
219 inline void AppendParam( const VGFillRule& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
220 inline void AppendParam( const VGPaintMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
221 inline void AppendParam( const VGPaintParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
222 inline void AppendParam( const VGPaintType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
223 inline void AppendParam( const VGColorRampSpreadMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
224 inline void AppendParam( const VGTilingMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
225 inline void AppendParam( const VGImageFormat& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
226 inline void AppendParam( const VGImageQuality& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
227 inline void AppendParam( const VGImageParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
228 inline void AppendParam( const VGImageMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
229 inline void AppendParam( const VGImageChannel& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
230 inline void AppendParam( const VGBlendMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
231 inline void AppendParam( const VGHardwareQueryType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
232 inline void AppendParam( const VGHardwareQueryResult& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
233 inline void AppendParam( const VGStringID& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
234 inline void AppendParam( const VGUArcType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
235 #ifdef __SYMBIAN32__ |
|
236 inline void AppendParam( const VGeglImageKHR& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
237 #endif |
|
238 |
|
239 //Gets a simple parameter value from parameter array |
|
240 inline void GetTUint64( TUint64& aParam, TInt aIndex ); |
|
241 inline void GetParamValue( VGfloat& aParam, TInt aIndex ); |
|
242 inline void GetParamValue( VGbyte& aParam, TInt aIndex ); |
|
243 inline void GetParamValue( VGubyte& aParam, TInt aIndex ); |
|
244 inline void GetParamValue( VGshort& aParam, TInt aIndex ); |
|
245 inline void GetParamValue( VGint& aParam, TInt aIndex ); |
|
246 inline void GetParamValue( VGuint& aParam, TInt aIndex ); |
|
247 inline void GetParamValue( VGboolean& aParam, TInt aIndex ); |
|
248 inline void GetParamValue( VGErrorCode& aParam, TInt aIndex ); |
|
249 inline void GetParamValue( VGParamType& aParam, TInt aIndex ); |
|
250 inline void GetParamValue( VGRenderingQuality& aParam, TInt aIndex ); |
|
251 inline void GetParamValue( VGPixelLayout& aParam, TInt aIndex ); |
|
252 inline void GetParamValue( VGMatrixMode& aParam, TInt aIndex ); |
|
253 inline void GetParamValue( VGMaskOperation& aParam, TInt aIndex ); |
|
254 inline void GetParamValue( VGPathDatatype& aParam, TInt aIndex ); |
|
255 inline void GetParamValue( VGPathAbsRel& aParam, TInt aIndex ); |
|
256 inline void GetParamValue( VGPathSegment& aParam, TInt aIndex ); |
|
257 inline void GetParamValue( VGPathCommand& aParam, TInt aIndex ); |
|
258 inline void GetParamValue( VGPathCapabilities& aParam, TInt aIndex ); |
|
259 inline void GetParamValue( VGPathParamType& aParam, TInt aIndex ); |
|
260 inline void GetParamValue( VGCapStyle& aParam, TInt aIndex ); |
|
261 inline void GetParamValue( VGJoinStyle& aParam, TInt aIndex ); |
|
262 inline void GetParamValue( VGFillRule& aParam, TInt aIndex ); |
|
263 inline void GetParamValue( VGPaintMode& aParam, TInt aIndex ); |
|
264 inline void GetParamValue( VGPaintParamType& aParam, TInt aIndex ); |
|
265 inline void GetParamValue( VGPaintType& aParam, TInt aIndex ); |
|
266 inline void GetParamValue( VGColorRampSpreadMode& aParam, TInt aIndex ); |
|
267 inline void GetParamValue( VGTilingMode& aParam, TInt aIndex ); |
|
268 inline void GetParamValue( VGImageFormat& aParam, TInt aIndex ); |
|
269 inline void GetParamValue( VGImageQuality& aParam, TInt aIndex ); |
|
270 inline void GetParamValue( VGImageParamType& aParam, TInt aIndex ); |
|
271 inline void GetParamValue( VGImageMode& aParam, TInt aIndex ); |
|
272 inline void GetParamValue( VGImageChannel& aParam, TInt aIndex ); |
|
273 inline void GetParamValue( VGBlendMode& aParam, TInt aIndex ); |
|
274 inline void GetParamValue( VGHardwareQueryType& aParam, TInt aIndex ); |
|
275 inline void GetParamValue( VGHardwareQueryResult& aParam, TInt aIndex ); |
|
276 inline void GetParamValue( VGStringID& aParam, TInt aIndex ); |
|
277 inline void GetParamValue( VGUArcType& aParam, TInt aIndex ); |
|
278 |
|
279 //Gets a pointer to an array parameter from parameter array |
|
280 inline void GetVectorData( VGfloat* &aData, TInt& aSize, TInt aIndex ); |
|
281 inline void GetVectorData( VGint* &aData, TInt& aSize, TInt aIndex ); |
|
282 inline void GetVectorData( VGuint* &aData, TInt& aSize, TInt aIndex ); |
|
283 inline void GetVectorData( VGshort* &aData, TInt& aSize, TInt aIndex ); |
|
284 inline void GetVectorData( VGubyte* &aData, TInt& aSize, TInt aIndex ); |
|
285 inline void GetVectorData( void* &aData, TInt& aSize, TInt aIndex ); |
|
286 |
|
287 //Sets a pointer to the data of an array parameter |
|
288 inline void SetVectorData( const VGfloat* aData, TInt aLength, TInt aIndex ); |
|
289 inline void SetVectorData( const VGint* aData, TInt aLength, TInt aIndex ); |
|
290 inline void SetVectorData( const VGuint* aData, TInt aLength, TInt aIndex ); |
|
291 inline void SetVectorData( const VGshort* aData, TInt aLength, TInt aIndex ); |
|
292 inline void SetVectorData( const VGubyte* aData, TInt aLength, TInt aIndex ); |
|
293 inline void SetVectorData( const void* aData, TInt aLength, TInt aIndex ); |
|
294 |
|
295 //Appends an array parameter to the parameter array |
|
296 // Does not serialize any data |
|
297 inline void AppendVector( const VGfloat* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
298 inline void AppendVector( const VGint* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
299 inline void AppendVector( const VGuint* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
300 inline void AppendVector( const VGshort* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
301 inline void AppendVector( const VGubyte* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
302 inline void AppendVector( const void* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
303 |
|
304 //Size of type aType |
|
305 TInt GetTypeSize( TInt32 aParamType ) const; |
|
306 |
|
307 //Alignemnt of type aType |
|
308 TInt GetTypeAlignment( TInt32 aParamType ) const; |
|
309 |
|
310 //Alignemnt of type aType |
|
311 TUint32 GetAPIUid() const; |
|
312 }; |
|
313 |
|
314 #include "openvgrfc.inl" |
|
315 #endif |