uifw/AvKon/aknphysics/inc/aknphysicskeyconsumer.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  AknPhysics key consuming control
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AKNPHYSICSKEYCONSUMER_H
       
    20 #define C_AKNPHYSICSKEYCONSUMER_H
       
    21 
       
    22 
       
    23 #include <coecntrl.h>
       
    24 
       
    25 class CAknPhysicsConeObserver;
       
    26 
       
    27 /**
       
    28  *  AknPhysics key consuming control
       
    29  *
       
    30  */
       
    31 NONSHARABLE_CLASS( CAknPhysicsKeyConsumer ) : public CCoeControl
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      */
       
    39     static CAknPhysicsKeyConsumer* NewL( 
       
    40         CAknPhysicsConeObserver* aConeObserver );
       
    41 
       
    42     /**
       
    43      * Two-phased constructor.
       
    44      */
       
    45     static CAknPhysicsKeyConsumer* NewLC( 
       
    46         CAknPhysicsConeObserver* aConeObserver );
       
    47 
       
    48     /**
       
    49      * Destructor.
       
    50      */
       
    51     virtual ~CAknPhysicsKeyConsumer();
       
    52     
       
    53 private:
       
    54 
       
    55     /**
       
    56      * C++ constructor.
       
    57      */
       
    58     CAknPhysicsKeyConsumer( CAknPhysicsConeObserver* aConeObserver );
       
    59 
       
    60     /**
       
    61      * Symbian second-phase constructor.
       
    62      */
       
    63     void ConstructL();
       
    64     
       
    65 // from base class CCoeControl
       
    66 
       
    67     /**
       
    68      * Handles key events.
       
    69      *
       
    70      * @param aKeyEvent The key event.
       
    71      * @param aType The type of key event: 
       
    72      * EEventKey, EEventKeyUp or EEventKeyDown.
       
    73      */
       
    74     TKeyResponse OfferKeyEventL( const TKeyEvent &aKeyEvent, 
       
    75                                        TEventCode aType );
       
    76 
       
    77 private: // data
       
    78 
       
    79     /**
       
    80      * Physics control environment observer.
       
    81      * Not own.
       
    82      */
       
    83     CAknPhysicsConeObserver* iConeObserver;
       
    84 
       
    85     };
       
    86 
       
    87 
       
    88 #endif // C_AKNPHYSICSKEYCONSUMER_H