textinput/peninputarc/src/peninputserverapp/peninputuilayoutowner.cpp
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Implementation for peninput server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "peninputuilayoutowner.h"	
       
    20 #include "peninputserver.h"
       
    21 
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CPeninputUiLayoutOwner::CPeninputUiLayoutOwner
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CPeninputUiLayoutOwner::CPeninputUiLayoutOwner ( CPeninputServer& aServer )
       
    31     : iServer( aServer )
       
    32     {
       
    33     }
       
    34 
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CPeninputUiLayoutOwner::NewL
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 CPeninputUiLayoutOwner* CPeninputUiLayoutOwner::NewL( CPeninputServer& aServer )
       
    41     {
       
    42     CPeninputUiLayoutOwner* self = new (ELeave) CPeninputUiLayoutOwner( aServer );
       
    43     CleanupStack::PushL( self );
       
    44     self->ConstructL();
       
    45     CleanupStack::Pop(self);
       
    46     return self;
       
    47     }
       
    48 
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CPeninputUiLayoutOwner::ConstructL
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 void CPeninputUiLayoutOwner::ConstructL( )
       
    55     {
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // CPeninputUiLayoutOwner::~CPeninputUiLayoutOwner
       
    60 // Destructor
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 CPeninputUiLayoutOwner::~CPeninputUiLayoutOwner()
       
    64     {
       
    65     }
       
    66 
       
    67 
       
    68 // From MLayoutOwner
       
    69 // ---------------------------------------------------------------------------
       
    70 // CPeninputUiLayoutOwner::UpdateArea
       
    71 // Update sprite rect
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 void CPeninputUiLayoutOwner::UpdateArea(const TRect& aRect,TBool aFullUpdate,
       
    75                                                     TBool aImmedFlag)
       
    76     {
       
    77     return iServer.UpdateArea( aRect, aFullUpdate,aImmedFlag);
       
    78     }
       
    79 
       
    80 //from MLayuoutOwner
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // CPeninputUiLayoutOwner::BitmapContext
       
    84 // Get bitmap context
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 CBitmapContext* CPeninputUiLayoutOwner::BitmapContext()
       
    88     {
       
    89     return iServer.BitmapContext();
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 // CPeninputUiLayoutOwner::BitmapDevice
       
    94 // Get bitmap device
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 CFbsBitmapDevice* CPeninputUiLayoutOwner::BitmapDevice()
       
    98     {
       
    99     return iServer.BitmapDevice();
       
   100     }
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // CPeninputUiLayoutOwner::MaskBmpDevice
       
   104 // Get mask bitmap device
       
   105 // ---------------------------------------------------------------------------
       
   106 //
       
   107 CFbsBitmapDevice* CPeninputUiLayoutOwner::MaskBmpDevice()
       
   108     {
       
   109     return iServer.MaskBmpDevice();
       
   110     }
       
   111 
       
   112 // ---------------------------------------------------------------------------
       
   113 // CPeninputUiLayoutOwner::Hide
       
   114 // Hide/show sprite
       
   115 // ---------------------------------------------------------------------------
       
   116 //
       
   117 void CPeninputUiLayoutOwner::Hide(TBool aHideFlag)
       
   118     {
       
   119     return iServer.Hide( aHideFlag );
       
   120     }
       
   121 
       
   122 // ---------------------------------------------------------------------------
       
   123 // CPeninputUiLayoutOwner::LayoutSizeChanged
       
   124 // Handle layout size change
       
   125 // ---------------------------------------------------------------------------
       
   126 //
       
   127 TInt CPeninputUiLayoutOwner::LayoutSizeChanged(const TSize& aSize, TBool aNeedUpdate)
       
   128 	{
       
   129 	return iServer.LayoutSizeChanged( aSize, aNeedUpdate );	    
       
   130 	}
       
   131 
       
   132 // ---------------------------------------------------------------------------
       
   133 // CPeninputUiLayoutOwner::SignalOwner
       
   134 // Signal owner
       
   135 // ---------------------------------------------------------------------------
       
   136 //
       
   137 void CPeninputUiLayoutOwner::SignalOwner(TInt aEventType, const TDesC& aEventData)
       
   138     {    
       
   139     return iServer.SignalOwner( aEventType, aEventData );	 
       
   140     }
       
   141     
       
   142 // ---------------------------------------------------------------------------
       
   143 // CPeninputUiLayoutOwner::LayoutRect
       
   144 // Get sprite size and position
       
   145 // ---------------------------------------------------------------------------
       
   146 //
       
   147 TRect CPeninputUiLayoutOwner::LayoutRect()
       
   148     {
       
   149     return iServer.LayoutRect();
       
   150     }
       
   151 
       
   152 // ---------------------------------------------------------------------------
       
   153 // CPeninputUiLayoutOwner::SetPosition
       
   154 // called when sprite has been moved
       
   155 // ---------------------------------------------------------------------------
       
   156 //
       
   157 
       
   158 TPoint CPeninputUiLayoutOwner::SetPosition(const TPoint& aNewPos)
       
   159     {
       
   160     return iServer.SetPosition( aNewPos );
       
   161     }
       
   162 
       
   163 void CPeninputUiLayoutOwner::FlushUi()
       
   164     {
       
   165     return iServer.FlushWsSession();
       
   166     }
       
   167     
       
   168 // End of File
       
   169