taskswitcher/contextengine/tsfswpreviewprovider/inc/tspreviewobserver.h
branchRCL_3
changeset 34 5456b4e8b3a8
child 35 3321d3e205b6
equal deleted inserted replaced
33:5f0182e07bfb 34:5456b4e8b3a8
       
     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:  Preview provider API
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TSPREVIEWOBSERVER_H
       
    20 #define TSPREVIEWOBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 /**
       
    26  * Observer for preview screenshot changes. Client must implement this and 
       
    27  * register itself when calling CTsFastSwapPreviewProvider::NewL. Callback
       
    28  * methods are called whenever there is a new preview screenshot taken from
       
    29  * the applications or when an application is exited.
       
    30  *
       
    31  * @see CTsFastSwapPreviewProvider
       
    32  */
       
    33 class MTsFastSwapPreviewObserver
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Called when application has changed and screenshot has been taken. 
       
    39      * New sceenshots will be taken and provided to the client via this 
       
    40      * callback every time the application goes to background.
       
    41      *
       
    42      * @param aWgId Window group id of the application.
       
    43      * @param aFbsHandle Handle to screenshot CFbsBitmap.
       
    44      */         
       
    45     virtual void HandleFswPpApplicationChange( TInt aWgId, TInt aFbsHandle ) = 0;
       
    46     
       
    47     /**
       
    48      * Called when application has been exited. Client can free the resources
       
    49      * related to aWgId (for example a copied bitmap) since the application is
       
    50      * no more running.
       
    51      *
       
    52      * @param aWgId Window group id of the application.
       
    53      */         
       
    54     virtual void HandleFswPpApplicationUnregistered( TInt aWgId ) = 0;
       
    55     
       
    56     /**
       
    57      * Called when screenshot for the application needs rotation. Client should
       
    58      * rotate bitmap for the given aWgId by 90 degrees, otherwise it will be
       
    59      * displayed incorrectly.
       
    60      * 
       
    61      * @param aWgId Window group id of the application
       
    62      * @param aClockwise marks direction of the rotation (ETrue - clockwise, EFalse - counter clockwise)
       
    63      */
       
    64     virtual void HandleFswPpApplicationBitmapRotation( TInt aWgId, TBool aClockwise ) = 0;
       
    65     };
       
    66 
       
    67 #endif // TSPREVIEWOBSERVER_H
       
    68 
       
    69 // End of file