CFbsScreenDevice Class Reference

class CFbsScreenDevice : public CFbsDevice

A graphics device interface that provides direct access to the screen, without the mediation of the window server.

Inherits from

Public Member Functions
~CFbsScreenDevice()
IMPORT_C const TUint32 *Bits()
IMPORT_C voidCancelSprite()
IMPORT_C voidChangeScreenDevice(CFbsScreenDevice *)
IMPORT_C TDeviceOrientationDeviceOrientation()
IMPORT_C TUintDeviceOrientationsAvailable()
IMPORT_C voidDrawSpriteBegin()
IMPORT_C voidDrawSpriteEnd()
IMPORT_C TIntGetPalette(CPalette *&)
IMPORT_C voidGetPixel(TRgb &, const TPoint &)
IMPORT_C voidGetScanLine(TDes8 &, const TPoint &, TInt, TDisplayMode)
IMPORT_C voidGetSurface(TSurfaceId &)
IMPORT_C RHardwareBitmapHardwareBitmap()
IMPORT_C TSpriteBase *HideSprite()
IMPORT_C TSpriteBase *HideSprite(const TRect &, const TRegion *)
IMPORT_C TIntHorizontalPixelsToTwips(TInt)
IMPORT_C TIntHorizontalTwipsToPixels(TInt)
IMPORT_C CFbsScreenDevice *NewL(const TDesC &, TDisplayMode)
IMPORT_C CFbsScreenDevice *NewL(const TDesC &, TDisplayMode, TRgb)
IMPORT_C CFbsScreenDevice *NewL(TInt, TDisplayMode)
IMPORT_C voidPaletteAttributes(TBool &, TInt &)
IMPORT_C TIntScreenNo()
IMPORT_C voidSetAutoUpdate(TBool)
IMPORT_C TBoolSetDeviceOrientation(TDeviceOrientation)
IMPORT_C voidSetPalette(CPalette *)
IMPORT_C voidShowSprite(TSpriteBase *)
IMPORT_C voidShowSprite(TSpriteBase *, const TRect &, const TRegion *)
IMPORT_C TSizeSizeInTwips()
IMPORT_C TIntStride()
IMPORT_C voidUpdate()
IMPORT_C voidUpdate(const TRegion &)
IMPORT_C TIntVerticalPixelsToTwips(TInt)
IMPORT_C TIntVerticalTwipsToPixels(TInt)
Private Member Functions
CFbsScreenDevice(TInt)
voidConstructL(TInt, TDisplayMode)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CBitmapDevice::CreateBitmapContext(CBitmapContext *&)
CFbsDevice::AddFile(const TDesC &,TInt &)
CFbsDevice::CFbsDevice()
CFbsDevice::CreateContext(CFbsBitGc *&)
CFbsDevice::CreateContext(CGraphicsContext *&)
CFbsDevice::DisplayMode()const
CFbsDevice::DisplayMode16M()
CFbsDevice::DoGetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)
CFbsDevice::DrawingBegin(TBool)
CFbsDevice::DrawingBegin(const CFbsBitmap *,TBool)
CFbsDevice::DrawingEnd(TBool)
CFbsDevice::DrawingEnd(const CFbsBitmap *,TBool)
CFbsDevice::FontHeightInPixels(TInt,TInt)const
CFbsDevice::FontHeightInTwips(TInt,TInt)const
CFbsDevice::GetDrawRect(TRect &)const
CFbsDevice::GetFontById(CFbsFont *&,TUid,const TAlgStyle &)
CFbsDevice::GetFontById(CFont *&,TUid,const TAlgStyle &)
CFbsDevice::GetNearestFbsFont(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInPixels(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInPixels(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInTwips(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInTwips(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInPixels(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInTwips(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToMaxHeightInPixels(CFbsFont *&,const TFontSpec &,TInt)
CFbsDevice::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
CFbsDevice::GetNearestFontToMaxHeightInTwips(CFbsFont *&,const TFontSpec &,TInt)
CFbsDevice::GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
CFbsDevice::GraphicsAccelerator()const
CFbsDevice::NumTypefaces()const
CFbsDevice::Orientation()const
CFbsDevice::ReadLineDiffMode(TInt,TInt,TInt,TAny *,TDisplayMode)const
CFbsDevice::RectCompare(const TRect &,const CFbsDevice &,const TRect &)const
CFbsDevice::RegisterLinkedTypeface(const CLinkedTypefaceSpecification &,TInt &)
CFbsDevice::ReleaseFont(CFont *)
CFbsDevice::RemoveFile(TInt)
CFbsDevice::SetBits()
CFbsDevice::SetCustomPalette(const CPalette *)
CFbsDevice::SetDrawDeviceOffset(const TPoint &)
CFbsDevice::SetOrientation(CFbsBitGc::TGraphicsOrientation)
CFbsDevice::SetScalingFactor(const TPoint &,TInt,TInt,TInt,TInt)
CFbsDevice::SizeInPixels()const
CFbsDevice::TruncateRect(TRect &)
CFbsDevice::TypefaceSupport(TTypefaceSupport &,TInt)const
CFbsDevice::~CFbsDevice()
Private Attributes
TInt iScreenNo
TInt iSpare1_CFbsScreenDevice
TInt iSpare2_CFbsScreenDevice
Inherited Attributes
CFbsDevice::iBitBltMaskedBuffer
CFbsDevice::iDrawDevice
CFbsDevice::iFbs
CFbsDevice::iGraphicsAccelerator
CFbsDevice::iOrientation
CFbsDevice::iScreenDevice
CFbsDevice::iSpare
CFbsDevice::iTypefaceStore

Constructor & Destructor Documentation

CFbsScreenDevice(TInt)

CFbsScreenDevice(TIntaScreenNo)[private]

Parameters

TInt aScreenNoThe screen number. If the device has a support for only one screen, its number is 0.

~CFbsScreenDevice()

IMPORT_C~CFbsScreenDevice()[virtual]

Frees all resources owned by the object prior to its destruction.

Member Functions Documentation

Bits()

IMPORT_C const TUint32 *Bits()const

Returns pointer to the location of first pixel in frame buffer. Not necessarily the same as pointer to frame buffer.

CancelSprite()

IMPORT_C voidCancelSprite()const [virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

ChangeScreenDevice(CFbsScreenDevice *)

IMPORT_C voidChangeScreenDevice(CFbsScreenDevice *aOldDevice)

Changes the screen device.

Parameters

CFbsScreenDevice * aOldDeviceA pointer to the old screen device.

ConstructL(TInt, TDisplayMode)

voidConstructL(TIntaScreenNo,
TDisplayModeaDispMode
)[private]

Parameters

TInt aScreenNo
TDisplayMode aDispMode

DeviceOrientation()

IMPORT_C TDeviceOrientationDeviceOrientation()const

WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.

This function is used to request the current device orientation.

DeviceOrientationsAvailable()

IMPORT_C TUintDeviceOrientationsAvailable()const

WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.

This function is used to request the device orientations supported by the screen device.

DrawSpriteBegin()

IMPORT_C voidDrawSpriteBegin()

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

DrawSpriteEnd()

IMPORT_C voidDrawSpriteEnd()

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

GetPalette(CPalette *&)

IMPORT_C TIntGetPalette(CPalette *&aPalette)const [virtual]

Gets the device's current palette.

This function is only supported if the device has a modifiable palette, which can be determined by calling PaletteAttributes().

Parameters

CPalette *& aPaletteOn return, holds the devices current palette.

GetPixel(TRgb &, const TPoint &)

IMPORT_C voidGetPixel(TRgb &aColor,
const TPoint &aPixel
)const [virtual]

Gets the RGB colour of an individual pixel on a bitmapped graphics device.

This implements the pure virtual function CBitmapDevice::GetPixel().

Parameters

TRgb & aColor
const TPoint & aPixel

GetScanLine(TDes8 &, const TPoint &, TInt, TDisplayMode)

IMPORT_C voidGetScanLine(TDes8 &aBuf,
const TPoint &aStartPixel,
TIntaLength,
TDisplayModeaDispMode
)const [virtual]

Copies a scanline into a buffer.

This implements the pure virtual function CBitmapDevice::GetScanLine().

Parameters

TDes8 & aBuf
const TPoint & aStartPixel
TInt aLength
TDisplayMode aDispMode

GetSurface(TSurfaceId &)

IMPORT_C voidGetSurface(TSurfaceId &aSurface)const

WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.

Get the surface identifier for the current device orientation of the screen. If screen device doesn't support providing a surface, the caller is panicked.

Parameters

TSurfaceId & aSurfaceSet to the surface identifier for the screen buffer.

HardwareBitmap()

IMPORT_C RHardwareBitmapHardwareBitmap()

Creates and returns a hardware bitmap (a bitmap which can be drawn to by a graphics accelerator whose operations may be implemented in hardware or software), whose handle is to the screen.

This allows the caller to draw to the screen like any other hardware bitmap.

This function may not be supported on all hardware. If unsupported, it returns an RHardwareBitmap with a handle of zero.

The hardware bitmap can be used to draw directly to the screen. Use it to create a TAcceleratedBitmapSpec object, which can either be used to get a TAcceleratedBitmapInfo, or can be passed to a graphics operation (an instance of a class derived from class TGraphicsOperation) e.g. a bitblt to copy one part of the screen to another.

Direct screen access must only be carried out in combination with the Window Server's direct screen access classes; i.e. only use the hardware bitmap on the CFbsScreenDevice which you get from CDirectScreenAccess, and not from your own CFbsScreenDevice.

TAcceleratedBitmapSpec TGraphicsOperation CGraphicsAccelerator::Operation() CDirectScreenAccess

HideSprite()

IMPORT_C TSpriteBase *HideSprite()const [virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

HideSprite(const TRect &, const TRegion *)

IMPORT_C TSpriteBase *HideSprite(const TRect &aRect,
const TRegion *aClippingRegion
)const [virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

Parameters

const TRect & aRectIgnored.
const TRegion * aClippingRegionIgnored.

HorizontalPixelsToTwips(TInt)

IMPORT_C TIntHorizontalPixelsToTwips(TIntaPixels)const

Converts a horizontal dimension from pixels to twips.

This implements the pure virtual function MGraphicsDeviceMap::HorizontalPixelsToTwips().

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

IMPORT_C TIntHorizontalTwipsToPixels(TIntaTwips)const

Converts a horizontal dimension from twips to pixels.

This implements the pure virtual function MGraphicsDeviceMap::HorizontalTwipsToPixels().

Parameters

TInt aTwips

NewL(const TDesC &, TDisplayMode)

IMPORT_C CFbsScreenDevice *NewL(const TDesC &aLibname,
TDisplayModeaDispMode
)[static]

Creates a new CFbsScreenDevice object.

Parameters

const TDesC & aLibnameNot used.
TDisplayMode aDispModeThe display mode of the device.

NewL(const TDesC &, TDisplayMode, TRgb)

IMPORT_C CFbsScreenDevice *NewL(const TDesC &aLibname,
TDisplayModeaDispMode,
TRgbaWhite
)[static]

Creates a new CFbsScreenDevice object.

Use two param version instead.

Parameters

const TDesC & aLibnameNot used.
TDisplayMode aDispModeThe display mode of the device.
TRgb aWhiteNot used.

NewL(TInt, TDisplayMode)

IMPORT_C CFbsScreenDevice *NewL(TIntaScreenNo,
TDisplayModeaDispMode
)[static]

Creates a new CFbsScreenDevice object.

Parameters

TInt aScreenNoThe screen number. If the device has a support for only one screen, its number is 0.
TDisplayMode aDispModeThe display mode of the device.

PaletteAttributes(TBool &, TInt &)

IMPORT_C voidPaletteAttributes(TBool &aModifiable,
TInt &aNumEntries
)const [virtual]

Gets the palette attributes of the device.

Parameters

TBool & aModifiableOn return, holds information on whether or not the device palette is modifiable (ETrue) or fixed (EFalse).
TInt & aNumEntriesOn return, holds the number of entries in the device palette.

ScreenNo()

IMPORT_C TIntScreenNo()const

Query the screen number to which the object refers.

SetAutoUpdate(TBool)

IMPORT_C voidSetAutoUpdate(TBoolaValue)

Sets or unsets auto-update for the screen.

Parameters

TBool aValueETrue, if the screen is set to auto-update; EFalse, otherwise.

SetDeviceOrientation(TDeviceOrientation)

IMPORT_C TBoolSetDeviceOrientation(TDeviceOrientationaOrientation)const

WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.

This function selects the surface and device buffer to use in the screen driver for this screen. Normal and 180 rotations will generally use the same surface, while 90 and 270 will use another. The surfaces may have different width, height, stride and surface, so functions that make use of any of these may be affected after a change in surface orientation, and the return value should be checked for this reason.

This call does not change the way rendering is performed, but may operate on the underlying memory using a new shape. The call does not change the display controller s settings, as this is handled via the GCE. All this changes are the internal attributes of the screen device and driver objects. A CFbsBitGc object activated on the device should be reactivated, to update its own attributes, or drawing may be corrupted.

Note: while TDeviceOrientation values do not directly correspond to CFbsBitGc::TGraphicsOrientation values, and cannot be used interchangeably, it is simple to generate the former from the latter using the left-shift operator (i.e. device == (1 << graphics)). In particular a device orientation of 90 degrees clockwise is equivalent to a content orientation of 90 degrees anti- clockwise, which is what TGraphicsOrientation refers to for the equivalent setting. The letters "CW" in the TDeviceOrientation enumeration refer to a clockwise device rotation, so EDeviceOrientation90CW is a 90 degree clockwise rotation of the device.

Parameters

TDeviceOrientation aOrientationThe new device orientation, relative to the normal physical screen orientation.

SetPalette(CPalette *)

IMPORT_C voidSetPalette(CPalette *aPalette)[virtual]

Sets the device's palette to the specified palette.

Setting the palette is only possible if the device has a modifiable palette, which can be determined by calling PaletteAttributes().

Parameters

CPalette * aPaletteThe new palette for the device.

ShowSprite(TSpriteBase *)

IMPORT_C voidShowSprite(TSpriteBase *aSprite)const [virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

Parameters

TSpriteBase * aSpriteIgnored.

ShowSprite(TSpriteBase *, const TRect &, const TRegion *)

IMPORT_C voidShowSprite(TSpriteBase *aSprite,
const TRect &aRect,
const TRegion *aClippingRegion
)const [virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect.

Parameters

TSpriteBase * aSpriteIgnored.
const TRect & aRectIgnored.
const TRegion * aClippingRegionIgnored.

SizeInTwips()

IMPORT_C TSizeSizeInTwips()const [virtual]

Gets the size of the device area, in twips.

This implements the pure virtual function CGraphicsDevice::SizeInTwips().

CGraphicsDevice::SizeInTwips()

Stride()

IMPORT_C TIntStride()const

Returns frame buffer line pitch or stride.

Update()

IMPORT_C voidUpdate()

Forces any out of date region of the screen to update.

Update(const TRegion &)

IMPORT_C voidUpdate(const TRegion &aRegion)

Forces any out of date region of the screen to update, and additionally forces the specified region to update.

Parameters

const TRegion & aRegionThe region of the screen to update, in addition to any out of date region.

VerticalPixelsToTwips(TInt)

IMPORT_C TIntVerticalPixelsToTwips(TIntaPixels)const

Converts a vertical dimension from pixels to twips.

This implements the pure virtual function MGraphicsDeviceMap::VerticalPixelsToTwips().

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

IMPORT_C TIntVerticalTwipsToPixels(TIntaTwips)const

Converts a vertical dimension from twips to pixels.

This implements the pure virtual function MGraphicsDeviceMap::VerticalTwipsToPixels().

Parameters

TInt aTwips

Member Data Documentation

TInt iScreenNo

TInt iScreenNo[private]

TInt iSpare1_CFbsScreenDevice

TInt iSpare1_CFbsScreenDevice[private]

TInt iSpare2_CFbsScreenDevice

TInt iSpare2_CFbsScreenDevice[private]