javauis/m2g_akn/inc/CM2GSVGProxy.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     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
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CM2GSVGPROXY_H
       
    19 #define CM2GSVGPROXY_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "MM2GSVGProxy.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 class CSvgJavaInterfaceImpl;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39  *
       
    40  */
       
    41 class CM2GSVGProxy : public CBase, public MM2GSVGProxy
       
    42 {
       
    43 public: // METHODS
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      * @return Reference counted proxy wrapper
       
    47      */
       
    48     static CM2GSVGProxy* NewL();
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     virtual ~CM2GSVGProxy();
       
    54 
       
    55     /**
       
    56      * @see MM2GSVGProxy::AddCloseL
       
    57      */
       
    58     virtual void AddCloseL(const TM2GSvgPathHandle& aPathHandle);
       
    59 
       
    60     /**
       
    61      * @see MM2GSVGProxy::AddCurveToL
       
    62      */
       
    63     virtual void AddCurveToL(
       
    64         const TM2GSvgPathHandle& aPathHandle,
       
    65         const TM2GPathCurveData& aPathCurveData);
       
    66 
       
    67     /**
       
    68      * @see MM2GSVGProxy::AddLineToL
       
    69      */
       
    70     virtual void AddLineToL(
       
    71         const TM2GSvgPathHandle& aPathHandle,
       
    72         const TReal32& aX, const TReal32& aY);
       
    73 
       
    74     /**
       
    75      * @see MM2GSVGProxy::AddMoveToL
       
    76      */
       
    77     virtual void AddMoveToL(
       
    78         const TM2GSvgPathHandle& aPathHandle,
       
    79         const TReal32& aX, const TReal32& aY);
       
    80 
       
    81     /**
       
    82      * @see MM2GSVGProxy::AddQuadToL
       
    83      */
       
    84     virtual void AddQuadToL(
       
    85         const TM2GSvgPathHandle& aPathHandle,
       
    86         const TReal32& aX1, const TReal32& aY1,
       
    87         const TReal32& aX2, const TReal32& aY2);
       
    88 
       
    89     /**
       
    90      * @see MM2GSVGProxy::AppendChildL
       
    91      */
       
    92     virtual void AppendChildL(
       
    93         const TM2GSvgElementHandle& aElementHandle,
       
    94         const TM2GSvgElementHandle& aChildElementHandle);
       
    95 
       
    96     /**
       
    97      * @see MM2GSVGProxy::BeginElementAtL
       
    98      */
       
    99     virtual void BeginElementAtL(
       
   100         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   101         const TM2GSvgElementHandle& aElementHandle,
       
   102         const TReal32& aOffset);
       
   103 
       
   104     /**
       
   105      * @see MM2GSVGProxy::CheckRemoveableL
       
   106      */
       
   107     virtual void CheckRemoveableL(
       
   108         const TM2GSvgElementHandle& aElementHandle,
       
   109         TInt& aRemoveable);
       
   110 
       
   111     /**
       
   112      * @see MM2GSVGProxy::ClearSvgSurfaceL
       
   113      */
       
   114     virtual void ClearSvgSurfaceL(const TM2GBitmapHandle& aSurfaceHandle);
       
   115 
       
   116     /**
       
   117      * @see MM2GSVGProxy::CreateDocumentL
       
   118      */
       
   119     virtual void CreateDocumentL(
       
   120         const TPtrC16& aData,
       
   121         TM2GSvgDocumentHandle& aDocumentHandle);
       
   122 
       
   123     /**
       
   124      * @see MM2GSVGProxy::CreateElementNsL
       
   125      */
       
   126     virtual void CreateElementNsL(
       
   127         const TM2GSvgAttrType& aType,
       
   128         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   129         TM2GSvgElementHandle& aElementHandle);
       
   130 
       
   131     /**
       
   132      * @see MM2GSVGProxy::CreatePathL
       
   133      */
       
   134     virtual void CreatePathL(TM2GSvgPathHandle& aPathHandle);
       
   135 
       
   136 
       
   137     /**
       
   138      * @see MM2GSVGProxy::CreateSvgEngineL
       
   139      */
       
   140     virtual void CreateSvgEngineL(TM2GSvgEngineHandle& aEngineHandle);
       
   141 
       
   142 
       
   143     /**
       
   144      * @see MM2GSVGProxy::TSvgSurfaceHandleL
       
   145      */
       
   146     virtual TM2GBitmapHandle CreateSvgSurfaceL(TInt aWidth, TInt aHeight);
       
   147 
       
   148     /**
       
   149      * @see MM2GSVGProxy::DeleteDocumentL
       
   150      */
       
   151     virtual void DeleteDocumentL(const TM2GSvgDocumentHandle& aDocumentHandle);
       
   152 
       
   153     /**
       
   154      * @see MM2GSVGProxy::DeleteSvgEngineL
       
   155      */
       
   156     virtual void DeleteSvgEngineL(const TM2GSvgEngineHandle& aEngineHandle);
       
   157 
       
   158     /**
       
   159      * @see MM2GSVGProxy::DeleteSvgSurfaceL
       
   160      */
       
   161     virtual void DeleteSvgSurfaceL(const TM2GBitmapHandle& aSurfaceHandle);
       
   162 
       
   163     /**
       
   164      * @see MM2GSVGProxy::DestroyPathL
       
   165      */
       
   166     virtual void DestroyPathL(const TM2GSvgPathHandle& aPathHandle);
       
   167 
       
   168     /**
       
   169      * @see MM2GSVGProxy::DispatchMouseEventL
       
   170      */
       
   171     virtual void DispatchMouseEventL(
       
   172         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   173         TInt aX, TInt aY, TM2GSvgElementHandle& aElementHandle);
       
   174 
       
   175     /**
       
   176      * @see MM2GSVGProxy::EndElementAtL
       
   177      */
       
   178     virtual void EndElementAtL(
       
   179         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   180         const TM2GSvgElementHandle& aElementHandle,
       
   181         const TReal32& aOffset);
       
   182 
       
   183     /**
       
   184      * @see MM2GSVGProxy::FocusOnL
       
   185      */
       
   186     virtual void FocusOnL(
       
   187         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   188         const TM2GSvgElementHandle& aElementHandle);
       
   189 
       
   190     /**
       
   191      * @see MM2GSVGProxy::FocusOutL
       
   192      */
       
   193     virtual void FocusOutL(
       
   194         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   195         const TM2GSvgElementHandle& aElementHandle);
       
   196 
       
   197     /**
       
   198      * @see MM2GSVGProxy::GetBBoxL
       
   199      */
       
   200     virtual void GetBBoxL(
       
   201         const TM2GSvgElementHandle& aElementHandle,
       
   202         const TM2GSvgAttrType& aAttributeType,
       
   203         TM2GRectData& aRectData, TInt& aResult);
       
   204 
       
   205     /**
       
   206      * @see MM2GSVGProxy::GetColorTraitL
       
   207      */
       
   208     virtual void GetColorTraitL(
       
   209         const TM2GSvgElementHandle& aElementHandle,
       
   210         const TM2GSvgAttrType& aAttributeType,
       
   211         TM2GColorData& aColor,
       
   212         TInt& aResult);
       
   213 
       
   214     /**
       
   215      * @see MM2GSVGProxy::GetElementByIdL
       
   216      */
       
   217     virtual void GetElementByIdL(
       
   218         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   219         const TPtrC16& aId,
       
   220         TM2GSvgElementHandle& aElementHandle);
       
   221 
       
   222     /**
       
   223      * @see MM2GSVGProxy::GetElementTypeIdL
       
   224      */
       
   225     virtual void GetElementTypeIdL(const TM2GSvgElementHandle& aElementHandle, TInt16& aId);
       
   226 
       
   227     /**
       
   228      * @see MM2GSVGProxy::GetEnumAttributeL
       
   229      */
       
   230     virtual void GetEnumTraitL(
       
   231         const TM2GSvgElementHandle& aElementHandle,
       
   232         const TM2GSvgAttrType& aAttributeType,
       
   233         TInt16& aEnumTrait);
       
   234 
       
   235     /**
       
   236      * @see MM2GSVGProxy::GetExternalItemL
       
   237      */
       
   238     virtual TInt GetExternalListItemL(
       
   239         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   240         TInt aIndex,
       
   241         TPtrC16& aItem);
       
   242 
       
   243     /**
       
   244      * @see MM2GSVGProxy::GetExternalListSizeL
       
   245      */
       
   246     virtual void GetExternalListSizeL(
       
   247         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   248         TInt& aListSz);
       
   249 
       
   250     /**
       
   251      * @see MM2GSVGProxy::GetFirstElementChildL
       
   252      */
       
   253     virtual void GetFirstElementChildL(
       
   254         const TM2GSvgElementHandle& aElementHandle,
       
   255         TM2GSvgElementHandle& aChildHandle);
       
   256 
       
   257     /**
       
   258      * @see MM2GSVGProxy::GetFloatTraitL
       
   259      */
       
   260     virtual void GetFloatTraitL(
       
   261         const TM2GSvgElementHandle& aElementHandle,
       
   262         const TM2GSvgAttrType& aAttributeType,
       
   263         TReal32& aFloatTrait);
       
   264 
       
   265     /**
       
   266      * @see MM2GSVGProxy::GetMatrixTraitL
       
   267      */
       
   268     virtual void GetMatrixTraitL(
       
   269         const TM2GSvgElementHandle& aElementHandle,
       
   270         const TM2GSvgAttrType& aAttributeType,
       
   271         TM2GMatrixData& aMatrix, TInt& aResult);
       
   272 
       
   273     /**
       
   274      * @see MM2GSVGProxy::GetMediaTimeL
       
   275      */
       
   276     virtual void GetMediaTimeL(
       
   277         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   278         TReal32& aSeconds);
       
   279 
       
   280     /**
       
   281      * @see MM2GSVGProxy::GetNextElementSiblingL
       
   282      */
       
   283     virtual void GetNextElementSiblingL(
       
   284         const TM2GSvgElementHandle& aElementHandle,
       
   285         TM2GSvgElementHandle& aSiblingElementHandle);
       
   286 
       
   287     /**
       
   288      * @see MM2GSVGProxy::GetNumberOfSegmentsL
       
   289      */
       
   290     virtual void GetNumberOfSegmentsL(
       
   291         const TM2GSvgPathHandle& aPathHandle,
       
   292         TInt& aNumberOfSegments);
       
   293 
       
   294     /**
       
   295      * @see MM2GSVGProxy::GetParentL
       
   296      */
       
   297     virtual void GetParentL(
       
   298         const TM2GSvgElementHandle& aElementHandle,
       
   299         TM2GSvgElementHandle& aParentElementHandle);
       
   300 
       
   301     /**
       
   302      * @see MM2GSVGProxy::GetPathTraitL
       
   303      */
       
   304     virtual void GetPathTraitL(
       
   305         const TM2GSvgElementHandle& aElementHandle,
       
   306         const TM2GSvgAttrType& aAttributeType,
       
   307         TInt& aPathTrait);
       
   308 
       
   309     /**
       
   310      * @see MM2GSVGProxy::GetRectTraitL
       
   311      */
       
   312     virtual void GetRectTraitL(
       
   313         const TM2GSvgElementHandle& aElementHandle,
       
   314         const TM2GSvgAttrType& aAttributeType,
       
   315         TM2GRectData& aRectData, TInt& aResult);
       
   316 
       
   317     /**
       
   318      * @see MM2GSVGProxy::GetRootElementL
       
   319      */
       
   320     virtual void GetRootElementL(
       
   321         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   322         TM2GSvgElementHandle& aRootElementHandle);
       
   323 
       
   324     /**
       
   325      * @see MM2GSVGProxy::GetScreenBBoxL
       
   326      */
       
   327     virtual void GetScreenBBoxL(
       
   328         const TM2GSvgElementHandle& aElementHandle,
       
   329         TM2GScreenBBoxData& aScreenBBoxData);
       
   330 
       
   331     /**
       
   332      * @see MM2GSVGProxy::GetSegmentParameterL
       
   333      */
       
   334     virtual void GetSegmentParameterL(
       
   335         const TM2GSvgPathHandle& aPathHandle,
       
   336         TInt aSegmentIndex, TInt aParamIndex,
       
   337         TReal32& aSegmentParam);
       
   338 
       
   339     /**
       
   340      * @see MM2GSVGProxy::GetSegmentTypeL
       
   341      */
       
   342     virtual void GetSegmentTypeL(
       
   343         const TM2GSvgPathHandle& aPathHandle,
       
   344         TInt aSegmentIndex,
       
   345         TInt16& aSegmentType);
       
   346 
       
   347     /**
       
   348      * @see MM2GSVGProxy::GetStringTraitL
       
   349      */
       
   350     virtual TInt GetStringTraitL(
       
   351         const TM2GSvgElementHandle& aElementHandle,
       
   352         const TM2GSvgAttrType& aAttributeType,
       
   353         TPtrC16& aStr);
       
   354 
       
   355 
       
   356     /**
       
   357      * @see MM2GSVGProxy::GetSvgSurfaceHeightL
       
   358      */
       
   359     virtual TInt GetSvgSurfaceHeightL(const TM2GBitmapHandle& aSurfaceHandle);
       
   360 
       
   361     /**
       
   362      * @see MM2GSVGProxy::GetSvgSurfaceWidthL
       
   363      */
       
   364     virtual TInt GetSvgSurfaceWidthL(const TM2GBitmapHandle& aSurfaceHandle);
       
   365 
       
   366     /**
       
   367      * @see MM2GSVGProxy::GetUsedFromElement
       
   368      */
       
   369     virtual void GetUsedFromElementL(
       
   370         const TM2GSvgElementHandle& aElementHandle,
       
   371         TM2GSvgElementHandle& aHandle);
       
   372 
       
   373     /**
       
   374      * @see MM2GSVGProxy::GetViewportHeightL
       
   375      */
       
   376     virtual void GetViewportHeightL(
       
   377         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   378         TInt& aHeight);
       
   379 
       
   380     /**
       
   381      * @see MM2GSVGProxy::GetViewportWidthL
       
   382      */
       
   383     virtual void GetViewportWidthL(
       
   384         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   385         TInt& aWidth);
       
   386 
       
   387     /**
       
   388      * @see MM2GSVGProxy::InitViewportL
       
   389      */
       
   390     virtual void InitViewportL(
       
   391         const TM2GSvgDocumentHandle& aDocumentHandle);
       
   392 
       
   393     /**
       
   394      * @see MM2GSVGProxy::InsertBeforeL
       
   395      */
       
   396     virtual void InsertBeforeL(
       
   397         const TM2GSvgElementHandle& aElementHandle,
       
   398         const TM2GSvgElementHandle& aNewChildElementHandle,
       
   399         const TM2GSvgElementHandle& aReferenceElementHandle);
       
   400 
       
   401     /**
       
   402      * @see MM2GSVGProxy::IsActiveL
       
   403      */
       
   404     virtual void IsActiveL(
       
   405         const TM2GSvgElementHandle& aElementHandle,
       
   406         TInt& aActive);
       
   407 
       
   408     /**
       
   409      * @see MM2GSVGProxy::IsElementInDomL
       
   410      */
       
   411     virtual void IsElementInDomL(
       
   412         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   413         const TM2GSvgElementHandle& aElementHandle,
       
   414         TInt& aIsElementInDom);
       
   415 
       
   416     /**
       
   417      * @see MM2GSVGProxy::IsUsedL
       
   418      */
       
   419     virtual void IsUsedL(
       
   420         const TM2GSvgElementHandle& aElementHandle,
       
   421         TInt& aResult);
       
   422 
       
   423     /**
       
   424      * @see MM2GSVGProxy::RemoveChildL
       
   425      */
       
   426     virtual void RemoveChildL(
       
   427         const TM2GSvgElementHandle& aElementHandle,
       
   428         const TM2GSvgElementHandle& aChildElementHandle,
       
   429         TM2GSvgElementHandle& aHandle);
       
   430 
       
   431     /**
       
   432      * @see MM2GSVGProxy::RenderDocumentL
       
   433      */
       
   434     virtual void RenderDocumentL(
       
   435         const TM2GSvgEngineHandle& aEngineHandle,
       
   436         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   437         const TM2GBitmapHandle& aSurfaceHandle,
       
   438         TM2GBitmapHandle aSurfaceMaskHandle,
       
   439         TReal32 aCurrentTime);
       
   440 
       
   441     /**
       
   442      * @see MM2GSVGProxy::RenderQualityL
       
   443      */
       
   444     virtual void RenderQualityL(
       
   445         const TM2GSvgEngineHandle& aEngineHandle,
       
   446         TInt aQuality);
       
   447     /**
       
   448      * @see MM2GSVGProxy::RequestCompletedL
       
   449      */
       
   450     virtual void RequestCompletedL(
       
   451         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   452         const TPtrC16& aURI,
       
   453         const TPtrC8& aResourceData,
       
   454         TInt& aCompleted);
       
   455 
       
   456     /**
       
   457      * @see MM2GSVGProxy::SetColorTraitL
       
   458      */
       
   459     virtual void SetColorTraitL(
       
   460         const TM2GSvgElementHandle& aElementHandle,
       
   461         const TM2GSvgAttrType& aAttributeType,
       
   462         const TM2GColorData& aColor);
       
   463 
       
   464     /**
       
   465      * @see MM2GSVGProxy::SetEnumTraitL
       
   466      */
       
   467     virtual void SetEnumTraitL(
       
   468         const TM2GSvgElementHandle& aElementHandle,
       
   469         const TM2GSvgAttrType& aAttributeType,
       
   470         TInt16 aValue);
       
   471 
       
   472     /**
       
   473      * @see MM2GSVGProxy::SetFloatTraitL
       
   474      */
       
   475     virtual void SetFloatTraitL(
       
   476         const TM2GSvgElementHandle& aElementHandle,
       
   477         const TM2GSvgAttrType& aAttributeType,
       
   478         const TReal32& aValue);
       
   479 
       
   480     /**
       
   481      * @see MM2GSVGProxy::SetMatrixTraitL
       
   482      */
       
   483     virtual void SetMatrixTraitL(
       
   484         const TM2GSvgElementHandle& aElementHandle,
       
   485         const TM2GSvgAttrType& aAttributeType,
       
   486         const TM2GMatrixData& aMatrix);
       
   487 
       
   488     /**
       
   489      * @see MM2GSVGProxy::SetMediaTimeL
       
   490      */
       
   491     virtual void SetMediaTimeL(
       
   492         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   493         const TReal32& aSeconds);
       
   494 
       
   495     /**
       
   496      * @see MM2GSVGProxy::SetPathTraitL
       
   497      */
       
   498     virtual void SetPathTraitL(
       
   499         const TM2GSvgElementHandle& aElementHandle,
       
   500         const TM2GSvgAttrType& aAttributeType,
       
   501         const TM2GSvgPathHandle& aPathHandle);
       
   502 
       
   503     /**
       
   504      * @see MM2GSVGProxy::SetRectTraitL
       
   505      */
       
   506     virtual void SetRectTraitL(
       
   507         const TM2GSvgElementHandle& aElementHandle,
       
   508         const TM2GSvgAttrType& aAttributeType,
       
   509         const TM2GRectData& aRect);
       
   510 
       
   511     /**
       
   512      * @see MM2GSVGProxy::SetRenderingQualityL
       
   513      */
       
   514     virtual void SetRenderingQualityL(
       
   515         const TM2GSvgEngineHandle& aEngineHandle,
       
   516         TInt aMode);
       
   517 
       
   518     /**
       
   519      * @see MM2GSVGProxy::SetStringTraitL
       
   520      */
       
   521     virtual void SetStringTraitL(
       
   522         const TM2GSvgElementHandle& aElementHandle,
       
   523         const TM2GSvgAttrType& aAttributeTypeId,
       
   524         const TPtrC16& aStr);
       
   525 
       
   526     /**
       
   527      * @see MM2GSVGProxy::SetViewportHeightL
       
   528      */
       
   529     virtual void SetViewportHeightL(
       
   530         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   531         TInt aHeight);
       
   532 
       
   533 
       
   534     /**
       
   535      * @see MM2GSVGProxy::SetViewportWidthL
       
   536      */
       
   537     virtual void SetViewportWidthL(
       
   538         const TM2GSvgDocumentHandle& aDocumentHandle,
       
   539         TInt aWidth);
       
   540 
       
   541 protected: // METHODS
       
   542     /**
       
   543      * Close engine & document containers
       
   544      */
       
   545     virtual void CloseContainers();
       
   546 
       
   547 private: // METHODS
       
   548     /**
       
   549      * C++ default constructor.
       
   550      */
       
   551     CM2GSVGProxy();
       
   552 
       
   553     /**
       
   554      * Initialization.
       
   555      */
       
   556     void ConstructL();
       
   557 
       
   558     /**
       
   559      * C++ copy constructor
       
   560      */
       
   561     CM2GSVGProxy(const CM2GSVGProxy&);
       
   562 
       
   563     /**
       
   564      * C++ assignment operator
       
   565      */
       
   566     CM2GSVGProxy& operator=(const CM2GSVGProxy&);
       
   567 
       
   568 private: // VARIABLES
       
   569     CSvgJavaInterfaceImpl* iNative;
       
   570     RArray<TM2GSvgEngineHandle> iSvgEngines;
       
   571     RArray<TM2GSvgDocumentHandle> iSvgDocuments;
       
   572 };
       
   573 
       
   574 M2G_NS_END
       
   575 
       
   576 #endif // CM2GSVGPROXY_H
       
   577 
       
   578