classicui_plat/screen_clearer_api/inc/AknClearer.h
changeset 45 667edd0b8678
equal deleted inserted replaced
37:89c890c70182 45:667edd0b8678
       
     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:  Screen Clearer API, support for screen blanking.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AKNCLEARER_H
       
    20 #define AKNCLEARER_H
       
    21 
       
    22 #include <AknControl.h>
       
    23 
       
    24 #include <eikenv.h>
       
    25 
       
    26 class CAknScreenClearerBaseExtension;
       
    27 
       
    28 /**
       
    29 *  This class is base class for screen blanking.
       
    30 *
       
    31 *  @since Series 60 0.9
       
    32 */
       
    33 class CAknScreenClearerBase : public CAknControl
       
    34 	{
       
    35 public:
       
    36 
       
    37 	/**
       
    38 	* Handles situation when status pane size changes.
       
    39 	*/
       
    40 	IMPORT_C void HandleStatusPaneSizeChangeL();
       
    41     
       
    42 public: // from CCoeControl
       
    43 
       
    44     /**
       
    45     * From CCoeControl.
       
    46 	*/
       
    47     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);	
       
    48 
       
    49 protected:
       
    50     
       
    51     /**
       
    52     * Destructor.
       
    53 	*/
       
    54 	IMPORT_C virtual ~CAknScreenClearerBase();
       
    55 	
       
    56     /**
       
    57     * Symbian 2nd phase constructor.
       
    58     *
       
    59     * @param aParent Parent window group.
       
    60     * @param aOrdinalPos Ordinal position of the blank window.
       
    61     * @param aBlankAppStatusPane A flag to decide if application status pane area is to blanked or not.
       
    62 	*/
       
    63 	IMPORT_C void ConstructL(RWindowGroup& aParent, TInt aOrdinalPos, TBool aBlankAppStatusPane);
       
    64 
       
    65 private: // from CCoeControl
       
    66 	
       
    67     /**
       
    68     * From CCoeControl.
       
    69 	*/
       
    70 	IMPORT_C void Draw(const TRect& aRect) const;
       
    71 
       
    72 private: // from CAknControl
       
    73     /**
       
    74     * From CAknControl.
       
    75     */
       
    76     IMPORT_C void* ExtensionInterface( TUid aInterface );
       
    77 
       
    78 protected:
       
    79     
       
    80     /**
       
    81     * Sets shape for the cleared window.
       
    82     */
       
    83 	void SetShapeL();
       
    84 
       
    85     /**
       
    86     * Sets skin background and shape for the cleared window.
       
    87     */
       
    88 	void SetSkinShapeL();
       
    89 
       
    90 private:
       
    91     CAknScreenClearerBaseExtension* iExtension;
       
    92 	TBitFlags iFlags;
       
    93 	};
       
    94 
       
    95 
       
    96 // CLASS DECLARATION
       
    97 
       
    98 /**
       
    99 *  This class is for use inside applications for screen blanking.
       
   100 *
       
   101 *  @since Series 60 0.9
       
   102 */
       
   103 class CAknLocalScreenClearer : public CAknScreenClearerBase
       
   104 	{
       
   105 public:
       
   106 
       
   107     /**
       
   108     * Two-phased constructor.
       
   109     */
       
   110 	IMPORT_C static CAknLocalScreenClearer* NewLC();
       
   111 
       
   112     /**
       
   113     * Two-phased constructor.
       
   114     * @param aBlankAppStatusPane @c ETrue if application status pane is blank, 
       
   115     *                            @c EFalse if not.
       
   116     */
       
   117 	IMPORT_C static CAknLocalScreenClearer* NewLC(TBool aBlankAppStatusPane);
       
   118 
       
   119     /**
       
   120     * Two-phased constructor.
       
   121     * @param aBlankAppStatusPane @c ETrue if application status pane is blank, 
       
   122     *                            @c EFalse if not.
       
   123     */
       
   124 	IMPORT_C static CAknLocalScreenClearer* NewL(TBool aBlankAppStatusPane);
       
   125 
       
   126     /**
       
   127     * From CCoeControl
       
   128     */
       
   129 	IMPORT_C void HandleResourceChange(TInt aType);
       
   130 
       
   131 	};
       
   132 
       
   133 #endif // AKNCLEARER_H