Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CWsScreenDevice Class Reference

Software device screen. More...

#include <w32std.h>

Inheritance diagram for CWsScreenDevice:
CBitmapDevice MWsClientClass CGraphicsDevice CBase MGraphicsDeviceMap

Public Types

enum  TSpriteInCompare { ERemoveSprite =0 , EIncludeSprite =1 , EIncludeTextCursor =2 }
 Whether or not to include sprites when comparing areas of the screen. More...
 

Public Member Functions

IMPORT_C CWsScreenDevice ()
 Default constructor.
 
IMPORT_C CWsScreenDevice (RWsSession &aWs)
 Constructs a new screen device attached to a particular window server session.
 
IMPORT_C ~CWsScreenDevice ()
 Destructor.
 
IMPORT_C TInt Construct ()
 Completes construction of the object.
 
IMPORT_C TInt Construct (TInt aDefaultScreenNumber)
 Completes construction of the object.
 
IMPORT_C TAny * GetInterface (TUint aInterfaceId)
 Interface Extension capability Use of this interface going forward will allow the published client interface to be dynamically extended.
 
const TAny * GetInterface (TUint aInterfaceId) const
 
IMPORT_C TBool IsModeDynamic (TInt aSizeMode) const
 Returns whether the given screen size mode is dynamic or not.
 
IMPORT_C TBool IsCurrentModeDynamic () const
 Returns whether the current screen size mode is dynamic or not.
 
IMPORT_C TDisplayMode DisplayMode () const
 Gets the display mode of the device.
 
IMPORT_C TSize SizeInPixels () const
 Gets the size of the device area in pixels.
 
IMPORT_C TSize SizeInTwips () const
 Gets the size of the device area in twips.
 
IMPORT_C TInt HorizontalTwipsToPixels (TInt aTwips) const
 Converts a horizontal dimension from twips to pixels.
 
IMPORT_C TInt VerticalTwipsToPixels (TInt aTwips) const
 Converts a vertical dimension from twips to pixels.
 
IMPORT_C TInt HorizontalPixelsToTwips (TInt aPixels) const
 Converts a horizontal dimension from pixels to twips.
 
IMPORT_C TInt VerticalPixelsToTwips (TInt aPixels) const
 Converts a vertical dimension from pixels to twips.
 
IMPORT_C TRect PointerRect () const
 Gets the active area for the pointing device.
 
IMPORT_C TInt CreateContext (CGraphicsContext *&aGc)
 Creates a graphics context for the device.
 
TInt CreateContext (CWindowGc *&aGc)
 Creates a graphics context for this device.
 
virtual IMPORT_C TInt GetNearestFontInTwips (CFont *&aFont, const TFontSpec &aFontSpec)
 
virtual IMPORT_C TInt GetNearestFontToDesignHeightInTwips (CFont *&aFont, const TFontSpec &aFontSpec)
 
virtual IMPORT_C TInt GetNearestFontToMaxHeightInTwips (CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight)
 
IMPORT_C TInt NumTypefaces () const
 Gets the number of typefaces supported by the graphics device.
 
