Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-29272C8D-A0F6-4861-90FB-D1637D0D8CD8" xml:lang="en"><title>How Will
the New Application Framework Affect my Applications?</title><shortdesc>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 <codeph>CWindowGc</codeph>.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The new application and UI framework will provide a modern replacement
for AVKON and <codeph>CWindowGc</codeph> drawing. However, AVKON and <codeph>CWindowGc</codeph> drawing
will continue to be supported, although AVKON may not exist on some devices.
This means that AVKON applications (and clients that draw using <xref href="GUID-0AEE5955-C530-35F1-A904-69183331B294.dita"><apiname>CWindowGc</apiname></xref>)
will eventually need to be ported to the new framework. </p>
<p>Assuming AVKON is present on the device, AVKON applications will continue
to work correctly on S^4 (although performance may be affected), provided
their <b>main view is opaque and it covers the entire screen</b>. The same
is true for any other clients that draw using <codeph>CWindowGc</codeph>.
These constraints apply only to the application's main view and not to dialogs
and menus that appear over the main view. </p>
<p>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. </p>
<section id="GUID-92E8CD3E-4B54-41CD-864A-0AFC996D9C05"><title>Ensuring your
application covers the entire screen</title><p>Use <xref href="GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E.dita#GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E/GUID-A3F76911-653B-3D0F-8A2D-06063D830715"><apiname>CEikAppUi::ClientRect()</apiname></xref> 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 <codeph>ConstructL()</codeph> of
the <codeph>CExampleAppUi</codeph> class, which is derived from <xref href="GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E.dita"><apiname>CEikAppUi</apiname></xref>. </p><codeblock xml:space="preserve">void CExampleAppUi::ConstructL()
{
iAppView = CExampleAppView::NewL(ClientRect());
}
</codeblock><p>In this example, the view is constructed using a static function
that wraps up the two-phase construction as shown below. <codeph>CExampleAppView</codeph> inherits
from <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref>. </p><codeblock xml:space="preserve">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();
}</codeblock><p>Windows are opaque by default, so provided you do not
make the main view's window transparent, it will automatically be opaque. </p></section>
</conbody><related-links>
<link href="GUID-02BD38E7-A579-5BD5-9444-4E7C14C7809A.dita"><linktext>Transparent
Windows</linktext></link>
<link href="GUID-53E1EBAB-758B-58DF-9568-8CC682C0F74F.dita"><linktext>Screen Handling</linktext>
</link>
</related-links></concept>