uiaccelerator_plat/alf_extension_api/inc/alf/alfbrushhandlers.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c)  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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_ALFBRUSHHANDLERS_H
       
    21 #define C_ALFBRUSHHANDLERS_H
       
    22 
       
    23 #include <alf/alfextensionfactory.h>
       
    24 #include <AknsConstants.h>
       
    25 
       
    26 class CHuiBrush;
       
    27 class THuiImage;
       
    28 struct TAlfMetric;
       
    29 struct TAlfXYMetric;
       
    30 class TAlfImage;
       
    31 
       
    32 
       
    33 /**
       
    34  *  ?one_line_short_description
       
    35  *
       
    36  *  ?more_complete_description
       
    37  *
       
    38  *  @lib ?library
       
    39  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    40  */
       
    41 class CAlfBrushHandler : public CBase, public MAlfExtension 
       
    42     {
       
    43     
       
    44 protected:
       
    45 
       
    46     IMPORT_C CAlfBrushHandler(MAlfInterfaceProvider& aResolver);
       
    47     
       
    48     IMPORT_C void ConstructL( CHuiBrush* aBrush );
       
    49     IMPORT_C ~CAlfBrushHandler();
       
    50 
       
    51     /**
       
    52      * From MAlfExtension.
       
    53      */
       
    54     IMPORT_C void Release();
       
    55     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
    56     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
    57 
       
    58 public:
       
    59     IMPORT_C void SetOwnership(TBool aHolderOwnsBrush);
       
    60 
       
    61 protected: // new member functions 
       
    62     IMPORT_C virtual void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
    63 
       
    64 protected: // data
       
    65 
       
    66     CHuiBrush* iBrush;
       
    67     MAlfInterfaceProvider& iResolver;
       
    68 
       
    69 private:
       
    70     TBool iOwnsBrush;
       
    71     TAny* iSpare;    
       
    72     };
       
    73 
       
    74 
       
    75 /**
       
    76  *  ?one_line_short_description
       
    77  *
       
    78  *  ?more_complete_description
       
    79  *
       
    80  *  @lib ?library
       
    81  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    82  */
       
    83 class CAlfBorderBrushHandler : public CAlfBrushHandler
       
    84     {
       
    85 public:
       
    86 
       
    87     IMPORT_C static MAlfExtension* NewL( 
       
    88         MAlfInterfaceProvider& aResolver,
       
    89         TAlfXYMetric aThickness, 
       
    90         TAlfXYMetric aEdgeOffset);
       
    91 
       
    92     IMPORT_C static MAlfExtension* NewL( 
       
    93         MAlfInterfaceProvider& aResolver,
       
    94         TInt aThicknessWidth, 
       
    95         TInt aThicknessHeight,
       
    96         TInt aEdgeOffsetX, 
       
    97         TInt aEdgeOffsetY );
       
    98         
       
    99     IMPORT_C CAlfBorderBrushHandler(MAlfInterfaceProvider& aResolver);
       
   100 
       
   101     IMPORT_C void ConstructL( 
       
   102         CHuiBrush* aBrush,
       
   103         TAlfXYMetric aThickness, 
       
   104         TAlfXYMetric aEdgeOffset);
       
   105     
       
   106     IMPORT_C void ConstructL( 
       
   107         CHuiBrush* aBrush,
       
   108         TInt aThicknessWidth, 
       
   109         TInt aThicknessHeight,
       
   110         TInt aEdgeOffsetX, 
       
   111         TInt aEdgeOffsetY );
       
   112 
       
   113 protected:
       
   114 
       
   115     IMPORT_C ~CAlfBorderBrushHandler();
       
   116 
       
   117     IMPORT_C void Release();
       
   118     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
   119     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
   120 
       
   121     IMPORT_C void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
   122 
       
   123 private:
       
   124     TAny* iSpare;
       
   125 
       
   126     };
       
   127 
       
   128 
       
   129 
       
   130 /**
       
   131  *  ?one_line_short_description
       
   132  *
       
   133  *  ?more_complete_description
       
   134  *
       
   135  *  @lib ?library
       
   136  *  @since S60 ?S60_version *** for example, S60 v3.0
       
   137  */
       
   138 class CAlfImageBrushHandler : public CAlfBrushHandler
       
   139     {
       
   140 public:
       
   141 
       
   142     IMPORT_C static MAlfExtension* NewL( 
       
   143         MAlfInterfaceProvider& aResolver, THuiImage aImage); 
       
   144         
       
   145     IMPORT_C CAlfImageBrushHandler(MAlfInterfaceProvider& aResolver);
       
   146     
       
   147     IMPORT_C void ConstructL( 
       
   148         CHuiBrush* aBrush, THuiImage aImage); 
       
   149 
       
   150 protected:
       
   151 
       
   152     IMPORT_C ~CAlfImageBrushHandler();
       
   153 
       
   154 // from base class MAlfExtension
       
   155     IMPORT_C void Release();
       
   156     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
   157     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
   158 
       
   159     IMPORT_C void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
   160 
       
   161 private:
       
   162     TAny* iSpare;
       
   163     };
       
   164 /**
       
   165  *  ?one_line_short_description
       
   166  *
       
   167  *  ?more_complete_description
       
   168  *
       
   169  *  @lib ?library
       
   170  *  @since S60 ?S60_version *** for example, S60 v3.0
       
   171  */
       
   172 class CAlfShadowBorderBrushHandler : public CAlfBrushHandler
       
   173     {
       
   174 public:
       
   175 
       
   176     IMPORT_C static MAlfExtension* NewL( 
       
   177         MAlfInterfaceProvider& aResolver,
       
   178         TInt aWidth );
       
   179 
       
   180     IMPORT_C static MAlfExtension* NewL( 
       
   181         MAlfInterfaceProvider& aResolver,
       
   182         TAlfMetric aWidth );
       
   183         
       
   184     IMPORT_C CAlfShadowBorderBrushHandler(MAlfInterfaceProvider& aResolver);
       
   185     
       
   186     IMPORT_C void ConstructL( 
       
   187         CHuiBrush* aBrush,
       
   188         TInt aWidth);
       
   189 
       
   190     IMPORT_C void ConstructL( 
       
   191         CHuiBrush* aBrush,
       
   192         TAlfMetric aWidth );
       
   193 
       
   194 protected:
       
   195 
       
   196     IMPORT_C ~CAlfShadowBorderBrushHandler();
       
   197 
       
   198 // from base class MAlfExtension
       
   199     IMPORT_C void Release();
       
   200     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
   201     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
   202 
       
   203     IMPORT_C void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
   204 
       
   205 private:
       
   206     TAny* iSpare;
       
   207     };
       
   208 
       
   209 /**
       
   210  *  ?one_line_short_description
       
   211  *
       
   212  *  ?more_complete_description
       
   213  *
       
   214  *  @lib ?library
       
   215  *  @since S60 ?S60_version *** for example, S60 v3.0
       
   216  */
       
   217 class CAlfDropShadowBrushHandler : public CAlfBrushHandler
       
   218     {
       
   219 public:
       
   220 
       
   221     IMPORT_C static MAlfExtension* NewL( 
       
   222         MAlfInterfaceProvider& aResolver,
       
   223         TAlfMetric aDepth );
       
   224 
       
   225     IMPORT_C static MAlfExtension* NewL( 
       
   226         MAlfInterfaceProvider& aResolver,
       
   227         TInt aDepth );
       
   228         
       
   229     IMPORT_C CAlfDropShadowBrushHandler(MAlfInterfaceProvider& aResolver);
       
   230     
       
   231     IMPORT_C void ConstructL( 
       
   232         CHuiBrush* aBrush,
       
   233         TAlfMetric aDepth );
       
   234 
       
   235     IMPORT_C void ConstructL( 
       
   236         CHuiBrush* aBrush,
       
   237         TInt aDepth );
       
   238 
       
   239 protected:
       
   240 
       
   241     IMPORT_C ~CAlfDropShadowBrushHandler();
       
   242 
       
   243 // from base class MAlfExtension
       
   244     IMPORT_C void Release();
       
   245     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
   246     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
   247 
       
   248     IMPORT_C void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
   249 
       
   250 private:
       
   251     TAny* iSpare;
       
   252     };
       
   253 /**
       
   254  *  ?one_line_short_description
       
   255  *
       
   256  *  ?more_complete_description
       
   257  *
       
   258  *  @lib ?library
       
   259  *  @since S60 ?S60_version *** for example, S60 v3.0
       
   260  */
       
   261 class CAlfGradientBrushHandler : public CAlfBrushHandler
       
   262     {
       
   263 public:
       
   264 
       
   265     IMPORT_C static MAlfExtension* NewL( MAlfInterfaceProvider& aResolver );
       
   266     IMPORT_C CAlfGradientBrushHandler(MAlfInterfaceProvider& aResolver);
       
   267     IMPORT_C void ConstructL( CHuiBrush* aBrush );
       
   268 
       
   269 protected:
       
   270 
       
   271     IMPORT_C ~CAlfGradientBrushHandler();
       
   272 
       
   273 // from base class MAlfExtension
       
   274     IMPORT_C void Release();
       
   275     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
   276     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
   277 
       
   278     IMPORT_C void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
   279 
       
   280 private:
       
   281     TAny* iSpare;
       
   282     };
       
   283 
       
   284 
       
   285 /**
       
   286  *  ?one_line_short_description
       
   287  *
       
   288  *  ?more_complete_description
       
   289  *
       
   290  *  @lib ?library
       
   291  *  @since S60 ?S60_version *** for example, S60 v3.0
       
   292  */
       
   293 class CAlfFrameBrushHandler : public CAlfBrushHandler
       
   294     {
       
   295 public:
       
   296 
       
   297     IMPORT_C static MAlfExtension* NewL( 
       
   298         MAlfInterfaceProvider& aResolver, const TAknsItemID& aIID, TAlfXYMetric aEdgeOffset); 
       
   299 
       
   300     IMPORT_C static MAlfExtension* NewL( 
       
   301         MAlfInterfaceProvider& aResolver, const TAknsItemID& aIID, TInt aEdgeOffsetX, TInt aEdgeOffsetY); 
       
   302 
       
   303     IMPORT_C static MAlfExtension* NewL( 
       
   304         MAlfInterfaceProvider& aResolver, const THuiImage& aImage, TAlfXYMetric aEdgeOffset); 
       
   305         
       
   306     IMPORT_C CAlfFrameBrushHandler(MAlfInterfaceProvider& aResolver);
       
   307     
       
   308     IMPORT_C void ConstructL( 
       
   309         CHuiBrush* aBrush, const TAknsItemID& aIID, TInt aEdgeOffsetX, TInt aEdgeOffsetY); 
       
   310 
       
   311     IMPORT_C void ConstructL( 
       
   312         CHuiBrush* aBrush, const TAknsItemID& aIID, TAlfXYMetric aEdgeOffset); 
       
   313 
       
   314     IMPORT_C void ConstructL( 
       
   315         CHuiBrush* aBrush, const THuiImage& aImage, TAlfXYMetric aEdgeOffset); 
       
   316 
       
   317 protected:
       
   318 
       
   319     IMPORT_C ~CAlfFrameBrushHandler();
       
   320 
       
   321 // from base class MAlfExtension
       
   322     IMPORT_C void Release();
       
   323     IMPORT_C TAny* GetInterface(const THuiInterfaceSupport& aInterface);
       
   324     IMPORT_C void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse);
       
   325 
       
   326     IMPORT_C void BrushHandlerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
   327 
       
   328 private:
       
   329     TAny* iSpare;
       
   330     };
       
   331 
       
   332 #endif // C_ALFBRUSHHANDLERS_H