uiacceltk/hitchcock/ServerCore/Src/alfwindowfxplugin.cpp
changeset 0 15bf7259bb7c
child 10 88b23e2e82e1
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #include "alfwindowfxplugin.h"
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 #include "alfwindowmanager.h"
       
    23 #include "alfwindowstructs.h"
       
    24 
       
    25 class CAlfWindowFxPlugin::TAlfFxPluginData
       
    26     {
       
    27     public:
       
    28         TUint iPriority;
       
    29         TUint iBufferFormat;
       
    30         CAlfWindowManager* iWindowMgr;
       
    31         TUid iIdentifier;
       
    32     };
       
    33 
       
    34 EXPORT_C void CAlfWindowFxPlugin::ConstructL(const CAlfWindowManager& aMgr, TInt aAlfBufferFormat)
       
    35     {
       
    36     if (!iData)
       
    37         {
       
    38         iData = new (ELeave) TAlfFxPluginData;
       
    39         }
       
    40     iData->iBufferFormat = aAlfBufferFormat;
       
    41     iData->iWindowMgr = (CAlfWindowManager*)&aMgr;
       
    42     }
       
    43 
       
    44 EXPORT_C CAlfWindowFxPlugin::~CAlfWindowFxPlugin()
       
    45     {
       
    46     if (iData)
       
    47         {
       
    48         delete iData;
       
    49         }
       
    50     }
       
    51 
       
    52 
       
    53 EXPORT_C void CAlfWindowFxPlugin::NewWindow(const TWindowIdentifier& /*aId*/)
       
    54     {
       
    55     }
       
    56 
       
    57 EXPORT_C void CAlfWindowFxPlugin::DestroyWindow(const TWindowIdentifier& /*aId*/)
       
    58     {
       
    59     }
       
    60     
       
    61 EXPORT_C CAlfWindowManager* CAlfWindowFxPlugin::WindowManager()
       
    62     {
       
    63     if (!iData)
       
    64         {
       
    65         return NULL;
       
    66         }
       
    67     return iData->iWindowMgr;
       
    68     }
       
    69 
       
    70 EXPORT_C void CAlfWindowFxPlugin::HandleMessageL(const TDesC8& /*inBuf*/, TPtr8& /*outBuf*/ )
       
    71     {
       
    72     // synchronous messages are completed by server 
       
    73     }
       
    74 
       
    75 EXPORT_C void CAlfWindowFxPlugin::HandleMessageL(const TDesC8& /*inBuf*/, const RMessage2& aClientMessage )
       
    76     {
       
    77     // make sure that there are no pending aynch calls left here
       
    78     aClientMessage.Complete(KErrNotSupported);
       
    79     }
       
    80 
       
    81 
       
    82 EXPORT_C void CAlfWindowFxPlugin::CancelMessage(TInt /*aMessageId*/)
       
    83     {
       
    84     // default implementation does not have pending messages
       
    85     }
       
    86     
       
    87 TUint CAlfWindowFxPlugin::Priority()
       
    88     {
       
    89     if (iData)
       
    90         {
       
    91         return iData->iPriority;
       
    92         }
       
    93     return 0;
       
    94     }
       
    95 
       
    96 TUid* CAlfWindowFxPlugin::Identifier()
       
    97     {
       
    98     if (iData)
       
    99         {
       
   100         return &iData->iIdentifier;
       
   101         }
       
   102     return 0;
       
   103     }