uiaccelerator_plat/alf_core_toolkit_api/inc/uiacceltk/huieventhandler.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   Definition of MHuiEventHandler, an interface enabling 
       
    15 *                handling of scheduled events.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20  
       
    21 #ifndef __HUIEVENTHANDLER_H__
       
    22 #define __HUIEVENTHANDLER_H__
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 /* Forward declarations. */
       
    27 class THuiEvent;
       
    28 
       
    29 /**
       
    30  * MHuiEventHandler is an interface that can be derived by any object that want's to handle
       
    31  * Hitchcock UI Toolkit events scheduled by HuiScheduler.
       
    32  * 
       
    33  * If an object wishes to process events from the toolkit, it should implement this interface. 
       
    34  * 
       
    35  * @note   The destructor will NOT cancel any pending commands enqueued to this object,
       
    36  *         so you must call eg. <code>CHuiEnv::CancelCommands(this);</code> to cancel
       
    37  *         still pending commands to prevent calling destroyed object.
       
    38  */
       
    39 class MHuiEventHandler
       
    40     {
       
    41 public:
       
    42 
       
    43     /** 
       
    44      * Destructor. 
       
    45      * 
       
    46      * @note   Will NOT cancel any pending commands scheduled to this object,
       
    47      *         so you must call eg. <code>CHuiEnv::CancelCommands(this);</code> to cancel
       
    48      *         still pending commands to prevent calling destroyed object.
       
    49      */    
       
    50     IMPORT_C virtual ~MHuiEventHandler();
       
    51 
       
    52     /**
       
    53      * Called when an input event is being offered to this object.
       
    54      * 
       
    55      * The implementation must ensure that the function returns EFalse if 
       
    56      * it does not do anything in response to the event, otherwise, other objects
       
    57      * may be prevented from receiving the event. If it is able to process the 
       
    58      * event it should return ETrue.
       
    59      *
       
    60      * @param aEvent  Event to be handled.
       
    61      *
       
    62      * @return  <code>ETrue</code>, if the event was handled.
       
    63      *          Otherwise <code>EFalse</code>.
       
    64      */
       
    65     virtual TBool OfferEventL(const THuiEvent& aEvent) = 0;
       
    66 
       
    67     };  
       
    68 
       
    69 #endif  // __HUIEVENTHANDLER_H__