#include <ImageDisplay.h>
Link against:
imagedisplay.lib
This item is not part of the S60 5th Edition SDK
class CImageDisplay : public CBase;
Description
The public API for clients to call the Image Display library. This class provides functions to convert images stored in descriptors
or files to bitmaps ready for display.
Derivation
CBase
-
Base class for all classes to be instantiated on the heap.
CImageDisplay
- The public API for clients to call the Image Display library. This class provide...
Members
Defined in CImageDisplay
:
Inherited from CBase
:
Construction and destruction
NewL(MIclImageDisplayObserver &,RFs &)
IMPORT_C static CImageDisplay* NewL(MIclImageDisplayObserver &aCallback, RFs &aFs);
Description
Constructs a CImageDisplay object.
Parameters
MIclImageDisplayObserver &aCallback |
A reference to a Image Display observer object which would recieve status notifications
|
RFs &aFs |
A reference to a file server session for the display API to use.
|
|
Return value
IMPORT_C ~CImageDisplay();
Description
This is the destructor for this class and is responsible for deallocating all resources
IMPORT_C void SetPluginUid(TUid aPluginUid);
Description
Specifies the UID of the image display plugin to load
Parameters
TUid aPluginUid |
The plugin's implementation UID
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised when a plugin is already loaded
|
|
SetImageSource(const TMMSource &)
IMPORT_C TInt SetImageSource(const TMMSource &aSource);
Description
Specifies the source of the image to display
Parameters
const TMMSource &aSource |
The data source container. Note that the framework doesn't take a copy of actual data/filename etc. and they must persist
during decoding
|
|
Return value
TInt
|
KErrNone if the given source type is supported, otherwise KErrNotSupported
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage
|
|
SetSourceMimeType(const TDesC8 &)
IMPORT_C void SetSourceMimeType(const TDesC8 &aMIMEType);
Description
Specifies the MIME type of the source image.
Parameters
const TDesC8 &aMIMEType |
The MIME type of the source image
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage
|
|
SetSourceImageType(TUid,TUid)
IMPORT_C void SetSourceImageType(TUid aImageType, TUid aImageSubType=TUid::Null());
Description
Specifies the source image's type and (optionally) its subtype
Parameters
TUid aImageType |
The UID of the source image's type
|
TUid aImageSubType |
The UID of the source image's subtype
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet
|
|
SetSourceRect(const TRect &)
IMPORT_C void SetSourceRect(const TRect &aRect);
Description
Defines a clipping region. Only the specified region will be processed.
Parameters
const TRect &aRect |
The coordinates of the clipping region
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet
|
|
IMPORT_C void ResetSourceRect();
Description
Clears settings for the clipping region, but not the image region
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet
|
|
SetSizeInPixels(const TSize &,TBool)
IMPORT_C void SetSizeInPixels(const TSize &aSize, TBool aMaintainAspectRatio=ETrue);
Description
Specifies the requested image size.
Parameters
const TSize &aSize |
The requested size of the image in pixels
|
TBool aMaintainAspectRatio |
Requests that the aspect ratio be maintained as far as possible Defaults to true
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet
|
|
SetDisplayMode(TDisplayMode)
IMPORT_C void SetDisplayMode(TDisplayMode aDisplayMode);
Description
Specifies the requested image display mode.
Parameters
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet
|
|
IMPORT_C TInt SetOptions(TUint aOptions);
Description
Defines how the image is to be displayed.
Note that all plugins support EOptionMainImage, whereas the availability of the other options depends on the image display
plugin loaded.
Parameters
TUint aOptions |
- image type selected using the TImageOptions flag set
|
|
Return value
TInt
|
KErrArgument on wrong combination of options, especially if the rotate and mirror options aren't set together with EOptionThumbnail
or EOptionMainImage.
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet
|
|
IMPORT_C void SetupL();
Description
Requests that a suitable plugin be selected and instantiated. Leaves with KErrNotFound if no suitable plugin found or if the
framework or plugin finds any error in any of the preceeding SetXXX() calls
Leave codes
KErrNotFound |
No suitable plugin was found
|
KErrArgument |
One of the previously supplied parameters (image size, mime type etc.) is invalid
|
|
Panic codes
ImageDisplay |
2 EUndefinedSourceType Raised when image source is not defined yet
|
|
IMPORT_C void Play();
Description
Initiates an image display operation. The framework will panic if no plugin has been instantiated already. Note: That a plugin
may perform some asynchronous operations within the current thread, so yielding to the Active Scheduler after calling this
function is almost mandatory
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded.
|
ImageDisplay |
3 EUndefinedDestSize Raised when destination image size is not defined yet
|
|
IMPORT_C void Pause();
Description
Instructs a plug-in to pause its operation. An operation can be resumed by calling the CImageDisplay::Play()
The framework will panic if no plugin has been instantiated already and CImageDisplay::Play()
has not been called yet.
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded.
|
|
IMPORT_C void StopPlay();
Description
Cancels any image display operation currently in progress.
Panic codes
ImageDisplay |
1 EIllegalCallSequence Raised when no plugin loaded yet.
|
|
IMPORT_C void Reset();
Description
Resets all SetXXX() calls so that the state is the same as that immediately after a call to CImageDisplay::NewL(MIclImageDisplayObserver &,RFs &)
. Deletes the plugin if one is loaded.
ExtensionInterface(TUid,TAny *&)
IMPORT_C TInt ExtensionInterface(TUid aIFaceUid, TAny *&aIFacePtr);
Description
Gets a pointer to a plugin extension
Parameters
TUid aIFaceUid |
Requested extension interface Uid
|
TAny *&aIFacePtr |
Reference to pointer which would have interface pointer on sucessful completion, otherwise NULL
|
|
Return value
TInt
|
KErrNotSupported if given extension interface is not supported or other system-wide error code
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded.
|
|
IMPORT_C TBool ValidBitmap() const;
Description
Check to see if the current frame can be displayed now
Return value
TBool
|
ETrue The current bitmap contains a valid image. It will return ETrue only when it is called in between the ImageReady() callback
and a subsequent call to CImageDisplay::Play() .
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded or decoding was not started
|
|
RecommendedImageSizes()const
IMPORT_C const RImageSizeArray& RecommendedImageSizes() const;
Description
Returns an array of recommended image sizes i.e. sizes which would be processed faster
Return value
const RArray & |
a reference to the array of recommended image sizes
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded.
|
|
GetBitmap(const CFbsBitmap *&,const CFbsBitmap *&)const
IMPORT_C void GetBitmap(const CFbsBitmap *&aBitmap, const CFbsBitmap *&aMask) const;
Description
Gets a reference to the current bitmap and mask
Parameters
const CFbsBitmap *&aBitmap |
Reference to pointer which would have current frame bitmap address.
|
const CFbsBitmap *&aMask |
Reference to pointer which would have current frame mask address. This is NULL if no mask is available or if aBitmap has a
display mode of EColor16MA (see CImageDisplay::SetDisplayMode(TDisplayMode) ).
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded or decoding was not started
|
|
See also:
IMPORT_C TUint ImageStatus() const;
Description
returns an integer, corresponding to the current image status (if known), the value will be comprised of elements of the TImageStatus
bit field
Return value
TUint
|
a combination TImageStatus flags
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded.
|
|
IMPORT_C TInt NumFrames(TInt &aNumFrames) const;
Description
returns the number of frames (if known) or an error code if unknown.
Parameters
TInt &aNumFrames |
a reference to frame number parameter which has meaning only if retrun value is KErrNone
|
|
Return value
TInt
|
KErrNotSupported if a plug-in can't determine number of frames
|
|
Panic codes
ImageDisplay |
1 EIllegalCallSequence No plugin loaded.
|
|
TImageOptions
Description
Flags to control how the image is handled These can be combined using an OR operation. Note that the rotate and mirror options
have to be set together with EOptionThumbnail or EOptionMainImage.
TImageStatus
Description
Return flags from CImageDisplay::ImageStatus()const
typedef RArray<TSize> CImageDisplay::RImageSizeArray;
Description
An array containing the sizes of images.