mulwidgets/gesturehelper/src/pointercapturer.h
changeset 0 e83bab7cf002
equal deleted inserted replaced
-1:000000000000 0:e83bab7cf002
       
     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:  Responsible for capturing pointer events
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef _POINTERCAPTURER_H_
       
    19 #define _POINTERCAPTURER_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 class CAlfControl;
       
    26 class CAlfControlGroup;
       
    27 class CAlfEnv;
       
    28 class CAlfDisplay;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 namespace GestureHelper 
       
    33 {
       
    34 
       
    35 class CGestureHelperImpl;
       
    36 class CPointerCaptureControl;
       
    37 
       
    38 /**
       
    39  * CPointerCaptureControl
       
    40  * Gesture control own a gesture helper, and captures any pointer events that 
       
    41  * no other control captures. After it captures pointer down event, it will 
       
    42  * capture all pointer events until pointer up. It does this by bringing its
       
    43  * control group to the top upon pointer down, and lowering the control group
       
    44  * to the botton upon pointer up.
       
    45  */
       
    46 NONSHARABLE_CLASS( CPointerCapturer ) : public CBase
       
    47     {
       
    48 public: 
       
    49     /** Two-phased constructor */
       
    50     static CPointerCapturer* NewL();
       
    51     /** Destructor */
       
    52     ~CPointerCapturer();
       
    53     
       
    54     void InitForAlfredL( CGestureHelperImpl& aHelper, CAlfEnv& aEnv, 
       
    55         CAlfDisplay& aDisplay, TInt aControlGroupId );
       
    56 
       
    57     void StartL();
       
    58     void Stop();
       
    59     
       
    60 private:    
       
    61     /// 
       
    62     CPointerCaptureControl* iCaptureControl;
       
    63     TInt iControlGroupId;
       
    64     };
       
    65 
       
    66 } // namespace GestureHelper
       
    67     
       
    68 #endif // _POINTERCAPTURER_H_