#include <imagedisplay.h>
Link against: imagedisplay.lib
class CImageDisplay : public CBase, public CBase |
Public Member Type Definitions | |
---|---|
typedef | RArray< TSize > RImageSizeArray |
Public Member Enumerations | |
---|---|
enum | TImageOptions { EOptionsUndefined, EOptionThumbnail, EOptionMainImage, EOptionRotateCw90, ..., EOptionAutoRotate } |
enum | TImageStatus { EImageTypeUnknown, EImageSingleFrame, EImageMultiFrame, EImageAnimated, ..., EImageIsFullyScalable } |
Public Member Functions | |
---|---|
~CImageDisplay() | |
IMPORT_C TInt | ExtensionInterface(TUid, TAny *&) |
IMPORT_C void | GetBitmap(const CFbsBitmap *&, const CFbsBitmap *&) |
IMPORT_C TUint | ImageStatus() |
IMPORT_C CImageDisplay * | NewL(MIclImageDisplayObserver &, RFs &) |
IMPORT_C TInt | NumFrames(TInt &) |
IMPORT_C void | Pause() |
IMPORT_C void | Play() |
IMPORT_C const RImageSizeArray & | RecommendedImageSizes() |
IMPORT_C void | Reset() |
IMPORT_C void | ResetSourceRect() |
IMPORT_C void | SetDisplayMode(TDisplayMode) |
IMPORT_C TInt | SetImageSource(const TMMSource &) |
IMPORT_C TInt | SetOptions(TUint) |
IMPORT_C void | SetPluginUid(TUid) |
IMPORT_C void | SetSizeInPixels(const TSize &, TBool) |
IMPORT_C void | SetSourceImageType(TUid, TUid) |
IMPORT_C void | SetSourceMimeType(const TDesC8 &) |
IMPORT_C void | SetSourceRect(const TRect &) |
IMPORT_C void | SetupL() |
IMPORT_C void | StopPlay() |
IMPORT_C TBool | ValidBitmap() |
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.
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.
Enumerator | Value | Description |
---|---|---|
EOptionsUndefined | 0x00000000 |
No options defined |
EOptionThumbnail | 0x00000001 |
Use the thumbnail image as source |
EOptionMainImage | 0x00000002 |
Use the main image as source |
EOptionRotateCw90 | 0x00000004 |
Rotate the image by 90 degrees clockwise |
EOptionRotateCw180 | 0x00000008 |
Rotate the image by 180 degrees clockwise |
EOptionRotateCw270 | 0x00000010 |
Rotate the image by 270 degrees clockwise |
EOptionMirrorHorizontal | 0x00000020 |
Mirror an image about the horizontal axis |
EOptionMirrorVertical | 0x00000040 |
Mirror an image about the vertical axis |
EOptionAutoRotate | 0x00000080 |
Rotate the image automatically (if necessary) |
Return flags from ImageStatus()
Enumerator | Value | Description |
---|---|---|
EImageTypeUnknown | 0x00000000 |
ImageStatus is unknown |
EImageSingleFrame | 0x00000001 |
Image is single frame |
EImageMultiFrame | 0x00000002 |
Image is multiframe |
EImageAnimated | 0x00000004 |
Image is animated |
EImageMasked | 0x00000008 |
Image has got a mask/alpha channel |
EImageHasThumbnail | 0x00000010 |
Image has got a thumbnail |
EImageIsFullyScalable | 0x00000020 |
Image is fully scalable i.e. arbitrary scaling can be perofmed quite quickly |
IMPORT_C | ~CImageDisplay | ( | ) |
This is the destructor for this class and is responsible for deallocating all resources
Parameters | |
---|---|
aIFaceUid | Requested extension interface Uid |
aIFacePtr | Reference to pointer which would have interface pointer on sucessful completion, otherwise NULL |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence No plugin loaded. |
IMPORT_C void | GetBitmap | ( | const CFbsBitmap *& | aBitmap, |
const CFbsBitmap *& | aMask | |||
) | const |
Parameters | |
---|---|
aBitmap | Reference to pointer which would have current frame bitmap address. |
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 SetDisplayMode()). |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence No plugin loaded or decoding was not started |
IMPORT_C TUint | ImageStatus | ( | ) | const |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence No plugin loaded. |
IMPORT_C CImageDisplay * | NewL | ( | MIclImageDisplayObserver & | aCallback, |
RFs & | aFs | |||
) | [static] |
Constructs a CImageDisplay object.
Parameters | |
---|---|
aCallback | A reference to a Image Display observer object which would recieve status notifications |
aFs | A reference to a file server session for the display API to use. |
Parameters | |
---|---|
aNumFrames | a reference to frame number parameter which has meaning only if retrun value is KErrNone |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence No plugin loaded. |
IMPORT_C void | Play | ( | ) |
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 const RImageSizeArray & | RecommendedImageSizes | ( | ) | const |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence No plugin loaded. |
IMPORT_C void | Reset | ( | ) |
Resets all SetXXX() calls so that the state is the same as that immediately after a call to NewL(). Deletes the plugin if one is loaded.
IMPORT_C void | ResetSourceRect | ( | ) |
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 |
IMPORT_C void | SetDisplayMode | ( | TDisplayMode | aDisplayMode | ) |
Specifies the requested image display mode.
Parameters | |
---|---|
aDisplayMode | The requested display mode |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet |
Specifies the source of the image to display
Parameters | |
---|---|
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 |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence Raised if the function was called during decoding stage |
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 | |
---|---|
aOptions | - image type selected using the TImageOptions flag set |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence Raised if the function was called during decoding stage or a plugin is not loaded yet |
IMPORT_C void | SetPluginUid | ( | TUid | aPluginUid | ) |
Specifies the UID of the image display plugin to load
Parameters | |
---|---|
aPluginUid | The plugin's implementation UID |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence Raised when a plugin is already loaded |
Specifies the requested image size.
Parameters | |
---|---|
aSize | The requested size of the image in pixels |
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 |
Specifies the source image's type and (optionally) its subtype
Parameters | |
---|---|
aImageType | The UID of the source image's type |
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 |
IMPORT_C void | SetSourceMimeType | ( | const TDesC8 & | aMIMEType | ) |
Specifies the MIME type of the source image.
Parameters | |
---|---|
aMIMEType | The MIME type of the source image |
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence Raised if the function was called during decoding stage |
IMPORT_C void | SetSourceRect | ( | const TRect & | aRect | ) |
Defines a clipping region. Only the specified region will be processed.
Parameters | |
---|---|
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 | SetupL | ( | ) |
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 | StopPlay | ( | ) |
Cancels any image display operation currently in progress.
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence Raised when no plugin loaded yet. |
IMPORT_C TBool | ValidBitmap | ( | ) | const |
Check to see if the current frame can be displayed now
Panic Codes | |
---|---|
ImageDisplay | 1 EIllegalCallSequence No plugin loaded or decoding was not started |