uiaccelerator_plat/alf_core_toolkit_api/inc/uiacceltk/HuiShadowedTexture.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   Declares the MHuiShadowedTexture interface. 
       
    15 *                MHuiShadowedTexture is an interface for textures that support 
       
    16 *                dropshadows that are generated out of the texture's content.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __HUISHADOWEDTEXTURE_H__
       
    23 #define __HUISHADOWEDTEXTURE_H__
       
    24 
       
    25 
       
    26 #include <uiacceltk/HuiTextureIf.h>
       
    27 
       
    28 
       
    29 /* Forward declarations. */
       
    30 class MHuiSegmentedTexture;
       
    31 class MHuiShadowedTexture;
       
    32 class THuiTextureHandle;
       
    33 
       
    34 
       
    35 /** Generic shadowing styles. */
       
    36 enum THuiShadowStyle
       
    37     {
       
    38     /** Shadow is going to be used with an icon. Little detail. */
       
    39     EHuiTextureShadowStyleIcon,
       
    40     
       
    41     /** Shadow is going to be used with rasterized text. High detail. */
       
    42     EHuiTextureShadowStyleRasterizedText
       
    43     };
       
    44 
       
    45 
       
    46 /**
       
    47  * MHuiShadowedTexture is an interface for textures that support dropshadows 
       
    48  * that are generated out of the texture's content.
       
    49  */
       
    50 class MHuiShadowedTexture
       
    51     {
       
    52 public:
       
    53     
       
    54     /* Destructor. */
       
    55     
       
    56     /**
       
    57      * Virtual destructor.
       
    58      */
       
    59     virtual ~MHuiShadowedTexture() 
       
    60         {
       
    61         }
       
    62     
       
    63     
       
    64     /* Interface methods. */
       
    65     
       
    66     /**
       
    67      * @deprecated 
       
    68      *
       
    69      * Enables or disables the generation of a shadow when a new image is
       
    70      * uploaded. Note that when the shadow is enabled, a new texture image
       
    71      * needs to be uploaded before the shadow is actually generated.
       
    72      *
       
    73      * @param aEnable  Enables or disables shadow generation and usage.
       
    74      */
       
    75     virtual void EnableShadow(TBool aEnable = ETrue) = 0;
       
    76 
       
    77     /**
       
    78      * @deprecated 
       
    79      *
       
    80      * Determines if shadow generation has been enabled.
       
    81      */
       
    82     virtual TBool IsShadowEnabled() const = 0;
       
    83 
       
    84     /**
       
    85      * @deprecated 
       
    86      *
       
    87      * Gets a handle to the shadow texture. The handle can be a null handle 
       
    88      * if the shadow is disabled or has not been generated yet. 
       
    89      *
       
    90      * Does not return the handle as a return value because that would make it too
       
    91      * easy to construct a THuiImage directly out of the handle, and cause
       
    92      * a crash since the THuiImage would then reference a temporary object.
       
    93      *
       
    94      * @param aHandle  Handle to the shadow texture is returned here.
       
    95      *
       
    96      * @return  <code>ETrue</code>, if a shadow texture is available.
       
    97      *          Otherwise, <code>EFalse</code>.
       
    98      */
       
    99     virtual TBool GetShadowTexture(THuiTextureHandle& aHandle) const = 0;
       
   100     
       
   101     };
       
   102 
       
   103 
       
   104 #endif // __HUISHADOWEDTEXTURE_H__