taskswitcher/screenshotplugin/inc/tsscreenshotplugin.h
changeset 121 0b3699f6c654
child 119 50e220be30d1
equal deleted inserted replaced
115:3ab5c078b490 121:0b3699f6c654
       
     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: 
       
    15 *
       
    16 */
       
    17 #ifndef TSSCREENSHOTPLUGIN_H
       
    18 #define TSSCREENSHOTPLUGIN_H
       
    19 
       
    20 #include <w32std.h>
       
    21 #include <graphics/wsgraphicdrawerinterface.h>
       
    22 #include <graphics/wsgraphicdrawer.h>
       
    23 
       
    24 #include "tsorientationobserver.h"
       
    25 
       
    26 class CTsOrientationMonitor;
       
    27 
       
    28 class CTsScreenshotPlugin: public CWsGraphicDrawer, 
       
    29                            public MWsEventHandler,
       
    30                            public MTsOrientationObserver
       
    31 {
       
    32 public:
       
    33     static CTsScreenshotPlugin* NewL();
       
    34     ~CTsScreenshotPlugin();
       
    35 
       
    36 private:
       
    37     void DoDraw(MWsGc&, const TRect&, const TDesC8&) const;
       
    38     void HandleMessage(const TDesC8&);
       
    39     void HandleMessageL(const TDesC8&);
       
    40     void ConstructL(MWsGraphicDrawerEnvironment& aEnv, 
       
    41                     const TGraphicDrawerId& aId, 
       
    42                     MWsClient& aOwner, 
       
    43                     const TDesC8& aData);
       
    44     void ConstructL();
       
    45     void DoHandleEvent(const TWservCrEvent& aEvent);
       
    46     void TakeScreenshot(TInt);
       
    47     void TakeScreenshotL(TInt);
       
    48     void NotifyWindowGroupToBackground(TInt aWindowGroupId);
       
    49     void NotifyWindowGroupToBackgroundL(TInt aWindowGroupId);
       
    50     TInt OrientationToAngle();
       
    51     
       
    52 private://from MTsOrientationObserver
       
    53     void OrientationChanged( TInt aAngle );
       
    54     
       
    55 private:
       
    56     RPointerArray<CFbsBitmap> iCache;
       
    57     CTsOrientationMonitor* iMonitor;
       
    58     TInt iWindowGroupId;
       
    59     TInt iAngle;
       
    60 };
       
    61 
       
    62 #endif //TSSCREENSHOTPLUGIN_H