inc/screensaverappui.h
branchRCL_3
changeset 26 e8d784ac1a4b
parent 0 040fcad49f44
equal deleted inserted replaced
25:aaeeca1f15af 26:e8d784ac1a4b
       
     1 /*
       
     2 * Copyright (c) 2009 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:   The define of appui for screensaver
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_SCREENSAVERAPPUI_H
       
    22 #define C_SCREENSAVERAPPUI_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <aknViewAppUi.h>
       
    26 
       
    27 #include "screensaverview.h"
       
    28 
       
    29 
       
    30 class CScreensaverEngine;
       
    31 
       
    32 // UID of Screensaver application
       
    33 const TUid KUidScreensaverApp  = { 0x100056CF };
       
    34 
       
    35 /**
       
    36  *  'AppUi' class.
       
    37  */
       
    38 class CScreensaverAppUi : public CAknViewAppUi
       
    39     {
       
    40 public:	
       
    41 	/**
       
    42     * ConstructL.
       
    43     * 2nd phase constructor.
       
    44     */
       
    45     void ConstructL();
       
    46 
       
    47     /**
       
    48     * ~CScreensaverAppUi.
       
    49     * Destructor.
       
    50     */
       
    51     ~CScreensaverAppUi();
       
    52     
       
    53     /**
       
    54     * Returns the pointer to screensaver model which is owned by AppUi
       
    55     * @return Screensaver Model
       
    56     */
       
    57     CScreensaverEngine& Model() const;
       
    58 
       
    59     /**
       
    60     * From CEikAppUi.
       
    61     * Takes care of command handling.
       
    62     * @param aCommand command to be handled
       
    63     */
       
    64     void HandleCommandL(TInt aCommand);
       
    65 
       
    66     /**
       
    67     * Returns the pointer to CScreensaverView which is derived from AknView
       
    68     * @return CScreensaverView
       
    69     */
       
    70     CScreensaverView* ScreensaverView();
       
    71 
       
    72 private:
       
    73     
       
    74     /**
       
    75     * Creates the CScreensaverView object and the Display object   
       
    76     */
       
    77     void CreateViewL();
       
    78 
       
    79     /**
       
    80     * From CEikAppUi.
       
    81     * Key event handler.
       
    82     */
       
    83     TKeyResponse HandleKeyEventL(const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/);
       
    84     
       
    85     /**
       
    86     * From @c CCoeAppUiBase.   
       
    87     * Calls CAknViewAppUi::HandleScreenDeviceChangedL().
       
    88     */
       
    89     void HandleScreenDeviceChangedL();
       
    90 
       
    91     /**
       
    92     * From AknAppUi. Handles pointer-initiated view switch. Currently this
       
    93     * function does nothing but calls base class function.
       
    94     * @since Series 60 3.0
       
    95     * @param aEvent Window server event.
       
    96     * @param aDestination Pointer to the control which the event is targeted to.
       
    97     */
       
    98     void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination);
       
    99 
       
   100 private:
       
   101     
       
   102     /**
       
   103     * Screensaver Model.
       
   104     * Owned.
       
   105     */
       
   106     CScreensaverEngine* iModel;
       
   107     
       
   108     /**
       
   109     * Screensaver view
       
   110     * 
       
   111     * Owned
       
   112     */
       
   113     CScreensaverView* iView;
       
   114     };
       
   115 
       
   116 #endif // C_SCREENSAVERAPPUI_H
       
   117