uiacceltk/hitchcock/Client/src/alfclientwindow.cpp
changeset 0 15bf7259bb7c
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 * Name        : alfclientwindow.cpp
       
    14 * Part of     : Alfred UI Toolkit / alfclient.dll
       
    15 * Description : AlfClientWindow class to post drawing commands to
       
    16 *               serverside canvas
       
    17 *
       
    18 */
       
    19 
       
    20 #include <alf/alfenv.h>
       
    21 #include <alf/alfclientwindow.h>
       
    22 #include "alfclient.h"
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // Constructor
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 
       
    29 EXPORT_C CAlfClientWindow* CAlfClientWindow::NewL( CAlfEnv& aEnv, RWindow& aWindow )
       
    30     {
       
    31     CAlfClientWindow* self = CAlfClientWindow::NewLC( aEnv, aWindow );
       
    32     CleanupStack::Pop();
       
    33     return self;
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // Constructor
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 
       
    41 CAlfClientWindow* CAlfClientWindow::NewLC( CAlfEnv& aEnv, RWindow& aWindow )
       
    42     {
       
    43     CAlfClientWindow* self = new(ELeave)CAlfClientWindow;
       
    44     CleanupStack::PushL(self);
       
    45     self->ConstructL( aEnv, aWindow );
       
    46     return self;
       
    47     }
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // Constructor
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 CAlfClientWindow::CAlfClientWindow()
       
    54     {    
       
    55     }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // Constructor
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 
       
    62 void CAlfClientWindow::ConstructL( CAlfEnv& aEnv, RWindow& aWindow )
       
    63     {
       
    64     iEnv = &aEnv;
       
    65     iRWindow = &aWindow;
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // Destructor
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 
       
    73 EXPORT_C CAlfClientWindow::~CAlfClientWindow()
       
    74     {    
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // PostCommandsL
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C void CAlfClientWindow::PostCommandsL( TDes8& aCommandBuffer, TAlfCommandBufferStatus aStatus )
       
    82     {
       
    83     User::LeaveIfError(iEnv->Client().PostQtBuffer( iRWindow->WindowGroupId(),
       
    84             iRWindow->ClientHandle(), aCommandBuffer, aStatus ));
       
    85     }
       
    86