IMPORT_C void TypefaceSupport (TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const
 Gets typeface information for a specified typeface.
 
IMPORT_C TInt FontHeightInTwips (TInt aTypefaceIndex, TInt aHeightIndex) const
 Get the height of a font in twips.
 
IMPORT_C void GetPixel (TRgb &aColor, const TPoint &aPixel) const
 Gets the RGB colour of an individual pixel on a bitmapped graphics device.
 
IMPORT_C void GetScanLine (TDes8 &aScanLine, const TPoint &aStartPixel, TInt aPixelLength, TDisplayMode aDispMode) const
 Copies a scanline into a buffer.
 
IMPORT_C TInt AddFile (const TDesC &aName, TInt &aId)
 Adds a font file to the device's typeface store.
 
IMPORT_C void RemoveFile (TInt aId=0)
 Removes a font file from the font store.
 
virtual IMPORT_C TInt GetNearestFontInPixels (CFont *&aFont, const TFontSpec &aFontSpec)
 
virtual IMPORT_C TInt GetNearestFontToDesignHeightInPixels (CFont *&aFont, const TFontSpec &aFontSpec)
 
virtual IMPORT_C TInt GetNearestFontToMaxHeightInPixels (CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight)
 
IMPORT_C TInt FontHeightInPixels (TInt aTypefaceIndex, TInt aHeightIndex) const
 Gets the height, in pixels, of the specified typeface at one of its defined heights.
 
IMPORT_C void ReleaseFont (CFont *aFont)
 Releases the specified font.
 
IMPORT_C void PaletteAttributes (TBool &aModifiable, TInt &aNumEntries) const
 Gets the palette attributes of the device.
 
IMPORT_C void SetPalette (CPalette *aPalette)
 Sets the device's palette.
 
IMPORT_C TInt GetPalette (CPalette *&aPalette) const
 Gets the device's current palette.
 
IMPORT_C TInt SetCustomPalette (const CPalette *aPalette)
 Sets the custom palette.
 
IMPORT_C TInt GetFontById (CFont *&aFont, TUid aUid, const TAlgStyle &aAlgStyle)
 Gets a font by its bitmap UID.
 
IMPORT_C TBool RectCompare (const TRect &aRect1, const TRect &aRect2) const
 Compares two areas of the screen to see if they have the same content.
 
IMPORT_C TBool RectCompare (const TRect &aRect1, const TRect &aRect2, TUint aFlags) const
 Compares two areas of the screen to see if they have the same content.
 
IMPORT_C TInt CopyScreenToBitmap (const CFbsBitmap *aBitmap) const
 Saves the entire screen to a bitmap.
 
IMPORT_C TInt CopyScreenToBitmap (const CFbsBitmap *aBitmap, const TRect &aRect) const
 Saves a region of the screen to a bitmap.
 
IMPORT_C TInt SetBackLight (TBool aBackLight)
 
IMPORT_C void SetScreenSizeAndRotation (const TPixelsTwipsAndRotation &aSizeAndRotation)
 Sets the current screen size in twips and pixels, and the rotation for the screen device.
 
IMPORT_C void GetDefaultScreenSizeAndRotation (TPixelsTwipsAndRotation &aSizeAndRotation) const
 Gets the current screen size (in both pixels and twips) and rotation.
 
IMPORT_C void SetScreenSizeAndRotation (const TPixelsAndRotation &aSizeAndRotation)
 Sets the current screen size in pixels, and the rotation for the screen device.
 
IMPORT_C void GetDefaultScreenSizeAndRotation (TPixelsAndRotation &aSizeAndRotation) const
 Gets the current screen size (in pixels) and the rotation.
 
IMPORT_C TScreenModeEnforcement ScreenModeEnforcement () const
 Gets the current screen mode enforcement settings.
 
IMPORT_C void SetScreenModeEnforcement (TScreenModeEnforcement aMode) const
 Sets the screen mode enforcement requirements.
 
IMPORT_C void GetScreenModeSizeAndRotation (TInt aMode, TPixelsTwipsAndRotation &aSizeAndRotation) const
 Get the screen rotation and size, in both pixels and twips, for the specified screen mode.
 
IMPORT_C void GetScreenModeSizeAndRotation (TInt aMode, TPixelsAndRotation &aSizeAndRotation) const
 Get the screen rotation and size (in pixels) for the specified screen mode.
 
IMPORT_C void SetCurrentRotations (TInt aMode, CFbsBitGc::TGraphicsOrientation aRotation) const
 Sets the screen rotation that should be used with a particular screen size.
 
IMPORT_C TInt GetRotationsList (TInt aMode, CArrayFixFlat< TInt > *aRotationList) const
 Gets the list of valid rotations for a particular screen size.
 
IMPORT_C TInt NumScreenModes () const
 Gets the number of available screen modes.
 
IMPORT_C void SetScreenMode (TInt aMode)
 Sets the current screen mode.
 
IMPORT_C TInt CurrentScreenMode () const
 Gets the current screen mode index.
 
IMPORT_C void SetAppScreenMode (TInt aMode)
 Sets the application's screen mode; this also sets all the attributes of the screen mode.
 
IMPORT_C TPoint GetDefaultScreenModeOrigin () const
 Gets the origin for the current screen mode.
 
IMPORT_C TPoint GetScreenModeOrigin (TInt aMode) const
 Get the origin of the screen for the specified screen mode.
 
IMPORT_C TSize GetCurrentScreenModeScale () const
 Gets the scale for the current screen mode.
 
IMPORT_C TSize GetScreenModeScale (TInt aMode) const
 Gets the scale for the specified screen mode.
 
IMPORT_C TPoint GetCurrentScreenModeScaledOrigin () const
 Gets the current screen mode's scaled origin.
 
IMPORT_C TPoint GetScreenModeScaledOrigin (TInt aMode) const
 Gets the specfied screen mode's scaled origin.
 
IMPORT_C TInt GetScreenSizeModeList (RArray< TInt > *aModeList) const
 Gets the available screen size modes.
 
IMPORT_C TDisplayMode GetScreenModeDisplayMode (const TInt &aMode) const
 Gets the display mode of the screen for the specified screen mode.
 
IMPORT_C TSizeMode GetCurrentScreenModeAttributes () const
 Used for testing purposes only.
 
IMPORT_C void SetCurrentScreenModeAttributes (const TSizeMode &aModeAtt)
 Used for testing purposes only.
 
IMPORT_C TInt GetScreenNumber () const
 Get device's screen number.
 
- Public Member Functions inherited from CBitmapDevice
TInt CreateBitmapContext (CBitmapContext *&aGC)
 Creates a bitmap context for this bitmap device.
 
- Public Member Functions inherited from CBase
 CBase ()
 Default constructor.
 
virtual IMPORT_C ~CBase ()
 Virtual destructor.
 
TAny * operator new (TUint aSize, TAny *aBase) __NO_THROW
 Initialises the object to binary zeroes.
 
TAny * operator new (TUint aSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TUint aExtraSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave, TUint aExtraSize)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
- Public Member Functions inherited from MGraphicsDeviceMap
IMPORT_C MGraphicsDeviceMap ()
 Default constructor.
 
virtual IMPORT_C ~MGraphicsDeviceMap ()
 Destructor.
 
IMPORT_C TPoint TwipsToPixels (const TPoint &aTwipPoint) const
 Converts a point in twips to a point in pixels.
 
IMPORT_C TRect TwipsToPixels (const TRect &aTwipRect) const
 Converts a rectangle in twips to a rectangle in pixels.
 
IMPORT_C TPoint PixelsToTwips (const TPoint &aPixelPoint) const
 Converts a point in pixels to a point in twips.
 
IMPORT_C TRect PixelsToTwips (const TRect &aPixelRect) const
 Converts a rectangle in pixels to a rectangle in twips.
 
- Public Member Functions inherited from MWsClientClass
 MWsClientClass ()
 
 MWsClientClass (RWsBuffer *aBuffer)
 
TInt WsHandle () const
 Gets the server side handle for the object.
 

Friends

class CWindowGc
 

Additional Inherited Members

- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 
- Protected Member Functions inherited from CBase
virtual IMPORT_C TInt Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1)
 Extension function.
 
