os/kernelhwsrv/kernel/eka/include/e32wins.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32\include\e32wins.h
sl@0
    15
// 
sl@0
    16
// WARNING: This file contains some APIs which are internal and are subject
sl@0
    17
//          to change without notice. Such APIs should therefore not be used
sl@0
    18
//          outside the Kernel and Hardware Services package.
sl@0
    19
//
sl@0
    20
sl@0
    21
#ifndef __E32WINS_H__
sl@0
    22
#define __E32WINS_H__
sl@0
    23
sl@0
    24
/** @file
sl@0
    25
	@internalTechnology
sl@0
    26
*/
sl@0
    27
sl@0
    28
#include <u32std.h>
sl@0
    29
#include <e32svr.h>
sl@0
    30
#include <winsdef.h>
sl@0
    31
sl@0
    32
#define MAX_PATH          260
sl@0
    33
sl@0
    34
IMPORT_C void BootEpoc(TBool aAutoRun);
sl@0
    35
sl@0
    36
inline TInt MapEmulatedFileName(TDes& aBuffer, const TDesC& aFilename)
sl@0
    37
	{
sl@0
    38
	TPtr8 ptrBuffer((TUint8*)aBuffer.Ptr(),aBuffer.MaxLength()<<1);
sl@0
    39
	TPtrC8 ptrFilename((TUint8*)aFilename.Ptr(), aFilename.Size());
sl@0
    40
	TInt r = UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalMapFilename,(TAny*)&ptrFilename,&ptrBuffer);
sl@0
    41
	aBuffer.SetLength(ptrBuffer.Length()>>1);
sl@0
    42
	return r;
sl@0
    43
	}
sl@0
    44
sl@0
    45
inline TInt EmulatorFlip(TEmulatorFlip aFlip)
sl@0
    46
	{return UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalSetFlip,(TAny*)aFlip,0);}
sl@0
    47
sl@0
    48
inline TInt EmulatorFlip(TEmulatorFlip aFlip, TInt aScreenNo)
sl@0
    49
	{return UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalSetFlip,(TAny*)aFlip,(TAny*)aScreenNo);}
sl@0
    50
sl@0
    51
inline void EmulatorColorDepth(TUint& aDepths)
sl@0
    52
	{UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalColorDepth,(TAny*)&aDepths,0);}
sl@0
    53
sl@0
    54
inline void EmulatorColorDepth(TUint& aDepths, TInt aScreenNo)
sl@0
    55
	{UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalColorDepth,(TAny*)&aDepths,(TAny*)aScreenNo);}
sl@0
    56
sl@0
    57
inline void EmulatorDiskSpeed(TInt& aReadSpeed, TInt& aWriteSpeed)
sl@0
    58
	{
sl@0
    59
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"DiskRead",&aReadSpeed);
sl@0
    60
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"DiskWrite",&aWriteSpeed);
sl@0
    61
	}
sl@0
    62
sl@0
    63
inline TBool EmulatorTextShell()
sl@0
    64
	{
sl@0
    65
	TBool val = EFalse;
sl@0
    66
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,(TAny*)"TextShell",&val);
sl@0
    67
	return val;
sl@0
    68
	}
sl@0
    69
sl@0
    70
inline TBool EmulatorNoGui()
sl@0
    71
	{
sl@0
    72
	TBool val = EFalse;
sl@0
    73
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,(TAny*)"NoGui",&val);
sl@0
    74
	return val;
sl@0
    75
	}
sl@0
    76
sl@0
    77
inline TBool EmulatorMiniGui()
sl@0
    78
	{
sl@0
    79
	TBool minigui = EFalse;
sl@0
    80
	TInt startupmode = 0;
sl@0
    81
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,(TAny*)"MiniGui",&minigui);
sl@0
    82
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"StartupMode",&startupmode);
sl@0
    83
	return minigui || startupmode == 8;
sl@0
    84
	}
sl@0
    85
sl@0
    86
inline const char* EmulatorAutoRun()
sl@0
    87
	{
sl@0
    88
	const char* val = NULL;
sl@0
    89
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalStringProperty,(TAny*)"AutoRun",&val);
sl@0
    90
	return val;
sl@0
    91
	}
sl@0
    92
sl@0
    93
inline const char* EmulatorCommandLine()
sl@0
    94
	{
sl@0
    95
	const char* val = NULL;
sl@0
    96
	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalStringProperty,(TAny*)"CommandLine",&val);
sl@0
    97
	return val;
sl@0
    98
	}
sl@0
    99
sl@0
   100
#endif
sl@0
   101