coreapplicationuis/SysAp/Inc/SysApShutdownImage.h
changeset 0 2e3d3ce01487
child 46 eea20ed08f4b
child 62 924385140d98
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2002-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:  CSysApShutdownImage class definition. This class
       
    15 *                implements stuff needed to show Shutdownimage.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef SYSAPSHUTDOWNIMAGE_H
       
    21 #define SYSAPSHUTDOWNIMAGE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <coecntrl.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28 *  CSysApShutdownImage
       
    29 *
       
    30 *  @lib   sysap
       
    31 *  @since 1.0
       
    32 */
       
    33 
       
    34 class CSysApShutdownImage : public CCoeControl , public MCoeControlObserver
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37         /**
       
    38         * Two-phased constructor.
       
    39         * @param CSysApAppUi& aSysApAppUi,
       
    40         * @param TUint8 aObjNo
       
    41         * @return CSysApPhonetObserver* ( Pointer to the created object )
       
    42         */
       
    43         static CSysApShutdownImage* NewL();
       
    44 
       
    45         /**
       
    46         *  Destructor
       
    47         */
       
    48         ~CSysApShutdownImage();
       
    49 
       
    50     public:
       
    51         /**
       
    52         * Gets called when the shutdown is about the begin. Does the thing.
       
    53         * @param None
       
    54         * @return void
       
    55         */
       
    56         void ShowShutdownImageL(TInt aBitmapId);
       
    57 
       
    58         RWindow& ShutdownCoeControlWindow();
       
    59 
       
    60 #ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    61         /**
       
    62         * Set a sub-control to this control.
       
    63         *
       
    64         * @since S60 3.2
       
    65         */
       
    66         void SetComponent( CCoeControl& aComponent );
       
    67 
       
    68         /**
       
    69         * Remove the sub-control from this control.
       
    70         *
       
    71         * @since S60 3.2
       
    72         */
       
    73         void RemoveComponent();
       
    74 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    75 
       
    76     private:
       
    77         /**
       
    78         *  C++ default constructor.
       
    79         */
       
    80         CSysApShutdownImage();
       
    81 
       
    82         /**
       
    83         *  EPOC default constructor
       
    84         */
       
    85         void ConstructL();
       
    86 
       
    87     private:
       
    88 
       
    89 #ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    90         /**
       
    91         * From CCoeControl.
       
    92         *
       
    93         * @since S60 3.2
       
    94         */
       
    95         void SizeChanged();
       
    96 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    97 
       
    98         /**
       
    99         * @param None
       
   100         * @return void
       
   101         */
       
   102         TInt CountComponentControls() const;
       
   103 
       
   104         /**
       
   105         * @param None
       
   106         * @return void
       
   107         */
       
   108         CCoeControl* ComponentControl(TInt aIndex) const;
       
   109 
       
   110         /**
       
   111         * @param None
       
   112         * @return void
       
   113         */
       
   114         void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
       
   115 
       
   116     private: // Functions from base classes
       
   117 
       
   118         /**
       
   119         * Gets called by HandleSystemAgentEventL to Disable keylock when devicelock is activated.
       
   120         * This is done already when device lock is activated because this
       
   121         * @param None
       
   122         * @return void
       
   123         */
       
   124         void Draw(const TRect& aRect) const;
       
   125 
       
   126         /**
       
   127         * Gets called by HandleSystemAgentEventL to Disable keylock when devicelock is activated.
       
   128         * This is done already when device lock is activated because this
       
   129         * @param None
       
   130         * @return void
       
   131         */
       
   132         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
   133 
       
   134     private:    // Data
       
   135 
       
   136         //Used for showing user selected image
       
   137         CFbsBitmap*     iBitmap;
       
   138 
       
   139 #ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
   140         // Component control.
       
   141         CCoeControl* iComponent;
       
   142 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
   143     };
       
   144 
       
   145 #endif      // SYSAPSHUTDOWNIMAGE_H
       
   146 
       
   147 // End of File