- Protected Member Functions inherited from MWsClientClass
void Write (const TAny *aData1, TInt aLength1, TInt aLength2, TUint aOpcode) const
 
void Write (const TAny *aData, TInt aLength, const TAny *aData2, TInt aLength2, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
void Write (const TAny *aBuf, TInt aBufLen, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
void Write (TUint aOpcode) const
 
void WriteInt (TInt aInt, TUint aOpcode) const
 
void WriteRect (const TRect &aRect, TUint aOpcode) const
 
void WritePoint (const TPoint &aPoint, TUint aOpcode) const
 
void WriteSize (const TSize &aSize, TUint aOpcode) const
 
TInt WriteReply (TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReplyInt (TInt aInt, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReply (const TAny *aBuf, TInt aBufLen, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReply (const TAny *aBuf, TInt aBufLen, const TAny *aBuf2, TInt aBuflen2, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReplyP (const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyIntP (TInt aInt, const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyP (const TAny *aBuf, TInt aBufLen, const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyP (const TAny *aBuf, TInt aBufLen, const TAny *aBuf2, TInt aBuflen2, const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyByProvidingRemoteReadAccess (const TAny *aBuf, TInt aBufLen, const TReadDescriptorType &aRemoteReadBuffer, TUint aOpcode) const
 
void AddToBitmapArray (const TInt aBitmapHandle) const
 
void AsyncRequest (TRequestStatus &aStatus, TUint aOpcode) const
 
TBool WindowSizeCacheEnabled () const
 
void MarkWindowSizeCacheDirty ()
 
void RefreshWindowSizeCache (const TSize &aNewSize) const
 
TInt CachedWindowSize (TSize &aSize) const
 
void DestroyWindowSizeCacheEntry ()
 
- Protected Attributes inherited from MWsClientClass
TInt32 iWsHandle
 WARNING: Member variable for internal use ONLY.
 
RWsBuffer * iBuffer
 WARNING: Member variable for internal use ONLY.
 

Detailed Description

Software device screen.

An object of this class can be used to enquire or set parameters of the software screen, and determine the physical limits of the device.

CWsScreenDevice gives access to the list of screen modes. These are the combinations of screen rotation and screen size supported by the device. One of them is selected as the current screen mode. The possible screen modes are initialised in wsini.ini.

See also
CFbsScreenDevice
API status
Published to all clients. Released API.

Definition at line 2311 of file w32std.h.

Member Enumeration Documentation

◆ TSpriteInCompare

Whether or not to include sprites when comparing areas of the screen.

Enumerator
ERemoveSprite 

This enum can be specified as the 3rd parameter to CWsScreenDevice::RectCompare(const TRect &aRect1, const TRect &aRect2,TUint aFlags).

When called with the value ERemoveSprite if there are any sprites visible in the areas of the screen being compared then these will not be included in the comparison. The function CWsScreenDevice::RectCompare(const TRect &aRect1,const TRect &aRect2) will not include sprites in the comparison.

EIncludeSprite 

This enum can be specified as the 3rd parameter to CWsScreenDevice::RectCompare(const TRect &aRect1, const TRect &aRect2,TUint aFlags).

When called with the value EIncludeSprite if there are any sprites visible in the areas of the screen being compared then these will be included in the comparison.

EIncludeTextCursor 

This enum can be specified as the 3rd parameter to CWsScreenDevice::RectCompare(const TRect &aRect1, const TRect &aRect2,TUint aFlags).

When called with the value EIncludeTextCursor if there are any text cursors visible in the areas of the screen being compared then these will be included in the comparison.

Definition at line 2331 of file w32std.h.

Constructor & Destructor Documentation

◆ CWsScreenDevice() [1/2]

IMPORT_C CWsScreenDevice::CWsScreenDevice ( )

Default constructor.

Developers should use the other constructor overload.

(generated from Symbian Developer Library)

◆ CWsScreenDevice() [2/2]

IMPORT_C CWsScreenDevice::CWsScreenDevice ( RWsSession &  aWs)

Constructs a new screen device attached to a particular window server session.

Parameters
aWsThe window server session this screen should be attached to.

(generated from Symbian Developer Library)

◆ ~CWsScreenDevice()

IMPORT_C CWsScreenDevice::~CWsScreenDevice ( )

Destructor.

(generated from Symbian Developer Library)

Member Function Documentation

◆ AddFile()

IMPORT_C TInt CWsScreenDevice::AddFile ( const TDesC &  aName,
TInt &  aId 
)
virtual

Adds a font file to the device's typeface store.

The specified font file must be accessible to any process, i.e. not located inside an application's private directory.

This pure virtual function is implemented in derived classes.

Parameters
aNameThe name of the font file.
aIdOn return, contains an ID for the font file.
Returns
KErrNone, if successful; otherwise, another of the system-wide error codes.

Implements CBitmapDevice.

◆ Construct() [1/2]

IMPORT_C TInt CWsScreenDevice::Construct ( )

Completes construction of the object.

This method invokes Construct(TInt aDefaultScreenNumber) with default Screen number.

(generated from Symbian Developer Library)

◆ Construct() [2/2]

IMPORT_C TInt CWsScreenDevice::Construct ( TInt  aDefaultScreenNumber)

Completes construction of the object.

Parameters
aDefaultScreenNumber- This is the screen on which an application will start

Panic condition: TW32Panic 17 in debug builds if called on an already constructed object.

(generated from Symbian Developer Library)

◆ CopyScreenToBitmap() [1/2]

IMPORT_C TInt CWsScreenDevice::CopyScreenToBitmap ( const CFbsBitmap *  aBitmap) const

Saves the entire screen to a bitmap.

This function always causes a flush of the window server buffer.

Parameters
aBitmapBitmap to be filled with the screen image.

(generated from Symbian Developer Library)

◆ CopyScreenToBitmap() [2/2]

IMPORT_C TInt CWsScreenDevice::CopyScreenToBitmap ( const CFbsBitmap *  aBitmap,
const TRect &  aRect 
) const

Saves a region of the screen to a bitmap.

This function always causes a flush of the window server buffer.

Parameters
aBitmapBitmap to be filled with the screen region image.
aRectScreen region to be saved.

(generated from Symbian Developer Library)

◆ CreateContext() [1/2]

IMPORT_C TInt CWsScreenDevice::CreateContext ( CGraphicsContext *&  aGC)
virtual

Creates a graphics context for the device.

Parameters
aGCOn return, contains a pointer to the created graphics context.
Returns
KErrNone, if successful; otherwise, another of the system-wide error codes.

Implements CGraphicsDevice.

◆ CreateContext() [2/2]

TInt CWsScreenDevice::CreateContext ( CWindowGc *&  aGc)
inline

Creates a graphics context for this device.

This function always causes a flush of the window server buffer.

Parameters
aGcOn successful return, contains a new graphics context referring to this screen device.
Returns
KErrNone if successful, otherwise one of the system-wide error codes.
See also
CGraphicsDevice::CreateContext()

Definition at line 2833 of file w32std.h.

◆ CurrentScreenMode()

IMPORT_C TInt CWsScreenDevice::CurrentScreenMode ( ) const

Gets the current screen mode index.

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)

◆ DisplayMode()

IMPORT_C TDisplayMode CWsScreenDevice::DisplayMode ( ) const
virtual

Gets the display mode of the device.

Returns
The display mode of the device.

Implements CGraphicsDevice.

◆ FontHeightInPixels()

IMPORT_C TInt CWsScreenDevice::FontHeightInPixels ( TInt  aTypefaceIndex,
TInt  aHeightIndex 
) const
virtual

Gets the height, in pixels, of the specified typeface at one of its defined heights.

The typeface is identified by by an index. For a given typeface, there are a discrete number of heights; the specific height is also identified by an index.

The value returned is rounded up or down to the nearest font height in pixels.

This pure virtual function is implemented in derived classes.

Parameters
aTypefaceIndexA typeface index number, in the range: 0 to (NumTypefaces() - 1).
aHeightIndexA font height index number, in the range: 0 to (iNumHeights - 1) where iNumHeights is a public data member of the TTypefaceSupport object returned by TypefaceSupport().
Returns
The height of the font, in pixels.
See also
TTypefaceSupport
CGraphicsDevice::NumTypefaces()
CGraphicsDevice::TypefaceSupport()

Implements CBitmapDevice.

◆ FontHeightInTwips()

IMPORT_C TInt CWsScreenDevice::FontHeightInTwips ( TInt  aTypefaceIndex,
TInt  aHeightIndex 
) const
virtual

Get the height of a font in twips.

The font is identified by typeface and height.

The value returned is rounded up or down to the nearest font height in twips.

Parameters
aTypefaceIndexAn index identifying the typeface, in the range: 0 to (NumTypefaces() - 1).
aHeightIndexAn index identifying the font height, in the range: 0 to (iNumHeights - 1). Note that iNumHeights is in the TTypefaceSupport object returned by TypefaceSupport().
Returns
The height of the font, in twips.

Implements CGraphicsDevice.

◆ GetCurrentScreenModeAttributes()

IMPORT_C TSizeMode CWsScreenDevice::GetCurrentScreenModeAttributes ( ) const

Used for testing purposes only.

(generated from Symbian Developer Library)

◆ GetCurrentScreenModeScale()

IMPORT_C TSize CWsScreenDevice::GetCurrentScreenModeScale ( ) const

Gets the scale for the current screen mode.

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)

◆ GetCurrentScreenModeScaledOrigin()

IMPORT_C TPoint CWsScreenDevice::GetCurrentScreenModeScaledOrigin ( ) const

Gets the current screen mode's scaled origin.

The formula used is (A+B-1)/B

where:

  • A is the screen mode origin in physical coordinates,
  • B is the screen mode scale width.

The result obtained is the scaled origin of the present screen mode.

(generated from Symbian Developer Library)

◆ GetDefaultScreenModeOrigin()

IMPORT_C TPoint CWsScreenDevice::GetDefaultScreenModeOrigin ( ) const

Gets the origin for the current screen mode.

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)

◆ GetDefaultScreenSizeAndRotation() [1/2]

IMPORT_C void CWsScreenDevice::GetDefaultScreenSizeAndRotation ( TPixelsAndRotation &  aSizeAndRotation) const

Gets the current screen size (in pixels) and the rotation.

This function always causes a flush of the window server buffer.

Parameters
aSizeAndRotationThe default screen size in pixels and the rotation.

(generated from Symbian Developer Library)

◆ GetDefaultScreenSizeAndRotation() [2/2]

IMPORT_C void CWsScreenDevice::GetDefaultScreenSizeAndRotation ( TPixelsTwipsAndRotation &  aSizeAndRotation) const

Gets the current screen size (in both pixels and twips) and rotation.

This function always causes a flush of the window server buffer.

Parameters
aSizeAndRotationThe default screen size and rotation, defining screen size in both pixels and twips.

(generated from Symbian Developer Library)

◆ GetFontById()

IMPORT_C TInt CWsScreenDevice::GetFontById ( CFont *&  aFont,
TUid  aUid,
const TAlgStyle &  aAlgStyle 
)

Gets a font by its bitmap UID.

Within a font file each font has its own UID. An algorithmic style is not part of the actual font description, but is applied to it. For example algorithmic bolding applies an algorithm to increase the apparent weight of each character in the font. Note that the algorithm is applied blindly, and that a typeface may already have a style e.g. it may already be bold or italic. Thus a bold face will appear extra-bold if algorithmic bolding is applied to it. Algorithmic effects are not necessarily a substitute for typeface design and should be used with care.

Parameters
aFontOn a successful return, contains a pointer to the new CFont.
aUidUID of the bitmap font.
aAlgStyleThe algorithmic style to apply.

(generated from Symbian Developer Library)

◆ GetInterface() [1/2]

IMPORT_C TAny * CWsScreenDevice::GetInterface ( TUint  aInterfaceId)

Interface Extension capability Use of this interface going forward will allow the published client interface to be dynamically extended.

Note that the pointer returned is only good for the lifetime of the called CBase derived object.

Parameters
aInterfaceIduniqueid or well known id of interface

(generated from Symbian Developer Library)

◆ GetInterface() [2/2]

const TAny * CWsScreenDevice::GetInterface ( TUint  aInterfaceId) const
inline

Definition at line 2828 of file w32std.h.

◆ GetNearestFontInPixels()

IMPORT_C TInt CWsScreenDevice::GetNearestFontInPixels ( CFont *&  aFont,
const TFontSpec &  aFontSpec 
)
virtual
Parameters
aFontOn return, this is set to point to the device font that is closest to the font specification passed in the second argument
aFontSpecAn absolute font specification

(generated from Symbian Developer Library)

Implements CBitmapDevice.

◆ GetNearestFontInTwips()

IMPORT_C TInt CWsScreenDevice::GetNearestFontInTwips ( CFont *&  aFont,
const TFontSpec &  aFontSpec 
)
virtual
Parameters
aFontOn return, this is set to point to the device font closest to the font specification passed in the second argument.
aFontSpecAn absolute font specification.

(generated from Symbian Developer Library)

Implements MGraphicsDeviceMap.

◆ GetNearestFontToDesignHeightInPixels()

IMPORT_C TInt CWsScreenDevice::GetNearestFontToDesignHeightInPixels ( CFont *&  aFont,
const TFontSpec &  aFontSpec 
)
virtual
Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.

(generated from Symbian Developer Library)

Reimplemented from CBitmapDevice.

◆ GetNearestFontToDesignHeightInTwips()

IMPORT_C TInt CWsScreenDevice::GetNearestFontToDesignHeightInTwips ( CFont *&  aFont,
const TFontSpec &  aFontSpec 
)
virtual
Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.

(generated from Symbian Developer Library)

Reimplemented from MGraphicsDeviceMap.

◆ GetNearestFontToMaxHeightInPixels()

IMPORT_C TInt CWsScreenDevice::GetNearestFontToMaxHeightInPixels ( CFont *&  aFont,
const TFontSpec &  aFontSpec,
TInt  aMaxHeight 
)
virtual
Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.
aMaxHeightThe maximum height within which the font must fit - this overrides the height specified in the TFontSpec.

(generated from Symbian Developer Library)

Reimplemented from CBitmapDevice.

◆ GetNearestFontToMaxHeightInTwips()

IMPORT_C TInt CWsScreenDevice::GetNearestFontToMaxHeightInTwips ( CFont *&  aFont,
const TFontSpec &  aFontSpec,
TInt  aMaxHeight 
)
virtual
Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.
aMaxHeightThe maximum height within which the font must fit - this overrides the height specified in the TFontSpec.

(generated from Symbian Developer Library)

Reimplemented from MGraphicsDeviceMap.

◆ GetPalette()

IMPORT_C TInt CWsScreenDevice::GetPalette ( 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
aPaletteOn return, holds the device's current palette.
Returns
KErrNone, if successful; otherwise, another of the system-wide error codes.

Implements CGraphicsDevice.

◆ GetPixel()

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

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

This pure virtual function is implemented in derived classes.

Parameters
aColorOn return, should contain the RGB colour of the pixel.
aPixelThe (x,y) co-ordinates of the pixel. The top left pixel is (0,0).

Implements CBitmapDevice.

◆ GetRotationsList()

IMPORT_C TInt CWsScreenDevice::GetRotationsList ( TInt  aMode,
CArrayFixFlat< TInt > *  aRotationList 
) const

Gets the list of valid rotations for a particular screen size.

The list is initialised in wsini.ini.

This function always causes a flush of the window server buffer.

SetCurrentRotations()

Parameters
aModeThe index of the screen mode for which the rotation list is required.
aRotationListThe list of valid screen orientations.

(generated from Symbian Developer Library)

◆ GetScanLine()

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

Copies a scanline into a buffer.

The pixels are converted from the display mode format on the bitmapped graphics device to the format of the specified device display mode.

By specifying the start pixel and the number of pixels, either the whole or a portion of a bitmapped graphics device pixel row may be copied.

This pure virtual function is implemented in derived classes.

Parameters
aBufAn 8 bit modifiable descriptor buffer into which pixels are copied; it must be sufficiently large to store all the scanline pixels.
aStartPixelThe (x,y) co-ordinates of the first pixel of the bitmap scanline to be put into the buffer.
aLengthThe number of pixels to put into the buffer.
aDispModeThe display mode into which to convert the pixels.

Implements CBitmapDevice.

◆ GetScreenModeDisplayMode()

IMPORT_C TDisplayMode CWsScreenDevice::GetScreenModeDisplayMode ( const TInt &  aMode) const

Gets the display mode of the screen for the specified screen mode.

This function always causes a flush of the window server buffer.

Parameters
aModeThe index of the screen mode for which the display mode is required

(generated from Symbian Developer Library)

◆ GetScreenModeOrigin()

IMPORT_C TPoint CWsScreenDevice::GetScreenModeOrigin ( TInt  aMode) const

Get the origin of the screen for the specified screen mode.

This function always causes a flush of the window server buffer.

Parameters
aModeThe index of the screen mode for which the screen origin is required.

(generated from Symbian Developer Library)

◆ GetScreenModeScale()

IMPORT_C TSize CWsScreenDevice::GetScreenModeScale ( TInt  aMode) const

Gets the scale for the specified screen mode.

This function always causes a flush of the window server buffer.

Parameters
aModeThe index of the screen mode for which the screen scale is required.

(generated from Symbian Developer Library)

◆ GetScreenModeScaledOrigin()

IMPORT_C TPoint CWsScreenDevice::GetScreenModeScaledOrigin ( TInt  aMode) const

Gets the specfied screen mode's scaled origin.

The functionality is same as CWsScreenDevice::GetCurrentScreenModeScaledOrigin().

It always causes a flush of the window server buffer.

Parameters
aModeThe index of the screen mode for which the scaled origin is required.

(generated from Symbian Developer Library)

◆ GetScreenModeSizeAndRotation() [1/2]

IMPORT_C void CWsScreenDevice::GetScreenModeSizeAndRotation ( TInt  aMode,
TPixelsAndRotation &  aSizeAndRotation 
) const

Get the screen rotation and size (in pixels) for the specified screen mode.

This function always causes a flush of the window server buffer.

Parameters
aModeThe index of the screen mode for which the screen size and rotation are required.
aSizeAndRotationThe orientation of the specified screen mode, and its size in pixels.

(generated from Symbian Developer Library)

◆ GetScreenModeSizeAndRotation() [2/2]

IMPORT_C void CWsScreenDevice::GetScreenModeSizeAndRotation ( TInt  aMode,
TPixelsTwipsAndRotation &  aSizeAndRotation 
) const

Get the screen rotation and size, in both pixels and twips, for the specified screen mode.

This function always causes a flush of the window server buffer.

Parameters
aModeThe index of the screen mode for which the screen size and rotation are required.
aSizeAndRotationThe orientation of the specified screen mode, and its size in both pixels and twips.

(generated from Symbian Developer Library)

◆ GetScreenNumber()

IMPORT_C TInt CWsScreenDevice::GetScreenNumber ( ) const

◆ GetScreenSizeModeList()

IMPORT_C TInt CWsScreenDevice::GetScreenSizeModeList ( RArray< TInt > *  aModeList) const

Gets the available screen size modes.

This function retrieves all available screen size modes which are supported by the server.

Parameters
aModeListOn return, the list of available screen size modes.

(generated from Symbian Developer Library)

◆ HorizontalPixelsToTwips()

IMPORT_C TInt CWsScreenDevice::HorizontalPixelsToTwips ( TInt  aPixels) const
virtual

Converts a horizontal dimension from pixels to twips.

An implementation is supplied by a derived class.

Parameters
aPixelsA horizontal dimension of a device in pixels.
Returns
A horizontal dimension of a device in twips.

Implements MGraphicsDeviceMap.

◆ HorizontalTwipsToPixels()

IMPORT_C TInt CWsScreenDevice::HorizontalTwipsToPixels ( TInt  aTwips) const
virtual

Converts a horizontal dimension from twips to pixels.

An implementation is supplied by a derived class.

Parameters
aTwipsA horizontal dimension of a device in twips.
Returns
A horizontal dimension of a device in pixels.

Implements MGraphicsDeviceMap.

◆ IsCurrentModeDynamic()

IMPORT_C TBool CWsScreenDevice::IsCurrentModeDynamic ( ) const

Returns whether the current screen size mode is dynamic or not.

IsModeDynamic

(generated from Symbian Developer Library)

◆ IsModeDynamic()

IMPORT_C TBool CWsScreenDevice::IsModeDynamic ( TInt  aSizeMode) const

Returns whether the given screen size mode is dynamic or not.

Dynamic screen size modes may change their size in pixels and/or twips and other attributes at run time, so they must not be cached. Static size mode attributes will not change at run time, but may not make full use of the display. Invalid size modes shall return EFalse.

Parameters
aSizeModeThe screen size mode to check.

(generated from Symbian Developer Library)

◆ NumScreenModes()

IMPORT_C TInt CWsScreenDevice::NumScreenModes ( ) const

Gets the number of available screen modes.

Each mode has a different size, and one or more possible rotations/orientations.

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)

◆ NumTypefaces()

IMPORT_C TInt CWsScreenDevice::NumTypefaces ( ) const
virtual

Gets the number of typefaces supported by the graphics device.

Returns
The number of typefaces supported.

Implements CGraphicsDevice.

◆ PaletteAttributes()

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

Gets the palette attributes of the device.

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

Implements CGraphicsDevice.

◆ PointerRect()

IMPORT_C TRect CWsScreenDevice::PointerRect ( ) const

Gets the active area for the pointing device.

This is a device-dependent parameter, and will typically depend on the screen size and other factors.

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)

◆ RectCompare() [1/2]

IMPORT_C TBool CWsScreenDevice::RectCompare ( const TRect &  aRect1,
const TRect &  aRect2 
) const

Compares two areas of the screen to see if they have the same content.

If there are any sprites on the screen they are not included in the comparison.

This function always causes a flush of the window server buffer.

Parameters
aRect1A rectangle.
aRect2Another rectangle.

(generated from Symbian Developer Library)

◆ RectCompare() [2/2]

IMPORT_C TBool CWsScreenDevice::RectCompare ( const TRect &  aRect1,
const TRect &  aRect2,
TUint  aFlags 
) const

Compares two areas of the screen to see if they have the same content.

This function always causes a flush of the window server buffer.

Parameters
aRect1A rectangle.
aRect2Another rectangle.
aFlagsEIncludeSprite to include the sprite in the compare or ERemoveSprite to remove the sprite.

(generated from Symbian Developer Library)

◆ ReleaseFont()

IMPORT_C void CWsScreenDevice::ReleaseFont ( CFont *  aFont)
virtual

Releases the specified font.

It is used to indicate that the specified font is no longer needed for use by the device map. As fonts can be shared between applications, this function does not delete the copy of the font from RAM unless the font was only being used by this particular device map.

An implementation is supplied by a derived class.

Parameters
aFontA pointer to the font to be released.

Implements MGraphicsDeviceMap.

◆ RemoveFile()

IMPORT_C void CWsScreenDevice::RemoveFile ( TInt  aId = 0)
virtual

Removes a font file from the font store.

This pure virtual function is implemented in derived classes.

Parameters
aIdThe ID of the font file to be removed. The default is 0.

Implements CBitmapDevice.

◆ ScreenModeEnforcement()

IMPORT_C TScreenModeEnforcement CWsScreenDevice::ScreenModeEnforcement ( ) const

Gets the current screen mode enforcement settings.

The global screen mode enforcement setting defines the requirements that a group window must meet to be displayed. The requirements may have been set in wsini.ini, or using SetScreenModeEnforcement().

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)

◆ SetAppScreenMode()

IMPORT_C void CWsScreenDevice::SetAppScreenMode ( TInt  aMode)

Sets the application's screen mode; this also sets all the attributes of the screen mode.

Note: although this API was added in Symbian OS v8.0, the functionality is only available from Symbian OS v8.1 onwards.

Parameters
aModeThe index of the application's new screen mode.

(generated from Symbian Developer Library)

◆ SetBackLight()

IMPORT_C TInt CWsScreenDevice::SetBackLight ( TBool  aBackLight)
capability
EikServ SID

(generated from Symbian Developer Library)

◆ SetCurrentRotations()

IMPORT_C void CWsScreenDevice::SetCurrentRotations ( TInt  aMode,
CFbsBitGc::TGraphicsOrientation  aRotation 
) const

Sets the screen rotation that should be used with a particular screen size.

After calling this function, whenever you change into the screen size specified by aMode you will have the rotation aRotation. The setting remains in force until it is explicitly changed using this function.

Panics if the specified rotation is not allowed by the given screen mode.

Parameters
aModeThe index of the screen mode the rotation applies to.
aRotationThe new screen orientation.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetCurrentScreenModeAttributes()

IMPORT_C void CWsScreenDevice::SetCurrentScreenModeAttributes ( const TSizeMode &  aModeAtt)

Used for testing purposes only.

Parameters
aModeAttScreen size mode to be set.

(generated from Symbian Developer Library)

◆ SetCustomPalette()

IMPORT_C TInt CWsScreenDevice::SetCustomPalette ( const CPalette *  aPalette)

Sets the custom palette.

This function always causes a flush of the window server buffer.

Parameters
aPaletteThe custom palette.

Panic condition: W32 6 aPalette is NULL.

capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetPalette()

IMPORT_C void CWsScreenDevice::SetPalette ( CPalette *  aPalette)
virtual

Sets the device's palette.

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

Parameters
aPaletteThe new palette for the device.

Implements CGraphicsDevice.

◆ SetScreenMode()

IMPORT_C void CWsScreenDevice::SetScreenMode ( TInt  aMode)

Sets the current screen mode.

Note that this function is only useful for testing. This is because the screen mode normally reflects the state of real hardware, e.g. whether the cover is open or closed on a phone that supports screen flipping.

This function always causes a flush of the window server buffer.

Parameters
aModeThe screen mode index, starting from zero.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetScreenModeEnforcement()

IMPORT_C void CWsScreenDevice::SetScreenModeEnforcement ( TScreenModeEnforcement  aMode) const

Sets the screen mode enforcement requirements.

This global setting defines the requirements that a group window must meet to be displayed. The value may be set using this function, but is more likely to be defined in wsini.ini.

Parameters
aModeThe screen mode enforcement requirements.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetScreenSizeAndRotation() [1/2]

IMPORT_C void CWsScreenDevice::SetScreenSizeAndRotation ( const TPixelsAndRotation &  aSizeAndRotation)

Sets the current screen size in pixels, and the rotation for the screen device.

This function always causes a flush of the window server buffer.

Parameters
aSizeAndRotationThe new rotation and the screen size in pixels.

(generated from Symbian Developer Library)

◆ SetScreenSizeAndRotation() [2/2]

IMPORT_C void CWsScreenDevice::SetScreenSizeAndRotation ( const TPixelsTwipsAndRotation &  aSizeAndRotation)

Sets the current screen size in twips and pixels, and the rotation for the screen device.

Parameters
aSizeAndRotationThe new rotation and the screen size in both pixels and twips.

(generated from Symbian Developer Library)

◆ SizeInPixels()

IMPORT_C TSize CWsScreenDevice::SizeInPixels ( ) const
virtual

Gets the size of the device area in pixels.

Returns
The width and height of the device area, in pixels

Implements CGraphicsDevice.

◆ SizeInTwips()

IMPORT_C TSize CWsScreenDevice::SizeInTwips ( ) const
virtual

Gets the size of the device area in twips.

Returns
The width and height of the device area, in twips

Implements CGraphicsDevice.

◆ TypefaceSupport()

IMPORT_C void CWsScreenDevice::TypefaceSupport ( TTypefaceSupport &  aTypefaceSupport,
TInt  aTypefaceIndex 
) const
virtual

Gets typeface information for a specified typeface.

This information is returned in aTypefaceSupport, and includes:

the typeface name and typeface attributes

the number of font heights

the maximum and minimum font heights

whether it is a scalable typeface

Parameters
aTypefaceSupportOn return, contains the typeface information.
aTypefaceIndexA typeface index number, in the range: zero to (NumTypefaces() - 1).
See also
NumTypefaces()

Implements CGraphicsDevice.

◆ VerticalPixelsToTwips()

IMPORT_C TInt CWsScreenDevice::VerticalPixelsToTwips ( TInt  aPixels) const
virtual

Converts a vertical dimension from pixels to twips.

An implementation is supplied by a derived class.

Parameters
aPixelsA vertical dimension of a device in pixels.
Returns
A vertical dimension of a device in twips.

Implements MGraphicsDeviceMap.

◆ VerticalTwipsToPixels()

IMPORT_C TInt CWsScreenDevice::VerticalTwipsToPixels ( TInt  aTwips) const
virtual

Converts a vertical dimension from twips to pixels.

An implementation is supplied by a derived class.

Parameters
aTwipsA vertical dimension of a device in twips.
Returns
A vertical dimension of a device in pixels.

Implements MGraphicsDeviceMap.

Friends And Related Symbol Documentation

◆ CWindowGc

friend class CWindowGc
friend

Definition at line 2437 of file w32std.h.


The documentation for this class was generated from the following files: