idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h
branchRCL_3
changeset 83 5456b4e8b3a8
equal deleted inserted replaced
82:5f0182e07bfb 83:5456b4e8b3a8
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Wallpaper view. View is used to get skin background
       
    15 *               to image selection grid.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CXNWALLPAPERVIEW_H
       
    22 #define CXNWALLPAPERVIEW_H
       
    23 
       
    24 // System includes
       
    25 #include <e32base.h>
       
    26 #include <aknview.h>
       
    27 
       
    28 // User includes
       
    29 
       
    30 // Forward declarations
       
    31 class CXnWallpaperContainer;
       
    32 class CXnAppUiAdapter;
       
    33 class CXnUiEngine;
       
    34 class CXnSpBgCleaner;
       
    35 
       
    36 // Constants
       
    37 const TUid KWallpaperViewUid = { 0x200286DB };
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  Wallpaper view.
       
    43 *  Possible to select background image.
       
    44 *
       
    45 *  @since S60 v5.0
       
    46 */
       
    47 NONSHARABLE_CLASS( CXnWallpaperView ) : public CAknView 
       
    48     {
       
    49 public:
       
    50     // constructor and destructor
       
    51 
       
    52     /**
       
    53      * Two-phased constructor.
       
    54      * @return new instance of CXnWallpaperView.
       
    55      */
       
    56     static CXnWallpaperView* NewL( CXnUiEngine& aEngine );
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     ~CXnWallpaperView();
       
    62 
       
    63 public:
       
    64     // from CAknView
       
    65     
       
    66     /**
       
    67      * @see CAknView
       
    68      */      
       
    69     TUid Id() const;
       
    70 
       
    71 private:
       
    72     // from CAknView
       
    73     
       
    74     /**
       
    75      * @see CAknView
       
    76      */      
       
    77     void DoActivateL( const TVwsViewId& aPrevViewId,        
       
    78         TUid aCustomMessageId, const TDesC8& aCustomMessage );
       
    79             
       
    80     /**
       
    81      * @see CAknView
       
    82      */      
       
    83     void DoDeactivate();
       
    84 
       
    85 private:
       
    86     // private constructors
       
    87     
       
    88     /**
       
    89      * C++ default constructor.
       
    90      */
       
    91     CXnWallpaperView( CXnUiEngine& aEngine );
       
    92 
       
    93     /**
       
    94      * By default Symbian 2nd phase constructor is private.
       
    95      */
       
    96     void ConstructL();
       
    97 
       
    98 public:
       
    99     // new functions
       
   100     
       
   101     /**
       
   102      * Returns selected wallpaper filename as parameter
       
   103      * 
       
   104      * @since S60 5.2
       
   105      * @param aFileName Selected wallpaper filename
       
   106      */
       
   107     void SelectedWallpaper( TFileName& aFileName ) const;
       
   108     
       
   109 private:
       
   110     // new functions
       
   111     
       
   112     static TInt HandleCallback( TAny* aAny );
       
   113     
       
   114     void DoHandleCallbackL();
       
   115          
       
   116 private: 
       
   117     // data
       
   118 
       
   119     /**
       
   120      * Wallpaper container.
       
   121      * Own.
       
   122      */
       
   123     CXnWallpaperContainer* iContainer;
       
   124     
       
   125     /**
       
   126      * Image files
       
   127      * Own.
       
   128      */
       
   129     CDesCArrayFlat* iFiles;
       
   130     
       
   131     /**
       
   132      * UiEngine
       
   133      * Not owned.
       
   134      */
       
   135     CXnUiEngine& iEngine;
       
   136     
       
   137     /**
       
   138      * AppUi
       
   139      * Not owned.
       
   140      */
       
   141     CXnAppUiAdapter& iAppUi;
       
   142     
       
   143     /**
       
   144      * Switch for multiple image selection.
       
   145      */
       
   146     TBool iMultiple;
       
   147         
       
   148     /**
       
   149      * Async callback.
       
   150      * Own.
       
   151      */
       
   152     CAsyncCallBack* iAsyncCb;
       
   153     
       
   154     /**
       
   155      * Resource file offset
       
   156      */
       
   157     TInt iResourceOffset;    
       
   158     
       
   159     /** 
       
   160      * Statuspane background cleaner. 
       
   161      * Own.
       
   162      */
       
   163 	CXnSpBgCleaner* iSpBgCleaner;
       
   164 	
       
   165 	/**
       
   166 	 * Selected image filename
       
   167 	 */
       
   168 	TFileName iFileName;
       
   169     };
       
   170 
       
   171 #endif      // CXNWALLPAPERVIEW_H
       
   172 
       
   173 // End of File