Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <BITDEV.H>

Class CFbsScreenDevice

class CFbsScreenDevice : public CFbsDevice;

Description

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

The interface adds sprite support to the CFbsDevice base class.

Derivation

Members

Defined in CFbsScreenDevice:

Inherited from CBase:

Inherited from CBitmapDevice:

Inherited from CFbsDevice:

Inherited from MGraphicsDeviceMap:


Construction and destruction


NewL(const TDesC &,TDisplayMode)

IMPORT_C static CFbsScreenDevice* NewL(const TDesC &aLibname, TDisplayMode aDispMode);

Description

Creates a new CFbsScreenDevice object.

Parameters

const TDesC16 &aLibname

Not used.

TDisplayMode aDispMode

The display mode of the device.

Return value

CFbsScreenDevice *

The newly created FBSERV screen device.


NewL(const TDesC &,TDisplayMode,TRgb)

Interface status: deprecated Use two param version instead.

IMPORT_C static CFbsScreenDevice* NewL(const TDesC &aLibname, TDisplayMode aDispMode, TRgb aWhite);

Description

Creates a new CFbsScreenDevice object.

Parameters

const TDesC16 &aLibname

Not used.

TDisplayMode aDispMode

The display mode of the device.

TRgb aWhite

Not used.

Return value

CFbsScreenDevice *

The newly created font and bitmap server screen device.


NewL(TInt,TDisplayMode)

IMPORT_C static CFbsScreenDevice* NewL(TInt aScreenNo, TDisplayMode aDispMode);

Description

Creates a new CFbsScreenDevice object.

Parameters

TInt aScreenNo

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

TDisplayMode aDispMode

The display mode of the device.

Return value

CFbsScreenDevice *

The newly created FBSERV screen device.


~CFbsScreenDevice()

IMPORT_C virtual ~CFbsScreenDevice();

Description

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

[Top]


Member functions


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

IMPORT_C virtual void GetScanLine(TDes8 &aBuf, const TPoint &aStartPixel, TInt aLength, TDisplayMode aDispMode) const;

Description

Copies a scanline into a buffer.

This implements the pure virtual function CBitmapDevice::GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const.

Parameters

TDes8 &aBuf

const TPoint &aStartPixel

TInt aLength

TDisplayMode aDispMode


GetPixel(TRgb &,const TPoint &)const

IMPORT_C virtual void GetPixel(TRgb &aColor, const TPoint &aPixel) const;

Description

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

This implements the pure virtual function CBitmapDevice::GetPixel(TRgb &,const TPoint &)const.

Parameters

TRgb &aColor

const TPoint &aPixel


HorizontalPixelsToTwips(TInt)const

IMPORT_C virtual TInt HorizontalPixelsToTwips(TInt aPixels) const;

Description

Converts a horizontal dimension from pixels to twips.

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

Parameters

TInt aPixels

Return value

TInt


VerticalPixelsToTwips(TInt)const

IMPORT_C virtual TInt VerticalPixelsToTwips(TInt aPixels) const;

Description

Converts a vertical dimension from pixels to twips.

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

Parameters

TInt aPixels

Return value

TInt


HorizontalTwipsToPixels(TInt)const

IMPORT_C virtual TInt HorizontalTwipsToPixels(TInt aTwips) const;

Description

Converts a horizontal dimension from twips to pixels.

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

Parameters

TInt aTwips

Return value

TInt


VerticalTwipsToPixels(TInt)const

IMPORT_C virtual TInt VerticalTwipsToPixels(TInt aTwips) const;

Description

Converts a vertical dimension from twips to pixels.

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

Parameters

TInt aTwips

Return value

TInt


SetAutoUpdate(TBool)

IMPORT_C void SetAutoUpdate(TBool aValue);

Description

Sets or unsets auto-update for the screen.

Parameters

TBool aValue

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


DrawSpriteBegin()

IMPORT_C void DrawSpriteBegin();

Description

Starts drawing the sprite.


DrawSpriteEnd()

IMPORT_C void DrawSpriteEnd();

Description

Ends drawing the sprite.


CancelSprite()const

IMPORT_C virtual void CancelSprite() const;

Description

Cancels drawing the sprite.


HideSprite()const

IMPORT_C virtual TSpriteBase* HideSprite() const;

Description

Hides the sprite over the whole screen.

Return value

TSpriteBase *

A pointer to the hidden sprite.


HideSprite(const TRect &,const TRegion *)const

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

Description

Hides the sprite within a particular region.

Parameters

const TRect &aRect

A rectangle within the clipping region.

const TRegion *aClippingRegion

The clipping region.

Return value

TSpriteBase *

A pointer to the hidden sprite.


ShowSprite(TSpriteBase *)const

IMPORT_C virtual void ShowSprite(TSpriteBase *aSprite) const;

Description

Shows the specified sprite over the whole screen.

Parameters

TSpriteBase *aSprite

The sprite which is to be shown.


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

IMPORT_C virtual void ShowSprite(TSpriteBase *aSprite, const TRect &aRect, const TRegion *aClippingRegion) const;

Description

Shows the specified sprite within a particular region.

Parameters

TSpriteBase *aSprite

The sprite which is to be shown.

const TRect &aRect

A rectangle within the clipping region.

const TRegion *aClippingRegion

The clipping region


ChangeScreenDevice(CFbsScreenDevice *)

IMPORT_C void ChangeScreenDevice(CFbsScreenDevice *aOldDevice);

Description

Changes the screen device.

Parameters

CFbsScreenDevice *aOldDevice

A pointer to the old screen device.


PaletteAttributes(TBool &,TInt &)const

IMPORT_C virtual void PaletteAttributes(TBool &aModifiable, TInt &aNumEntries) const;

Description

Gets the palette attributes of the device.

Parameters

TBool &aModifiable

On return, holds information on whether or not the device palette is modifiable (ETrue) or fixed (EFalse).

TInt &aNumEntries

On return, holds the number of entries in the device palette.


SetPalette(CPalette *)

IMPORT_C virtual void SetPalette(CPalette *aPalette);

Description

Sets the device palette to the specified palette.

Parameters

CPalette *aPalette

The new palette for the device.


GetPalette(CPalette *&)const

IMPORT_C virtual TInt GetPalette(CPalette *&aPalette) const;

Description

Gets the devices current palette.

Parameters

CPalette *&aPalette

On return, holds the devices current palette.

Return value

TInt

KErrNone, if successful; otherwise, another of the system-wide error codes.


Update()

IMPORT_C void Update();

Description

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


Update(const TRegion &)

IMPORT_C void Update(const TRegion &aRegion);

Description

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

Parameters

const TRegion &aRegion

The region of the screen to update, in addition to any out of date region.


SizeInTwips()const

IMPORT_C virtual TSize SizeInTwips() const;

Description

Gets the size of the device area, in twips.

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

Return value

TSize

See also:


HardwareBitmap()

IMPORT_C RHardwareBitmap HardwareBitmap();

Description

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.

Return value

RHardwareBitmap

A hardware bitmap whose handle is to the screen.

See also:


ScreenNo()const

IMPORT_C TInt ScreenNo() const;

Description

Query the screen number to which the object refers.

Return value

TInt

Screen number as passed in aScreenNo to NewL.