# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276070039 -10800 # Node ID 0227b64654ad23a8ea576dc4d8e18765baf647e1 # Parent 582f97e694c59903d8c6dcd82abc33a342b0627a Revision: 201023 Kit: 2010123 diff -r 582f97e694c5 -r 0227b64654ad emulator/emulatorbsp/hal/config.hcf --- a/emulator/emulatorbsp/hal/config.hcf Wed Apr 14 17:07:53 2010 +0300 +++ b/emulator/emulatorbsp/hal/config.hcf Wed Jun 09 10:53:59 2010 +0300 @@ -86,3 +86,4 @@ EPointer3DExitCloseProximityThreshold : set = 0 EDisplayMemoryHandle=GetDisplayMemoryHandle ENumCpus=GetNumCpus +EDigitiserOrientation : set = DigitiserOrientation diff -r 582f97e694c5 -r 0227b64654ad emulator/emulatorbsp/inc/gui.h --- a/emulator/emulatorbsp/inc/gui.h Wed Apr 14 17:07:53 2010 +0300 +++ b/emulator/emulatorbsp/inc/gui.h Wed Jun 09 10:53:59 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -266,6 +266,7 @@ TInt iMaxScreenHeight; TInt iXYInputWidth; TInt iXYInputHeight; + TInt iXYOrientation; TInt iPhysicalScreenWidth; TInt iPhysicalScreenHeight; TInt iMaxPhysicalScreenWidth; diff -r 582f97e694c5 -r 0227b64654ad emulator/emulatorbsp/specific/gui.cpp --- a/emulator/emulatorbsp/specific/gui.cpp Wed Apr 14 17:07:53 2010 +0300 +++ b/emulator/emulatorbsp/specific/gui.cpp Wed Jun 09 10:53:59 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -4108,7 +4108,7 @@ return static_cast(aThis)->XYHalFunction(aFunction,a1,a2); } -TInt DMasterIni::XYHalFunction(TInt aFunction, TAny* a1, TAny* /*a2*/) +TInt DMasterIni::XYHalFunction(TInt aFunction, TAny* a1, TAny* a2) { TInt r=KErrNone; switch(aFunction) @@ -4129,6 +4129,28 @@ r=KErrNotSupported; } break; + + // a2 = TBool aSet (ETrue for setting, EFalse for retrieval) + // a1 = TDigitizerOrientation (set) + // a1 = &TDigitizerOrientation (get) + // Assume screen [0] here as this HAL function is only registered for + // screen 0 on the emulator platform. Function only called if display==0 + case EDigitiserOrientation: + if ((TBool)a2) + { + // Set the orientation attribute + // In case user thread, check it has WDD capability + if(!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData,__PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EDigitiserOrientation"))) + return KErrPermissionDenied; + systemIni->iScreens[0]->iXYOrientation = (TInt)a1; + } + else + { + // Get the orientation attribute, safe copy it into user memory + kumemput32(a1, &(systemIni->iScreens[0]->iXYOrientation), sizeof(TInt)); + } + break; + default: r=KErrNotSupported; break;