class MSgDriverAdapter |
This interface must be implemented by the Graphics Resource Adapter singleton. There must be a single instance of the adaptation layer class that implements this interface in each process using the Graphics Resource API.
Public Member Functions | |
---|---|
void | AllocMarkEnd ( TInt ) |
void | AllocMarkStart () |
TBool | CheckDrawable (const MSgResourceAdapter &) |
TBool | CheckImage (const MSgResourceAdapter &) |
TBool | CheckImageCollection (const MSgResourceAdapter &) |
TInt | CreateImage (const TSgImageInfo &, const TAny *, TInt , MSgDrawableAdapter *&) |
TInt | CreateImage (const TSgImageInfo &, MSgImageAdapter *, MSgDrawableAdapter *&) |
TInt | CreateImageCollection (const TSgImageInfo &, TInt , MSgImageCollectionAdapter *&) |
TInt | CreateImageCollections (const TSgImageInfo , TInt , MSgImageCollectionAdapter *, TInt ) |
void | Delete () |
TInt | GetPixelFormats (const TSgImageInfo &, TUidPixelFormat *, TInt &) |
IMPORT_C TInt | New ( MSgDriverAdapter *&) |
TInt | OpenDrawable (const TSgDrawableId &, TUint32 , TUid , MSgDrawableAdapter *&) |
TInt | ResourceCount () |
void | SetAllocFail ( RAllocator::TAllocFail , TInt ) |
void | AllocMarkEnd | ( | TInt | aCount | ) | [pure virtual] |
Marks the end of cell checking at the current nesting level on the heap for adapter objects. Each call to this function must match an earlier call to AllocMarkStart() .
This function checks that the number of cells allocated in the heap for adapter objects, at the current nesting level, is aCount. If the check fails then an SGALLOC:nnnnnnnn panic is raised, where nnnnnnnn is the hexadecimal address of the first orphaned cell.
TInt aCount | The number of allocated heap cells expected. |
void | AllocMarkStart | ( | ) | [pure virtual] |
Marks the start of cell checking on the heap for adapter objects. Calls to this function can be nested but each call must be matched by a corresponding call to AllocMarkEnd() .
TBool | CheckDrawable | ( | const MSgResourceAdapter & | aDrawable | ) | const [pure virtual] |
Tests whether aDrawable references an existing adapter object representing a drawable resource. This function is called in debug builds to detect invalid RSgDrawable handles.
const MSgResourceAdapter & aDrawable |
TBool | CheckImage | ( | const MSgResourceAdapter & | aImage | ) | const [pure virtual] |
Tests whether aImage references an existing adapter object representing an image. This function is called in debug builds to detect invalid RSgImage handles.
const MSgResourceAdapter & aImage |
TBool | CheckImageCollection | ( | const MSgResourceAdapter & | aImageCollection | ) | const [pure virtual] |
Tests whether aImageCollection references an existing adapter object representing an image collection. This function is called in debug builds to detect invalid RSgImageCollection handles.
const MSgResourceAdapter & aImageCollection |
TInt | CreateImage | ( | const TSgImageInfo & | aInfo, |
const TAny * | aDataAddress, | |||
TInt | aDataStride, | |||
MSgDrawableAdapter *& | aResult | |||
) | [pure virtual] |
Creates an image with the specified attributes and, optionally, the specified initial contents.
const TSgImageInfo & aInfo | The attributes of the image to be created. |
const TAny * aDataAddress | The base address of the pixel data used to populate the new image. If this value is null, the initial contents of the image are undefined. If aInfo specifies that the new image is constant, this value must not be null. |
TInt aDataStride | The number of bytes between rows of the pixel data used to populate the new image. |
MSgDrawableAdapter *& aResult | On return, a pointer to the adapter object that represents the new image. |
TInt | CreateImage | ( | const TSgImageInfo & | aInfo, |
MSgImageAdapter * | aImage, | |||
MSgDrawableAdapter *& | aResult | |||
) | [pure virtual] |
Creates an image with the specified attributes and initial contents copied from an existing image.
const TSgImageInfo & aInfo | The attributes of the image to be created. |
MSgImageAdapter * aImage | A pointer to the adapter object that represents the existing image to be copied. |
MSgDrawableAdapter *& aResult | On return, a pointer to the adapter object that represents the new image. |
TInt | CreateImageCollection | ( | const TSgImageInfo & | aInfo, |
TInt | aImageCount, | |||
MSgImageCollectionAdapter *& | aResult | |||
) | [pure virtual] |
Creates an image collection with the specified attributes.
const TSgImageInfo & aInfo | The image attributes of the collection to be created. |
TInt aImageCount | The number of images in the collection to be created. |
MSgImageCollectionAdapter *& aResult | On return, a pointer to the adapter object that represents the new image collection. |
TInt | CreateImageCollections | ( | const TSgImageInfo | aInfos, |
TInt | aImageCount, | |||
MSgImageCollectionAdapter * | aCollections, | |||
TInt | aCollectionCount | |||
) | [pure virtual] |
Creates a set of image collections that share a single memory chunk.
const TSgImageInfo aInfos | An array of aCollectionCount elements with the image attributes of each of the collections to be created. |
TInt aImageCount | The number of images in each of the collections to be created. |
MSgImageCollectionAdapter * aCollections | On return, an array of pointers to the adapter objects that represent the new image collections. |
TInt aCollectionCount | The number of image collections to be created. |
void | Delete | ( | ) | [pure virtual] |
Deletes an instance of the singleton class and carries out the termination tasks needed to release the internal resources allocated for the calling process.
TInt | GetPixelFormats | ( | const TSgImageInfo & | aInfo, |
TUidPixelFormat * | aPixelFormats, | |||
TInt & | aCount | |||
) | [pure virtual] |
Retrieves the list of image pixel formats supported on this device for a specified usage.
const TSgImageInfo & aInfo | The image attributes. aInfo.iPixelFormat is ignored. |
TUidPixelFormat * aPixelFormats | A pointer to an array that on return will contain the supported pixel formats. If this parameter is null, then this function will just return the number of supported pixel formats in aCount. |
TInt & aCount | On input, the number of elements in the array pointed to by aPixelFormats if not null, ignored otherwise. On return, the actual number of supported pixel formats. If this number is greater than the number of elements in the array, then the array will be filled with as many pixel formats as it can hold and the function will return KErrOverflow. |
IMPORT_C TInt | New | ( | MSgDriverAdapter *& | aPtr | ) | [static] |
Creates a new instance of the singleton class and carries out the initialisation tasks needed to use the Graphics Resource API in the context of the calling process. This is the only function that must be exported by the Graphics Resource Adapter DLL, at ordinal 1.
MSgDriverAdapter *& aPtr | On return, a pointer to the new instance of the singleton class. |
TInt | OpenDrawable | ( | const TSgDrawableId & | aId, |
TUint32 | aMode, | |||
TUid | aHandleType, | |||
MSgDrawableAdapter *& | aResult | |||
) | [pure virtual] |
Opens a new handle to a drawable resource. If there are no handles to the drawable resource open in the calling process then this function creates a new adapter object that represents the drawable resource in the context of the calling process. Otherwise this function just increments the reference count of the existing adapter object that represents the drawable resource in the context of the calling process.
const TSgDrawableId & aId | The unique identifier of the drawable resource. |
TUint32 aMode | Flags controlling how the drawable resource is opened. The only value of this parameter which it is mandatory to support is KSgDefaultOpenMode. Extra opening options may be defined by an implementation of the Graphics Resource API and made available through additional functions. |
TUid aHandleType | The type of the handle which is to store the reference to the specified drawable resource as a globally unique identifier. |
MSgDrawableAdapter *& aResult | On return, a pointer to the adapter object that represents the specified drawable resource. |
void | SetAllocFail | ( | RAllocator::TAllocFail | aType, |
TInt | aRate | |||
) | [pure virtual] |
Sets the type and rate of simulated allocation failure on the heap for adapter objects.
RAllocator::TAllocFail aType | The type of allocation failure requested. |
TInt aRate | The rate of allocation failure requested. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.