williamr@2: // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // e32\include\e32hal.h williamr@2: // williamr@2: // williamr@2: williamr@2: #ifndef __E32HAL_H__ williamr@2: #define __E32HAL_H__ williamr@2: #include williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated No replacement. williamr@2: */ williamr@2: const TInt KMaxRomDevices=8; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Defines the calibration settings that can be restored by williamr@2: the digitiser's implementation of DDigitiser::RestoreXYInputCalibration. williamr@2: williamr@2: See the digitiser template port in: williamr@2: @code williamr@2: ...\template\template_variant\specific\xyin.cpp williamr@2: @endcode williamr@2: williamr@2: @see DDigitiser::RestoreXYInputCalibration() williamr@2: */ williamr@2: enum TDigitizerCalibrationType williamr@2: { williamr@2: EFactory, /**< Restore to factory settings. */ williamr@2: ESaved /**< Restore to saved settings. */ williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Defines the screen coordinates of the point touched during calibration. williamr@2: williamr@2: An object of this type is passed, via a TPckgBuf, to the HAL handler williamr@2: that deals with the HAL group function-id pair: williamr@2: - EHalGroupDigitiser, EDigitiserHalSetXYInputCalibration williamr@2: - EHalGroupDigitiser, EDigitiserHalCalibrationPoints williamr@2: - EHalGroupDigitiser, EDigitiserHalRestoreXYInputCalibration williamr@2: williamr@2: @see EDigitiserHalSetXYInputCalibration williamr@2: @see EDigitiserHalCalibrationPoints williamr@2: @see EDigitiserHalRestoreXYInputCalibration williamr@2: @see TDigitiserHalFunction williamr@2: @see EHalGroupDigitiser williamr@2: @see TPckgBuf williamr@2: */ williamr@2: class TDigitizerCalibration williamr@2: { williamr@2: public: williamr@2: TPoint iTl; /**< Top left point.*/ williamr@2: TPoint iBl; /**< Bottom left point. */ williamr@2: TPoint iTr; /**< Top right point.*/ williamr@2: TPoint iBr; /**< Bottom right point.*/ williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: An enum that identifies the full set of keyboard types. williamr@2: williamr@2: A variable of this type is defined and used in the TKeyboardInfoV01 struct. williamr@2: williamr@2: @see TKeyboardInfoV01::iKeyboardType. williamr@2: */ williamr@2: enum TKeyboard williamr@2: { williamr@2: EKeyboard_Keypad=1, /**< Keypad type*/ williamr@2: EKeyboard_Full=2, /**< Full keyboard type*/ williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Encapsulates information about the keyboard. williamr@2: williamr@2: NOTE that the information represented here is not used by Symbian OS, williamr@2: and exists to maintain binary compatibilty with older versions. williamr@2: williamr@2: However, keyboard drivers that implement the HAL handler for williamr@2: the EHalGroupKeyboard group still need to return a default object williamr@2: of this type. williamr@2: See the template port. williamr@2: williamr@2: An object of this type is passed, via a TPckgBuf, to the HAL handler williamr@2: that deals with the HAL group function-id pair: williamr@2: - EHalGroupKeyboard, EKeyboardHalKeyboardInfo; williamr@2: williamr@2: @see EKeyboardHalKeyboardInfo williamr@2: @see TKeyboardHalFunction williamr@2: @see EHalGroupKeyboard williamr@2: @see TPckgBuf williamr@2: */ williamr@2: class TKeyboardInfoV01 williamr@2: { williamr@2: public: williamr@2: /** williamr@2: The number of device keys. williamr@2: williamr@2: NOTE that the information represented by this variable is not williamr@2: used by Symbian OS, and exists to maintain binary compatibility williamr@2: with older versions. williamr@2: */ williamr@2: TInt iDeviceKeys; williamr@2: williamr@2: williamr@2: /** williamr@2: The number of application keys. williamr@2: williamr@2: NOTE that the information represented by this variable is not williamr@2: used by Symbian OS, and exists to maintain binary compatibility williamr@2: with older versions. williamr@2: */ williamr@2: TInt iAppsKeys; williamr@2: williamr@2: williamr@2: /** williamr@2: Defines the type of keyboard available as enumerated by williamr@2: the TKeyboard enum. williamr@2: williamr@2: NOTE that the information represented by this variable is not williamr@2: used by Symbian OS, and exists to maintain binary compatibility williamr@2: with older versions. williamr@2: williamr@2: @see TKeyboard williamr@2: */ williamr@2: TKeyboard iKeyboardType; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Package buffer for a TKeyboardInfoV01 object. williamr@2: williamr@2: @see TKeyboardInfoV01 williamr@2: */ williamr@2: typedef TPckgBuf TKeyboardInfoV01Buf; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Encapsulates information about the digitiser. williamr@2: williamr@2: An object of this type is passed, via a TPckgBuf, to the HAL handler williamr@2: that deals with the HAL group function-id pair: williamr@2: - EHalGroupDigitiser, EDigitiserHalXYInfo; williamr@2: williamr@2: @see EDigitiserHalXYInfo williamr@2: @see TDigitiserHalFunction williamr@2: @see EHalGroupDigitiser williamr@2: @see TPckgBuf williamr@2: */ williamr@2: class TDigitiserInfoV01 williamr@2: { williamr@2: public: williamr@2: TPoint iOffsetToDisplay;/**< The offset in pixels from the digitiser usable area to the display area. */ williamr@2: TSize iDigitiserSize; /**< The width/height of the display in pixels as used by digitiser.*/ williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Encapsulates extra information required by 3 dimensional pointing devices. williamr@2: */ williamr@2: class TDigitiserInfoV02 : public TDigitiserInfoV01 williamr@2: { williamr@2: TInt iZRange; /**< The maximum distance to screen a pointing device will be detected (settable).*/ williamr@2: TUint8 iThetaSupported; /**< A Boolean value that indicates if Theta polar angle detection (tilt) is supported.*/ williamr@2: TUint8 iPhiSupported; /**< A Boolean value that indicates if Phi polar angle detection (tilt) is supported.*/ williamr@2: TUint8 iAlphaSupported; /**< A Boolean value that indicates if rotation of the pointing device along its main axis is supported.*/ williamr@2: TUint8 iPressureSupported; /**< A Boolean value that indicates if pressure applied on screen is supported.*/ williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Package buffer for a TDigitiserInfoV01 object. williamr@2: williamr@2: @see TDigitiserInfoV01 williamr@2: */ williamr@2: typedef TPckgBuf TDigitiserInfoV01Buf; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Package buffer for a TDigitiserInfoV02 object. williamr@2: williamr@2: @see TDigitiserInfoV02 williamr@2: */ williamr@2: typedef TPckgBuf TDigitiserInfoV02Buf; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Encapsulates information about the mouse display characteristics. williamr@2: williamr@2: An object of this type is passed, via a TPckgBuf, to the HAL handler williamr@2: that deals with the HAL group function-id pair: williamr@2: - EHalGroupMouse, EMouseHalMouseInfo; williamr@2: williamr@2: @see EMouseHalMouseInfo williamr@2: @see TMouseHalFunction williamr@2: @see EHalGroupMouse williamr@2: @see TPckgBuf williamr@2: */ williamr@2: class TMouseInfoV01 williamr@2: { williamr@2: public: williamr@2: TInt iMouseButtons; /**< The number of mouse buttons.*/ williamr@2: TPoint iOffsetToDisplay; /**< The offset in pixels from the mouse usable area to the display area.*/ williamr@2: TSize iMouseAreaSize; /**< The width/height of the display in pixels as used by the mouse. */ williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Package buffer for a TMouseInfoV01 object. williamr@2: williamr@2: @see TMouseInfoV01 williamr@2: */ williamr@2: typedef TPckgBuf TMouseInfoV01Buf; williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Encapsulates Variant specific information. williamr@2: williamr@2: An object of this type is passed, via a TPckgBuf, to the HAL handler williamr@2: that deals with the HAL group function-id pair: williamr@2: - EHalGroupVariant, EVariantHalVariantInfo; williamr@2: williamr@2: @see EVariantHalVariantInfo williamr@2: @see TVariantHalFunction williamr@2: @see EHalGroupVariant williamr@2: @see TPckgBuf williamr@2: */ williamr@2: class TVariantInfoV01 williamr@2: { williamr@2: public: williamr@2: /** williamr@2: The ROM version. williamr@2: */ williamr@2: TVersion iRomVersion; williamr@2: williamr@2: /** williamr@2: The Id that uniquely identifies the device. williamr@2: */ williamr@2: SInt64 iMachineUniqueId; williamr@2: williamr@2: /** williamr@2: The bits that represent the LED capabilities. williamr@2: williamr@2: NB capabilities in this context does not mean security capabilities. williamr@2: */ williamr@2: TUint iLedCapabilities; williamr@2: williamr@2: /** williamr@2: The processor clock speed. williamr@2: */ williamr@2: TInt iProcessorClockInKHz; williamr@2: williamr@2: /** williamr@2: The speed factor. williamr@2: */ williamr@2: TInt iSpeedFactor; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Package buffer for a TVariantInfoV01 object. williamr@2: williamr@2: @see TVariantInfoV01 williamr@2: */ williamr@2: typedef TPckgBuf TVariantInfoV01Buf; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated Use HAL::Get() from the HAL library instead with attributes ESystemStartupReason. williamr@2: williamr@2: The reason that the device last reset williamr@2: williamr@2: Note that not all reasons can occur on all devices. williamr@2: */ williamr@2: enum TMachineStartupType williamr@2: { williamr@2: EStartupCold,EStartupColdReset,EStartupNewOs, williamr@2: EStartupPowerFail,EStartupWarmReset,EStartupKernelFault, williamr@2: EStartupSafeReset williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated Use HAL::Get() from the HAL library instead with attributes EPen or EMouse. williamr@2: williamr@2: The XY input method supported williamr@2: */ williamr@2: enum TXYInputType williamr@2: { williamr@2: EXYInputNone, williamr@2: EXYInputPointer, williamr@2: EXYInputMouse, williamr@2: EXYInputDeltaMouse williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated Use HAL::Get() from the HAL library instead. williamr@2: williamr@2: Miscellaneous machine info. williamr@2: */ williamr@2: class TMachineInfoV1 williamr@2: { williamr@2: public: williamr@2: TVersion iRomVersion; williamr@2: TXYInputType iXYInputType; williamr@2: TBool iKeyboardPresent; williamr@2: TBool iBacklightPresent; williamr@2: TSize iDisplaySizeInPixels; williamr@2: TSize iXYInputSizeInPixels; williamr@2: TSize iPhysicalScreenSize; williamr@2: TPoint iOffsetToDisplayInPixels; williamr@2: TInt iKeyboardId; williamr@2: TInt iDisplayId; williamr@2: SInt64 iMachineUniqueId; williamr@2: TUint iLedCapabilities; williamr@2: TInt iProcessorClockInKHz; williamr@2: TInt iSpeedFactor; williamr@2: TInt iMaximumDisplayColors; williamr@2: }; williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated williamr@2: */ williamr@2: typedef TPckgBuf TMachineInfoV1Buf; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated Use HAL::Get() from the HAL library instead with attributes ELanguageIndex or EKeyboardIndex. williamr@2: williamr@2: Miscellaneous locale info. williamr@2: */ williamr@2: class TMachineInfoV2 : public TMachineInfoV1 williamr@2: { williamr@2: public: williamr@2: TInt iLanguageIndex; williamr@2: TInt iKeyboardIndex; williamr@2: }; williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated williamr@2: */ williamr@2: typedef TPckgBuf TMachineInfoV2Buf; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated Use HAL::Get() from the HAL library instead with attributes EMemoryRAM, EMemoryRAMFree or EMemoryROM. williamr@2: williamr@2: Miscellaneous memory info. williamr@2: */ williamr@2: class TMemoryInfoV1 williamr@2: { williamr@2: public: williamr@2: TInt iTotalRamInBytes; williamr@2: TInt iTotalRomInBytes; williamr@2: TInt iMaxFreeRamInBytes; williamr@2: TInt iFreeRamInBytes; williamr@2: TInt iInternalDiskRamInBytes; williamr@2: TBool iRomIsReprogrammable; williamr@2: }; williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated williamr@2: */ williamr@2: typedef TPckgBuf TMemoryInfoV1Buf; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated No replacement. williamr@2: williamr@2: Miscellaneous ROM info. williamr@2: */ williamr@2: class TRomInfoEntryV1 williamr@2: { williamr@2: public: williamr@2: enum TRomTypeV1 williamr@2: { williamr@2: ERomTypeRom=0, williamr@2: ERomTypeFlash=1 williamr@2: }; williamr@2: TInt iSize; // size of ROM in bytes, 0=no ROM present williamr@2: TInt iWidth; // bus width in bits williamr@2: TInt iSpeed; // number of wait states williamr@2: TRomTypeV1 iType; // 0=ROM, 1=FLASH williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated No replacement. williamr@2: williamr@2: Miscellaneous ROM info. williamr@2: */ williamr@2: class TRomInfoV1 williamr@2: { williamr@2: public: williamr@2: TRomInfoEntryV1 iEntry[KMaxRomDevices]; williamr@2: }; williamr@2: /** williamr@2: @publishedPartner williamr@2: @deprecated williamr@2: */ williamr@2: typedef TPckgBuf TRomInfoV1Buf; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: const TUint KRuggedFileSystem=0x01; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: class TDriveInfoV1 williamr@2: { williamr@2: public: williamr@2: TInt iTotalSupportedDrives; williamr@2: TInfoName iDriveName[KMaxLocalDrives]; williamr@2: TInt iTotalSockets; williamr@2: TInfoName iSocketName[KMaxPBusSockets]; williamr@2: TInt iRuggedFileSystem; williamr@2: TUint iRegisteredDriveBitmask; williamr@2: }; williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: typedef TPckgBuf TDriveInfoV1Buf; williamr@2: williamr@2: #if defined(_UNICODE) && !defined(__KERNEL_MODE__) williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: class TDriveInfoV18 williamr@2: { williamr@2: public: williamr@2: TInt iTotalSupportedDrives; williamr@2: TBuf8 iDriveName[KMaxLocalDrives]; //TInfoName williamr@2: TInt iTotalSockets; williamr@2: TBuf8 iSocketName[KMaxPBusSockets]; //TInfoName williamr@2: TInt iRuggedFileSystem; williamr@2: TUint iRegisteredDriveBitmask; williamr@2: }; williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: typedef TPckgBuf TDriveInfoV1Buf8; williamr@2: #else williamr@2: typedef TDriveInfoV1 TDriveInfoV18; williamr@2: typedef TDriveInfoV1Buf TDriveInfoV1Buf8; williamr@2: #endif williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: class TExcInfo williamr@2: { williamr@2: public: williamr@2: TAny *iCodeAddress; williamr@2: TAny *iDataAddress; williamr@2: TInt iExtraData; williamr@2: }; williamr@2: williamr@2: #ifndef __KERNEL_MODE__ williamr@2: #include williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: A set of user side utility functions for acessing hardware related williamr@2: information. williamr@2: williamr@2: Four of these functions are DEPRECATED and should NOT be used; some of williamr@2: these functions have replacements, but others do not; see the description of williamr@2: the individual functions. williamr@2: williamr@2: The following functions are not deprecated, but are only used by Symbian williamr@2: OS as part of its internal implementation: williamr@2: - UserHal::FaultReason() williamr@2: - UserHal::ExceptionId() williamr@2: - UserHal::ExceptionInfo() williamr@2: - UserHal::PageSizeInBytes() williamr@2: - UserHal::TickPeriod() williamr@2: - UserHal::DriveInfo() williamr@2: - UserHal::SwitchOff() williamr@2: - UserHal::SetXYInputCalibration() williamr@2: - UserHal::CalibrationPoints() williamr@2: - UserHal::SaveXYInputCalibration() williamr@2: - UserHal::RestoreXYInputCalibration() williamr@2: */ williamr@2: class UserHal williamr@2: { williamr@2: public: williamr@2: // kernel group williamr@2: IMPORT_C static TInt MemoryInfo(TDes8& anInfo); williamr@2: IMPORT_C static TInt RomInfo(TDes8& anInfo); williamr@2: IMPORT_C static TInt StartupReason(TMachineStartupType& aReason); williamr@2: IMPORT_C static TInt FaultReason(TInt &aReason); williamr@2: IMPORT_C static TInt ExceptionId(TInt &anId); williamr@2: IMPORT_C static TInt ExceptionInfo(TExcInfo &aInfo); williamr@2: IMPORT_C static TInt PageSizeInBytes(TInt& aSize); williamr@2: williamr@2: // variant group williamr@2: IMPORT_C static TInt MachineInfo(TDes8& anInfo); williamr@2: IMPORT_C static TInt TickPeriod(TTimeIntervalMicroSeconds32& aPeriod); williamr@2: williamr@2: // media group williamr@2: IMPORT_C static TInt DriveInfo(TDes8& anInfo); williamr@2: williamr@2: // power group williamr@2: IMPORT_C static TInt SwitchOff(); williamr@2: williamr@2: // digitiser group williamr@2: IMPORT_C static TInt SetXYInputCalibration(const TDigitizerCalibration& aCalibration); williamr@2: IMPORT_C static TInt CalibrationPoints(TDigitizerCalibration& aCalibration); williamr@2: IMPORT_C static TInt SaveXYInputCalibration(); williamr@2: IMPORT_C static TInt RestoreXYInputCalibration(TDigitizerCalibrationType aType); williamr@2: }; williamr@2: #endif williamr@2: #endif