DirectGDI Interface Overview

The DirectGDI Interface component provides a Hardware Adaptation Interface (HAI), which separates the generic and adaptation parts of the DirectGDI functionality. This HAI defines a set of interfaces that are implemented by device creators in order to provide the API functionality.

Target audience: Device creators.

Note: DirectGDI is deprecated in Symbian^3.

The following diagram provides an overview of the classes in the DirectGDI Interface component and related classes in other components.

Figure 1. DirectGDI Interface component classes and related classes

The following table provides a summary of the key classes that make up the DirectGDI Interface component.

Class Description

CDirectGdiDriverInternal

This class represents the body part of the DirectGDI driver, which is implemented using the handle/body idiom. The handle part is encapsulated by the CDirectGdiDriver class, which is part of the DirectGDI component. CDirectGdiDriverInternal defines the HAI. The DirectGDI adaptation must derive a concrete class from this class and implement of its pure virtual functions. This concrete class must provide the initialisation, termination and construction of the concrete drawing engine and the creation of source and target rendering.

MDirectGdiEngine

This interface defines the main part of DirectGDI HAI. The DirectGDI adaptation must provide a concrete engine class that implements this interface. This performs the actual drawing and blitting routines that enable rendering to a RDirectGdiImageTarget instance. The implementation can take advantage of hardware acceleration if it is available.

RDirectGdiImageTarget

This class is a handle to a DirectGDI adaptation-specific resource which abstracts the image-based rendering target. This class allows a global sharable image resource (RSgImage) to be used as a target of DirectGDI rendering. This handle class and its DirectGDI adaptation-specific resource are non-sharable and local within the creating thread. This class is part of the generic layer and forwards any request to the CDirectGdiDriver singleton for the calling thread.

RDirectGdiDrawableSource

This class is a handle to a DirectGDI adaptation-specific resource that is bound to an image or non-image resource (RSgDrawable). This class allows non-image resources (global and sharable between processes) to be used as a source from the DirectGDI rendering API. This class and its DirectGDI adaptation-specific resource are non-sharable and are local to the calling thread. This class is part of the generic code and forwards the creation and deletion request to the CDirectGdiDriver singleton object for the calling thread.

Sequence diagrams

The following sequence diagrams illustrate the behaviour of key DirectGDI classes in two separate scenarios.

Context usage

Figure 2. DirectGDI context usage sequence diagram

Driver creation and deletion

Figure 3. DirectGDI driver creation and deletion sequence diagram