javauis/lcdui_akn/lcduiphysicswrapper/inc/MMIDLcduiPhysicsObserver.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     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:  Observer interface for physics scrolling
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMIDLCDUIPHYSICSOBSERVER_H
       
    20 #define MMIDLCDUIPHYSICSOBSERVER_H
       
    21 
       
    22 class MMIDLcduiPhysicsObserver
       
    23 {
       
    24 public:
       
    25 
       
    26     /**
       
    27      * Physics emulation has moved the view.
       
    28      *
       
    29      * When this method is called client should update its visual and logical
       
    30      * states to reflect the changes caused by view move. Note that if the
       
    31      * parameter @c aDrawNow is @c EFalse client is not allowed to redraw the
       
    32      * display but should only update its logical state.
       
    33      * Physics engine will ensure that the last frame is always drawn.
       
    34      *
       
    35      * @since S60 v5.0
       
    36      *
       
    37      * @param  aNewPosition  The new position of the view.
       
    38      * @param  aDrawNow      @c ETrue if client should redraw the screen,
       
    39      *                       otherwise @c EFalse.
       
    40      * @param  aFlags        Additional flags, not used currently.
       
    41      */
       
    42     virtual void ViewPositionChanged(const TPoint& aNewPosition,
       
    43                                      TBool aDrawNow,
       
    44                                      TUint aFlags) = 0;
       
    45 
       
    46     /**
       
    47      * Physics emulation has stopped moving the view
       
    48      *
       
    49      * @since S60 v5.0
       
    50      */
       
    51     virtual void PhysicEmulationEnded() = 0;
       
    52 
       
    53     /**
       
    54      * Returns the observer's view position.
       
    55      *
       
    56      * @since S60 v5.0
       
    57      *
       
    58      * @return Physics observer's view position.
       
    59      */
       
    60     virtual TPoint ViewPosition() const = 0;
       
    61 };
       
    62 #endif // MMIDLCDUIPHYSICSOBSERVER_H