MAknsRlEffectContext Class Reference

class MAknsRlEffectContext

Interface to skin effect context.

Skin effect plugins receive a reference to their contexts upon activation. The context is then used to retrieve and manipulate layer data.

The skin renderer sets the size of the layers of the particular skin item being rendered, and may initialize the content of one or more layers. Then the effects are executed, one at a time, to manipulate layer content. Finally, one or more layers are used as the content of the skin item being rendered.

All the layers have the same size. All the RGB channels have the same color depth, and the color depth is either EColor64K or EColor16MU . All the alpha channels have color depth EGray256 .

Since
2.8

Constructor & Destructor Documentation

~MAknsRlEffectContext()

~MAknsRlEffectContext ( ) [inline, virtual]

Destructor for internal use.

Destructor is reserved for internal use. Client code must never destroy effect contexts.

Member Functions Documentation

GetLayerDataL(TAknsRlLayerData &, const TInt, const TInt, const TBool)

void GetLayerDataL ( TAknsRlLayerData & aData,
const TInt aLayerIndex,
const TInt aLayerStatus,
const TBool aInitialize
) [pure virtual]

Retrieves the given layer data.

Retrieves the required objects to manipulate layer content, and optionally initializes the graphical content if the layer is currently unused.

The ownership of the objects included in aData structure stays with the effect context. Calling code must not deactivate, close, nor destroy any of the objects.

Calling code must assume any initial brush, pen, or color configuration regarding the graphics devices. After rendering, the plugin must not leave any clipping configuration active in the graphics contexts. Brush, pen, and color configuration may be left in any state.

Only the fields indicated by aLayerStatus parameter are assigned. Other fields are set to NULL . For example, if only the RGB channel is requested, fields for the alpha channel are set to NULL .

Note that both RGB and alpha channels are created, even if the callers requests only one of them. Therefore it is strongly recommended to use aInitialize parameter with ETrue value, unless the caller knows that it will draw both the channels.

Exceptions:
The method leaves with an error code if the layer can not be retrieved or an invalid parameter is given. The result of the subsequent GetLayerDataL calls is undefined. The plugin must exit as soon as possible with an error code.

Parameters

TAknsRlLayerData & aData Structure that will receive layer data. This is an output parameter created and owned by the caller. Ownership of the data objects themselves (i.e., the fields of the stucture) stays with the effect context.
const TInt aLayerIndex Index of the layer to be retrieved.
const TInt aLayerStatus One of the KAknsRlLayer constants indicating which channels of the layer are requested. This value must not be KAknsRlLayerNone nor a combination of constants.
const TBool aInitialize ETrue if the context should initialize the layer content, EFalse otherwise. Regardless of this parameter, the objects included in layer data are always constructed and drawable. If the layer is currently unused (i.e., no effect plugin or renderer has yet drawn to it), ETrue value instructs the context to perform the following initialization:If RGB and alpha channels are requested, both of them are filled with black.If only RGB channel is requested, it is filled with black. Alpha channel (not visible to the effect) is filled with white.If only alpha channel is requested, it is filled with black. RGB channel (not visible to the effect) is filled with black. If EFalse is specified, the initial content of a previously unused layer is undefined. This also applies to the channel possibly not included in the request. Note that initialization is never done if the layer has been previously used by some effect or the renderer itself.

GetSkinSrvSession()

RAknsSrvSession * GetSkinSrvSession ( ) [pure virtual]

Retrieves current skin server session.

Since
3.0

LayerSize()

const TSize LayerSize ( ) [pure virtual]

Retrieves the size of the layers. Every layer has the same size.

Since
2.8