56
|
1 |
/*
|
87
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
56
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: SVGTopt proxy interface
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MM2GSVGPROXY_H
|
|
19 |
#define MM2GSVGPROXY_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include "M2GUtils.h"
|
|
23 |
|
|
24 |
M2G_NS_START
|
|
25 |
|
|
26 |
// CONSTANTS
|
|
27 |
|
|
28 |
// MACROS
|
|
29 |
|
|
30 |
// DATA TYPES
|
|
31 |
|
|
32 |
// FUNCTION PROTOTYPES
|
|
33 |
|
|
34 |
// FORWARD DECLARATIONS
|
|
35 |
|
|
36 |
// CLASS DECLARATION
|
|
37 |
/**
|
|
38 |
* Interface class
|
|
39 |
*/
|
|
40 |
class MM2GSVGProxy
|
|
41 |
{
|
|
42 |
public: // METHODS
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Dtor
|
|
46 |
*/
|
|
47 |
virtual ~MM2GSVGProxy() {};
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Add close to the given path.
|
|
51 |
* @since Series S60 3.1
|
|
52 |
* @param aPathHandle Path handle.
|
|
53 |
* @throws exception if not ok
|
|
54 |
*/
|
|
55 |
virtual void AddCloseL(const TM2GSvgPathHandle& aPathHandle) = 0;
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Add curve to the given path.
|
|
59 |
* @since Series S60 3.1
|
|
60 |
* @param aPathHandle Path handle.
|
|
61 |
* @param aPathCurveData Curve data
|
|
62 |
* @throws exception if not ok
|
|
63 |
*/
|
|
64 |
virtual void AddCurveToL(
|
|
65 |
const TM2GSvgPathHandle& aPathHandle,
|
|
66 |
const TM2GPathCurveData& aPathCurveData) = 0;
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Add line to the given path.
|
|
70 |
* @since Series S60 3.1
|
|
71 |
* @param aPathHandle Path handle.
|
|
72 |
* @param aX -
|
|
73 |
* @param aY -
|
|
74 |
* @throws exception if not ok
|
|
75 |
*/
|
|
76 |
virtual void AddLineToL(
|
|
77 |
const TM2GSvgPathHandle& aPathHandle,
|
|
78 |
const TReal32& aX, const TReal32& aY) = 0;
|
|
79 |
/**
|
|
80 |
* Add move to the given path.
|
|
81 |
* @since Series S60 3.1
|
|
82 |
* @param aPathHandle Path handle.
|
|
83 |
* @param aX -
|
|
84 |
* @param aY -
|
|
85 |
* @throws exception if not ok
|
|
86 |
*/
|
|
87 |
virtual void AddMoveToL(
|
|
88 |
const TM2GSvgPathHandle& aPathHandle,
|
|
89 |
const TReal32& aX, const TReal32& aY) = 0;
|
|
90 |
|
|
91 |
/**
|
|
92 |
* Add quad to the given path.
|
|
93 |
* @since Series S60 3.1
|
|
94 |
* @param aPathHandle Path handle.
|
|
95 |
* @param aX1 -
|
|
96 |
* @param aY1 -
|
|
97 |
* @param aX2 -
|
|
98 |
* @param aY2 -
|
|
99 |
* @throws exception if not ok
|
|
100 |
*/
|
|
101 |
virtual void AddQuadToL(
|
|
102 |
const TM2GSvgPathHandle& aPathHandle,
|
|
103 |
const TReal32& aX1, const TReal32& aY1,
|
|
104 |
const TReal32& aX2, const TReal32& aY2) = 0;
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Append child
|
|
108 |
* @since Series S60 3.1
|
|
109 |
* @param aElementHandle
|
|
110 |
* @param aChildElementHandle
|
|
111 |
* @throws exception if not ok
|
|
112 |
*/
|
|
113 |
virtual void AppendChildL(
|
|
114 |
const TM2GSvgElementHandle& aElementHandle,
|
|
115 |
const TM2GSvgElementHandle& aChildElementHandle) = 0;
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Set the begin animation time for the given element.
|
|
119 |
* @since Series S60 3.1
|
|
120 |
* @param aDocumentHandle
|
|
121 |
* @param aElementHandle
|
|
122 |
* @param aOffset
|
|
123 |
* @throws exception if not ok
|
|
124 |
*/
|
|
125 |
virtual void BeginElementAtL(
|
|
126 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
127 |
const TM2GSvgElementHandle& aElementHandle,
|
|
128 |
const TReal32& aOffset) = 0;
|
|
129 |
|
|
130 |
/**
|
|
131 |
* Check if element is removable
|
|
132 |
* @since Series S60 3.1
|
|
133 |
* @param aSurfaceHandle
|
|
134 |
* @param aRemoveable Result
|
|
135 |
* @throws exception if not ok
|
|
136 |
*/
|
|
137 |
virtual void CheckRemoveableL(
|
|
138 |
const TM2GSvgElementHandle& aElementHandle,
|
|
139 |
TInt& aRemoveable) = 0;
|
|
140 |
|
|
141 |
|
|
142 |
/**
|
|
143 |
* Clear svg surface
|
|
144 |
* @since Series S60 3.1
|
|
145 |
* @param aSurfaceHandle Surface handle
|
|
146 |
* @throws exception if not ok
|
|
147 |
*/
|
|
148 |
virtual void ClearSvgSurfaceL(const TM2GSvgDocumentHandle& aSurfaceHandle) = 0;
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Create document
|
|
152 |
* @since Series S60 3.1
|
|
153 |
* @param aData Document content
|
|
154 |
* @param aDocumentHandle Document handle to be returned
|
|
155 |
* @throws exception if not ok
|
|
156 |
*/
|
|
157 |
virtual void CreateDocumentL(
|
|
158 |
const TPtrC16& aData,
|
|
159 |
TM2GSvgDocumentHandle& aDocumentHandle) = 0;
|
|
160 |
|
|
161 |
/**
|
|
162 |
* Create svg engine
|
|
163 |
* @since Series S60 3.1
|
|
164 |
* @param aEngineHandle Svg engine handle
|
|
165 |
* @throws exception if not ok
|
|
166 |
*/
|
|
167 |
virtual void CreateSvgEngineL(TM2GSvgEngineHandle& aEngineHandle) = 0;
|
|
168 |
|
|
169 |
/**
|
|
170 |
* Create path
|
|
171 |
* @since Series S60 3.1
|
|
172 |
* @param aPathHandle Path handle to be returned
|
|
173 |
* @throws exception if not ok
|
|
174 |
*/
|
|
175 |
virtual void CreatePathL(TM2GSvgPathHandle& aPathHandle) = 0;
|
|
176 |
|
|
177 |
/**
|
|
178 |
* Create svg surface
|
|
179 |
* @since Series S60 3.1
|
|
180 |
* @param aWidth Surface width
|
|
181 |
* @param aHeight Surface height
|
|
182 |
* @return Svg surface
|
|
183 |
* @throws exception if not ok
|
|
184 |
*/
|
|
185 |
virtual TM2GBitmapHandle CreateSvgSurfaceL(TInt aWidth, TInt aHeight) = 0;
|
|
186 |
|
|
187 |
/**
|
|
188 |
* Create new element
|
|
189 |
* @since Series S60 3.1
|
|
190 |
* @param aType Element type id
|
|
191 |
* @param aParentHandle Parent of the new element.
|
|
192 |
* Note: Can be '0' if element is not added to DOM.
|
|
193 |
* @param aDocumentHandle Document handle.
|
|
194 |
* @param aRootHandle Root element handle.
|
|
195 |
* @param aEngineHandle Element handle to be returned
|
|
196 |
* @throws exception if not ok
|
|
197 |
*/
|
|
198 |
virtual void CreateElementNsL(
|
|
199 |
const TM2GSvgAttrType& aType,
|
|
200 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
201 |
TM2GSvgElementHandle& aEngineHandle) = 0;
|
|
202 |
|
|
203 |
/**
|
|
204 |
* Delete document
|
|
205 |
* @since Series S60 3.1
|
|
206 |
* @param aDocumentHandle Document handle
|
|
207 |
* @throws exception if not ok
|
|
208 |
*/
|
|
209 |
virtual void DeleteDocumentL(const TM2GSvgDocumentHandle& aDocumentHandle) = 0;
|
|
210 |
|
|
211 |
/**
|
|
212 |
* Delete svg engine
|
|
213 |
* @since Series S60 3.1
|
|
214 |
* @param aEngineHandle Engine handle
|
|
215 |
* @throws exception if not ok
|
|
216 |
*/
|
|
217 |
virtual void DeleteSvgEngineL(const TM2GSvgEngineHandle& aEngineHandle) = 0;
|
|
218 |
|
|
219 |
/**
|
|
220 |
* Deletes svg surface
|
|
221 |
* @since Series S60 3.1
|
|
222 |
* @param aSurfaceHandle Surface handle
|
|
223 |
* @throws exception if not ok
|
|
224 |
*/
|
|
225 |
virtual void DeleteSvgSurfaceL(const TM2GSvgDocumentHandle& aSurfaceHandle) = 0;
|
|
226 |
|
|
227 |
/**
|
|
228 |
* Delete path
|
|
229 |
* @since Series S60 3.1
|
|
230 |
* @param aPathHandle Path handle
|
|
231 |
* @throws exception if not ok
|
|
232 |
*/
|
|
233 |
virtual void DestroyPathL(const TM2GSvgPathHandle& aPathHandle) = 0;
|
|
234 |
|
|
235 |
/**
|
|
236 |
* Dispatches a mouse event
|
|
237 |
* @since Series S60 3.1
|
|
238 |
* @param aDocumentHandle Document handle.
|
|
239 |
* @param aX X coordinate.
|
|
240 |
* @param aY Y coordinate
|
|
241 |
* @param aElementHandle Target element handle
|
|
242 |
* @throws exception if not ok
|
|
243 |
*/
|
|
244 |
virtual void DispatchMouseEventL(
|
|
245 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
246 |
TInt aX, TInt aY, TM2GSvgElementHandle& aElementHandle) = 0;
|
|
247 |
|
|
248 |
/**
|
|
249 |
* Set the end animation time for the given element.
|
|
250 |
* @since Series S60 3.1
|
|
251 |
* @param aDocumentHandle
|
|
252 |
* @param aElementHandle
|
|
253 |
* @param aOffset
|
|
254 |
* @throws exception if not ok
|
|
255 |
*/
|
|
256 |
virtual void EndElementAtL(
|
|
257 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
258 |
const TM2GSvgElementHandle& aElementHandle,
|
|
259 |
const TReal32& aOffset) = 0;
|
|
260 |
|
|
261 |
|
|
262 |
/**
|
|
263 |
* Set focus on.
|
|
264 |
* @since Series S60 3.1
|
|
265 |
* @param aDocumentHandle
|
|
266 |
* @param aElementHandle
|
|
267 |
* @throws exception if not ok
|
|
268 |
*/
|
|
269 |
virtual void FocusOnL(
|
|
270 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
271 |
const TM2GSvgElementHandle& aElementHandle) = 0;
|
|
272 |
|
|
273 |
/**
|
|
274 |
* Set focus out.
|
|
275 |
* @since Series S60 3.1
|
|
276 |
* @param aDocumentHandle
|
|
277 |
* @param aElementHandle
|
|
278 |
* @throws exception if not ok
|
|
279 |
*/
|
|
280 |
virtual void FocusOutL(
|
|
281 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
282 |
const TM2GSvgElementHandle& aElementHandle) = 0;
|
|
283 |
|
|
284 |
/**
|
|
285 |
* Get a bounding box
|
|
286 |
* @since Series S60 3.1
|
|
287 |
* @param aElementHandle Element handle.
|
|
288 |
* @param aAttributeType Attribute type
|
|
289 |
* @param aRectData Rect components are saved to this parameter
|
|
290 |
* @param aResult Result
|
|
291 |
* @throws exception if not ok
|
|
292 |
*/
|
|
293 |
virtual void GetBBoxL(
|
|
294 |
const TM2GSvgElementHandle& aElementHandle,
|
|
295 |
const TM2GSvgAttrType& aAttributeType,
|
|
296 |
TM2GRectData& aRectData, TInt& aResult) = 0;
|
|
297 |
|
|
298 |
/**
|
|
299 |
* Get colors
|
|
300 |
* @since Series S60 3.1
|
|
301 |
* @param aElementHandle Element handle
|
|
302 |
* @param aAttributeType Attribute type
|
|
303 |
* @param aColor Result
|
|
304 |
* @param aResult Extra result info
|
|
305 |
* @throws exception if not ok
|
|
306 |
*/
|
|
307 |
virtual void GetColorTraitL(
|
|
308 |
const TM2GSvgElementHandle& aElementHandle,
|
|
309 |
const TM2GSvgAttrType& aAttributeType,
|
|
310 |
TM2GColorData& aColor,
|
|
311 |
TInt& aResult) = 0;
|
|
312 |
|
|
313 |
/**
|
|
314 |
* Get element by id
|
|
315 |
* @since Series S60 3.1
|
|
316 |
* @param aDocumentHandle Document handle.
|
|
317 |
* @param aId Element id
|
|
318 |
* @param aElementHandle Element handle to be returned
|
|
319 |
* @throws exception if not ok
|
|
320 |
*/
|
|
321 |
virtual void GetElementByIdL(
|
|
322 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
323 |
const TPtrC16& aId,
|
|
324 |
TM2GSvgElementHandle& aElementHandle) = 0;
|
|
325 |
|
|
326 |
/**
|
|
327 |
* Get element by id
|
|
328 |
* @since Series S60 3.1
|
|
329 |
* @param aElementHandle Element handle.
|
|
330 |
* @param aId Result element type id.
|
|
331 |
* @throws exception if not ok
|
|
332 |
*/
|
|
333 |
virtual void GetElementTypeIdL(const TM2GSvgElementHandle& aElementHandle, TInt16& aId) = 0;
|
|
334 |
|
|
335 |
/**
|
|
336 |
* Get an enumeration value of the specified attribute.
|
|
337 |
* @since Series S60 3.1
|
|
338 |
* @param aElementHandle Element handle.
|
|
339 |
* @param aAttributeType Attribute type
|
|
340 |
* @param aEnumTraiT Enum attribute.
|
|
341 |
* @throws exception if not ok
|
|
342 |
*/
|
|
343 |
virtual void GetEnumTraitL(
|
|
344 |
const TM2GSvgElementHandle& aElementHandle,
|
|
345 |
const TM2GSvgAttrType& aAttributeType,
|
|
346 |
TInt16& aEnumTrait) = 0;
|
|
347 |
|
|
348 |
/**
|
|
349 |
* Get external list item
|
|
350 |
* @since Series S60 3.1
|
|
351 |
* @param aDocumentHandle Document handle.
|
|
352 |
* @param aIndex Index.
|
|
353 |
* @param aItem Returns external item according to a given index
|
|
354 |
* @return KErrNone if no error
|
|
355 |
* @throws Exception if not ok
|
|
356 |
*/
|
|
357 |
virtual TInt GetExternalListItemL(
|
|
358 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
359 |
TInt aIndex,
|
|
360 |
TPtrC16& aItem) = 0;
|
|
361 |
|
|
362 |
/**
|
|
363 |
* Get external list size
|
|
364 |
* @since Series S60 3.1
|
|
365 |
* @param aDocumentHandle Document handle.
|
|
366 |
* @param aListSz Size.
|
|
367 |
* @throws exception if not ok
|
|
368 |
*/
|
|
369 |
virtual void GetExternalListSizeL(
|
|
370 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
371 |
TInt& aListSz) = 0;
|
|
372 |
|
|
373 |
/**
|
|
374 |
* Get a first chlid element
|
|
375 |
* @since Series S60 3.1
|
|
376 |
* @param aElementHandle Element handle.
|
|
377 |
* @param aChildHandle Returns child element handle.
|
|
378 |
* @throws exception if not ok
|
|
379 |
*/
|
|
380 |
virtual void GetFirstElementChildL(
|
|
381 |
const TM2GSvgElementHandle& aElementHandle,
|
|
382 |
TM2GSvgElementHandle& aChildHandle) = 0;
|
|
383 |
|
|
384 |
/**
|
|
385 |
* Get a float trait
|
|
386 |
* @since Series S60 3.1
|
|
387 |
* @param aElementHandle Element handle.
|
|
388 |
* @param aAttributeType Attribute type
|
|
389 |
* @param Float trait
|
|
390 |
* @throws exception if not ok
|
|
391 |
*/
|
|
392 |
virtual void GetFloatTraitL(
|
|
393 |
const TM2GSvgElementHandle& aElementHandle,
|
|
394 |
const TM2GSvgAttrType& aAttributeType,
|
|
395 |
TReal32& aFloatTrait) = 0;
|
|
396 |
|
|
397 |
/**
|
|
398 |
* Get a matrix trait
|
|
399 |
* @since Series S60 3.1
|
|
400 |
* @param aElementHandle Element handle.
|
|
401 |
* @param aAttributeType Attribute type
|
|
402 |
* @param aMatrix Matrix trait
|
|
403 |
* @param aResult
|
|
404 |
* @throws exception if not ok
|
|
405 |
*/
|
|
406 |
virtual void GetMatrixTraitL(
|
|
407 |
const TM2GSvgElementHandle& aElementHandle,
|
|
408 |
const TM2GSvgAttrType& aAttributeType,
|
|
409 |
TM2GMatrixData& aMatrix, TInt& aResult) = 0;
|
|
410 |
|
|
411 |
/**
|
|
412 |
* Get a media time
|
|
413 |
* @since Series S60 3.1
|
|
414 |
* @param aDocumentHandle Document handle.
|
|
415 |
* @param aSeconds Media time to be returned
|
|
416 |
* @throws exception if not ok
|
|
417 |
*/
|
|
418 |
virtual void GetMediaTimeL(
|
|
419 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
420 |
TReal32& aSeconds) = 0;
|
|
421 |
|
|
422 |
/**
|
|
423 |
* Get a next element sibling
|
|
424 |
* @since Series S60 3.1
|
|
425 |
* @param aElementHandle Element handle.
|
|
426 |
* @param aSiblingElementHandle Sibling handle
|
|
427 |
* @throws exception if not ok
|
|
428 |
*/
|
|
429 |
virtual void GetNextElementSiblingL(
|
|
430 |
const TM2GSvgElementHandle& aElementHandle,
|
|
431 |
TM2GSvgElementHandle& aSiblingElementHandle) = 0;
|
|
432 |
|
|
433 |
/**
|
|
434 |
* Get the segment count for the given path.
|
|
435 |
* @since Series S60 3.1
|
|
436 |
* @param aPathHandle Path handle.
|
|
437 |
* @param aNumberOfSegments Segment count
|
|
438 |
* @throws exception if not ok
|
|
439 |
*/
|
|
440 |
virtual void GetNumberOfSegmentsL(
|
|
441 |
const TM2GSvgPathHandle& aPathHandle,
|
|
442 |
TInt& aNumberOfSegments) = 0;
|
|
443 |
|
|
444 |
/**
|
|
445 |
* Get a parent
|
|
446 |
* @since Series S60 3.1
|
|
447 |
* @param aElementHandle Element handle.
|
|
448 |
* @param aParentElementHandle Parent Element handle
|
|
449 |
* @throws exception if not ok
|
|
450 |
*/
|
|
451 |
virtual void GetParentL(
|
|
452 |
const TM2GSvgElementHandle& aElementHandle,
|
|
453 |
TM2GSvgElementHandle& aParentElementHandle) = 0;
|
|
454 |
|
|
455 |
/**
|
|
456 |
* Get a path trait
|
|
457 |
* @since Series S60 3.1
|
|
458 |
* @param aElementHandle Element handle.
|
|
459 |
* @param aAttributeType Attribute type
|
|
460 |
* @param aPathTrait Path trait
|
|
461 |
* @throws exception if not ok
|
|
462 |
*/
|
|
463 |
virtual void GetPathTraitL(
|
|
464 |
const TM2GSvgElementHandle& aElementHandle,
|
|
465 |
const TM2GSvgAttrType& aAttributeType,
|
|
466 |
TInt& aPathTrait) = 0;
|
|
467 |
|
|
468 |
/**
|
|
469 |
* Get a rect trait
|
|
470 |
* @since Series S60 3.1
|
|
471 |
* @param aElementHandle Element handle.
|
|
472 |
* @param aAttributeType Attribute type
|
|
473 |
* @param aRectData Rect components are saved to this parameter
|
|
474 |
* @param aResult Result
|
|
475 |
* @throws exception if not ok
|
|
476 |
*/
|
|
477 |
virtual void GetRectTraitL(
|
|
478 |
const TM2GSvgElementHandle& aElementHandle,
|
|
479 |
const TM2GSvgAttrType& aAttributeType,
|
|
480 |
TM2GRectData& aRectData, TInt& aResult) = 0;
|
|
481 |
|
|
482 |
/**
|
|
483 |
* Get a root element
|
|
484 |
* @since Series S60 3.1
|
|
485 |
* @param aDocumentHandle Document handle.
|
|
486 |
* @param aRootElementHandle Root element handle
|
|
487 |
* @throws exception if not ok
|
|
488 |
*/
|
|
489 |
virtual void GetRootElementL(
|
|
490 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
491 |
TM2GSvgElementHandle& aRootElementHandle) = 0;
|
|
492 |
|
|
493 |
/**
|
|
494 |
* Get screen b box
|
|
495 |
* @since Series S60 3.1
|
|
496 |
* @param aElementHandle Element handle
|
|
497 |
* @param aScreenBBoxData Screen box data out
|
|
498 |
* @throws exception if not ok
|
|
499 |
*/
|
|
500 |
virtual void GetScreenBBoxL(
|
|
501 |
const TM2GSvgElementHandle& aElementHandle,
|
|
502 |
TM2GScreenBBoxData& aScreenBBoxData) = 0;
|
|
503 |
|
|
504 |
/**
|
|
505 |
* Get the segment parameter for the given path.
|
|
506 |
* @since Series S60 3.1
|
|
507 |
* @param aPathHandle Path handle.
|
|
508 |
* @param aSegmentIndex -
|
|
509 |
* @param aParamIndex -
|
|
510 |
* @param aSegmentParam Segment parameter to be returned.
|
|
511 |
* @throws exception if not ok
|
|
512 |
*/
|
|
513 |
virtual void GetSegmentParameterL(
|
|
514 |
const TM2GSvgPathHandle& aPathHandle,
|
|
515 |
TInt aSegmentIndex, TInt aParamIndex,
|
|
516 |
TReal32& aSegmentParam) = 0;
|
|
517 |
|
|
518 |
/**
|
|
519 |
* Get the segment type for the given path.
|
|
520 |
* @since Series S60 3.1
|
|
521 |
* @param aPathHandle Path handle.
|
|
522 |
* @param aSegmentIndex -
|
|
523 |
* @param aSegmentType Segment type
|
|
524 |
* @throws exception if not ok
|
|
525 |
*/
|
|
526 |
virtual void GetSegmentTypeL(
|
|
527 |
const TM2GSvgPathHandle& aPathHandle,
|
|
528 |
TInt aSegmentIndex,
|
|
529 |
TInt16& aSegmentType) = 0;
|
|
530 |
|
|
531 |
/**
|
|
532 |
* Get a string trait
|
|
533 |
* @since Series S60 3.1
|
|
534 |
* @param aElementHandle Element handle.
|
|
535 |
* @param aAttributeType Attribute type.
|
|
536 |
* @param aStr Returns a string attribute
|
|
537 |
|
|
538 |
* @throws exception if not ok
|
|
539 |
*/
|
|
540 |
virtual TInt GetStringTraitL(
|
|
541 |
const TM2GSvgElementHandle& aElementHandle,
|
|
542 |
const TM2GSvgAttrType& aAttributeType,
|
|
543 |
TPtrC16& aStr) = 0;
|
|
544 |
/**
|
|
545 |
* Get a svg surface height
|
|
546 |
* @since Series S60 3.1
|
|
547 |
* @param aSurfaceHandle Surface handle.
|
|
548 |
* @return Svg surface height
|
|
549 |
* @throws exception if not ok
|
|
550 |
*/
|
|
551 |
virtual TInt GetSvgSurfaceHeightL(const TM2GBitmapHandle& aSurfaceHandle) = 0;
|
|
552 |
|
|
553 |
/**
|
|
554 |
* Get a svg surface width
|
|
555 |
* @since Series S60 3.1
|
|
556 |
* @param aSurfaceHandle Surface handle.
|
|
557 |
* @return Svg surface width
|
|
558 |
* @throws exception if not ok
|
|
559 |
*/
|
|
560 |
virtual TInt GetSvgSurfaceWidthL(const TM2GBitmapHandle& aSurfaceHandle) = 0;
|
|
561 |
|
|
562 |
/**
|
|
563 |
* Finds handle to the actual cloned element
|
|
564 |
* @since Series S60 3.1
|
|
565 |
* @param aElementHandle Element handle.
|
|
566 |
* @param aHandle Element handle to be returned
|
|
567 |
* @throws exception if not ok
|
|
568 |
*/
|
|
569 |
virtual void GetUsedFromElementL(
|
|
570 |
const TM2GSvgElementHandle& aElementHandle,
|
|
571 |
TM2GSvgElementHandle& aHandle) = 0;
|
|
572 |
|
|
573 |
/**
|
|
574 |
* Viewport height.
|
|
575 |
* @since Series S60 3.1
|
|
576 |
* @param aDocumentHandle Document handle.
|
|
577 |
* @param aHeight Wieport height to be returned.
|
|
578 |
* @throws exception if not ok
|
|
579 |
*/
|
|
580 |
virtual void GetViewportHeightL(
|
|
581 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
582 |
TInt& aHeight) = 0;
|
|
583 |
|
|
584 |
/**
|
|
585 |
* Viewport width.
|
|
586 |
* @since Series S60 3.1
|
|
587 |
* @param aDocumentHandle Document handle.
|
|
588 |
* @param aWidth Viewport width.
|
|
589 |
* @throws exception if not ok
|
|
590 |
*/
|
|
591 |
virtual void GetViewportWidthL(
|
|
592 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
593 |
TInt& aWidth) = 0;
|
|
594 |
|
|
595 |
/**
|
|
596 |
* Init native engine & document
|
|
597 |
* @since Series S60 3.1
|
|
598 |
* @param aDocumentHandle Document handle
|
|
599 |
* @throws exception if not ok
|
|
600 |
*/
|
|
601 |
virtual void InitViewportL(
|
|
602 |
const TM2GSvgDocumentHandle& aDocumentHandle) = 0;
|
|
603 |
|
|
604 |
/**
|
|
605 |
* Add given child element to the given element before
|
|
606 |
* the given reference element.
|
|
607 |
* @since Series S60 3.1
|
|
608 |
* @param aElementHandle Element handle.
|
|
609 |
* @param aNewChildElementHandle Child element handle.
|
|
610 |
* @param aReferenceElementHandle Child element handle.
|
|
611 |
* @throws exception if not ok
|
|
612 |
*/
|
|
613 |
virtual void InsertBeforeL(
|
|
614 |
const TM2GSvgElementHandle& aElementHandle,
|
|
615 |
const TM2GSvgElementHandle& aNewChildElementHandle,
|
|
616 |
const TM2GSvgElementHandle& aReferenceElementHandle) = 0;
|
|
617 |
|
|
618 |
/**
|
|
619 |
* Check if element is active.
|
|
620 |
* @since Series S60 3.1
|
|
621 |
* @param aElementHandle Element handle.
|
|
622 |
* @param aActive Return "1" if active
|
|
623 |
* @throws exception if not ok
|
|
624 |
*/
|
|
625 |
virtual void IsActiveL(
|
|
626 |
const TM2GSvgElementHandle& aElementHandle,
|
|
627 |
TInt& aActive) = 0;
|
|
628 |
|
|
629 |
/**
|
|
630 |
* Checks if an element in DOM.
|
|
631 |
* @since Series S60 3.1
|
|
632 |
* @param aDocumentHandle Document handle.
|
|
633 |
* @param aElementHandle Element handle.
|
|
634 |
* @param aIsElementInDom Result.
|
|
635 |
* @throws exception if not ok
|
|
636 |
*/
|
|
637 |
virtual void IsElementInDomL(
|
|
638 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
639 |
const TM2GSvgElementHandle& aElementHandle,
|
|
640 |
TInt& aIsElementInDom) = 0;
|
|
641 |
|
|
642 |
/**
|
|
643 |
* Checks whether this element is child of a use element
|
|
644 |
* @since Series S60 3.1
|
|
645 |
* @param aElementHandle Element handle.
|
|
646 |
* @param aResult Return "1" if used otherwise returns "0"
|
|
647 |
* @throws exception if not ok
|
|
648 |
*/
|
|
649 |
virtual void IsUsedL(
|
|
650 |
const TM2GSvgElementHandle& aElementHandle,
|
|
651 |
TInt& aResult) = 0;
|
|
652 |
|
|
653 |
/**
|
|
654 |
* Remove child
|
|
655 |
* @since Series S60 3.1
|
|
656 |
* @param aDocumentHandle Document handle.
|
|
657 |
* @param aURI Uri
|
|
658 |
* @param aResourceData Resource
|
|
659 |
* @param aHandle Removed element handle
|
|
660 |
* @throws exception if not ok
|
|
661 |
*/
|
|
662 |
virtual void RemoveChildL(
|
|
663 |
const TM2GSvgElementHandle& aElementHandle,
|
|
664 |
const TM2GSvgElementHandle& aChildElementHandle,
|
|
665 |
TM2GSvgElementHandle& aHandle) = 0;
|
|
666 |
/**
|
|
667 |
* Render document
|
|
668 |
* @since Series S60 3.1
|
|
669 |
* @param aEngineHandle Engine handle.
|
|
670 |
* @param aDocumentHandle Document handle.
|
|
671 |
* @param aSurfaceHandle Surface.
|
|
672 |
* @param aSurfaceMaskHandle Mask.
|
|
673 |
* @throws exception if not ok
|
|
674 |
*/
|
|
675 |
virtual void RenderDocumentL(
|
|
676 |
const TM2GSvgEngineHandle& aEngineHandle,
|
|
677 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
678 |
const TM2GBitmapHandle& aSurfaceHandle,
|
|
679 |
TM2GBitmapHandle aSurfaceMaskHandle,
|
|
680 |
TReal32 aCurrentTime) = 0;
|
|
681 |
|
|
682 |
virtual void RenderDocumentL(
|
|
683 |
const TM2GSvgEngineHandle& aEngineHandle,
|
|
684 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
685 |
const TM2GSvgBitmapHandle& aSurfaceHandle,
|
|
686 |
TM2GSvgBitmapHandle aSurfaceMaskHandle,
|
|
687 |
TReal32 aCurrentTime)=0;
|
87
|
688 |
|
56
|
689 |
/**
|
|
690 |
* Sets render quality
|
|
691 |
* @since Series S60 3.1
|
|
692 |
* @param aEngineHandle Engine handle.
|
|
693 |
* @param aQuality Quality.
|
|
694 |
* @throws exception if not ok
|
|
695 |
*/
|
|
696 |
virtual void RenderQualityL(
|
|
697 |
const TM2GSvgEngineHandle& aEngineHandle,
|
|
698 |
TInt aQuality) = 0;
|
|
699 |
|
|
700 |
/**
|
|
701 |
* Request completed
|
|
702 |
* @since Series S60 3.1
|
|
703 |
* @param aDocumentHandle Document handle.
|
|
704 |
* @param aURI -
|
|
705 |
* @param aResourceData -
|
|
706 |
* @param aCompeleted Result
|
|
707 |
* @throws exception if not ok
|
|
708 |
*/
|
|
709 |
virtual void RequestCompletedL(
|
|
710 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
711 |
const TPtrC16& aURI,
|
|
712 |
const TPtrC8& aResourceData,
|
|
713 |
TInt& aCompleted) = 0;
|
|
714 |
|
|
715 |
/**
|
|
716 |
* Set color trait
|
|
717 |
* @since Series S60 3.1
|
|
718 |
* @param aElementHandle Element handle.
|
|
719 |
* @param aAttributeType Attribute type
|
|
720 |
* @param aColor Color components: RGB
|
|
721 |
* @throws exception if not ok
|
|
722 |
*/
|
|
723 |
virtual void SetColorTraitL(
|
|
724 |
const TM2GSvgElementHandle& aElementHandle,
|
|
725 |
const TM2GSvgAttrType& aAttributeType,
|
|
726 |
const TM2GColorData& aColor) = 0;
|
|
727 |
|
|
728 |
/**
|
|
729 |
* Set enum trait
|
|
730 |
* @since Series S60 3.1
|
|
731 |
* @param aElementHandle Element handle.
|
|
732 |
* @param aAttributeType Attribute type
|
|
733 |
* @param aValue Value
|
|
734 |
* @throws exception if not ok
|
|
735 |
*/
|
|
736 |
virtual void SetEnumTraitL(
|
|
737 |
const TM2GSvgElementHandle& aElementHandle,
|
|
738 |
const TM2GSvgAttrType& aAttributeType,
|
|
739 |
TInt16 aValue) = 0;
|
|
740 |
|
|
741 |
/**
|
|
742 |
* Set float attribute
|
|
743 |
* @since Series S60 3.1
|
|
744 |
* @param aElementHandle Element handle.
|
|
745 |
* @param aAttributeType Attribute type
|
|
746 |
* @param aValue Value
|
|
747 |
* @throws exception if not ok
|
|
748 |
*/
|
|
749 |
virtual void SetFloatTraitL(
|
|
750 |
const TM2GSvgElementHandle& aElementHandle,
|
|
751 |
const TM2GSvgAttrType& aAttributeType,
|
|
752 |
const TReal32& aValue) = 0;
|
|
753 |
|
|
754 |
/**
|
|
755 |
* Set matrix attribute
|
|
756 |
* @since Series S60 3.1
|
|
757 |
* @param aElementHandle Element handle.
|
|
758 |
* @param aAttributeType Attribute type
|
|
759 |
* @param aMatrix -
|
|
760 |
* @throws exception if not ok
|
|
761 |
*/
|
|
762 |
virtual void SetMatrixTraitL(
|
|
763 |
const TM2GSvgElementHandle& aElementHandle,
|
|
764 |
const TM2GSvgAttrType& aAttributeType,
|
|
765 |
const TM2GMatrixData& aMatrix) = 0;
|
|
766 |
|
|
767 |
/**
|
|
768 |
* Set media time
|
|
769 |
* @since Series S60 3.1
|
|
770 |
* @param aDocumentHandle Document handle.
|
|
771 |
* @param aSeconds Media time
|
|
772 |
* @throws exception if not ok
|
|
773 |
*/
|
|
774 |
virtual void SetMediaTimeL(
|
|
775 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
776 |
const TReal32& aSeconds) = 0;
|
|
777 |
|
|
778 |
/**
|
|
779 |
* Set path attribute
|
|
780 |
* @since Series S60 3.1
|
|
781 |
* @param aElementHandle Element handle.
|
|
782 |
* @param aAttributeType Attribute type
|
|
783 |
* @param aPathHandle -
|
|
784 |
* @throws exception if not ok
|
|
785 |
*/
|
|
786 |
virtual void SetPathTraitL(
|
|
787 |
const TM2GSvgElementHandle& aElementHandle,
|
|
788 |
const TM2GSvgAttrType& aAttributeType,
|
|
789 |
const TM2GSvgPathHandle& aPathHandle) = 0;
|
|
790 |
|
|
791 |
/**
|
|
792 |
* Set rect attribute
|
|
793 |
* @since Series S60 3.1
|
|
794 |
* @param aElementHandle Element handle.
|
|
795 |
* @param aAttributeType Attribute type
|
|
796 |
* @param aRect Rect trait to be set
|
|
797 |
* @throws exception if not ok
|
|
798 |
*/
|
|
799 |
virtual void SetRectTraitL(
|
|
800 |
const TM2GSvgElementHandle& aElementHandle,
|
|
801 |
const TM2GSvgAttrType& aAttributeType,
|
|
802 |
const TM2GRectData& aRect) = 0;
|
|
803 |
|
|
804 |
/**
|
|
805 |
* Set render quality
|
|
806 |
* @since Series S60 3.1
|
|
807 |
* @param aEngineHandle Engine handle.
|
|
808 |
* @param aMode
|
|
809 |
* @throws exception if not ok
|
|
810 |
*/
|
|
811 |
virtual void SetRenderingQualityL(
|
|
812 |
const TM2GSvgEngineHandle& aEngineHandle,
|
|
813 |
TInt aMode) = 0;
|
|
814 |
|
|
815 |
/**
|
|
816 |
* Set string attribute
|
|
817 |
* @since Series S60 3.1
|
|
818 |
* @param aElementHandle Element handle.
|
|
819 |
* @param aAttributeType Attribute type
|
|
820 |
* @param aStr String trait to be set
|
|
821 |
* @throws exception if not ok
|
|
822 |
*/
|
|
823 |
virtual void SetStringTraitL(
|
|
824 |
const TM2GSvgElementHandle& aElementHandle,
|
|
825 |
const TM2GSvgAttrType& aAttributeTypeId,
|
|
826 |
const TPtrC16& aStr) = 0;
|
|
827 |
|
|
828 |
/**
|
|
829 |
* Set viewport height
|
|
830 |
* @since Series S60 3.1
|
|
831 |
* @param aDocumentHandle Document
|
|
832 |
* @param aWidth Width
|
|
833 |
* @throws exception if not ok
|
|
834 |
*/
|
|
835 |
virtual void SetViewportHeightL(
|
|
836 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
837 |
TInt aHeight) = 0;
|
|
838 |
|
|
839 |
/**
|
|
840 |
* Set viewport width
|
|
841 |
* @since Series S60 3.1
|
|
842 |
* @param aDocumentHandle Document
|
|
843 |
* @param aWidth Width
|
|
844 |
* @throws exception if not ok
|
|
845 |
*/
|
|
846 |
virtual void SetViewportWidthL(
|
|
847 |
const TM2GSvgDocumentHandle& aDocumentHandle,
|
|
848 |
TInt aWidth) = 0;
|
|
849 |
};
|
|
850 |
|
|
851 |
M2G_NS_END
|
|
852 |
|
|
853 |
#endif // MM2GSVGPROXY_H
|