idlehomescreen/inc/xnbitmap.h
changeset 0 f72a12da539e
child 54 1b758917cafc
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Wrapper class for Bitmap.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef _XNBITMAP_H
       
    21 #define _XNBITMAP_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "xncomponent.h"
       
    25 #include "mxncomponentinterface.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CFbsBitmap;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 namespace XnImageInterface
       
    33 {
       
    34 _LIT8(KType, "image");
       
    35 class MXnImageInterface : public XnComponentInterface::MXnComponentInterface
       
    36    {
       
    37 
       
    38 public:
       
    39 		
       
    40     static inline const TDesC8& Type()
       
    41         {
       
    42         return KType;
       
    43         }
       
    44 		
       
    45 public: // New functions
       
    46 
       
    47     /**
       
    48     * Sets content bitmaps. Ownership is transferred.
       
    49     * @since Series 60 3.1
       
    50     * @param aBitmap Bitmap to draw
       
    51     * @param aMask Mask to use
       
    52     */        
       
    53     virtual void SetContentBitmaps(CFbsBitmap* aBitmap, CFbsBitmap* aMask) = 0;   
       
    54 
       
    55     /**
       
    56     * Gets content bitmaps. Ownership is not transferred.
       
    57     * @since Series 60 3.1
       
    58     * @param aBitmap Bitmap to draw
       
    59     * @param aMask Mask to use
       
    60     */        
       
    61     virtual void ContentBitmaps(CFbsBitmap*& aBitmap, CFbsBitmap*& aMask) = 0;
       
    62 
       
    63 private:
       
    64 
       
    65    };
       
    66  }   
       
    67     
       
    68 /**
       
    69 *  @ingroup group_xnbitmapfactory
       
    70 *  @lib xn3bitmapfactory.dll
       
    71 *  @since Series 60 3.1
       
    72 */
       
    73 class CXnBitmap : public CXnComponent, public XnImageInterface::MXnImageInterface
       
    74    {
       
    75 
       
    76 public:
       
    77 
       
    78 	/**
       
    79 	 * 2 phase construction.
       
    80 	 */
       
    81 	static CXnBitmap* NewL();
       
    82 
       
    83 	/**
       
    84 	 * Destructor.
       
    85 	 */
       
    86 	virtual ~CXnBitmap();
       
    87 
       
    88 public: // New functions
       
    89     /**
       
    90     * Sets content bitmaps. Ownership is transferred.
       
    91     * @since Series 60 3.1
       
    92     * @param aBitmap Bitmap to draw
       
    93     * @param aMask Mask to use
       
    94     */        
       
    95     void SetContentBitmaps(CFbsBitmap* aBitmap, CFbsBitmap* aMask);   
       
    96 
       
    97     /**
       
    98     * Gets content bitmaps. Ownership is not transferred.
       
    99     * @since Series 60 3.1
       
   100     * @param aBitmap Bitmap to draw
       
   101     * @param aMask Mask to use
       
   102     */        
       
   103     void ContentBitmaps(CFbsBitmap*& aBitmap, CFbsBitmap*& aMask);
       
   104 
       
   105 
       
   106 public: // from CCoeControl
       
   107    	/**
       
   108       * Create a component interface according to the given type.
       
   109       * @param aType Type of the interface to create
       
   110       * @return Created interface or NULL if the provided type is not supported.
       
   111       */ 
       
   112     virtual XnComponentInterface::MXnComponentInterface* MakeInterfaceL(const TDesC8& aType); 
       
   113   
       
   114 	        
       
   115 private:
       
   116 
       
   117 	CXnBitmap();
       
   118 	void ConstructL();
       
   119 
       
   120 private:
       
   121    };
       
   122 
       
   123 #endif      // _XNBITMAP_H
       
   124             
       
   125 // End of File