A new application and UI framework is planned for Symbian^4 (S^4).
This topic summarizes what you need to know about how the new framework will
affect your AVKON applications and any clients that draw using CWindowGc
.
The new application and UI framework will provide a modern replacement
for AVKON and CWindowGc
drawing. However, AVKON and CWindowGc
drawing
will continue to be supported, although AVKON may not exist on some devices.
This means that AVKON applications (and clients that draw using CWindowGc
)
will eventually need to be ported to the new framework.
Assuming AVKON is present on the device, AVKON applications will continue
to work correctly on S^4 (although performance may be affected), provided
their main view is opaque and it covers the entire screen. The same
is true for any other clients that draw using CWindowGc
.
These constraints apply only to the application's main view and not to dialogs
and menus that appear over the main view.
Applications that of necessity have a transparent main view and/or occupy only a section of the screen (for example, a magnifying glass application) are not guaranteed to work correctly if they are run on S^4 and later. You may therefore want to port these applications to the new framework at the earliest opportunity.
Use CEikAppUi::ClientRect()
to
find out the full area of the screen that is available for drawing. You should
never hard code any assumptions about the screen size in your code. Here is
an example that constructs the application's main view in the ConstructL()
of
the CExampleAppUi
class, which is derived from CEikAppUi
.
void CExampleAppUi::ConstructL() { iAppView = CExampleAppView::NewL(ClientRect()); }
In this example, the view is constructed using a static function
that wraps up the two-phase construction as shown below. CExampleAppView
inherits
from CCoeControl
.
CExampleAppView* CExampleAppView::NewL(const TRect& aRect) { CExampleAppView* self = new(ELeave) CExampleAppView(); CleanupStack::PushL(self); self->ConstructL(aRect); CleanupStack::Pop(); return self; } // Standard initialization for a window-owning control. void CExampleAppView::ConstructL(const TRect& aRect) { // Create the window owned by the view. CreateWindowL(); // Set the view's size and position. SetRect(aRect); // Activate the view. ActivateL(); }
Windows are opaque by default, so provided you do not make the main view's window transparent, it will automatically be opaque.