# HG changeset patch # User jake # Date 1273659179 -10800 # Node ID 899e4666ea9a07f649c0cb122b2f2f2e05ed08f4 # Parent 1526727a5b85a7b3141b3fb251b026892834917d# Parent 79311d8563545b4874a65bf009386cf1d2633ca3 Merge bug fix with RCL3 tip diff -r 1526727a5b85 -r 899e4666ea9a homescreen_plat/hs_renderingplugin_api/hs_renderingplugin_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreen_plat/hs_renderingplugin_api/hs_renderingplugin_api.metaxml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,15 @@ + + + HS Rendering Plug-in API + API allows the widget developer to create his own rendering plugin, which can be taken into use in widget declaration. + c++ + idlehomescreen + + + + + + no + no + + diff -r 1526727a5b85 -r 899e4666ea9a homescreen_plat/hs_renderingplugin_api/inc/xnextrenderingpluginadapter.h --- a/homescreen_plat/hs_renderingplugin_api/inc/xnextrenderingpluginadapter.h Fri Mar 26 15:15:17 2010 +0200 +++ b/homescreen_plat/hs_renderingplugin_api/inc/xnextrenderingpluginadapter.h Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,7 +11,7 @@ * * Contributors: * -* Description: External rendering plugin adapter header +* Description: External rendering plugin adapter * */ @@ -28,7 +28,12 @@ class MXnExtEventHandler; /** - * CXnExtRenderingPluginAdapter class + * Base class for the external rendering plug-ins. Widget developer + * can implement own rendering plug-in if stock plug-ins do not + * provide sufficient functionality. Baddly written plug-in can + * ruin the Homescreen performance as it runs in the Homescreen + * process. Power save mode must be obeyed in order to maximize + * the standby times of the device. * * * @code @@ -36,61 +41,72 @@ * @endcode * * @lib extrenderingplugin.lib - * @since S60 v5.0 + * @since S60 v5.2 */ class CXnExtRenderingPluginAdapter : public CCoeControl { public: // Constructor and destructor /** * Two-phased constructor. + * + * @since Series 60 5.2 */ IMPORT_C static CXnExtRenderingPluginAdapter* NewL( TUid aImplUid ); /** * Destructor. + * + * @since Series 60 5.2 */ IMPORT_C virtual ~CXnExtRenderingPluginAdapter(); -private: // Constructors - /** - * Constructor - */ - // CXnExtRenderingPluginAdapter(); - - /** - * Second phase constructor - */ - // void ConstructL(); - public: // New functions, /** - * Returns the implementation uid. + * Returns the ECOM implementation uid. + * + * @since Series 60 5.2 */ IMPORT_C TUid ImplUid() const; /** - * Enters power save mode. + * Is called when Homescreen enters power save mode. + * In power save mode all the timers, outstanding requests and animations + * must be cancelled in order to save battery. + * + * @since Series 60 5.2 */ IMPORT_C virtual void EnterPowerSaveModeL(); /** - * Exits power save mode. + * Is called when Homescreen exists power save mode. + * + * @since Series 60 5.2 */ IMPORT_C virtual void ExitPowerSaveModeL(); /** - * Informs skin change. + * Informs skin change. If plug-in is responsible of loading skin + * graphics, all the graphics must be reloaded. + * + * @since Series 60 5.2 */ IMPORT_C virtual void SkinChanged(); /** - * Informs focuschange. + * Informs that plug-in element has gained a focus and highlight must be + * drawn if appropriate. + * + * @since Series 60 5.2 + * @param aDrawNow whether plug-in should draw itself. */ IMPORT_C virtual void FocusChanged( TDrawNow aDrawNow ); /** - * Informs size change. + * Informs that plug-in element size has changed. Size can change if the + * plug-in element is declared relatively to parent element. + * + * @since Series 60 5.2 */ IMPORT_C virtual void SizeChanged(); diff -r 1526727a5b85 -r 899e4666ea9a homescreen_plat/menu_settings_api/menu_settings_api.metaxml --- a/homescreen_plat/menu_settings_api/menu_settings_api.metaxml Fri Mar 26 15:15:17 2010 +0200 +++ b/homescreen_plat/menu_settings_api/menu_settings_api.metaxml Wed May 12 13:12:59 2010 +0300 @@ -1,7 +1,7 @@ Menu Settings API - Provides infromation about Menu current state. + Provides infromation about the current state of Menu application. c++ menufw diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/desktop_20026f4f/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/desktop_20026f4f/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/desktop_20026f4f/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + qhd_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/desktop_20026f4f/hsps/00/widgetconfiguration.xml --- a/idlehomescreen/data/qhd_tch/desktop_20026f4f/hsps/00/widgetconfiguration.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/desktop_20026f4f/hsps/00/widgetconfiguration.xml Wed May 12 13:12:59 2010 +0300 @@ -8,12 +8,12 @@ - + - - + + - + @@ -22,10 +22,10 @@ - + - + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/empty_2001f47f/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/empty_2001f47f/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/empty_2001f47f/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,6 +1,6 @@ - + @@ -57,4 +57,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/group/bld.inf --- a/idlehomescreen/data/qhd_tch/group/bld.inf Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/group/bld.inf Wed May 12 13:12:59 2010 +0300 @@ -25,6 +25,8 @@ #include "../posterwideimage_2001fdbc/group/bld.inf" #include "../profile_2001cb7c/group/bld.inf" #include "../view_2001f48b/group/bld.inf" +#include "../view_200286e4/group/bld.inf" +#include "../view_200286e5/group/bld.inf" #include "../templateview_20026f50/group/bld.inf" #include "../root_2001f482/group/bld.inf" diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/onerow_2001f480/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/onerow_2001f480/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/onerow_2001f480/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,18 +1,18 @@ - + - qhd_tch + qhd_tch - template + template - + 0x2001f48a @@ -60,4 +60,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/posterwideimage_2001fdbc/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/posterwideimage_2001fdbc/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/posterwideimage_2001fdbc/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,18 +1,18 @@ - + - qhd_tch + qhd_tch - template + template - + 0x2001f48a @@ -58,4 +58,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/profile_2001cb7c/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/profile_2001cb7c/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/profile_2001cb7c/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,6 +1,6 @@ - + qhd_tch widget @@ -32,4 +32,4 @@ profile.o0000 - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/profile_2001cb7c/xuikon/00/profile.xml --- a/idlehomescreen/data/qhd_tch/profile_2001cb7c/xuikon/00/profile.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/profile_2001cb7c/xuikon/00/profile.xml Wed May 12 13:12:59 2010 +0300 @@ -106,20 +106,20 @@ - + <title id="title_sat" titleindex="0"> + <property class="SAT/SatIdleModeText"/> + <property class="policy/emptyContent" name="title_sat" value="display: none;" /> + <property class="policy/Content" name="title_sat" value="display: block;" /> + <property class="policy/Visibility" name="NT_SATVHZ" value="if (title_vhz,title_sat,SatIdleModeIcon) display:block" /> + <property class="policy/Visibility" name="NT_SATVHZ" value="if !+(title_vhz,title_sat,SatIdleModeIcon) display:none" /> + + <property class="DeviceStatus/VHZText"/> <property class="policy/emptyContent" name="title_vhz" value="display: none;" /> <property class="policy/Content" name="title_vhz" value="display: block;" /> <property class="policy/Visibility" name="NT_SATVHZ" value="if (title_vhz,title_sat,SatIdleModeIcon) display:block" /> <property class="policy/Visibility" name="NT_SATVHZ" value="if !+(title_vhz,title_sat,SatIdleModeIcon) display:none" /> - - <property class="SAT/SatIdleModeText"/> - <property class="policy/emptyContent" name="title_sat" value="display: none;" /> - <property class="policy/Content" name="title_sat" value="display: block;" /> - <property class="policy/Visibility" name="NT_SATVHZ" value="if (title_vhz,title_sat,SatIdleModeIcon) display:block" /> - <property class="policy/Visibility" name="NT_SATVHZ" value="if !+(title_vhz,title_sat,SatIdleModeIcon) display:none" /> - diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/conf/root2001f482.confml Binary file idlehomescreen/data/qhd_tch/root_2001f482/conf/root2001f482.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/conf/root2001f482.gcfml --- a/idlehomescreen/data/qhd_tch/root_2001f482/conf/root2001f482.gcfml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/root_2001f482/conf/root2001f482.gcfml Wed May 12 13:12:59 2010 +0300 @@ -1,3 +1,5 @@ + + @@ -14,36 +16,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -53,3 +25,4 @@ + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/group/bld.inf --- a/idlehomescreen/data/qhd_tch/root_2001f482/group/bld.inf Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/root_2001f482/group/bld.inf Wed May 12 13:12:59 2010 +0300 @@ -25,7 +25,6 @@ // Support for productization and Carbide.Ui customization //******************************************************** ../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/root_2001f482/hsps/manifest.dat -//../hsps/00/rootconfiguration.xml /epoc32/data/Z/resource/homescreen/root_2001f482/hsps/rootconfiguration.xml ../xuikon/00/Root.dat /epoc32/data/Z/resource/homescreen/root_2001f482/xuikon/root_2001f482.dat ../xuikon/00/Root.css /epoc32/data/Z/resource/homescreen/root_2001f482/xuikon/root.css ../xuikon/00/Root.xml /epoc32/data/Z/resource/homescreen/root_2001f482/xuikon/root.xml @@ -44,9 +43,6 @@ // Support for S60 builds //*********************** -../rom/root_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(root_2001f482_resources.iby) -../rom/root_customer.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(root_2001f482_customer.iby) -//../rom/root_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(root_2001f482_variant.iby) ../rom/root.iby CORE_APP_LAYER_IBY_EXPORT_PATH(root_2001f482.iby) diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/root_2001f482/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/root_2001f482/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,11 +1,11 @@ - + - qhd_tch + qhd_tch - application + application - + 0x102750F0 @@ -30,4 +30,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/rom/root_customer.iby --- a/idlehomescreen/data/qhd_tch/root_2001f482/rom/root_customer.iby Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: -* Root widget HSPS-plugin language specific IBY file. -* -*/ - -#ifndef __ROOT_2001F482_CUSTOMER_IBY__ -#define __ROOT_2001F482_CUSTOMER_IBY__ - -#if defined(__LAYOUT_360_640_TOUCH) || defined(__LAYOUT_640_360_TOUCH) - -// Enabled by DTD-localization tools, language specific -data=ZPRIVATE\200159c0\install\root_2001f482\hsps\00\rootconfiguration.dtd \private\200159c0\install\root_2001f482\hsps\00\rootconfiguration.dtd - -#endif // __LAYOUT_360_640_TOUCH || __LAYOUT_640_360_TOUCH - -#endif // __ROOT_2001F482_CUSTOMER_IBY__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/rom/root_resources.iby --- a/idlehomescreen/data/qhd_tch/root_2001f482/rom/root_resources.iby Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: -* Root widget HSPS-plugin language specific IBY file. -* -*/ - -#ifndef __ROOT_2001F482_RESOURCES_IBY__ -#define __ROOT_2001F482_RESOURCES_IBY__ - -#if defined(__LAYOUT_360_640_TOUCH) || defined(__LAYOUT_640_360_TOUCH) - -// Enabled by DTD-localization tools, language specific - -#endif // __LAYOUT_360_640_TOUCH || __LAYOUT_640_360_TOUCH - -#endif // __ROOT_2001F482_RESOURCES_IBY__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/root_2001f482/rom/root_variant.iby --- a/idlehomescreen/data/qhd_tch/root_2001f482/rom/root_variant.iby Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: -* Root widget HSPS-plugin variant specific IBY file. -* -*/ - -#ifndef __ROOT_2001F482_VARIANT_IBY__ -#define __ROOT_2001F482_VARIANT_IBY__ - -#if defined(__LAYOUT_360_640_TOUCH) || defined(__LAYOUT_640_360_TOUCH) - -// Enabled by variation tools, variant specific -//data=ZPRIVATE\200159c0\install\root_2001f482\hsps\00\rootconfiguration.xml \private\200159c0\install\root_2001f482\hsps\00\rootconfiguration.xml - -#endif // __LAYOUT_360_640_TOUCH || __LAYOUT_640_360_TOUCH - -#endif // __ROOT_2001F482_VARIANT_IBY__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,8 +1,8 @@ - + - qhd_tch - view + qhd_tch + view 0x2001f48a @@ -28,4 +28,4 @@ templateview.o0000 - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/00/templateview.css --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/00/templateview.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/00/templateview.css Wed May 12 13:12:59 2010 +0300 @@ -29,28 +29,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - left: auto; - right: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/00/templateview.xml --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/00/templateview.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/00/templateview.xml Wed May 12 13:12:59 2010 +0300 @@ -21,8 +21,7 @@ - - + @@ -34,8 +33,7 @@ - - + @@ -80,24 +78,12 @@ - - - - - - - - - - - - - - - - - - + + + + + + @@ -149,6 +135,12 @@ + + + + + + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/37/templateview.css --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/37/templateview.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/37/templateview.css Wed May 12 13:12:59 2010 +0300 @@ -29,28 +29,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/50/templateview.css --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/50/templateview.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/50/templateview.css Wed May 12 13:12:59 2010 +0300 @@ -29,28 +29,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/57/templateview.css --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/57/templateview.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/57/templateview.css Wed May 12 13:12:59 2010 +0300 @@ -29,28 +29,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/94/templateview.css --- a/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/94/templateview.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/templateview_20026f50/xuikon/94/templateview.css Wed May 12 13:12:59 2010 +0300 @@ -29,28 +29,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/threerows_2001f486/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/threerows_2001f486/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/threerows_2001f486/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,18 +1,18 @@ - + - qhd_tch + qhd_tch - template + template - + 0x2001f48a @@ -60,4 +60,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/threetextrows_2001f487/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/threetextrows_2001f487/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/threetextrows_2001f487/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,18 +1,18 @@ - + - qhd_tch + qhd_tch - template + template - + 0x2001f48a @@ -62,4 +62,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/tworows_2001f488/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/tworows_2001f488/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/tworows_2001f488/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,18 +1,18 @@ - + - qhd_tch + qhd_tch - template + template - + 0x2001f48a @@ -60,4 +60,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.confml Binary file idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.gcfml --- a/idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.gcfml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.gcfml Wed May 12 13:12:59 2010 +0300 @@ -1,73 +1,59 @@ + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - + @@ -81,6 +67,14 @@ + + + + + + + + @@ -95,6 +89,14 @@ + + + + + + + + @@ -109,6 +111,14 @@ + + + + + + + + @@ -123,10 +133,18 @@ + + + + + + + + - + @@ -136,3 +154,4 @@ + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bmanifest.confml Binary file idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bmanifest.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bmanifest.gcfml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bmanifest.gcfml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + & + + ; + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bxuikon.confml Binary file idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bxuikon.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bxuikon.gcfml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48bxuikon.gcfml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/group/bld.inf --- a/idlehomescreen/data/qhd_tch/view_2001f48b/group/bld.inf Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/group/bld.inf Wed May 12 13:12:59 2010 +0300 @@ -24,7 +24,7 @@ PRJ_EXPORTS // Support for productization and Carbide.Ui customization //******************************************************** -../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/view_2001f48b/hsps/manifest.dat +//../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/view_2001f48b/hsps/manifest.dat //../hsps/00/viewconfiguration.xml /epoc32/data/Z/resource/homescreen/view_2001f48b/hsps/viewconfiguration.xml ../xuikon/00/View.dat /epoc32/data/Z/resource/homescreen/view_2001f48b/xuikon/view_2001f48b.dat @@ -44,6 +44,10 @@ //*********************************** ../conf/view2001f48b.confml APP_LAYER_CONFML(view2001f48b.confml) ../conf/view2001f48b.gcfml APP_LAYER_GCFML(view2001f48b.gcfml) +../conf/view2001f48bmanifest.confml APP_LAYER_CONFML(view2001f48bmanifest.confml) +../conf/view2001f48bmanifest.gcfml APP_LAYER_GCFML(view2001f48bmanifest.gcfml) +../conf/view2001f48bxuikon.confml APP_LAYER_CONFML(view2001f48bxuikon.confml) +../conf/view2001f48bxuikon.gcfml APP_LAYER_GCFML(view2001f48bxuikon.gcfml) // Support for S60 localization //***************************** @@ -57,7 +61,7 @@ ../rom/view_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(view_2001f48b_resources.iby) ../rom/view_customer.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_2001f48b_customer.iby) //../rom/view_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_2001f48b_variant.iby) -../rom/view.iby CORE_APP_LAYER_IBY_EXPORT_PATH(view_2001f48b.iby) +//../rom/view.iby CORE_APP_LAYER_IBY_EXPORT_PATH(view_2001f48b.iby) // Dtd-localization diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/view_2001f48b/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,6 +1,6 @@ - + @@ -56,4 +56,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/rom/view_variant.iby --- a/idlehomescreen/data/qhd_tch/view_2001f48b/rom/view_variant.iby Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/rom/view_variant.iby Wed May 12 13:12:59 2010 +0300 @@ -22,7 +22,7 @@ #if defined(__LAYOUT_360_640_TOUCH) || defined(__LAYOUT_640_360_TOUCH) // Enabled by variation tools, variant specific -//data=ZPRIVATE\200159c0\install\view_2001f48b\hsps\00\viewconfiguration.xml \private\200159c0\install\view_2001f48b\hsps\00\viewconfiguration.xml +data=ZPRIVATE\200159c0\install\view_2001f48b\hsps\00\viewconfiguration.xml \private\200159c0\install\view_2001f48b\hsps\00\viewconfiguration.xml #endif // __LAYOUT_360_640_TOUCH || __LAYOUT_640_360_TOUCH diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/00/View.css --- a/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/00/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/00/View.css Wed May 12 13:12:59 2010 +0300 @@ -29,28 +29,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - left: auto; - right: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/00/View.xml --- a/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/00/View.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/00/View.xml Wed May 12 13:12:59 2010 +0300 @@ -22,7 +22,6 @@ - @@ -35,7 +34,6 @@ - @@ -80,24 +78,12 @@ - - - - - - - - - - - - - - - - - - + + + + + + @@ -149,6 +135,12 @@ + + + + + + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/37/View.css --- a/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/37/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/37/View.css Wed May 12 13:12:59 2010 +0300 @@ -27,28 +27,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/50/View.css --- a/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/50/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/50/View.css Wed May 12 13:12:59 2010 +0300 @@ -27,28 +27,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/57/View.css --- a/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/57/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/57/View.css Wed May 12 13:12:59 2010 +0300 @@ -27,28 +27,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/94/View.css --- a/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/94/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_2001f48b/xuikon/94/View.css Wed May 12 13:12:59 2010 +0300 @@ -27,28 +27,6 @@ nav-index: appearance; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.confml Binary file idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.gcfml --- a/idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.gcfml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.gcfml Wed May 12 13:12:59 2010 +0300 @@ -1,73 +1,59 @@ + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + @@ -81,6 +67,14 @@ + + + + + + + + @@ -95,6 +89,14 @@ + + + + + + + + @@ -109,6 +111,14 @@ + + + + + + + + @@ -123,10 +133,18 @@ + + + + + + + + - + @@ -136,3 +154,4 @@ + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4manifest.confml Binary file idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4manifest.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4manifest.gcfml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4manifest.gcfml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + & + + ; + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4xuikon.confml Binary file idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4xuikon.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4xuikon.gcfml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4xuikon.gcfml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/group/bld.inf --- a/idlehomescreen/data/qhd_tch/view_200286e4/group/bld.inf Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/group/bld.inf Wed May 12 13:12:59 2010 +0300 @@ -24,8 +24,8 @@ PRJ_EXPORTS // Support for productization and Carbide.Ui customization //******************************************************** -../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/view_200286e4/hsps/manifest.dat -../hsps/00/viewconfiguration.xml /epoc32/data/Z/resource/homescreen/view_200286e4/hsps/viewconfiguration.xml +//../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/view_200286e4/hsps/manifest.dat +//../hsps/00/viewconfiguration.xml /epoc32/data/Z/resource/homescreen/view_200286e4/hsps/viewconfiguration.xml ../xuikon/00/View.dat /epoc32/data/Z/resource/homescreen/view_200286e4/xuikon/view_200286e4.dat ../xuikon/00/View.css /epoc32/data/Z/resource/homescreen/view_200286e4/xuikon/view.css @@ -43,8 +43,12 @@ //Confml and cfgml files for the customization // starting use confml it is need to remove root_configuration.xml direct exporting (view_200286e4_variant.iby) //*********************************** -//../conf/view200286e4.confml APP_LAYER_CONFML(view200286e4.confml) -//../conf/view200286e4.gcfml APP_LAYER_GCFML(view200286e4.gcfml) +../conf/view200286e4.confml APP_LAYER_CONFML(view200286e4.confml) +../conf/view200286e4.gcfml APP_LAYER_GCFML(view200286e4.gcfml) +../conf/view200286e4manifest.confml APP_LAYER_CONFML(view200286e4manifest.confml) +../conf/view200286e4manifest.gcfml APP_LAYER_GCFML(view200286e4manifest.gcfml) +../conf/view200286e4xuikon.confml APP_LAYER_CONFML(view200286e4xuikon.confml) +../conf/view200286e4xuikon.gcfml APP_LAYER_GCFML(view200286e4xuikon.gcfml) // Support for S60 localization //***************************** @@ -57,8 +61,8 @@ //*********************** ../rom/view_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(view_200286e4_resources.iby) ../rom/view_customer.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_200286e4_customer.iby) -../rom/view_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_200286e4_variant.iby) -../rom/view.iby CORE_APP_LAYER_IBY_EXPORT_PATH(view_200286e4.iby) +//../rom/view_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_200286e4_variant.iby) +//../rom/view.iby CORE_APP_LAYER_IBY_EXPORT_PATH(view_200286e4.iby) // Dtd-localization diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/view_200286e4/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,6 +1,6 @@ - + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/xuikon/00/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/00/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/00/View.css Wed May 12 13:12:59 2010 +0300 @@ -34,28 +34,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - left: auto; - right: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/xuikon/00/View.xml --- a/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/00/View.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/00/View.xml Wed May 12 13:12:59 2010 +0300 @@ -22,7 +22,6 @@ - @@ -35,7 +34,6 @@ - @@ -80,24 +78,12 @@ - - - - - - - - - - - - - - - - - - + + + + + + @@ -149,6 +135,12 @@ + + + + + + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/xuikon/37/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/37/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/37/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/xuikon/50/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/50/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/50/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/xuikon/57/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/57/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/57/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e4/xuikon/94/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/94/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e4/xuikon/94/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.confml Binary file idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.gcfml --- a/idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.gcfml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.gcfml Wed May 12 13:12:59 2010 +0300 @@ -1,73 +1,59 @@ + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + @@ -81,6 +67,14 @@ + + + + + + + + @@ -95,6 +89,14 @@ + + + + + + + + @@ -109,6 +111,14 @@ + + + + + + + + @@ -123,10 +133,18 @@ + + + + + + + + - + @@ -136,3 +154,4 @@ + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5manifest.confml Binary file idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5manifest.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5manifest.gcfml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5manifest.gcfml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + & + + ; + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5xuikon.confml Binary file idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5xuikon.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5xuikon.gcfml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5xuikon.gcfml Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/group/bld.inf --- a/idlehomescreen/data/qhd_tch/view_200286e5/group/bld.inf Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/group/bld.inf Wed May 12 13:12:59 2010 +0300 @@ -24,8 +24,8 @@ PRJ_EXPORTS // Support for productization and Carbide.Ui customization //******************************************************** -../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/view_200286e5/hsps/manifest.dat -../hsps/00/viewconfiguration.xml /epoc32/data/Z/resource/homescreen/view_200286e5/hsps/viewconfiguration.xml +//../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/view_200286e5/hsps/manifest.dat +//../hsps/00/viewconfiguration.xml /epoc32/data/Z/resource/homescreen/view_200286e5/hsps/viewconfiguration.xml ../xuikon/00/View.dat /epoc32/data/Z/resource/homescreen/view_200286e5/xuikon/view_200286e5.dat ../xuikon/00/View.css /epoc32/data/Z/resource/homescreen/view_200286e5/xuikon/view.css @@ -43,8 +43,12 @@ //Confml and cfgml files for the customization // starting use confml it is need to remove root_configuration.xml direct exporting (view_200286e5_variant.iby) //*********************************** -//../conf/view2001f486.confml APP_LAYER_CONFML(view200286e5.confml) -//../conf/view2001f486.gcfml APP_LAYER_GCFML(view200286e5.gcfml) +../conf/view200286e5.confml APP_LAYER_CONFML(view200286e5.confml) +../conf/view200286e5.gcfml APP_LAYER_GCFML(view200286e5.gcfml) +../conf/view200286e5manifest.confml APP_LAYER_CONFML(view200286e5manifest.confml) +../conf/view200286e5manifest.gcfml APP_LAYER_GCFML(view200286e5manifest.gcfml) +../conf/view200286e5xuikon.confml APP_LAYER_CONFML(view200286e5xuikon.confml) +../conf/view200286e5xuikon.gcfml APP_LAYER_GCFML(view200286e5xuikon.gcfml) // Support for S60 localization //***************************** @@ -57,8 +61,8 @@ //*********************** ../rom/view_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(view_200286e5_resources.iby) ../rom/view_customer.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_200286e5_customer.iby) -../rom/view_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_200286e5_variant.iby) -../rom/view.iby CORE_APP_LAYER_IBY_EXPORT_PATH(view_200286e5.iby) +//../rom/view_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(view_200286e5_variant.iby) +//../rom/view.iby CORE_APP_LAYER_IBY_EXPORT_PATH(view_200286e5.iby) // Dtd-localization diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/view_200286e5/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,6 +1,6 @@ - + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/xuikon/00/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/00/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/00/View.css Wed May 12 13:12:59 2010 +0300 @@ -34,28 +34,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - left: auto; - right: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/xuikon/00/View.xml --- a/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/00/View.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/00/View.xml Wed May 12 13:12:59 2010 +0300 @@ -22,7 +22,6 @@ - @@ -35,7 +34,6 @@ - @@ -80,24 +78,12 @@ - - - - - - - - - - - - - - - - - - + + + + + + @@ -149,6 +135,12 @@ + + + + + + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/xuikon/37/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/37/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/37/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/xuikon/50/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/50/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/50/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/xuikon/57/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/57/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/57/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/view_200286e5/xuikon/94/View.css --- a/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/94/View.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/view_200286e5/xuikon/94/View.css Wed May 12 13:12:59 2010 +0300 @@ -32,28 +32,6 @@ background-color:"SKIN(270501603 8582)"; } -image.widget_indication -{ - display: none; - position: absolute; - - right: auto; - left: 3px; - top: 5px; - - height: 26px; - width: 26px; - - path: "SKIN(270501603 9252)"; - _s60-aspect-ratio: preserve; - z-index: 2; -} - -image.widget_indication:edit -{ - display: block; -} - trigger#hs_popup_open_hold:edit { display: none; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/hsps/00/manifest.dat --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,18 +1,18 @@ - + - qhd_tch + qhd_tch - template + template - + 0x2001f48a @@ -56,4 +56,4 @@ - \ No newline at end of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/hsps/00/widgetconfiguration.xml --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/hsps/00/widgetconfiguration.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/hsps/00/widgetconfiguration.xml Wed May 12 13:12:59 2010 +0300 @@ -1,28 +1,9 @@ - - + + - - - - - - - - - - - - - - - - - - - diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/rom/wideimage_resources.iby --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/rom/wideimage_resources.iby Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/rom/wideimage_resources.iby Wed May 12 13:12:59 2010 +0300 @@ -21,7 +21,18 @@ #if defined(__LAYOUT_360_640_TOUCH) || defined(__LAYOUT_640_360_TOUCH) // Enabled by DTD-localization tools, language specific -data=ZPRIVATE\200159c0\install\wideimage_2001f489\xuikon\00\wideimage.o0000 \private\200159c0\install\wideimage_2001f489\xuikon\00\wideimage.o0000 +#if defined (__LOCALES_37_IBY__) +data=ZPRIVATE\200159c0\install\wideimage_2001f489\xuikon\37\wideimage.o0037 \private\200159c0\install\wideimage_2001f489\xuikon\37\wideimage.o0037 +#endif +#if defined (__LOCALES_50_IBY__) +data=ZPRIVATE\200159c0\install\wideimage_2001f489\xuikon\50\wideimage.o0050 \private\200159c0\install\wideimage_2001f489\xuikon\50\wideimage.o0050 +#endif +#if defined (__LOCALES_57_IBY__) +data=ZPRIVATE\200159c0\install\wideimage_2001f489\xuikon\57\wideimage.o0057 \private\200159c0\install\wideimage_2001f489\xuikon\57\wideimage.o0057 +#endif +#if defined (__LOCALES_94_IBY__) +data=ZPRIVATE\200159c0\install\wideimage_2001f489\xuikon\94\wideimage.o0094 \private\200159c0\install\wideimage_2001f489\xuikon\94\wideimage.o0094 +#endif #endif // __LAYOUT_360_640_TOUCH || __LAYOUT_640_360_TOUCH diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/00/wideimage.css --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/00/wideimage.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/00/wideimage.css Wed May 12 13:12:59 2010 +0300 @@ -16,7 +16,7 @@ display: block; } -image#default_image +image#w_default_image { padding-top:9px; padding-bottom:9px; @@ -26,7 +26,7 @@ width: 64px; } -text#default_text +text#w_default_text { padding-left:9px; padding-right:9px; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/00/wideimage.xml --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/00/wideimage.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/00/wideimage.xml Wed May 12 13:12:59 2010 +0300 @@ -3,7 +3,7 @@ - + @@ -12,15 +12,15 @@ - + - - + + - - + + @@ -31,7 +31,7 @@ - + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/37/wideimage.css --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/37/wideimage.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/37/wideimage.css Wed May 12 13:12:59 2010 +0300 @@ -16,7 +16,7 @@ display: block; } -image#default_image +image#w_default_image { padding-top:9px; padding-bottom:9px; @@ -26,7 +26,7 @@ width: 64px; } -text#default_text +text#w_default_text { padding-left:9px; padding-right:9px; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/50/wideimage.css --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/50/wideimage.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/50/wideimage.css Wed May 12 13:12:59 2010 +0300 @@ -16,7 +16,7 @@ display: block; } -image#default_image +image#w_default_image { padding-top:9px; padding-bottom:9px; @@ -26,7 +26,7 @@ width: 64px; } -text#default_text +text#w_default_text { padding-left:9px; padding-right:9px; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/57/wideimage.css --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/57/wideimage.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/57/wideimage.css Wed May 12 13:12:59 2010 +0300 @@ -16,7 +16,7 @@ display: block; } -image#default_image +image#w_default_image { padding-top:9px; padding-bottom:9px; @@ -26,7 +26,7 @@ width: 64px; } -text#default_text +text#w_default_text { padding-left:9px; padding-right:9px; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/94/wideimage.css --- a/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/94/wideimage.css Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/qhd_tch/wideimage_2001f489/xuikon/94/wideimage.css Wed May 12 13:12:59 2010 +0300 @@ -16,7 +16,7 @@ display: block; } -image#default_image +image#w_default_image { padding-top:9px; padding-bottom:9px; @@ -26,7 +26,7 @@ width: 64px; } -text#default_text +text#w_default_text { padding-left:9px; padding-right:9px; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/desktop_20018eee/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/desktop_20018eee/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/desktop_20018eee/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/double_row_icon_widget_2001fdbd/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/double_row_icon_widget_2001fdbd/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/double_row_icon_widget_2001fdbd/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/double_row_widget_2001fdc2/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/double_row_widget_2001fdc2/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/double_row_widget_2001fdc2/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/root_2001f48f/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/root_2001f48f/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/root_2001f48f/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/single_row_icon_widget_2001fdc0/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/single_row_icon_widget_2001fdc0/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/single_row_icon_widget_2001fdc0/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/single_row_widget_2001fdc1/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/single_row_widget_2001fdc1/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/single_row_widget_2001fdc1/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/triple_row_icon_widget_2001fdbe/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/triple_row_icon_widget_2001fdbe/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/triple_row_icon_widget_2001fdbe/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/triple_row_widget_2001fdbf/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/triple_row_widget_2001fdbf/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/triple_row_widget_2001fdbf/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/view1_2001fdb9/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/view1_2001fdb9/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/view1_2001fdb9/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/data/vga_tch/wideimage_10009dff/hsps/00/manifest.dat --- a/idlehomescreen/data/vga_tch/wideimage_10009dff/hsps/00/manifest.dat Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/data/vga_tch/wideimage_10009dff/hsps/00/manifest.dat Wed May 12 13:12:59 2010 +0300 @@ -1,5 +1,5 @@ - + vga_tch diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/exths/group/backup_registration.xml --- a/idlehomescreen/exths/group/backup_registration.xml Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/exths/group/bld.inf --- a/idlehomescreen/exths/group/bld.inf Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/exths/group/bld.inf Wed May 12 13:12:59 2010 +0300 @@ -27,11 +27,6 @@ ../rom/aicontainer.iby CORE_APP_LAYER_IBY_EXPORT_PATH(aicontainer.iby) -// Backup registration -//backup_registration.xml /epoc32/data/z/private/101fd657/backup_registration.xml -//backup_registration.xml /epoc32/release/winscw/udeb/z/private/101fd657/backup_registration.xml -//backup_registration.xml /epoc32/release/winscw/urel/z/private/101fd657/backup_registration.xml - // Generic configuration interface for component cenrep settings ../conf/activeidle.confml APP_LAYER_CONFML(activeidle.confml) ../conf/activeidle_10207467.crml APP_LAYER_CRML(activeidle_10207467.crml) diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/exths/rom/aicontainer.iby --- a/idlehomescreen/exths/rom/aicontainer.iby Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/exths/rom/aicontainer.iby Wed May 12 13:12:59 2010 +0300 @@ -23,7 +23,6 @@ #ifdef RD_CUSTOMIZABLE_AI ECOM_PLUGIN(aicontainer.dll,101FD657.rsc) -data=ZPRIVATE\101FD657\backup_registration.xml private\101FD657\backup_registration.xml #endif // RD_CUSTOMIZABLE_AI #endif // AIPLUGINTEST_IBY diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/group/hscontentcontrol.mmp --- a/idlehomescreen/hscontentcontrol/group/hscontentcontrol.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/hscontentcontrol/group/hscontentcontrol.mmp Wed May 12 13:12:59 2010 +0300 @@ -33,7 +33,7 @@ SOURCE hscontentcontrolfactory.cpp SOURCE hscontentcontrolui.cpp SOURCE hscontentcontrolecomlistener.cpp -SOURCE hscontentcontroluninstallmonitor.cpp +SOURCE hscontentcontrolswilistener.cpp //By default, the build tools look for the WINSCW def file in a BWINS directory //(at the same level as the directory containing the mmp file), @@ -60,7 +60,8 @@ LIBRARY estor.lib LIBRARY ecom.lib LIBRARY charconv.lib -LIBRARY xn3layoutengine.lib +LIBRARY swiutils.lib +LIBRARY xn3layoutengine.lib #ifdef ENABLE_ABIV2_MODE DEBUGGABLE diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/inc/hscontentcontrolfactory.h --- a/idlehomescreen/hscontentcontrol/inc/hscontentcontrolfactory.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/hscontentcontrol/inc/hscontentcontrolfactory.h Wed May 12 13:12:59 2010 +0300 @@ -24,11 +24,11 @@ // User includes #include "hscontentcontrolecomobserver.h" -#include "hscontentcontroluninstallobserver.h" +#include "hscontentcontrolswiobserver.h" // Forward declarations class CHsContentControlEComListener; -class CHsContentControlUninstallMonitor; +class CHsContentControlSwiListener; class CXnAppUiAdapter; /** @@ -44,7 +44,7 @@ */ NONSHARABLE_CLASS( CHsContentControlFactory ) : public CBase, public MHsContentControlEComObserver, - public MHsContentControlUninstallObserver + public MHsContentControlSwiObserver { public: // Constructor and destructor /** @@ -64,14 +64,14 @@ */ void HandleEComChangeEvent(); -private: // from MHsContentControlUninstallObserver +private: // from MHsContentControlSwiObserver /** - * Notification of Uninstall event from SWI. - * @param aPkgUid The package UID which is being uninstalled. + * Notification of Install/Uninstall event from SWI. + * @param aUidList The package UID list which is being processed. */ - void HandleUninstallEvent( const TUid& aPkgUid ); - + void HandleSwiEvent( const RArray& aUidList ); + private: // Constructors /** * Constructor @@ -150,9 +150,9 @@ CHsContentControlEComListener* iHsContentControlEComListener; /** - * An object of type CHsContentControlUninstallMonitor ( Owned ). + * An object of type CHsContentControlSwiListener ( Owned ). */ - CHsContentControlUninstallMonitor* iHsContentControlUninstallMonitor; + CHsContentControlSwiListener* iHsContentControlSwiListener; }; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/inc/hscontentcontrolswilistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/hscontentcontrol/inc/hscontentcontrolswilistener.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: Utility class to listen SWI operations. +* +*/ + +#ifndef HSCONTENTCONTROLSWILISTENER_H +#define HSCONTENTCONTROLSWILISTENER_H + +// System includes +#include +#include + +// User includes +#include "hscontentcontrolswiobserver.h" + +// Forward declarations + +// Class declaration +/** +* @class CHsContentControlSwiListener +* +* @brief An instance of class CHsContentControlSwiListener which listens for +* SWI operations (installation, uninstallation , restore). +* +* @lib hscontentcontrol.lib +*/ +NONSHARABLE_CLASS( CHsContentControlSwiListener ) : public CActive + { +public: // constructors and destructor + static CHsContentControlSwiListener* NewL( + MHsContentControlSwiObserver& aObs ); + ~CHsContentControlSwiListener(); + +protected: // from CActive + void DoCancel(); + void RunL(); + +private: // new functions + CHsContentControlSwiListener( + MHsContentControlSwiObserver& aObs ); + void ConstructL(); + +private: // data + MHsContentControlSwiObserver& iObs; + RProperty iSwInstallKey; + }; + +#endif // HSCONTENTCONTROLSWILISTENER_H + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/inc/hscontentcontrolswiobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/hscontentcontrol/inc/hscontentcontrolswiobserver.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: Interface for getting notified for Swi events. +* +*/ + + +#ifndef HSCONTENTCONTROLSWIOBSERVER_H +#define HSCONTENTCONTROLSWIOBSERVER_H + +/** +* MHsContentControlSwiObserver +* +* @brief The observer of Swi operations. The derived class needs to implement +* the functions below and will be notified by CHsContentControlSwiListener +* +* @see CHsContentControlSwiListener +*/ +class MHsContentControlSwiObserver + { +public: + /** + * Notification of Swi event ( install/uninstall/restore) + * @param aUidList list of package UID which is being processed. + */ + virtual void HandleSwiEvent( const RArray& aUidList ) = 0; + }; + +#endif // HSCONTENTCONTROLSWIOBSERVER_H + +// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/inc/hscontentcontroluninstallmonitor.h --- a/idlehomescreen/hscontentcontrol/inc/hscontentcontroluninstallmonitor.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Class to listen SWI uninstall operation. -* -*/ - -#ifndef HSCONTENTCONTROLUNINSTALLMONITOR_H -#define HSCONTENTCONTROLUNINSTALLMONITOR_H - -// System includes -#include -#include - -// User includes -#include "hscontentcontroluninstallobserver.h" - -// Forward declarations - -// Class declaration -/** -* @class CHsContentControlUninstallMonitor -* -* @brief An instance of class CHsContentControlUninstallMonitor which listens for -* uninstall event from SWI. -* -* @lib hscontentcontrol.lib -*/ -NONSHARABLE_CLASS( CHsContentControlUninstallMonitor ) : public CActive - { -public: // constructors and destructor - static CHsContentControlUninstallMonitor* NewL( - MHsContentControlUninstallObserver& aObs ); - ~CHsContentControlUninstallMonitor(); - -protected: // from CActive - void DoCancel(); - void RunL(); - -private: // new functions - CHsContentControlUninstallMonitor( - MHsContentControlUninstallObserver& aObs ); - void ConstructL(); - -private: // data - MHsContentControlUninstallObserver& iObs; - RProperty iSwUninstallKey; - }; - -#endif // HSCONTENTCONTROLUNINSTALLMONITOR_H - diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/inc/hscontentcontroluninstallobserver.h --- a/idlehomescreen/hscontentcontrol/inc/hscontentcontroluninstallobserver.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Interface for getting notified for SWI uninstall event. -* -*/ - - -#ifndef HSCONTENTCONTROLUNINSTALLOBSERVER_H -#define HSCONTENTCONTROLUNINSTALLOBSERVER_H - -/** -* MHsContentControlUninstallObserver -* -* @brief The observer of uninstall operations. The derived class needs to implement -* the functions below and will be notified by CHsContentControlUninstallMonitor. -* -* @see CHsContentControlUninstallMonitor -*/ -class MHsContentControlUninstallObserver - { -public: - /** - * Notification of Uninstall event from SWI. - * @param aPkgUid The package UID which is being uninstalled. - */ - virtual void HandleUninstallEvent( const TUid& aPkgUid ) = 0; - }; - -#endif // HSCONTENTCONTROLUNINSTALLOBSERVER_H - -// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/src/hscontentcontrolfactory.cpp --- a/idlehomescreen/hscontentcontrol/src/hscontentcontrolfactory.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/hscontentcontrol/src/hscontentcontrolfactory.cpp Wed May 12 13:12:59 2010 +0300 @@ -24,7 +24,7 @@ #include "xnappuiadapter.h" #include "hscontentcontrolfactory.h" #include "hscontentcontrolecomlistener.h" -#include "hscontentcontroluninstallmonitor.h" +#include "hscontentcontrolswilistener.h" // Local constants @@ -81,11 +81,11 @@ { iHsContentControlEComListener = CHsContentControlEComListener::NewL( *this ); + iHsContentControlSwiListener = + CHsContentControlSwiListener::NewL( *this ); + REComSession::ListImplementationsL( - KInterfaceUidContentController, iImplArray ); - - iHsContentControlUninstallMonitor = - CHsContentControlUninstallMonitor::NewL( *this ); + KInterfaceUidContentController, iImplArray ); } // ---------------------------------------------------------------------------- @@ -102,13 +102,13 @@ // ---------------------------------------------------------------------------- // EXPORT_C CHsContentControlFactory::~CHsContentControlFactory() - { - delete iHsContentControlEComListener; - delete iHsContentControlUninstallMonitor; + { + delete iHsContentControlEComListener; + delete iHsContentControlSwiListener; iImplArray.ResetAndDestroy(); iImplArray.Close(); - + iHsContentControlUis.ResetAndDestroy(); } @@ -208,25 +208,29 @@ } // ---------------------------------------------------------------------------- -// CHsContentControlFactory::HandleUninstallEvent() +// CHsContentControlFactory::HandleSwiEvent() // ---------------------------------------------------------------------------- // -void CHsContentControlFactory::HandleUninstallEvent( const TUid& aPkgUid ) +void CHsContentControlFactory::HandleSwiEvent( const RArray& aUidList ) { // ignore event if no plugin loaded. - if ( iHsContentControlUis.Count() > 0 ) + if ( iHsContentControlUis.Count() > 0 && aUidList.Count() > 0 ) { for( TInt index( iHsContentControlUis.Count() - 1 ); index >= 0; --index ) { CHsContentControlUi* cc( iHsContentControlUis[ index ] ); - // ImplUid of plugin must match Sis pkg uid - if ( cc && cc->ImplUid() == aPkgUid ) + for( TInt uidIndex( aUidList.Count() - 1 ); uidIndex >= 0 && cc; --uidIndex ) { - ReleaseHsCcUi( cc ); - iHsContentControlUis.Remove( index ); - delete cc; - cc = NULL; - break; + // ImplUid of plugin must match Sis pkg uid + if ( cc->ImplUid() == aUidList[uidIndex] ) + { + // release ui and keep checking, multiple package might be being + // processed by SWI, this events comes once for all packages. + ReleaseHsCcUi( cc ); + iHsContentControlUis.Remove( index ); + delete cc; + cc = NULL; + } } } } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/src/hscontentcontrolswilistener.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/hscontentcontrol/src/hscontentcontrolswilistener.cpp Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: Class to listen SWI operations (install/uninstall/restore). +* +*/ +#include +#include // KSWIUidsCurrentlyBeingProcessed + +#include "hscontentcontrolswilistener.h" + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// CHsContentControlSwiListener::NewL() +// --------------------------------------------------------------------------- +// +CHsContentControlSwiListener* CHsContentControlSwiListener::NewL( + MHsContentControlSwiObserver& aObs ) + { + CHsContentControlSwiListener* self = + new( ELeave ) CHsContentControlSwiListener( aObs ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CHsContentControlSwiListener::~CHsContentControlSwiListener() +// --------------------------------------------------------------------------- +// +CHsContentControlSwiListener::~CHsContentControlSwiListener() + { + Cancel(); + iSwInstallKey.Close(); + } + +// --------------------------------------------------------------------------- +// CHsContentControlSwiListener::DoCancel() +// --------------------------------------------------------------------------- +// +void CHsContentControlSwiListener::DoCancel() + { + if ( IsActive() ) + { + iSwInstallKey.Cancel(); + } + } + +// --------------------------------------------------------------------------- +// CHsContentControlSwiListener::RunL() +// --------------------------------------------------------------------------- +// +void CHsContentControlSwiListener::RunL() + { + RArray uidList; + + // get list of uids being processed. + if ( Swi::GetAllUids( uidList ) == KErrNone ) + { + iObs.HandleSwiEvent( uidList ); + uidList.Reset(); + } + + // close array + uidList.Close(); + + // keep monitoring + iSwInstallKey.Subscribe( iStatus ); + SetActive(); + } + +// --------------------------------------------------------------------------- +// CHsContentControlSwiListener::CHsContentControlSwiListener() +// --------------------------------------------------------------------------- +// +CHsContentControlSwiListener::CHsContentControlSwiListener( + MHsContentControlSwiObserver& aObs ) + : CActive( CActive::EPriorityStandard ), + iObs( aObs ) + { + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// CHsContentControlSwiListener::ConstructL() +// --------------------------------------------------------------------------- +// +void CHsContentControlSwiListener::ConstructL() + { + if ( KErrNone == iSwInstallKey.Attach( + KUidSystemCategory, KSWIUidsCurrentlyBeingProcessed ) ) + { + iSwInstallKey.Subscribe( iStatus ); + SetActive(); + } + } + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/hscontentcontrol/src/hscontentcontroluninstallmonitor.cpp --- a/idlehomescreen/hscontentcontrol/src/hscontentcontroluninstallmonitor.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Class to listen SWI uninstall operation. -* -*/ - -#include "hscontentcontroluninstallmonitor.h" -#include - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::NewL() -// --------------------------------------------------------------------------- -// -CHsContentControlUninstallMonitor* CHsContentControlUninstallMonitor::NewL( - MHsContentControlUninstallObserver& aObs ) - { - CHsContentControlUninstallMonitor* self = - new ( ELeave ) CHsContentControlUninstallMonitor( aObs ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::~CHsContentControlUninstallMonitor() -// --------------------------------------------------------------------------- -// -CHsContentControlUninstallMonitor::~CHsContentControlUninstallMonitor() - { - Cancel(); - iSwUninstallKey.Close(); - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::DoCancel() -// --------------------------------------------------------------------------- -// -void CHsContentControlUninstallMonitor::DoCancel() - { - if ( IsActive() ) - { - iSwUninstallKey.Cancel(); - } - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::RunL() -// --------------------------------------------------------------------------- -// -void CHsContentControlUninstallMonitor::RunL() - { - iSwUninstallKey.Subscribe( iStatus ); - SetActive(); - - TInt value = 0; - if( iSwUninstallKey.Get( value ) == KErrNone ) - { - TUid uid( KNullUid ); - uid.iUid = value; - iObs.HandleUninstallEvent( uid ); - } - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::CHsContentControlUninstallMonitor() -// --------------------------------------------------------------------------- -// -CHsContentControlUninstallMonitor::CHsContentControlUninstallMonitor( - MHsContentControlUninstallObserver& aObs ) - : CActive( CActive::EPriorityStandard ), - iObs( aObs ) - { - CActiveScheduler::Add( this ); - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::ConstructL() -// --------------------------------------------------------------------------- -// -void CHsContentControlUninstallMonitor::ConstructL() - { - if ( KErrNone == iSwUninstallKey.Attach( - KPSUidSWInstallerUiNotification, KSWInstallerUninstallation ) ) - { - iSwUninstallKey.Subscribe( iStatus ); - SetActive(); - } - } - -// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnappuiadapter.h --- a/idlehomescreen/inc/xnappuiadapter.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnappuiadapter.h Wed May 12 13:12:59 2010 +0300 @@ -160,12 +160,12 @@ CXnNodeAppIf& aDestination ); /** - * This is called when initial view is activated + * This is called when (initial) view is ready * To be overriden by subclass. * * @since S60 5.2 */ - IMPORT_C virtual void UiActivated(); + IMPORT_C virtual void HandleUiReadyEventL(); /** * Second-phase constructor diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnmenu.h --- a/idlehomescreen/inc/xnmenu.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnmenu.h Wed May 12 13:12:59 2010 +0300 @@ -137,6 +137,12 @@ */ virtual CXnNodePluginIf* SoftKeyL( XnMenuInterface::MXnMenuInterface::TSoftKeyPosition aPos ) = 0; + /** + * Returns softkey node, which should handle key event. + * @return softkey node which should handle key event, NULL if not available. + */ + virtual CXnNodePluginIf* KeyEventNode() = 0; + /** * Sets MXnMenuObserver observer * @since S60 5.1 @@ -152,10 +158,11 @@ /** * Tries to display menubar - * @since S60 5.1 - * @param aMenuNodeId the menu node id + * @since S60 5.2 + * @param aMenuNodeId the menu node id + * @param aContextMenu ETrue if context menu should be displayed, EFalse otherwise */ - virtual void TryDisplayingMenuBarL( const TDesC& aMenuNodeId ) = 0; + virtual void TryDisplayingMenuBarL( const TDesC& aMenuNodeId, TBool aContextMenu ) = 0; }; } @@ -220,6 +227,11 @@ */ CXnNodePluginIf* SoftKeyL( XnMenuInterface::MXnMenuInterface::TSoftKeyPosition aPos ); + /** + * @see MXnMenuInterface::KeyEventNode + */ + CXnNodePluginIf* KeyEventNode(); + /** * @see MXnMenuInterface::SetObserver */ @@ -233,13 +245,13 @@ /** * @see MXnMenuInterface::TryDisplayingMenuBarL */ - void TryDisplayingMenuBarL( const TDesC& aMenuNodeId ); - - + void TryDisplayingMenuBarL( const TDesC& aMenuNodeId, TBool aContextMenu ); + /** * @see MXnComponentInterface::MakeInterfaceL */ - XnComponentInterface::MXnComponentInterface* MakeInterfaceL( const TDesC8& aType ); + XnComponentInterface::MXnComponentInterface* MakeInterfaceL( const TDesC8& aType ); + private: /** diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnmenuadapter.h --- a/idlehomescreen/inc/xnmenuadapter.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnmenuadapter.h Wed May 12 13:12:59 2010 +0300 @@ -148,6 +148,12 @@ CXnNodePluginIf* SoftKeyL( XnMenuInterface::MXnMenuInterface::TSoftKeyPosition aPos ); /** + * Returns softkey node, which should handle key event. + * @return softkey node which should handle key event, NULL if not available. + */ + CXnNodePluginIf* KeyEventNode(); + + /** * Finds softkey node by given position * @since Series 60 5.0 */ @@ -155,10 +161,11 @@ /** * Tries to display menubar - * @since Series 60 5.1 + * @since Series 60 5.2 * @param aMenuNodeId the menu node id + * @param aContextMenu ETrue if context menu should be displayed, EFalse otherwise */ - void TryDisplayingMenuL( const TDesC& aMenuNodeId ); + void TryDisplayingMenuL( const TDesC& aMenuNodeId, TBool aContextMenu ); public: // from CCoeControl @@ -384,6 +391,7 @@ TBool iUpdateLskAppearance; TBool iUpdateMskAppearance; TBool iUpdateRskAppearance; + TBool iContextMenu; CXnSoftkeyItem* iVisibleLSK; CXnSoftkeyItem* iVisibleRSK; CXnSoftkeyItem* iVisibleMSK; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnoomsyshandler.h --- a/idlehomescreen/inc/xnoomsyshandler.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnoomsyshandler.h Wed May 12 13:12:59 2010 +0300 @@ -71,7 +71,8 @@ EMem1MB = 1024000, EMem2MB = 2048000, EMem3MB = 3072000, - EMem4MB = 4096000 + EMem4MB = 4096000, + EMem6MB = 6144000 }; public: // Construction / destruction. diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnpropertysubscriber.h --- a/idlehomescreen/inc/xnpropertysubscriber.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnpropertysubscriber.h Wed May 12 13:12:59 2010 +0300 @@ -94,17 +94,26 @@ private: /** - * From CActive. - * Handle completion + * Handles an active object's request completion event. + * + * @see CActive::RunL */ void RunL(); /** - * From CActive. - * How to cancel me + * Implements cancellation of an outstanding request. + * + * @see CActive::DoCancel */ void DoCancel(); + /** + * RunError + * + * @see CActive::RunError + */ + TInt RunError(TInt aError); + private: // Data diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnuiengine.h --- a/idlehomescreen/inc/xnuiengine.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnuiengine.h Wed May 12 13:12:59 2010 +0300 @@ -37,7 +37,6 @@ class CXnPointerArray; class CXnEditor; class CXnEditMode; -class CXnHitTest; class CXnKeyEventDispatcher; // Class declaration @@ -243,14 +242,6 @@ void RefreshMenuL(); /** - * Activate a view - * - * @since Series 60 3.1 - * @param aViewNode View node - */ - void ActivateViewL( CXnNode& aViewNode ); - - /** * Returns view manager * * @since S60 5.0 @@ -414,14 +405,6 @@ RPointerArray< CXnNode >* Plugins(); /** - * Gets hit test - * - * @since S60 5.1 - * @return the hittest - */ - CXnHitTest& HitTest() const; - - /** * Gets theme resource file * * @since S60 5.1 diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnuiengineappif.h --- a/idlehomescreen/inc/xnuiengineappif.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnuiengineappif.h Wed May 12 13:12:59 2010 +0300 @@ -139,14 +139,6 @@ IMPORT_C void RefreshMenuL(); /** - * Activate a view - * - * @since Series 60 3.1 - * @param aViewNode View node - */ - IMPORT_C void ActivateViewL( CXnNodeAppIf& aViewNode ); - - /** * Returns the active view * * @since Series 60 3.1 diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnuienginepluginif.h --- a/idlehomescreen/inc/xnuienginepluginif.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnuienginepluginif.h Wed May 12 13:12:59 2010 +0300 @@ -127,12 +127,6 @@ */ IMPORT_C void SetFocusedNode( CXnNodePluginIf* aFocusedNode ); - /** - * Restore focus to previously focused node - * - * @since Series 60 3.1 - */ - IMPORT_C void RestorePreviousFocusedNode(); /** * Get the string pool @@ -191,14 +185,6 @@ TInt aReferenceValue ); /** - * Activate a view - * - * @since Series 60 3.1 - * @param aViewNode View node - */ - IMPORT_C void ActivateViewL( CXnNodePluginIf& aViewNode ); - - /** * Get the size of the current screen device * * @since Series 60 3.1 @@ -253,29 +239,6 @@ * @return ETrue if widgets visible, EFalse otherwise */ IMPORT_C TBool WidgetsVisible() const; - - /** - * Gets control defining hit region - * - * @since Series 60 5.0 - * @return Control defining the hit region - */ - IMPORT_C CXnControlAdapter* HitRegion() const; - - /** - * Deactivates focused node - * - * @since Series 60 5.0 - */ - IMPORT_C void DeactivateFocusedNodeL(); - - /** - * Queries wheter focus is visible - * - * @since Series 60 5.0 - * @return ETrue if focus is shown, EFalse otherwise - */ - IMPORT_C TBool ShowFocus(); /** * Gets a plugin node which the given node is. @@ -285,35 +248,7 @@ * @return A Plugin node. */ IMPORT_C CXnNodePluginIf& PluginNodeL( CXnNodePluginIf* aNode ); - - /** - * Sets focus visibility for active view - * @since Series 60 5.0 - * @param aVisible Visibility state - */ - IMPORT_C void SetFocusVisibleL( TBool aVisible ); - - /** - * Return focus visibility of active view - * @since Series 60 5.0 - * @return ETrue if active view focus is visible, EFalse otherwise - */ - IMPORT_C TBool FocusVisible(); - - /** - * Enables or disables swipe for active view - * @since Series 60 5.0 - * @param aEnable True will enable swipe, false will disable - */ - IMPORT_C void EnableSwipeL( TBool aEnable ); - - /** - * Return whether swipe is enabled or not - * @since Series 60 5.0 - * @return ETrue if swipe is enable, EFalse otherwise - */ - IMPORT_C TBool SwipeEnabledL(); - + /** * Disables layoyt and redraw, places cleanup item to cleanup stack * for enabling layot and redraw diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/inc/xnviewmanager.h --- a/idlehomescreen/inc/xnviewmanager.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/inc/xnviewmanager.h Wed May 12 13:12:59 2010 +0300 @@ -22,7 +22,6 @@ #include // User includes -#include "xnpropertysubscriber.h" // Forward declarations class CXnUiEngine; @@ -86,8 +85,7 @@ * @lib xn3layoutengine.lib * @since S60 5.0 */ -NONSHARABLE_CLASS( CXnViewManager ) : public CBase, - public MXnPropertyChangeObserver +NONSHARABLE_CLASS( CXnViewManager ) : public CBase { public: /** @@ -119,14 +117,6 @@ * 2nd phase constructor */ void ConstructL(); - -private: - // from MXnPropertyChangeObserver - - /** - * @see MXnPropertyChangeObserver - */ - void PropertyChangedL( const TUint32 aKey, const TInt aValue ); public: // New functions @@ -212,9 +202,9 @@ CXnOomSysHandler& OomSysHandler() const; void UpdatePageManagementInformationL(); - - TBool UiStartupPhaseAllDone() const; - + + void OrientationChanged(); + private: // new functions @@ -264,11 +254,11 @@ void ResetCrashCount(); /** - * Show error note - * - * @param aResourceId Resource id for string to be displayed. + * Show error note from resource. */ - void ShowErrorNoteL( const TInt aResourceId ); + void ShowErrorNoteL(); + + void DoRobustnessCheckL(); private: // data @@ -295,12 +285,6 @@ * Not own. */ CXnUiEngine* iUiEngine; - - /** - * UI startup phase observer - * Own. - */ - CXnPropertySubscriber* iUiStartupPhase; /** * Comopser. @@ -364,9 +348,9 @@ CPeriodic* iStabilityTimer; /** - * Flag to indicate that UI startup phase is ready - */ - TBool iUiStartupPhaseAllDone; + * Flag for current orientation. + */ + TBool iIsLandscapeOrientation; private: // Friend classes diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/loc/activeidle3.loc --- a/idlehomescreen/loc/activeidle3.loc Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/loc/activeidle3.loc Wed May 12 13:12:59 2010 +0300 @@ -297,3 +297,22 @@ // r: TB9.2 // #define qtn_hs_corrupted_image_note "Unable to select. Image corrupted or format not supported." + +// d: Shown when user select too large image file as a wallpaper +// l: popup_note_window +// w: +// r: TB9.2 +// +#define qtn_hs_too_big_image_note "Unable to select. Image size is too large." + +// d: Show when default configuration is loaded (critical error case) +// l: list_single_pane_t1_cp2 +// w: +// r: TB9.2 +#define qtn_hs_error_content_removed "Critical error occurred. Content removed." + +// d: Wait/progress note text that is shown when backup or restore process is ongoing. +// l: popup_note_wait_window +// w: +// r: TB9.2 +#define qtn_hs_backup_use_prevented "Home screen is not in use during backup or restore operation. Wait to finish." diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/nativeuicontroller/inc/ainativerenderer.h --- a/idlehomescreen/nativeuicontroller/inc/ainativerenderer.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/nativeuicontroller/inc/ainativerenderer.h Wed May 12 13:12:59 2010 +0300 @@ -23,8 +23,8 @@ #include // User includes -#include "aidevicestatuscontentmodel.h" -#include "aiprofileplugincontentmodel.h" +#include +#include // Forward declarations class CHsContentPublisher; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/nativeuicontroller/src/ainativeuimodel.cpp --- a/idlehomescreen/nativeuicontroller/src/ainativeuimodel.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/nativeuicontroller/src/ainativeuimodel.cpp Wed May 12 13:12:59 2010 +0300 @@ -17,7 +17,7 @@ #include "ainativeuimodel.h" -#include "aidevicestatuscontentmodel.h" +#include namespace AiNativeUiController { diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/nativeuicontroller/src/aistatuspanetouchui.cpp --- a/idlehomescreen/nativeuicontroller/src/aistatuspanetouchui.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/nativeuicontroller/src/aistatuspanetouchui.cpp Wed May 12 13:12:59 2010 +0300 @@ -27,18 +27,18 @@ #ifdef RD_TACTILE_FEEDBACK #include #endif +#include +#include +#include +#include // User includes -#include -#include #include "aistrcnv.h" #include "aistatuspanetouchui.h" #include "aistatuspanel.h" #include "ainativeuiplugins.h" #include "aifweventhandler.h" #include "aiconsts.h" -#include "aidevicestatuscontentmodel.h" -#include using namespace AiNativeUiController; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/nativeuicontroller/src/nativeuicontroller.cpp --- a/idlehomescreen/nativeuicontroller/src/nativeuicontroller.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/nativeuicontroller/src/nativeuicontroller.cpp Wed May 12 13:12:59 2010 +0300 @@ -26,7 +26,8 @@ #include #include #include -#include +#include +#include // User includes #include @@ -38,7 +39,6 @@ #include "appui.h" #include "aiutility.h" #include "aistrparser.h" -#include "aidevicestatuscontentmodel.h" #include "aistatuspanel.h" #include "ainativerenderer.h" #include "aititlepanerenderer.h" diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/sapiwrapper/hspswrapper/bwins/hspswrapper.def --- a/idlehomescreen/sapiwrapper/hspswrapper/bwins/hspswrapper.def Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/sapiwrapper/hspswrapper/bwins/hspswrapper.def Wed May 12 13:12:59 2010 +0300 @@ -44,59 +44,59 @@ ?NewLC@CHspsWrapper@hspswrapper@@SAPAV12@ABVTDesC8@@PAVMHspsWrapperObserver@2@@Z @ 43 NONAME ; class hspswrapper::CHspsWrapper * hspswrapper::CHspsWrapper::NewLC(class TDesC8 const &, class hspswrapper::MHspsWrapperObserver *) ?SetNameL@CPropertyMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 44 NONAME ; class hspswrapper::CPropertyMap & hspswrapper::CPropertyMap::SetNameL(class TDesC8 const &) ?SetConfStateL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@0H@Z @ 45 NONAME ; int hspswrapper::CHspsWrapper::SetConfStateL(class TDesC8 const &, class TDesC8 const &, int) - ?MediaType@CObjectMap@hspswrapper@@QBEABVTDesC8@@XZ @ 46 NONAME ; class TDesC8 const & hspswrapper::CObjectMap::MediaType(void) const - ?SetTypeL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 47 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetTypeL(class TDesC8 const &) - ?AddPropertyMapL@CItemMap@hspswrapper@@QAEAAV12@PAVCPropertyMap@2@@Z @ 48 NONAME ; class hspswrapper::CItemMap & hspswrapper::CItemMap::AddPropertyMapL(class hspswrapper::CPropertyMap *) - ?NewLC@CObjectMap@hspswrapper@@SAPAV12@XZ @ 49 NONAME ; class hspswrapper::CObjectMap * hspswrapper::CObjectMap::NewLC(void) - ?GetAppConfigurationsL@CHspsWrapper@hspswrapper@@QAEXAAV?$RPointerArray@VCPluginInfo@hspswrapper@@@@@Z @ 50 NONAME ; void hspswrapper::CHspsWrapper::GetAppConfigurationsL(class RPointerArray &) - ?NewL@CPluginInfo@hspswrapper@@SAPAV12@XZ @ 51 NONAME ; class hspswrapper::CPluginInfo * hspswrapper::CPluginInfo::NewL(void) - ?SetItemNameL@CItemMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 52 NONAME ; class hspswrapper::CItemMap & hspswrapper::CItemMap::SetItemNameL(class TDesC8 const &) - ?AddPluginL@CHspsWrapper@hspswrapper@@QAEPAVCAddPluginResult@2@ABVTDesC8@@0@Z @ 53 NONAME ; class hspswrapper::CAddPluginResult * hspswrapper::CHspsWrapper::AddPluginL(class TDesC8 const &, class TDesC8 const &) - ?NewL@CHspsConfiguration@hspswrapper@@SAPAV12@XZ @ 54 NONAME ; class hspswrapper::CHspsConfiguration * hspswrapper::CHspsConfiguration::NewL(void) - ?SetLogoIconL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 55 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetLogoIconL(class TDesC8 const &) - ?SetPluginUidL@CPluginMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 56 NONAME ; class hspswrapper::CPluginMap & hspswrapper::CPluginMap::SetPluginUidL(class TDesC8 const &) - ?SetValueL@CPropertyMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 57 NONAME ; class hspswrapper::CPropertyMap & hspswrapper::CPropertyMap::SetValueL(class TDesC8 const &) - ??1CObjectMap@hspswrapper@@UAE@XZ @ 58 NONAME ; hspswrapper::CObjectMap::~CObjectMap(void) - ??1CItemMap@hspswrapper@@UAE@XZ @ 59 NONAME ; hspswrapper::CItemMap::~CItemMap(void) - ?Name@CPropertyMap@hspswrapper@@QBEABVTDesC8@@XZ @ 60 NONAME ; class TDesC8 const & hspswrapper::CPropertyMap::Name(void) const - ?SetPluginSettingsL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@ABV?$RPointerArray@VCItemMap@hspswrapper@@@@@Z @ 61 NONAME ; int hspswrapper::CHspsWrapper::SetPluginSettingsL(class TDesC8 const &, class RPointerArray const &) - ?ConfId@CHspsConfiguration@hspswrapper@@QBEABVTDesC8@@XZ @ 62 NONAME ; class TDesC8 const & hspswrapper::CHspsConfiguration::ConfId(void) const - ?GetPluginsL@CHspsWrapper@hspswrapper@@QAEXAAV?$RPointerArray@VCPluginInfo@hspswrapper@@@@ABVTDesC8@@1@Z @ 63 NONAME ; void hspswrapper::CHspsWrapper::GetPluginsL(class RPointerArray &, class TDesC8 const &, class TDesC8 const &) - ?ItemId@CItemMap@hspswrapper@@QBEABVTDesC8@@XZ @ 64 NONAME ; class TDesC8 const & hspswrapper::CItemMap::ItemId(void) const - ?GetAppConfigurationL@CHspsWrapper@hspswrapper@@QAEPAVCHspsConfiguration@2@XZ @ 65 NONAME ; class hspswrapper::CHspsConfiguration * hspswrapper::CHspsWrapper::GetAppConfigurationL(void) - ?NewL@CItemMap@hspswrapper@@SAPAV12@XZ @ 66 NONAME ; class hspswrapper::CItemMap * hspswrapper::CItemMap::NewL(void) - ?SetPathL@CObjectMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 67 NONAME ; class hspswrapper::CObjectMap & hspswrapper::CObjectMap::SetPathL(class TDesC8 const &) - ?PluginId@CAddPluginResult@hspswrapper@@QBEABVTDesC8@@XZ @ 68 NONAME ; class TDesC8 const & hspswrapper::CAddPluginResult::PluginId(void) const - ??1CAddPluginResult@hspswrapper@@UAE@XZ @ 69 NONAME ; hspswrapper::CAddPluginResult::~CAddPluginResult(void) - ?NewLC@CPluginMap@hspswrapper@@SAPAV12@XZ @ 70 NONAME ; class hspswrapper::CPluginMap * hspswrapper::CPluginMap::NewLC(void) - ?ReplacePluginL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@0@Z @ 71 NONAME ; int hspswrapper::CHspsWrapper::ReplacePluginL(class TDesC8 const &, class TDesC8 const &) - ?Resources@CHspsConfiguration@hspswrapper@@QAEAAV?$RPointerArray@VCObjectMap@hspswrapper@@@@XZ @ 72 NONAME ; class RPointerArray & hspswrapper::CHspsConfiguration::Resources(void) - ?MaxChild@CPluginInfo@hspswrapper@@QBEABJXZ @ 73 NONAME ; long const & hspswrapper::CPluginInfo::MaxChild(void) const - ?SetLockingStatusL@CPluginMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 74 NONAME ; class hspswrapper::CPluginMap & hspswrapper::CPluginMap::SetLockingStatusL(class TDesC8 const &) - ?ServiceHandler@CHspsWrapper@hspswrapper@@QBEPAVCLiwServiceHandler@@XZ @ 75 NONAME ; class CLiwServiceHandler * hspswrapper::CHspsWrapper::ServiceHandler(void) const - ?Interface@CPluginInfo@hspswrapper@@QBEABVTDesC8@@XZ @ 76 NONAME ; class TDesC8 const & hspswrapper::CPluginInfo::Interface(void) const - ?SetActivePluginL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@@Z @ 77 NONAME ; int hspswrapper::CHspsWrapper::SetActivePluginL(class TDesC8 const &) - ?SetDescriptionL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 78 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetDescriptionL(class TDesC8 const &) - ?AddPluginL@CHspsWrapper@hspswrapper@@QAEPAVCAddPluginResult@2@ABVTDesC8@@0H@Z @ 79 NONAME ; class hspswrapper::CAddPluginResult * hspswrapper::CHspsWrapper::AddPluginL(class TDesC8 const &, class TDesC8 const &, int) - ?SetPluginIdL@CAddPluginResult@hspswrapper@@QAEXABVTDesC8@@@Z @ 80 NONAME ; void hspswrapper::CAddPluginResult::SetPluginIdL(class TDesC8 const &) - ?SetUidL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 81 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetUidL(class TDesC8 const &) - ?SetTagL@CObjectMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 82 NONAME ; class hspswrapper::CObjectMap & hspswrapper::CObjectMap::SetTagL(class TDesC8 const &) - ?NewLC@CPluginInfo@hspswrapper@@SAPAV12@XZ @ 83 NONAME ; class hspswrapper::CPluginInfo * hspswrapper::CPluginInfo::NewLC(void) - ?SetNameL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 84 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetNameL(class TDesC8 const &) - ?SetMediaTypeL@CObjectMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 85 NONAME ; class hspswrapper::CObjectMap & hspswrapper::CObjectMap::SetMediaTypeL(class TDesC8 const &) - ?Tag@CObjectMap@hspswrapper@@QBEABVTDesC8@@XZ @ 86 NONAME ; class TDesC8 const & hspswrapper::CObjectMap::Tag(void) const - ?SetItemIdL@CItemMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 87 NONAME ; class hspswrapper::CItemMap & hspswrapper::CItemMap::SetItemIdL(class TDesC8 const &) - ?NewLC@CItemMap@hspswrapper@@SAPAV12@XZ @ 88 NONAME ; class hspswrapper::CItemMap * hspswrapper::CItemMap::NewLC(void) - ?SetLogoIconL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC16@@@Z @ 89 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetLogoIconL(class TDesC16 const &) - ?SetInterfaceL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 90 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetInterfaceL(class TDesC8 const &) - ?AddPluginMapL@CHspsConfiguration@hspswrapper@@QAEAAV12@PAVCPluginMap@2@@Z @ 91 NONAME ; class hspswrapper::CHspsConfiguration & hspswrapper::CHspsConfiguration::AddPluginMapL(class hspswrapper::CPluginMap *) - ?RemovePluginL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@@Z @ 92 NONAME ; int hspswrapper::CHspsWrapper::RemovePluginL(class TDesC8 const &) - ?LockingStatus@CPluginMap@hspswrapper@@QBEABVTDesC8@@XZ @ 93 NONAME ; class TDesC8 const & hspswrapper::CPluginMap::LockingStatus(void) const - ?SetActivationStateL@CPluginMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 94 NONAME ; class hspswrapper::CPluginMap & hspswrapper::CPluginMap::SetActivationStateL(class TDesC8 const &) - ?Type@CPluginInfo@hspswrapper@@QBEABVTDesC8@@XZ @ 95 NONAME ; class TDesC8 const & hspswrapper::CPluginInfo::Type(void) const - ?SetConfIdL@CHspsConfiguration@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 96 NONAME ; class hspswrapper::CHspsConfiguration & hspswrapper::CHspsConfiguration::SetConfIdL(class TDesC8 const &) - ?NewLC@CPropertyMap@hspswrapper@@SAPAV12@XZ @ 97 NONAME ; class hspswrapper::CPropertyMap * hspswrapper::CPropertyMap::NewLC(void) - ??0CAddPluginResult@hspswrapper@@AAE@XZ @ 98 NONAME ; hspswrapper::CAddPluginResult::CAddPluginResult(void) - ?RestoreActiveViewL@CHspsWrapper@hspswrapper@@QAEHXZ @ 99 NONAME ; int hspswrapper::CHspsWrapper::RestoreActiveViewL(void) - ?RestoreRootL@CHspsWrapper@hspswrapper@@QAEHXZ @ 100 NONAME ; int hspswrapper::CHspsWrapper::RestoreRootL(void) + ?RestoreDefaultConfL@CHspsWrapper@hspswrapper@@QAEHXZ @ 46 NONAME ; int hspswrapper::CHspsWrapper::RestoreDefaultConfL(void) + ?MediaType@CObjectMap@hspswrapper@@QBEABVTDesC8@@XZ @ 47 NONAME ; class TDesC8 const & hspswrapper::CObjectMap::MediaType(void) const + ?SetTypeL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 48 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetTypeL(class TDesC8 const &) + ?AddPropertyMapL@CItemMap@hspswrapper@@QAEAAV12@PAVCPropertyMap@2@@Z @ 49 NONAME ; class hspswrapper::CItemMap & hspswrapper::CItemMap::AddPropertyMapL(class hspswrapper::CPropertyMap *) + ?NewLC@CObjectMap@hspswrapper@@SAPAV12@XZ @ 50 NONAME ; class hspswrapper::CObjectMap * hspswrapper::CObjectMap::NewLC(void) + ?GetAppConfigurationsL@CHspsWrapper@hspswrapper@@QAEXAAV?$RPointerArray@VCPluginInfo@hspswrapper@@@@@Z @ 51 NONAME ; void hspswrapper::CHspsWrapper::GetAppConfigurationsL(class RPointerArray &) + ?NewL@CPluginInfo@hspswrapper@@SAPAV12@XZ @ 52 NONAME ; class hspswrapper::CPluginInfo * hspswrapper::CPluginInfo::NewL(void) + ?SetItemNameL@CItemMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 53 NONAME ; class hspswrapper::CItemMap & hspswrapper::CItemMap::SetItemNameL(class TDesC8 const &) + ?AddPluginL@CHspsWrapper@hspswrapper@@QAEPAVCAddPluginResult@2@ABVTDesC8@@0@Z @ 54 NONAME ; class hspswrapper::CAddPluginResult * hspswrapper::CHspsWrapper::AddPluginL(class TDesC8 const &, class TDesC8 const &) + ?NewL@CHspsConfiguration@hspswrapper@@SAPAV12@XZ @ 55 NONAME ; class hspswrapper::CHspsConfiguration * hspswrapper::CHspsConfiguration::NewL(void) + ?SetLogoIconL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 56 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetLogoIconL(class TDesC8 const &) + ?SetPluginUidL@CPluginMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 57 NONAME ; class hspswrapper::CPluginMap & hspswrapper::CPluginMap::SetPluginUidL(class TDesC8 const &) + ?SetValueL@CPropertyMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 58 NONAME ; class hspswrapper::CPropertyMap & hspswrapper::CPropertyMap::SetValueL(class TDesC8 const &) + ??1CObjectMap@hspswrapper@@UAE@XZ @ 59 NONAME ; hspswrapper::CObjectMap::~CObjectMap(void) + ??1CItemMap@hspswrapper@@UAE@XZ @ 60 NONAME ; hspswrapper::CItemMap::~CItemMap(void) + ?Name@CPropertyMap@hspswrapper@@QBEABVTDesC8@@XZ @ 61 NONAME ; class TDesC8 const & hspswrapper::CPropertyMap::Name(void) const + ?SetPluginSettingsL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@ABV?$RPointerArray@VCItemMap@hspswrapper@@@@@Z @ 62 NONAME ; int hspswrapper::CHspsWrapper::SetPluginSettingsL(class TDesC8 const &, class RPointerArray const &) + ?ConfId@CHspsConfiguration@hspswrapper@@QBEABVTDesC8@@XZ @ 63 NONAME ; class TDesC8 const & hspswrapper::CHspsConfiguration::ConfId(void) const + ?GetPluginsL@CHspsWrapper@hspswrapper@@QAEXAAV?$RPointerArray@VCPluginInfo@hspswrapper@@@@ABVTDesC8@@1@Z @ 64 NONAME ; void hspswrapper::CHspsWrapper::GetPluginsL(class RPointerArray &, class TDesC8 const &, class TDesC8 const &) + ?ItemId@CItemMap@hspswrapper@@QBEABVTDesC8@@XZ @ 65 NONAME ; class TDesC8 const & hspswrapper::CItemMap::ItemId(void) const + ?GetAppConfigurationL@CHspsWrapper@hspswrapper@@QAEPAVCHspsConfiguration@2@XZ @ 66 NONAME ; class hspswrapper::CHspsConfiguration * hspswrapper::CHspsWrapper::GetAppConfigurationL(void) + ?NewL@CItemMap@hspswrapper@@SAPAV12@XZ @ 67 NONAME ; class hspswrapper::CItemMap * hspswrapper::CItemMap::NewL(void) + ?SetPathL@CObjectMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 68 NONAME ; class hspswrapper::CObjectMap & hspswrapper::CObjectMap::SetPathL(class TDesC8 const &) + ?PluginId@CAddPluginResult@hspswrapper@@QBEABVTDesC8@@XZ @ 69 NONAME ; class TDesC8 const & hspswrapper::CAddPluginResult::PluginId(void) const + ?RestoreRootL@CHspsWrapper@hspswrapper@@QAEHXZ @ 70 NONAME ; int hspswrapper::CHspsWrapper::RestoreRootL(void) + ??1CAddPluginResult@hspswrapper@@UAE@XZ @ 71 NONAME ; hspswrapper::CAddPluginResult::~CAddPluginResult(void) + ?NewLC@CPluginMap@hspswrapper@@SAPAV12@XZ @ 72 NONAME ; class hspswrapper::CPluginMap * hspswrapper::CPluginMap::NewLC(void) + ?ReplacePluginL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@0@Z @ 73 NONAME ; int hspswrapper::CHspsWrapper::ReplacePluginL(class TDesC8 const &, class TDesC8 const &) + ?Resources@CHspsConfiguration@hspswrapper@@QAEAAV?$RPointerArray@VCObjectMap@hspswrapper@@@@XZ @ 74 NONAME ; class RPointerArray & hspswrapper::CHspsConfiguration::Resources(void) + ?MaxChild@CPluginInfo@hspswrapper@@QBEABJXZ @ 75 NONAME ; long const & hspswrapper::CPluginInfo::MaxChild(void) const + ?SetLockingStatusL@CPluginMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 76 NONAME ; class hspswrapper::CPluginMap & hspswrapper::CPluginMap::SetLockingStatusL(class TDesC8 const &) + ?ServiceHandler@CHspsWrapper@hspswrapper@@QBEPAVCLiwServiceHandler@@XZ @ 77 NONAME ; class CLiwServiceHandler * hspswrapper::CHspsWrapper::ServiceHandler(void) const + ?Interface@CPluginInfo@hspswrapper@@QBEABVTDesC8@@XZ @ 78 NONAME ; class TDesC8 const & hspswrapper::CPluginInfo::Interface(void) const + ?SetActivePluginL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@@Z @ 79 NONAME ; int hspswrapper::CHspsWrapper::SetActivePluginL(class TDesC8 const &) + ?SetDescriptionL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 80 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetDescriptionL(class TDesC8 const &) + ?AddPluginL@CHspsWrapper@hspswrapper@@QAEPAVCAddPluginResult@2@ABVTDesC8@@0H@Z @ 81 NONAME ; class hspswrapper::CAddPluginResult * hspswrapper::CHspsWrapper::AddPluginL(class TDesC8 const &, class TDesC8 const &, int) + ?SetPluginIdL@CAddPluginResult@hspswrapper@@QAEXABVTDesC8@@@Z @ 82 NONAME ; void hspswrapper::CAddPluginResult::SetPluginIdL(class TDesC8 const &) + ?SetUidL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 83 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetUidL(class TDesC8 const &) + ?SetTagL@CObjectMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 84 NONAME ; class hspswrapper::CObjectMap & hspswrapper::CObjectMap::SetTagL(class TDesC8 const &) + ?NewLC@CPluginInfo@hspswrapper@@SAPAV12@XZ @ 85 NONAME ; class hspswrapper::CPluginInfo * hspswrapper::CPluginInfo::NewLC(void) + ?SetNameL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 86 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetNameL(class TDesC8 const &) + ?SetMediaTypeL@CObjectMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 87 NONAME ; class hspswrapper::CObjectMap & hspswrapper::CObjectMap::SetMediaTypeL(class TDesC8 const &) + ?Tag@CObjectMap@hspswrapper@@QBEABVTDesC8@@XZ @ 88 NONAME ; class TDesC8 const & hspswrapper::CObjectMap::Tag(void) const + ?SetItemIdL@CItemMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 89 NONAME ; class hspswrapper::CItemMap & hspswrapper::CItemMap::SetItemIdL(class TDesC8 const &) + ?NewLC@CItemMap@hspswrapper@@SAPAV12@XZ @ 90 NONAME ; class hspswrapper::CItemMap * hspswrapper::CItemMap::NewLC(void) + ?SetLogoIconL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC16@@@Z @ 91 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetLogoIconL(class TDesC16 const &) + ?SetInterfaceL@CPluginInfo@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 92 NONAME ; class hspswrapper::CPluginInfo & hspswrapper::CPluginInfo::SetInterfaceL(class TDesC8 const &) + ?AddPluginMapL@CHspsConfiguration@hspswrapper@@QAEAAV12@PAVCPluginMap@2@@Z @ 93 NONAME ; class hspswrapper::CHspsConfiguration & hspswrapper::CHspsConfiguration::AddPluginMapL(class hspswrapper::CPluginMap *) + ?RemovePluginL@CHspsWrapper@hspswrapper@@QAEHABVTDesC8@@@Z @ 94 NONAME ; int hspswrapper::CHspsWrapper::RemovePluginL(class TDesC8 const &) + ?LockingStatus@CPluginMap@hspswrapper@@QBEABVTDesC8@@XZ @ 95 NONAME ; class TDesC8 const & hspswrapper::CPluginMap::LockingStatus(void) const + ?SetActivationStateL@CPluginMap@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 96 NONAME ; class hspswrapper::CPluginMap & hspswrapper::CPluginMap::SetActivationStateL(class TDesC8 const &) + ?Type@CPluginInfo@hspswrapper@@QBEABVTDesC8@@XZ @ 97 NONAME ; class TDesC8 const & hspswrapper::CPluginInfo::Type(void) const + ?SetConfIdL@CHspsConfiguration@hspswrapper@@QAEAAV12@ABVTDesC8@@@Z @ 98 NONAME ; class hspswrapper::CHspsConfiguration & hspswrapper::CHspsConfiguration::SetConfIdL(class TDesC8 const &) + ?NewLC@CPropertyMap@hspswrapper@@SAPAV12@XZ @ 99 NONAME ; class hspswrapper::CPropertyMap * hspswrapper::CPropertyMap::NewLC(void) + ??0CAddPluginResult@hspswrapper@@AAE@XZ @ 100 NONAME ; hspswrapper::CAddPluginResult::CAddPluginResult(void) diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/sapiwrapper/hspswrapper/eabi/hspswrapper.def --- a/idlehomescreen/sapiwrapper/hspswrapper/eabi/hspswrapper.def Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/sapiwrapper/hspswrapper/eabi/hspswrapper.def Wed May 12 13:12:59 2010 +0300 @@ -36,100 +36,100 @@ _ZN11hspswrapper12CHspsWrapper10AddPluginLERK6TDesC8S3_i @ 35 NONAME _ZN11hspswrapper12CHspsWrapper11GetPluginsLER13RPointerArrayINS_11CPluginInfoEERK6TDesC8S7_ @ 36 NONAME _ZN11hspswrapper12CHspsWrapper12MovePluginsLERK6TDesC8RK11MDesC8Array @ 37 NONAME - _ZN11hspswrapper12CHspsWrapper13RemovePluginLERK6TDesC8 @ 38 NONAME - _ZN11hspswrapper12CHspsWrapper13SetConfStateLERK6TDesC8S3_i @ 39 NONAME - _ZN11hspswrapper12CHspsWrapper14ReplacePluginLERK6TDesC8S3_ @ 40 NONAME - _ZN11hspswrapper12CHspsWrapper16SetActivePluginLERK6TDesC8 @ 41 NONAME - _ZN11hspswrapper12CHspsWrapper18SetPluginSettingsLERK6TDesC8RK13RPointerArrayINS_8CItemMapEE @ 42 NONAME - _ZN11hspswrapper12CHspsWrapper20GetAppConfigurationLEv @ 43 NONAME - _ZN11hspswrapper12CHspsWrapper20SetAppConfigurationLERK6TDesC8 @ 44 NONAME - _ZN11hspswrapper12CHspsWrapper21GetAppConfigurationsLER13RPointerArrayINS_11CPluginInfoEE @ 45 NONAME - _ZN11hspswrapper12CHspsWrapper23GetPluginConfigurationLERK6TDesC8 @ 46 NONAME - _ZN11hspswrapper12CHspsWrapper4NewLERK6TDesC8PNS_20MHspsWrapperObserverE @ 47 NONAME - _ZN11hspswrapper12CHspsWrapper5NewLCERK6TDesC8PNS_20MHspsWrapperObserverE @ 48 NONAME - _ZN11hspswrapper12CHspsWrapperD0Ev @ 49 NONAME - _ZN11hspswrapper12CHspsWrapperD1Ev @ 50 NONAME - _ZN11hspswrapper12CHspsWrapperD2Ev @ 51 NONAME - _ZN11hspswrapper12CPropertyMap4NewLEv @ 52 NONAME - _ZN11hspswrapper12CPropertyMap5NewLCEv @ 53 NONAME - _ZN11hspswrapper12CPropertyMap8SetNameLERK6TDesC8 @ 54 NONAME - _ZN11hspswrapper12CPropertyMap9SetValueLERK6TDesC8 @ 55 NONAME - _ZN11hspswrapper12CPropertyMapD0Ev @ 56 NONAME - _ZN11hspswrapper12CPropertyMapD1Ev @ 57 NONAME - _ZN11hspswrapper12CPropertyMapD2Ev @ 58 NONAME - _ZN11hspswrapper16CAddPluginResult12SetPluginIdLERK6TDesC8 @ 59 NONAME - _ZN11hspswrapper16CAddPluginResult4NewLEv @ 60 NONAME - _ZN11hspswrapper16CAddPluginResult9SetStatusEi @ 61 NONAME - _ZN11hspswrapper16CAddPluginResultC1Ev @ 62 NONAME - _ZN11hspswrapper16CAddPluginResultC2Ev @ 63 NONAME - _ZN11hspswrapper16CAddPluginResultD0Ev @ 64 NONAME - _ZN11hspswrapper16CAddPluginResultD1Ev @ 65 NONAME - _ZN11hspswrapper16CAddPluginResultD2Ev @ 66 NONAME - _ZN11hspswrapper18CHspsConfiguration10PluginInfoEv @ 67 NONAME - _ZN11hspswrapper18CHspsConfiguration10PluginMapsEv @ 68 NONAME - _ZN11hspswrapper18CHspsConfiguration10SetConfIdLERK6TDesC8 @ 69 NONAME - _ZN11hspswrapper18CHspsConfiguration11AddItemMapLEPNS_8CItemMapE @ 70 NONAME - _ZN11hspswrapper18CHspsConfiguration13AddObjectMapLEPNS_10CObjectMapE @ 71 NONAME - _ZN11hspswrapper18CHspsConfiguration13AddPluginMapLEPNS_10CPluginMapE @ 72 NONAME - _ZN11hspswrapper18CHspsConfiguration4NewLEv @ 73 NONAME - _ZN11hspswrapper18CHspsConfiguration5NewLCEv @ 74 NONAME - _ZN11hspswrapper18CHspsConfiguration8SettingsEv @ 75 NONAME - _ZN11hspswrapper18CHspsConfiguration9ResourcesEv @ 76 NONAME - _ZN11hspswrapper18CHspsConfigurationD0Ev @ 77 NONAME - _ZN11hspswrapper18CHspsConfigurationD1Ev @ 78 NONAME - _ZN11hspswrapper18CHspsConfigurationD2Ev @ 79 NONAME - _ZN11hspswrapper8CItemMap10SetItemIdLERK6TDesC8 @ 80 NONAME - _ZN11hspswrapper8CItemMap12SetItemNameLERK6TDesC8 @ 81 NONAME - _ZN11hspswrapper8CItemMap15AddPropertyMapLEPNS_12CPropertyMapE @ 82 NONAME - _ZN11hspswrapper8CItemMap4NewLEv @ 83 NONAME - _ZN11hspswrapper8CItemMap5NewLCEv @ 84 NONAME - _ZN11hspswrapper8CItemMapD0Ev @ 85 NONAME - _ZN11hspswrapper8CItemMapD1Ev @ 86 NONAME - _ZN11hspswrapper8CItemMapD2Ev @ 87 NONAME - _ZNK11hspswrapper10CObjectMap3TagEv @ 88 NONAME - _ZNK11hspswrapper10CObjectMap4PathEv @ 89 NONAME - _ZNK11hspswrapper10CObjectMap5NameLEv @ 90 NONAME - _ZNK11hspswrapper10CObjectMap9MediaTypeEv @ 91 NONAME - _ZNK11hspswrapper10CPluginMap13LockingStatusEv @ 92 NONAME - _ZNK11hspswrapper10CPluginMap15ActivationStateEv @ 93 NONAME - _ZNK11hspswrapper10CPluginMap8PluginIdEv @ 94 NONAME - _ZNK11hspswrapper10CPluginMap9PluginUidEv @ 95 NONAME - _ZNK11hspswrapper11CPluginInfo11DescriptionEv @ 96 NONAME - _ZNK11hspswrapper11CPluginInfo13MultiInstanceEv @ 97 NONAME - _ZNK11hspswrapper11CPluginInfo18ConfigurationStateEv @ 98 NONAME - _ZNK11hspswrapper11CPluginInfo3UidEv @ 99 NONAME - _ZNK11hspswrapper11CPluginInfo4NameEv @ 100 NONAME - _ZNK11hspswrapper11CPluginInfo4TypeEv @ 101 NONAME - _ZNK11hspswrapper11CPluginInfo8LogoIconEv @ 102 NONAME - _ZNK11hspswrapper11CPluginInfo8MaxChildEv @ 103 NONAME - _ZNK11hspswrapper11CPluginInfo9InterfaceEv @ 104 NONAME - _ZNK11hspswrapper12CHspsWrapper11HspsServiceEv @ 105 NONAME - _ZNK11hspswrapper12CHspsWrapper13HspsInterfaceEv @ 106 NONAME - _ZNK11hspswrapper12CHspsWrapper14ServiceHandlerEv @ 107 NONAME - _ZNK11hspswrapper12CPropertyMap4NameEv @ 108 NONAME - _ZNK11hspswrapper12CPropertyMap5ValueEv @ 109 NONAME - _ZNK11hspswrapper16CAddPluginResult6StatusEv @ 110 NONAME - _ZNK11hspswrapper16CAddPluginResult8PluginIdEv @ 111 NONAME - _ZNK11hspswrapper18CHspsConfiguration6ConfIdEv @ 112 NONAME - _ZNK11hspswrapper8CItemMap10PropertiesEv @ 113 NONAME - _ZNK11hspswrapper8CItemMap6ItemIdEv @ 114 NONAME - _ZNK11hspswrapper8CItemMap8ItemNameEv @ 115 NONAME - _ZTIN11hspswrapper10CObjectMapE @ 116 NONAME - _ZTIN11hspswrapper10CPluginMapE @ 117 NONAME - _ZTIN11hspswrapper11CPluginInfoE @ 118 NONAME - _ZTIN11hspswrapper12CHspsWrapperE @ 119 NONAME - _ZTIN11hspswrapper12CPropertyMapE @ 120 NONAME - _ZTIN11hspswrapper16CAddPluginResultE @ 121 NONAME - _ZTIN11hspswrapper18CHspsConfigurationE @ 122 NONAME - _ZTIN11hspswrapper8CItemMapE @ 123 NONAME - _ZTVN11hspswrapper10CObjectMapE @ 124 NONAME - _ZTVN11hspswrapper10CPluginMapE @ 125 NONAME - _ZTVN11hspswrapper11CPluginInfoE @ 126 NONAME - _ZTVN11hspswrapper12CHspsWrapperE @ 127 NONAME - _ZTVN11hspswrapper12CPropertyMapE @ 128 NONAME - _ZTVN11hspswrapper16CAddPluginResultE @ 129 NONAME - _ZTVN11hspswrapper18CHspsConfigurationE @ 130 NONAME - _ZTVN11hspswrapper8CItemMapE @ 131 NONAME - _ZN11hspswrapper12CHspsWrapper18RestoreActiveViewLEv @ 132 NONAME - _ZN11hspswrapper12CHspsWrapper12RestoreRootLEv @ 133 NONAME + _ZN11hspswrapper12CHspsWrapper12RestoreRootLEv @ 38 NONAME + _ZN11hspswrapper12CHspsWrapper13RemovePluginLERK6TDesC8 @ 39 NONAME + _ZN11hspswrapper12CHspsWrapper13SetConfStateLERK6TDesC8S3_i @ 40 NONAME + _ZN11hspswrapper12CHspsWrapper14ReplacePluginLERK6TDesC8S3_ @ 41 NONAME + _ZN11hspswrapper12CHspsWrapper16SetActivePluginLERK6TDesC8 @ 42 NONAME + _ZN11hspswrapper12CHspsWrapper18SetPluginSettingsLERK6TDesC8RK13RPointerArrayINS_8CItemMapEE @ 43 NONAME + _ZN11hspswrapper12CHspsWrapper19RestoreDefaultConfLEv @ 44 NONAME + _ZN11hspswrapper12CHspsWrapper20GetAppConfigurationLEv @ 45 NONAME + _ZN11hspswrapper12CHspsWrapper20SetAppConfigurationLERK6TDesC8 @ 46 NONAME + _ZN11hspswrapper12CHspsWrapper21GetAppConfigurationsLER13RPointerArrayINS_11CPluginInfoEE @ 47 NONAME + _ZN11hspswrapper12CHspsWrapper23GetPluginConfigurationLERK6TDesC8 @ 48 NONAME + _ZN11hspswrapper12CHspsWrapper4NewLERK6TDesC8PNS_20MHspsWrapperObserverE @ 49 NONAME + _ZN11hspswrapper12CHspsWrapper5NewLCERK6TDesC8PNS_20MHspsWrapperObserverE @ 50 NONAME + _ZN11hspswrapper12CHspsWrapperD0Ev @ 51 NONAME + _ZN11hspswrapper12CHspsWrapperD1Ev @ 52 NONAME + _ZN11hspswrapper12CHspsWrapperD2Ev @ 53 NONAME + _ZN11hspswrapper12CPropertyMap4NewLEv @ 54 NONAME + _ZN11hspswrapper12CPropertyMap5NewLCEv @ 55 NONAME + _ZN11hspswrapper12CPropertyMap8SetNameLERK6TDesC8 @ 56 NONAME + _ZN11hspswrapper12CPropertyMap9SetValueLERK6TDesC8 @ 57 NONAME + _ZN11hspswrapper12CPropertyMapD0Ev @ 58 NONAME + _ZN11hspswrapper12CPropertyMapD1Ev @ 59 NONAME + _ZN11hspswrapper12CPropertyMapD2Ev @ 60 NONAME + _ZN11hspswrapper16CAddPluginResult12SetPluginIdLERK6TDesC8 @ 61 NONAME + _ZN11hspswrapper16CAddPluginResult4NewLEv @ 62 NONAME + _ZN11hspswrapper16CAddPluginResult9SetStatusEi @ 63 NONAME + _ZN11hspswrapper16CAddPluginResultC1Ev @ 64 NONAME + _ZN11hspswrapper16CAddPluginResultC2Ev @ 65 NONAME + _ZN11hspswrapper16CAddPluginResultD0Ev @ 66 NONAME + _ZN11hspswrapper16CAddPluginResultD1Ev @ 67 NONAME + _ZN11hspswrapper16CAddPluginResultD2Ev @ 68 NONAME + _ZN11hspswrapper18CHspsConfiguration10PluginInfoEv @ 69 NONAME + _ZN11hspswrapper18CHspsConfiguration10PluginMapsEv @ 70 NONAME + _ZN11hspswrapper18CHspsConfiguration10SetConfIdLERK6TDesC8 @ 71 NONAME + _ZN11hspswrapper18CHspsConfiguration11AddItemMapLEPNS_8CItemMapE @ 72 NONAME + _ZN11hspswrapper18CHspsConfiguration13AddObjectMapLEPNS_10CObjectMapE @ 73 NONAME + _ZN11hspswrapper18CHspsConfiguration13AddPluginMapLEPNS_10CPluginMapE @ 74 NONAME + _ZN11hspswrapper18CHspsConfiguration4NewLEv @ 75 NONAME + _ZN11hspswrapper18CHspsConfiguration5NewLCEv @ 76 NONAME + _ZN11hspswrapper18CHspsConfiguration8SettingsEv @ 77 NONAME + _ZN11hspswrapper18CHspsConfiguration9ResourcesEv @ 78 NONAME + _ZN11hspswrapper18CHspsConfigurationD0Ev @ 79 NONAME + _ZN11hspswrapper18CHspsConfigurationD1Ev @ 80 NONAME + _ZN11hspswrapper18CHspsConfigurationD2Ev @ 81 NONAME + _ZN11hspswrapper8CItemMap10SetItemIdLERK6TDesC8 @ 82 NONAME + _ZN11hspswrapper8CItemMap12SetItemNameLERK6TDesC8 @ 83 NONAME + _ZN11hspswrapper8CItemMap15AddPropertyMapLEPNS_12CPropertyMapE @ 84 NONAME + _ZN11hspswrapper8CItemMap4NewLEv @ 85 NONAME + _ZN11hspswrapper8CItemMap5NewLCEv @ 86 NONAME + _ZN11hspswrapper8CItemMapD0Ev @ 87 NONAME + _ZN11hspswrapper8CItemMapD1Ev @ 88 NONAME + _ZN11hspswrapper8CItemMapD2Ev @ 89 NONAME + _ZNK11hspswrapper10CObjectMap3TagEv @ 90 NONAME + _ZNK11hspswrapper10CObjectMap4PathEv @ 91 NONAME + _ZNK11hspswrapper10CObjectMap5NameLEv @ 92 NONAME + _ZNK11hspswrapper10CObjectMap9MediaTypeEv @ 93 NONAME + _ZNK11hspswrapper10CPluginMap13LockingStatusEv @ 94 NONAME + _ZNK11hspswrapper10CPluginMap15ActivationStateEv @ 95 NONAME + _ZNK11hspswrapper10CPluginMap8PluginIdEv @ 96 NONAME + _ZNK11hspswrapper10CPluginMap9PluginUidEv @ 97 NONAME + _ZNK11hspswrapper11CPluginInfo11DescriptionEv @ 98 NONAME + _ZNK11hspswrapper11CPluginInfo13MultiInstanceEv @ 99 NONAME + _ZNK11hspswrapper11CPluginInfo18ConfigurationStateEv @ 100 NONAME + _ZNK11hspswrapper11CPluginInfo3UidEv @ 101 NONAME + _ZNK11hspswrapper11CPluginInfo4NameEv @ 102 NONAME + _ZNK11hspswrapper11CPluginInfo4TypeEv @ 103 NONAME + _ZNK11hspswrapper11CPluginInfo8LogoIconEv @ 104 NONAME + _ZNK11hspswrapper11CPluginInfo8MaxChildEv @ 105 NONAME + _ZNK11hspswrapper11CPluginInfo9InterfaceEv @ 106 NONAME + _ZNK11hspswrapper12CHspsWrapper11HspsServiceEv @ 107 NONAME + _ZNK11hspswrapper12CHspsWrapper13HspsInterfaceEv @ 108 NONAME + _ZNK11hspswrapper12CHspsWrapper14ServiceHandlerEv @ 109 NONAME + _ZNK11hspswrapper12CPropertyMap4NameEv @ 110 NONAME + _ZNK11hspswrapper12CPropertyMap5ValueEv @ 111 NONAME + _ZNK11hspswrapper16CAddPluginResult6StatusEv @ 112 NONAME + _ZNK11hspswrapper16CAddPluginResult8PluginIdEv @ 113 NONAME + _ZNK11hspswrapper18CHspsConfiguration6ConfIdEv @ 114 NONAME + _ZNK11hspswrapper8CItemMap10PropertiesEv @ 115 NONAME + _ZNK11hspswrapper8CItemMap6ItemIdEv @ 116 NONAME + _ZNK11hspswrapper8CItemMap8ItemNameEv @ 117 NONAME + _ZTIN11hspswrapper10CObjectMapE @ 118 NONAME + _ZTIN11hspswrapper10CPluginMapE @ 119 NONAME + _ZTIN11hspswrapper11CPluginInfoE @ 120 NONAME + _ZTIN11hspswrapper12CHspsWrapperE @ 121 NONAME + _ZTIN11hspswrapper12CPropertyMapE @ 122 NONAME + _ZTIN11hspswrapper16CAddPluginResultE @ 123 NONAME + _ZTIN11hspswrapper18CHspsConfigurationE @ 124 NONAME + _ZTIN11hspswrapper8CItemMapE @ 125 NONAME + _ZTVN11hspswrapper10CObjectMapE @ 126 NONAME + _ZTVN11hspswrapper10CPluginMapE @ 127 NONAME + _ZTVN11hspswrapper11CPluginInfoE @ 128 NONAME + _ZTVN11hspswrapper12CHspsWrapperE @ 129 NONAME + _ZTVN11hspswrapper12CPropertyMapE @ 130 NONAME + _ZTVN11hspswrapper16CAddPluginResultE @ 131 NONAME + _ZTVN11hspswrapper18CHspsConfigurationE @ 132 NONAME + _ZTVN11hspswrapper8CItemMapE @ 133 NONAME diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/sapiwrapper/hspswrapper/inc/hspswrapper.h --- a/idlehomescreen/sapiwrapper/hspswrapper/inc/hspswrapper.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/sapiwrapper/hspswrapper/inc/hspswrapper.h Wed May 12 13:12:59 2010 +0300 @@ -237,19 +237,18 @@ IMPORT_C TInt SetActivePluginL(const TDesC8& aPluginId); /** - * Restore active view. Will remove all plugins in active view. + * Removes all but one view and removes all plugins from it. * * @return Operation status. KErrNone (success), KErrNotFound */ - IMPORT_C TInt RestoreActiveViewL(); + IMPORT_C TInt RestoreRootL(); /** - * Restore whole root configuration. Will remove - * everything except one view. + * Restore (re-install) default configuration from ROM. * * @return Operation status. KErrNone (success), KErrNotFound */ - IMPORT_C TInt RestoreRootL(); + IMPORT_C TInt RestoreDefaultConfL(); /** * Replace plugin in the active configuration. diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/sapiwrapper/hspswrapper/src/hspswrapper.cpp --- a/idlehomescreen/sapiwrapper/hspswrapper/src/hspswrapper.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/sapiwrapper/hspswrapper/src/hspswrapper.cpp Wed May 12 13:12:59 2010 +0300 @@ -56,6 +56,7 @@ _LIT8( KKeyConfUid, "confUid" ); _LIT8( KInterface, "interface" ); _LIT8( KType, "type" ); +_LIT8( KCopyLogos, "copylogos" ); _LIT8( KKeyPlugins, "plugins" ); _LIT8( KKeyItemId, "itemId" ); _LIT8( KKeyName, "name" ); @@ -369,6 +370,8 @@ CleanupStack::Pop(&confVar); confVar.Reset(); + plugin->SetTypeL( _L8("application") ); + aPlugins.AppendL( plugin ); CleanupStack::Pop( plugin ); } @@ -498,6 +501,13 @@ inParamList.AppendL( typeParam ); CleanupStack::Pop(&typeParam); typeParam.Reset(); + + TLiwGenericParam logosParam; + logosParam.SetNameAndValueL( KCopyLogos, TLiwVariant( ETrue ) ); + logosParam.PushL(); + inParamList.AppendL( logosParam ); + CleanupStack::Pop(&logosParam); + logosParam.Reset(); iHspsInterface->ExecuteCmdL( KHSPSCommandGetPlugins, inParamList, outParamList ); inParamList.Reset(); @@ -512,7 +522,17 @@ ProcessPluginsL(*list,aPlugins); } } - outParamList.Reset(); + + // check success + TInt pos(0); + const TLiwGenericParam* outParam = + outParamList.FindFirst( pos, KOutKeyStatus ); + if ( outParam ) + { + User::LeaveIfError( outParam->Value().AsTInt32() ); + } + + outParamList.Reset(); } // --------------------------------------------------------------------------- @@ -765,14 +785,14 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // -EXPORT_C TInt CHspsWrapper::RestoreActiveViewL() +EXPORT_C TInt CHspsWrapper::RestoreRootL() { CLiwGenericParamList& inParamList = iServiceHandler->InParamListL(); CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL(); // Compose Liw message TLiwGenericParam restoreTypeParam; - restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KActive ) ); + restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KAll ) ); restoreTypeParam.PushL(); inParamList.AppendL( restoreTypeParam ); CleanupStack::Pop( &restoreTypeParam ); @@ -801,14 +821,14 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // -EXPORT_C TInt CHspsWrapper::RestoreRootL() +EXPORT_C TInt CHspsWrapper::RestoreDefaultConfL() { CLiwGenericParamList& inParamList = iServiceHandler->InParamListL(); CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL(); // Compose Liw message TLiwGenericParam restoreTypeParam; - restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KAll ) ); + restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KActive ) ); restoreTypeParam.PushL(); inParamList.AppendL( restoreTypeParam ); CleanupStack::Pop( &restoreTypeParam ); diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/conf/widgetmanager.confml Binary file idlehomescreen/widgetmanager/conf/widgetmanager.confml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/conf/widgetmanager_20026F53.crml Binary file idlehomescreen/widgetmanager/conf/widgetmanager_20026F53.crml has changed diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/gfx/add_widget_button.svg --- a/idlehomescreen/widgetmanager/gfx/add_widget_button.svg Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/group/widgetmanager.mmp --- a/idlehomescreen/widgetmanager/group/widgetmanager.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/group/widgetmanager.mmp Wed May 12 13:12:59 2010 +0300 @@ -54,6 +54,7 @@ SOURCE wminstaller.cpp SOURCE wmprocessmonitor.cpp SOURCE wmwidgetorderdata.cpp +SOURCE wmspbgcleaner.cpp SOURCEPATH ../data START RESOURCE 20026F53.rss @@ -118,4 +119,6 @@ LIBRARY centralrepository.lib LIBRARY bmpanim.lib // AknBitmap animation LIBRARY inetprotutil.lib +LIBRARY browserlauncher.lib + // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmconfiguration.h --- a/idlehomescreen/widgetmanager/inc/wmconfiguration.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmconfiguration.h Wed May 12 13:12:59 2010 +0300 @@ -35,7 +35,19 @@ { public: // constructors and destructor - + + /** Operator Application type */ + enum TOpAppType + { + EUnknown, + ES60, + ECwrt, + EWrt, + EJava, + EQt, + EReserved + }; + /** Two-phased constructor. */ static CWmConfiguration* NewL( CWmResourceLoader& aResourceLoader ); @@ -88,16 +100,52 @@ * @param aIndex index of the button, starting at 0 */ const TDesC& PortalButtonClientParam( TInt aIndex ); - + + /** + * Returns bool if buttons are mirrored. + * @return true when operator button on left on portraid and + * on top on landscape. + */ + TBool PortalButtonsMirrored(); + + /** + * Returns application type by button index + * @param aIndex button index + * @return application type + */ + TOpAppType PortalButtonApplicationType( TInt aIndex ); + + /** + * Returns application id as string + * @param aIndex button index + * @param aOperatorAppId string to get app id + */ + void PortalButtonApplicationId( TInt aIndex, TDes& aOperatorAppId ); + + /** + * Returns application id as uid + * @param aIndex button index + * @param aOperatorAppId uid to get app id + */ + void PortalButtonApplicationId( TInt aIndex, TUid& aOperatorAppId ); + private: // New functions void LoadConfigurationL(); TInt FindCorrectLanguageId(); HBufC* ReadDescParameterL( TInt aKey ); - void ReadIntParameter( TInt aKey, TInt32& aValue ); + void ReadInt32Parameter( TInt aKey, TInt32& aValue ); + void ReadIntParameter( TInt aKey, TInt& aValue ); HBufC* ReadLocalisedParameterL( TInt aOffset ); - void IndexConversion( TInt& aIndex ); - + void ReadOperatorApplicationInfoL(); + TUid StringToUid( const TDesC& aStr ); + + /** Returns uid of the widget with a particular bundle identifier. */ + TUid FetchWidgetUidFromRegistryL( const TDesC& aBundleId ); + + /** sets operator icon to button if not already defined */ + void SetOperatorIconL( TUid aUid ); + private: /** @@ -132,9 +180,9 @@ HBufC* iOviStoreClientParam; /** - * OVI store laucher ui + * OVI store laucher uid */ - TUid iOviStoreUid; + TUid iOviStoreUid; /** * OPERATOR button text @@ -151,7 +199,36 @@ */ HBufC* iOperatorButtonUrl; - }; + /** + * OPERATOR store button application parameter + */ + HBufC* iOperatorParam; + + /** + * OPERATOR store application id as string. Used for java + */ + HBufC* iOperatorAppIdStr; + + /** + * OPERATOR store application id as uid. + */ + TUid iOperatorAppIdUid; + + /** + * OPERATOR store application type + */ + TOpAppType iOperatorAppType; + + /** + * Tells if operator button is enabled. + */ + TBool iOperatorButtonEnabled; + + /** + * Tells if buttons need to be mirrored for operator. + */ + TBool iButtonsMirrored; + }; #endif // WMCONFIGURATION_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmcrkeys.h --- a/idlehomescreen/widgetmanager/inc/wmcrkeys.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmcrkeys.h Wed May 12 13:12:59 2010 +0300 @@ -53,18 +53,46 @@ // ************************************************************ -// NON-LOCALISED parameters +// NON-LOCALISED OVI parameters // ************************************************************ /** Key to Ovi Store Client param */ const TUint32 KOviStoreClientParam = 0x1F; +/** Key to Ovi Store client Uid */ +const TUint32 KOviStoreUid = 0x20; + +// ************************************************************ +// NON-LOCALISED Operator parameters +// ************************************************************ + /** Key to Operator button icon */ -const TUint32 KOperatorButtonIcon = 0x20; +const TUint32 KOperatorButtonEnabled = 0x21; + +/** Key to Operator button icon */ +const TUint32 KOperatorButtonIcon = 0x22; -/** Key to Ovi Store client Uid */ -const TUint32 KOviStoreUid = 0x21; +/** + * Key to Operator application type and id. + * Give ':' as separator between type and id. + * Type can be s60, cwrt, wrt, java, qt + * Examples: + * s60:0x10005902 Application Uid as id + * cwrt:ovi.serviceui.SSOUI BundleId as id + * wrt:com.accuweather.widget.touchNG BundleId as id + * java:c:/sys/bin/javastore.jar full path for java app + * qt:0x2001A9CA Application Uid as id + */ +const TUint32 KOperatorAppTypeAndId = 0x23; +/** Key to Operator application param */ +const TUint32 KOperatorParam = 0x24; + +/** + * Key to define if operator button needs to be placed to left in landscape and + * top on portraid. By default it's right and bottom. + */ +const TUint32 KOperatorButtonHigherPriority = 0x25; #endif // __WMCRKEYS_H__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmdetailsdlg.h --- a/idlehomescreen/widgetmanager/inc/wmdetailsdlg.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmdetailsdlg.h Wed May 12 13:12:59 2010 +0300 @@ -27,6 +27,7 @@ class CAknMarqueeControl; class CEikRichTextEditor; class CAknsBasicBackgroundControlContext; +class CWmImageConverter; // CLASS DECLARATIONS /** @@ -42,9 +43,10 @@ static CWmDetailsDlg* NewL( const TDesC& aName, const TDesC& aDescription, - TBool aCanBeAdded, - const CFbsBitmap* aLogoBmp, - const CFbsBitmap* aLogoMask ); + TBool aCanBeAdded, + const TDesC& aIconStr, + const CFbsBitmap& aDefaultIcon, + const CFbsBitmap& aDefaultIconMask ); /** Destructor. */ ~CWmDetailsDlg(); @@ -108,8 +110,9 @@ void ConstructL( const TDesC& aName, const TDesC& aDescription, - const CFbsBitmap* aLogoBmp, - const CFbsBitmap* aLogoMask ); + const TDesC& aIconStr, + const CFbsBitmap& aDefaultIcon, + const CFbsBitmap& aDefaultIconMask ); private: @@ -157,6 +160,11 @@ * ETrue if widget name needs to be scrolled. */ TBool iNeedToScroll; + + /** + * the image converter utility + */ + CWmImageConverter* iImageConverter; }; #endif ___WMDETAILSDLG_H__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmimageconverter.h --- a/idlehomescreen/widgetmanager/inc/wmimageconverter.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmimageconverter.h Wed May 12 13:12:59 2010 +0300 @@ -27,47 +27,23 @@ // Forward declarations class CFbsBitmap; -class CBitmapScaler; -class CImageDecoder; class TAknsItemID; class CWmUnitTest; class MSvgError; // Class declaration /** - * MConverterObserver - * To notify when image is converted - */ -NONSHARABLE_CLASS( MConverterObserver ) - { - public: - virtual void NotifyCompletion( TInt aError ) = 0; - }; - -// Class declaration -/** * CWmImageConverter * Image converter */ -NONSHARABLE_CLASS ( CWmImageConverter ) : public CActive, - public MAknIconFileProvider +NONSHARABLE_CLASS ( CWmImageConverter ) : public MAknIconFileProvider { - /** states for this converter */ - enum TState - { - EIdle = 0, - EDecoding, - EScalingBitmap, - EScalingMask, - EFailed - }; - public: //contructors/destructors /** * Two-phased constructor. * @param aObserver observer */ - static CWmImageConverter* NewL( MConverterObserver* aObserver ); + static CWmImageConverter* NewL(); /** Destructor */ ~CWmImageConverter(); @@ -77,9 +53,10 @@ /** * Parses icon string and prepares logo image. * - * @param aWidth wanted widht - * @param aHeight wanted height + * @param aIconSize wanted size * @param aIconStr str containing logo icon + * @param aBitmap bitmap to create. Empty if fails + * @param aMask mask to create. Empty if fails * Supported values: * - skin( ):mif( ) * - mif( ) @@ -88,91 +65,35 @@ * * @return Error code */ - TInt HandleIconString( TInt aWidth, TInt aHeight, const TDesC& aIconStr ); - - /** - * Returns converted bitmap. Caller takes ownership - * - * @return CFbsBitmap - */ - CFbsBitmap* Bitmap(); + TInt HandleIconString( + const TSize& aIconSize, + const TDesC& aIconStr, + CFbsBitmap*& aBitmap, + CFbsBitmap*& aMask ); - /** - * Returns converted mask. Caller takes ownership + /** + * Parses icon string and resizes given bitmaps if needed. + * Errors are ignored and previos size image will be used. * - * @return CFbsBitmap - */ - CFbsBitmap* Mask(); - - /** - * sets the size for decoding - * @param aSize the logo size - */ - void SetLogoSize( const TSize& aSize ); - - /** supported image conversion methods */ - enum TConversionMethod - { - EUnrecognized, // we could not recognise the icon string - EUidIcon, // App.UID-coded icon - ESvgIcon, // Icon from SVG-file - ESkinIcon, // Icon from SKIN id - EMifIcon, // Icon from MIF file, known graphic index - ESkinAndMifIcon, // Icon from SKIN and MIF combination - EImageIcon, // Icon from image file (jpeg or png) - }; - - /** - * The type of currently converted image. - * This method can be used to check if correct conversion was used. - * @return conversion method used for current image - */ - TConversionMethod ConversionMethod(); - - /** - * Image convertion status - * - * @return ETrue if processing image, false otherwise. - */ - TBool IsProcessing(); - -protected: // implementation of CActive - /** - * Implements cancellation of an outstanding request. - * - * @see CActive::DoCancel - */ - void DoCancel(); + * @param aIconSize wanted size + * @param aIconStr icon string to find out what to resize + * @param aBitmap bitmap to resize + * @param aMask mask to resize + */ + void UpdateImageSize( + const TSize& aSize, + const TDesC& aIconStr, + CFbsBitmap& aBitmap, + CFbsBitmap& aMask ); - /** - * Handles an active object's request completion event. - * - * @see CActive::RunL - */ - void RunL(); - - /** - * RunError - * - * @see CActive::RunError - */ - TInt RunError(TInt aError); - private: CWmImageConverter(); - void ConstructL( MConverterObserver* aObserver ); - void CheckSvgErrorL( MSvgError* aError ); - void HandleIconStringL( TInt aWidth, TInt aHeight, - const TDesC& aIconStr ); + void ConstructL(); private: + void CheckSvgErrorL( MSvgError* aError ); + void HandleIconStringL( const TSize& aIconSize, const TDesC& aIconStr ); - TBool DoesScaleBitmapUseFallBack( CFbsBitmap* aSrcBitmap ); - void ScaleBitmapL( const TSize& aSize, - CFbsBitmap* aTrgBitmap, - CFbsBitmap* aSrcBitmap ); - void ScaleBitmap( TInt aWidth, TInt aHeight ); - void ScaleMask( TInt aWidth, TInt aHeight ); void CreateIconFromUidL( const TUid& aUid ); void CreateIconFromSvgL( const TDesC& aFileName ); void CreateIconFromOtherL( const TDesC& aFileName ); @@ -190,6 +111,7 @@ // helpers TInt ParseNextUint( TLex& aLex, TUint& aValue ); + void CopyBitmapL( CFbsBitmap& aTrgBitmap, CFbsBitmap& aSrcBitmap ); private: // from MAknIconFileProvider @@ -201,11 +123,6 @@ private: /** - * Converter observer (not owned) - */ - MConverterObserver* iObserver; - - /** * decoded image */ CFbsBitmap* iBitmap; @@ -214,22 +131,7 @@ * decoded image mask */ CFbsBitmap* iMask; - - /** - * decoder from ICL API - */ - CImageDecoder* iImageDecoder; - - /** - * bitmap scaler - */ - CBitmapScaler* iScaler; - - /** - * internal state - */ - TState iState; - + /** * File name to convert */ @@ -239,22 +141,11 @@ * size to convert */ TSize iSize; - - /** - * is scaling needed - */ - TBool iScaleNeeded; - + /** * File handle */ RFs iFs; - - /** - * Conversion method for current image - */ - TConversionMethod iConversionMethod; - }; #endif // #ifndef WMIMAGECONVERTER_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wminstaller.h --- a/idlehomescreen/widgetmanager/inc/wminstaller.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wminstaller.h Wed May 12 13:12:59 2010 +0300 @@ -105,8 +105,10 @@ * wrt widget that is currently been uninstalled */ TUid iUid; - - + + /** + * mime type of widget currently being uninstalled. + */ HBufC8* iMime; /** reference to plugin root */ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmlistbox.h --- a/idlehomescreen/widgetmanager/inc/wmlistbox.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmlistbox.h Wed May 12 13:12:59 2010 +0300 @@ -70,17 +70,11 @@ const CFbsBitmap* DefaultLogoMask(); /** - * re-size bitmaps to size provided by layout + * sets item height according to layout */ - void ResizeDefaultBitmaps(); - - /** - * Responds to skin changed event. - */ - void HandleSkinChanged(); + void UpdateItemHeight(); public: - /** * from CFormattedCellListBoxItemDrawer: * draws a single list box item @@ -101,9 +95,8 @@ /** 2nd phase constructor */ void ConstructL(); - + private: // data members - /** * the plugin root (not owned) */ @@ -132,7 +125,6 @@ }; - // CLASS DECLARATIONS /** * CWmListBox @@ -264,11 +256,6 @@ void HandleLayoutChanged(); /** - * Responds to skin changed. - */ - void HandleSkinChanged(); - - /** * Returns size of logo * * @return Size of logo rect diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmmaincontainer.h --- a/idlehomescreen/widgetmanager/inc/wmmaincontainer.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmmaincontainer.h Wed May 12 13:12:59 2010 +0300 @@ -153,12 +153,12 @@ /** * executes findbox activation */ - void ActivateFindPaneL( TBool aActivateAdabtive = EFalse ); + void ActivateFindPaneL( TBool aActivateAdaptive = EFalse ); /** * executes findbox deactivation */ - void DeactivateFindPaneL(); + void DeactivateFindPaneL(TBool aLayout = ETrue); /** * sorts the widget list in alphabetical order @@ -194,6 +194,13 @@ public: + /** + * Handles focus changed events. + * + * @see CCoeControl::FocusChanged + */ + void FocusChanged( TDrawNow aDrawNow ); + /** * Handles key events. * @@ -302,6 +309,7 @@ void StartLoadingWidgetsL(); void RemoveCtrlsFromStack(); void UpdateFocusMode(); + void ResetFocus( TDrawNow aDrawNow = ENoDrawNow ); CCoeControl* FindChildControlByPoint( const TPoint& aPoint ); void HandleFindSizeChanged(); TKeyResponse MoveFocusByKeys( @@ -316,6 +324,8 @@ TKeyResponse HandleSearchKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); + TInt OperatorButtonHigherPriority( TInt aIndex ); + private: /** diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmmaincontainerview.h --- a/idlehomescreen/widgetmanager/inc/wmmaincontainerview.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmmaincontainerview.h Wed May 12 13:12:59 2010 +0300 @@ -21,8 +21,8 @@ #include - class CWmMainContainer; +class CWmSpBgCleaner; class CWmPlugin; /** @@ -103,13 +103,6 @@ TUid aCustomMessageId, const TDesC8& aCustomMessage ); - /** - * Event handler for status pane size changes. - * - * @see CAknView::HandleStatusPaneSizeChange - */ - void HandleStatusPaneSizeChange(); - protected: // From MEikMenuObserver /* * Menu observer interface. @@ -139,6 +132,11 @@ */ CWmMainContainer* iWmMainContainer; + /** + * Statuspane background cleaner + */ + CWmSpBgCleaner* iWmSpBgCleaner; + /** * the plugin root (not owned) */ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmportalbutton.h --- a/idlehomescreen/widgetmanager/inc/wmportalbutton.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmportalbutton.h Wed May 12 13:12:59 2010 +0300 @@ -20,7 +20,8 @@ #define ___WMPORTALBUTTON_H__ #include // CAknButton -#include "wmimageconverter.h" +#include //MAknServerAppExitObserver + #include "wmcommon.h" // FORWARD DECLARATIONS @@ -28,6 +29,8 @@ class CFbsBitmap; class CWmConfiguration; class CWmProcessMonitor; +class CBrowserLauncher; +class CWmImageConverter; /** * Portal button ( ovi, operator ) class for Wm @@ -35,8 +38,8 @@ * @class CWmPortalButton wmportalbutton.h */ NONSHARABLE_CLASS( CWmPortalButton ) : public CAknButton, - public MConverterObserver, - public MCoeControlObserver + public MCoeControlObserver, + public MAknServerAppExitObserver { public: /* @@ -73,16 +76,16 @@ */ void ExecuteL(); -protected: // from MConverterObserver - - /** image conversin completed */ - void NotifyCompletion( TInt aError ); - protected: // from MCoeControlObserver /** Observes the button's own activity */ void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); +protected: // from MAknServerAppExitObserver + + /** Observes when browser is exited */ + void HandleServerAppExit( TInt aReason ); + protected: // from CCoeControl /** Handles pointer events. */ @@ -110,14 +113,25 @@ const TDesC& aText, TAknTextComponentLayout& aLayout, TInt aMargin ) const; - /** Runs operator button action */ - void RunOperatorL( CWmConfiguration& aConf ); /** Runs ovi store launcher */ void RunOviL( CWmConfiguration& aConf ); /** Starts browser */ - void StartBrowserL( CWmConfiguration& aConf ); + void StartBrowserL( const TDesC& aUrl ); + + /** Starts operator application */ + void RunOperatorApplicationL( CWmConfiguration& aConf ); + + /** Starts rprocess by given values */ + void StartProcessL( TUid aUid, const TDesC& aParam ); + + /** + * Opens cwrt/wrt widget to fullscreen. + * @param aAppUid Uid of the widget + * @param aParams Optional parameters + * */ + void StartWidgetL( TUid aAppUid, const TDesC& aParams ); private: //data members @@ -142,8 +156,16 @@ /** icon mask */ CFbsBitmap* iButtonIconMask; - /** Monitors process */ - CWmProcessMonitor* iProcessMonitor; + /** + * Monitors process + */ + CWmProcessMonitor* iProcessMonitor; + + /** + * Broswer launcher. + */ + CBrowserLauncher* iBrowserLauncher; + }; #endif //___WMPORTALBUTTON_H__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmspbgcleaner.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/widgetmanager/inc/wmspbgcleaner.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,76 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: +* Declares statuspane's background cleaner. +* +*/ + +#ifndef __WMSPBGCLEANER_ +#define __WMSPBGCLEANER_ + +// Forward declarations + +/** + * Statuspane background cleaner. + * + * @class CWmSpBgCleaner wmspbgcleaner.h + */ +NONSHARABLE_CLASS( CWmSpBgCleaner ) : public CCoeControl + { +public: + /** + * Two-phased constructors. + */ + static CWmSpBgCleaner* NewL(); + static CWmSpBgCleaner* NewLC(); + + /** Destructor */ + ~CWmSpBgCleaner(); + +private: + /** constructor */ + CWmSpBgCleaner(); + + /** 2nd phase constructor */ + void ConstructL(); + + +protected: // from base class CCoeControl + + /** + * Handles a change to the control's resources + * + * @see CCoeControl::HandleResourceChange + */ + void HandleResourceChange( TInt aType ); + + /** + * Sets the control's extent, specifying a rectangle. + * + * @see CCoeControl::SizeChanged + */ + void SizeChanged(); + + /* + * Draws the control. + * + * @see CCoeControl::Draw + */ + void Draw( const TRect& aRect ) const; + +private: + + }; + +#endif // __WMSPBGCLEANERCTRL_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmwidgetdata.h --- a/idlehomescreen/widgetmanager/inc/wmwidgetdata.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmwidgetdata.h Wed May 12 13:12:59 2010 +0300 @@ -27,7 +27,6 @@ #include #include -#include "wmimageconverter.h" // FORWARD DECLARATIONS class CDictionaryFileStore; @@ -37,6 +36,7 @@ class CWmPersistentWidgetOrder; class RWidgetRegistryClientSession; class CWmResourceLoader; +class CWmImageConverter; // CLASS DECLARATION /** @@ -46,7 +46,6 @@ */ NONSHARABLE_CLASS( CWmWidgetData ) : public CBase - , public MConverterObserver { public: // types @@ -59,6 +58,14 @@ ECps // wrt widgets included in this category }; + /** wrt widget type */ + enum TWrtType + { + EUnIdentified, + EWgz, + EWgt + }; + public: // construction /** * static constructor @@ -139,7 +146,7 @@ /** * Init logo re-creation */ - void ReCreateLogo( const TSize& aSize ); + void UpdateLogo( const TSize& aSize, TBool aReCreateLogo ); /** * returns widget description @@ -185,7 +192,7 @@ inline const CHsContentInfo& HsContentInfo() const; /** widget name */ - inline const TDesC& Name() const; + const TDesC& Name() const; /** widget uid */ inline TUid Uid() const; @@ -199,6 +206,9 @@ /** widget type */ inline TWidgetType WidgetType() const; + /** wrt widget type */ + inline TWrtType WrtType() const; + /** running install animation index */ inline TInt InstallAnimationIndex() const; @@ -218,13 +228,8 @@ void VisualizeUninstallL(); /** stop uninstallation animation */ - void StopUninstallAnimationL(); + void StopUninstallAnimation(); -protected: // from MConverterObserver - - /** image conversin completed */ - void NotifyCompletion( TInt aError ); - private: // new functions /** uninstall animation related*/ @@ -243,16 +248,12 @@ /** Logo icon string handling */ void HandleIconString( const TDesC& aIconStr ); void FireDataChanged(); - static TInt TimeoutTick( TAny* aPtr ); private: // data members /* reference to resource loader */ CWmResourceLoader& iWmResourceLoader; - /* the image converter utility */ - CWmImageConverter* iImageConverter; - /* observes this widget representation (NOT OWNED) */ MWmWidgetDataObserver* iObserver; @@ -265,8 +266,11 @@ /** The CHsContentInfo that corresponds to this list row */ CHsContentInfo* iHsContentInfo; - /** type oif the widget */ + /** type of the widget */ TWidgetType iWidgetType; + + /** type of the wrt widget */ + TWrtType iWrtType; /** persistent order of widgets (used in sorting) */ const CWmPersistentWidgetOrder* iPersistentWidgetOrder; @@ -288,30 +292,15 @@ /** timer for updating animation */ CPeriodic* iAnimationTimer; - - /** timer for canceling image convertion */ - CPeriodic* iTimeoutTimer; - + /* uninstall animation index */ TInt iAnimationIndex; /** uninstallation switch */ TBool iAsyncUninstalling; - - /** logo changed switch */ - TBool iFireLogoChanged; - - /** - * ActiveSchedulerWait used to wait while logo image - * is being prepaired. - */ - CActiveSchedulerWait* iWait; - - /** - * Holds widget name. Used for restoring widget name - * if error has occurred during uninstallation. - */ - HBufC* iWidgetName; + + /* the image converter utility */ + CWmImageConverter* iImageConverter; }; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/inc/wmwidgetdata.inl --- a/idlehomescreen/widgetmanager/inc/wmwidgetdata.inl Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/inc/wmwidgetdata.inl Wed May 12 13:12:59 2010 +0300 @@ -27,10 +27,6 @@ inline const CHsContentInfo& CWmWidgetData::HsContentInfo() const { return *iHsContentInfo; } - /** widget name */ - inline const TDesC& CWmWidgetData::Name() const - { return iHsContentInfo->Name(); } - /** widget uid */ inline TUid CWmWidgetData::Uid() const { return UidFromString( iHsContentInfo->Uid() ); }; @@ -43,6 +39,10 @@ inline CWmWidgetData::TWidgetType CWmWidgetData::WidgetType() const { return iWidgetType; } + /** wrt widget type */ + inline CWmWidgetData::TWrtType CWmWidgetData::WrtType() const + { return iWrtType; } + /** the logo bitmap */ inline const CFbsBitmap* CWmWidgetData::LogoImage() { return iLogoImage; } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmconfiguration.cpp --- a/idlehomescreen/widgetmanager/src/wmconfiguration.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmconfiguration.cpp Wed May 12 13:12:59 2010 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include // widget reqistry #include #include @@ -35,6 +36,14 @@ const TInt KLangGroupSize = KLangId1 - KLangId0; const TUint32 KLastLangId = KLangId9; +_LIT( KOpAppTypeS60, "s60" ); +_LIT( KOpAppTypeCwrt, "cwrt" ); +_LIT( KOpAppTypeWrt, "wrt" ); +_LIT( KOpAppTypeJava, "java" ); +_LIT( KOpAppTypeQt, "qt" ); +_LIT( KSeparator, ":" ); +_LIT( KOperatorIcon, "uid(%d)"); +_LIT( KHexPrefix, "0x" ); // --------------------------------------------------------- // CWmConfiguration::NewL @@ -58,14 +67,15 @@ CWmResourceLoader& aResourceLoader ) : iResourceLoader( aResourceLoader ) { - iRepository = NULL; + + // ovi iOviStoreUid = KNullUid; - iOviStoreClientParam = NULL; - iOviButtonTitle = NULL; - iOviButtonIcon = NULL; - iOperatorButtonTitle = NULL; - iOperatorButtonIcon = NULL; - iOperatorButtonUrl = NULL; + + // operator + iOperatorAppIdUid = KNullUid; + iOperatorAppType = EUnknown; + iOperatorButtonEnabled = EFalse; + iButtonsMirrored = EFalse; } // --------------------------------------------------------- @@ -75,12 +85,16 @@ CWmConfiguration::~CWmConfiguration() { delete iRepository; + // ovi delete iOviStoreClientParam; delete iOviButtonTitle; delete iOviButtonIcon; + // operator delete iOperatorButtonTitle; delete iOperatorButtonIcon; delete iOperatorButtonUrl; + delete iOperatorParam; + delete iOperatorAppIdStr; } // --------------------------------------------------------- @@ -118,18 +132,23 @@ iRepository = CRepository::NewL( TUid::Uid( KCrWidgetManagerm ) ); - // read fixed parameters - ReadIntParameter( KOviStoreUid, iOviStoreUid.iUid ); + // read Ovi parameters + ReadInt32Parameter( KOviStoreUid, iOviStoreUid.iUid ); iOviStoreClientParam = ReadDescParameterL( KOviStoreClientParam ); - // determine language and read localised parameters - iLanguageIndex = FindCorrectLanguageId(); - iOperatorButtonTitle = ReadLocalisedParameterL( KLangOffsetOperatorText ); - iOperatorButtonUrl = ReadLocalisedParameterL( KLangOffsetOperatorUrl ); - - if ( iOperatorButtonUrl && iOperatorButtonUrl->Length() > 0 ) + + // read operator parameters if operator button enabled + ReadIntParameter( KOperatorButtonEnabled, iOperatorButtonEnabled ); + if ( iOperatorButtonEnabled ) { - // construct the operator button icon. + // determine language and read localised parameters + iLanguageIndex = FindCorrectLanguageId(); + iOperatorButtonTitle = ReadLocalisedParameterL( KLangOffsetOperatorText ); + iOperatorButtonUrl = ReadLocalisedParameterL( KLangOffsetOperatorUrl ); + // read non-localised parameters iOperatorButtonIcon = ReadDescParameterL( KOperatorButtonIcon ); + ReadOperatorApplicationInfoL(); + iOperatorParam = ReadDescParameterL( KOperatorParam ); + ReadIntParameter( KOperatorButtonHigherPriority, iButtonsMirrored ); } delete iRepository; @@ -191,17 +210,26 @@ } // --------------------------------------------------------- +// CWmConfiguration::ReadInt32ParameterIntL +// --------------------------------------------------------- +// +void CWmConfiguration::ReadInt32Parameter( TInt aKey, TInt32& aValue ) + { + TInt value = 0; + if ( iRepository->Get( aKey, value ) == KErrNone ) + { + aValue = value; + } + } + +// --------------------------------------------------------- // CWmConfiguration::ReadIntParameterIntL // --------------------------------------------------------- // -void CWmConfiguration::ReadIntParameter( TInt aKey, TInt32& aValue ) +void CWmConfiguration::ReadIntParameter( TInt aKey, TInt& aValue ) { - TInt read = KErrNone; - TInt err = iRepository->Get( aKey, read ); - if( err == KErrNone ) - { - aValue = read; - } + aValue = 0; + iRepository->Get( aKey, aValue ); } // --------------------------------------------------------- @@ -231,14 +259,102 @@ } // --------------------------------------------------------- +// CWmConfiguration::ReadOperatorApplicationInfoL +// --------------------------------------------------------- +// +void CWmConfiguration::ReadOperatorApplicationInfoL() + { + HBufC* applicationInfo = ReadDescParameterL( KOperatorAppTypeAndId ); + if ( applicationInfo && applicationInfo->Des().Length() > 0 ) + { + CleanupStack::PushL( applicationInfo ); + applicationInfo->Des().TrimAll(); + + // parse + TInt separator = applicationInfo->Des().Find( KSeparator ); + if ( separator != KErrNotFound ) + { + TPtrC type = applicationInfo->Des().Left( separator ); + TPtrC appId = applicationInfo->Des().Mid( + separator + KSeparator().Length() ); + + if ( !type.Compare( KOpAppTypeS60 ) ) + { + iOperatorAppType = ES60; + iOperatorAppIdUid = StringToUid( appId ); + SetOperatorIconL( iOperatorAppIdUid ); + } + else if ( !type.Compare( KOpAppTypeCwrt ) ) + { + iOperatorAppType = ECwrt; + iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId ); + SetOperatorIconL( iOperatorAppIdUid ); + } + else if ( !type.Compare( KOpAppTypeWrt ) ) + { + iOperatorAppType = EWrt; + iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId ); + SetOperatorIconL( iOperatorAppIdUid ); + } + else if ( !type.Compare( KOpAppTypeJava ) ) + { + //TODO: java support is not fully implemented + User::Leave( KErrGeneral ); + iOperatorAppType = EJava; + iOperatorAppIdStr = appId.AllocL(); + } + else if ( !type.Compare( KOpAppTypeQt ) ) + { + iOperatorAppType = EQt; + iOperatorAppIdUid = StringToUid( appId ); + SetOperatorIconL( iOperatorAppIdUid ); + } + } + CleanupStack::PopAndDestroy( applicationInfo ); + } + } + +// --------------------------------------------------------- +// CWmConfiguration::SetOperatorIcon +// --------------------------------------------------------- +// +void CWmConfiguration::SetOperatorIconL( TUid aUid ) + { + if ( iOperatorButtonIcon && + !iOperatorButtonIcon->Des().Length() ) + { + delete iOperatorButtonIcon; + iOperatorButtonIcon = NULL; + iOperatorButtonIcon = HBufC::NewL( + KMaxUidName + KOperatorIcon().Length() ); + iOperatorButtonIcon->Des().Format( + KOperatorIcon(), aUid ); + } + } + +// --------------------------------------------------------- +// CWmConfiguration::FetchWidgetUidFromRegistryL +// --------------------------------------------------------- +// +TUid CWmConfiguration::FetchWidgetUidFromRegistryL( + const TDesC& aBundleId ) + { + RWidgetRegistryClientSession clientSession; + User::LeaveIfError( clientSession.Connect() ); + CleanupClosePushL( clientSession ); + TInt ret = clientSession.GetWidgetUidL( aBundleId ); + clientSession.Disconnect(); + CleanupStack::PopAndDestroy( &clientSession ); + return TUid::Uid( ret ); + } + +// --------------------------------------------------------- // CWmConfiguration::PortalButtonCount // --------------------------------------------------------- // TInt CWmConfiguration::PortalButtonCount() { - if ( iOperatorButtonUrl && iOperatorButtonUrl->Length() > 0 ) - return 2; - return 1; + return ( iOperatorButtonEnabled ? 2 : 1 ); } // --------------------------------------------------------- @@ -247,10 +363,9 @@ // const TDesC& CWmConfiguration::PortalButtonText( TInt aIndex ) { - IndexConversion( aIndex ); if ( aIndex == 0 && iOviButtonTitle ) return *iOviButtonTitle; - if ( aIndex == 1 && iOperatorButtonTitle ) + if ( aIndex == 1 && iOperatorButtonTitle && iOperatorButtonEnabled ) return *iOperatorButtonTitle; return KNullDesC; } @@ -261,10 +376,9 @@ // const TDesC& CWmConfiguration::PortalButtonIcon( TInt aIndex ) { - IndexConversion( aIndex ); if ( aIndex == 0 && iOviButtonIcon ) return *iOviButtonIcon; - if ( aIndex == 1 && iOperatorButtonIcon ) + if ( aIndex == 1 && iOperatorButtonIcon && iOperatorButtonEnabled ) return *iOperatorButtonIcon; return KNullDesC; } @@ -275,7 +389,8 @@ // const TDesC& CWmConfiguration::PortalButtonBrowserUrl( TInt aIndex ) { - if ( aIndex == 1 && iOperatorButtonUrl ) + // No support for ovi here + if ( aIndex == 1 && iOperatorButtonUrl && iOperatorButtonEnabled ) return *iOperatorButtonUrl; return KNullDesC; } @@ -290,10 +405,8 @@ { return iOviStoreUid; } - // Operator client uid not supported. - // If operator client is a widget we can use widget registry - // to fetch uid of operator widget save it to member and return that here - + // operator not supported. Get operator data using + // PortalButtonApplicationInfoL return KNullUid; } @@ -307,25 +420,93 @@ { return *iOviStoreClientParam; } - // Operator client param not supported. Can be added if needed. + if ( aIndex == 1 && iOperatorParam && iOperatorButtonEnabled ) + { + return *iOperatorParam; + } return KNullDesC; } +// --------------------------------------------------------- +// CWmConfiguration::PortalButtonsMirrored +// --------------------------------------------------------- +// +TBool CWmConfiguration::PortalButtonsMirrored() + { + return iButtonsMirrored; + } + +// --------------------------------------------------------- +// CWmConfiguration::PortalButtonApplicationType +// --------------------------------------------------------- +// +CWmConfiguration::TOpAppType CWmConfiguration::PortalButtonApplicationType( + TInt aIndex ) + { + if ( aIndex == 1 ) + { + return iOperatorAppType; + } + // no support for ovi + return EUnknown; + } + +// --------------------------------------------------------- +// CWmConfiguration::PortalButtonApplicationId +// --------------------------------------------------------- +// +void CWmConfiguration::PortalButtonApplicationId( + TInt aIndex, TDes& aOperatorAppId ) + { + if ( aIndex == 1 ) + { + aOperatorAppId.Copy( *iOperatorAppIdStr ); + } + // no support for ovi + } + +// --------------------------------------------------------- +// CWmConfiguration::PortalButtonApplicationId +// --------------------------------------------------------- +// +void CWmConfiguration::PortalButtonApplicationId( + TInt aIndex, TUid& aOperatorAppId ) + { + if ( aIndex == 1 ) + { + aOperatorAppId = iOperatorAppIdUid; + } + // no support for ovi + } + +// --------------------------------------------------------- +// CWmConfiguration::StringToUid +// --------------------------------------------------------- +// +TUid CWmConfiguration::StringToUid( const TDesC& aStr ) + { + if ( aStr.Length() > 0 && aStr.Find( KHexPrefix ) == 0 ) + { + // hex value 0x12345678 + TLex lex( aStr.Mid( KHexPrefix().Length() ) ); + TUint id = 0; + if ( lex.Val( id, EHex ) == KErrNone ) + { + return TUid::Uid( (TInt)id ); + } + } + else if ( aStr.Length() > 0 ) + { + TLex lex( aStr ); + TUint id( 0 ); + if ( KErrNone == lex.Val( id ) ) + { + return TUid::Uid( (TInt)id ); + } + } + return KNullUid; + } + -// --------------------------------------------------------- -// CWmConfiguration::IndexConversion -// --------------------------------------------------------- -// -void CWmConfiguration::IndexConversion( TInt& /*aIndex*/ ) - { - // if there is a need to configure switching button places - // (operator button left, then OVI button) then this method - // would have something like this: - - // if ( iSwitchButtons ) aIndex = 1 - aIndex; - - // but for now, this method is empty. - } - // End of File diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmdetailsdlg.cpp --- a/idlehomescreen/widgetmanager/src/wmdetailsdlg.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmdetailsdlg.cpp Wed May 12 13:12:59 2010 +0300 @@ -30,8 +30,10 @@ #include #include #include + #include "widgetmanager.hrh" #include "wmdetailsdlg.h" +#include "wmimageconverter.h" // CONSTANTS @@ -47,12 +49,18 @@ const TDesC& aName, const TDesC& aDescription, TBool aCanBeAdded, - const CFbsBitmap* aLogoBmp, - const CFbsBitmap* aLogoMask ) + const TDesC& aIconStr, + const CFbsBitmap& aDefaultIcon, + const CFbsBitmap& aDefaultIconMask ) { CWmDetailsDlg* self = new ( ELeave ) CWmDetailsDlg( aCanBeAdded ); CleanupStack::PushL( self ); - self->ConstructL( aName, aDescription, aLogoBmp, aLogoMask ); + self->ConstructL( + aName, + aDescription, + aIconStr, + aDefaultIcon, + aDefaultIconMask ); CleanupStack::Pop( self ); return self; } @@ -61,7 +69,7 @@ // CWmDetailsDlg::CWmDetailsDlg // --------------------------------------------------------- // -CWmDetailsDlg::CWmDetailsDlg( TBool aCanBeAdded ) +CWmDetailsDlg::CWmDetailsDlg( TBool aCanBeAdded ) : CAknDialog(), iCanBeAdded( aCanBeAdded ), iNeedToScroll( EFalse ) @@ -85,6 +93,7 @@ delete iLogoBmp; delete iLogoMask; delete iBgContext; + delete iImageConverter; } // ----------------------------------------------------------------------------- @@ -110,13 +119,10 @@ void CWmDetailsDlg::ConstructL( const TDesC& aName, const TDesC& aDescription, - const CFbsBitmap* aLogoBmp, - const CFbsBitmap* aLogoMask ) + const TDesC& aIconStr, + const CFbsBitmap& aDefaultIcon, + const CFbsBitmap& aDefaultIconMask ) { - if ( !aLogoBmp ) - { - User::Leave( KErrArgument ); - } CAknDialog::ConstructL( R_AVKON_DIALOG_EMPTY_MENUBAR ); @@ -125,21 +131,61 @@ iName = aName.AllocL(); iDescription = aDescription.AllocL(); - - // create bitmap and duplicate handle - iLogoBmp = new ( ELeave ) CFbsBitmap; - TSize newSize = TSize( aLogoBmp->SizeInPixels().iWidth , - aLogoBmp->SizeInPixels().iHeight ); - User::LeaveIfError( iLogoBmp->Create( newSize, aLogoBmp->DisplayMode() ) ); - User::LeaveIfError( iLogoBmp->Duplicate( aLogoBmp->Handle() ) ); + + iImageConverter = CWmImageConverter::NewL(); - if ( aLogoMask ) + // Main window + TRect mainPane; + AknLayoutUtils::LayoutMetricsRect( + AknLayoutUtils::EApplicationWindow, mainPane ); + + // Dialog + TAknLayoutRect dlgWindowRect; + TAknWindowLineLayout dlgWindow = AknLayoutScalable_Apps + ::popup_wgtman_window().LayoutLine(); + dlgWindowRect.LayoutRect( mainPane, dlgWindow ); + + // Heading + TAknLayoutRect layoutRect; + TAknWindowLineLayout headingPane = AknLayoutScalable_Apps + ::wgtman_heading_pane().LayoutLine(); + layoutRect.LayoutRect( dlgWindowRect.Rect(), headingPane ); + + // Icon + TAknLayoutRect iconRect; + TAknWindowLineLayout icongrapichs = AknLayoutScalable_Apps + ::wgtman_heading_pane_g1().LayoutLine(); + iconRect.LayoutRect( layoutRect.Rect(), icongrapichs ); + + iImageConverter->HandleIconString( + iconRect.Rect().Size(), + aIconStr, + iLogoBmp, + iLogoMask ); + + // if icon creation fails use defaults + if ( !iLogoBmp || !iLogoMask ) { - iLogoMask = new ( ELeave ) CFbsBitmap; - newSize = TSize( aLogoMask->SizeInPixels().iWidth , - aLogoMask->SizeInPixels().iHeight ); - User::LeaveIfError( iLogoMask->Create( newSize, aLogoMask->DisplayMode() ) ); - User::LeaveIfError( iLogoMask->Duplicate( aLogoMask->Handle() ) ); + delete iLogoBmp; iLogoBmp = NULL; + delete iLogoMask; iLogoMask = NULL; + + iLogoBmp = new ( ELeave ) CFbsBitmap; + iLogoMask = new ( ELeave ) CFbsBitmap; + + TSize size = iconRect.Rect().Size(); + User::LeaveIfError( + iLogoBmp->Create( size, aDefaultIcon.DisplayMode() ) ); + User::LeaveIfError( + iLogoMask->Create( size, aDefaultIconMask.DisplayMode() ) ); + + iLogoBmp->Duplicate( aDefaultIcon.Handle() ); + iLogoMask->Duplicate( aDefaultIconMask.Handle() ); + + // Resize default icons only when they are really needed + AknIconUtils::SetSize( + iLogoBmp, size, EAspectRatioPreserved ); + AknIconUtils::SetSize( + iLogoMask, size, EAspectRatioPreserved ); } iEikonEnv->AddWindowShadow( static_cast(this) ); @@ -180,12 +226,11 @@ EEikEdwinAvkonDisableCursor | EEikEdwinDisplayOnly | EEikEdwinReadOnly ); + iRtEditor->EnableKineticScrollingL( ETrue ); CEikScrollBarFrame* scrollBarFrame = iRtEditor->CreateScrollBarFrameL(); scrollBarFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, - CEikScrollBarFrame::EOff ); // set to EAuto - // when layout fixed. ~wk04_2010 - // currently scrollbar overlaps cba. + CEikScrollBarFrame::EAuto ); iMarquee = CAknMarqueeControl::NewL(); TCallBack callback( RedrawCallback, this ); @@ -225,18 +270,12 @@ TCharFormatMask charFormatMask; CParaFormat paraFormat; TParaFormatMask paraFormatMask; - if ( Layout_Meta_Data::IsMirrored() ) - { - paraFormat.iHorizontalAlignment = CParaFormat::ERightAlign; - } - else - { - paraFormat.iHorizontalAlignment = CParaFormat::ELeftAlign; - } + paraFormat.iHorizontalAlignment = CParaFormat::ELeftAlign; charFormat.iFontPresentation.iTextColor = color; paraFormatMask.SetAttrib(EAttAlignment); charFormatMask.SetAttrib(EAttFontTypeface); charFormatMask.SetAttrib(EAttFontHeight); + paraFormatMask.SetAttrib(EAttLineSpacing); charFormatMask.SetAttrib(EAttColor); iRtEditor->ApplyParaFormatL(¶Format, paraFormatMask); iRtEditor->ApplyCharFormatL(charFormat, charFormatMask); @@ -319,7 +358,10 @@ layoutRect.LayoutRect( rect, contentPane ); AknLayoutUtils::LayoutControl( iRtEditor, layoutRect.Rect(), rtePane ); CEikScrollBarFrame* sbFrame = iRtEditor->ScrollBarFrame(); - if ( sbFrame && sbFrame->VScrollBarVisibility() != CEikScrollBarFrame::EOff ) + if ( sbFrame && + sbFrame->ScrollBarVisibility( + CEikScrollBar::EVertical ) != CEikScrollBarFrame::EOff && + sbFrame->VerticalScrollBar()->IsVisible() ) { CEikScrollBar* scrollBar = sbFrame->VerticalScrollBar(); TAknWindowLineLayout scrollPane = AknLayoutScalable_Apps @@ -401,7 +443,6 @@ TRect rect = Rect(); TRect innerRect( rect ); TRgb color = KRgbBlack; - const TInt offSet = 5; MAknsSkinInstance* skin = AknsUtils::SkinInstance(); MAknsControlContext* cc = AknsDrawUtils::ControlContext( this ); @@ -423,12 +464,17 @@ ::wgtman_heading_pane().LayoutLine(); layoutRect.LayoutRect( rect, headingPane ); + TAknLayoutRect logoLayout; + logoLayout.LayoutRect( layoutRect.Rect(),AknLayoutScalable_Apps + ::wgtman_heading_pane_g1().LayoutLine() ); + if( iLogoBmp && iLogoMask ) { - TAknLayoutRect logoLayout; - logoLayout.LayoutRect( layoutRect.Rect(),AknLayoutScalable_Apps - ::wgtman_heading_pane_g1().LayoutLine() ); - logoLayout.DrawImage( gc, iLogoBmp, iLogoMask ); + gc.DrawBitmapMasked( logoLayout.Rect(), + iLogoBmp, + TRect(TPoint(0, 0), iLogoBmp->SizeInPixels()), + iLogoMask, + EFalse ); } AknsUtils::GetCachedColor( @@ -478,22 +524,6 @@ const TInt KBorderWidth = 2; gc.SetPenSize( TSize( KBorderWidth, KBorderWidth ) ); gc.DrawRoundRect( innerRect, TSize( KFrameRoundRadius, KFrameRoundRadius ) ); - - // draw shadow - gc.SetBrushStyle(CGraphicsContext::ESolidBrush); - gc.SetPenStyle( CGraphicsContext::ESolidPen ); - gc.SetBrushColor( color ); - gc.SetPenColor( color ); - TRect rightShadowArea = Rect(); - rightShadowArea.iTl.iX = rightShadowArea.iBr.iX - offSet; - rightShadowArea.iTl.iY += offSet/2; - gc.DrawRect(rightShadowArea); - TRect bottomShadowArea = Rect(); - bottomShadowArea.iTl.iX += offSet/2; - bottomShadowArea.iTl.iY += bottomShadowArea.iBr.iY - offSet; - gc.DrawRect( bottomShadowArea ); - gc.SetBrushStyle( CGraphicsContext::ENullBrush ); - gc.SetPenStyle( CGraphicsContext::ENullPen ); } // --------------------------------------------------------- @@ -547,14 +577,7 @@ void CWmDetailsDlg::FocusChanged( TDrawNow aDrawNow ) { CCoeControl::FocusChanged( aDrawNow ); - if ( IsFocused() ) - { - StartMarquee(); - } - else - { - StopMarquee(); - } + ( IsFocused() ? StartMarquee() : StopMarquee() ); } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmeffectmanager.cpp --- a/idlehomescreen/widgetmanager/src/wmeffectmanager.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmeffectmanager.cpp Wed May 12 13:12:59 2010 +0300 @@ -126,6 +126,12 @@ RemoveEffect( &aEffect ); return; } + + // Must give some time before starting effect, because otherwise + // fullscreen effect may contain unwanted parts (dialog, note, etc.) + // which was shown when fullscreen effect is about to be started + iCoeEnv.WsSession().Finish(); + User::After( 1 ); const TInt flags( AknTransEffect::TParameter::EActivateExplicitCancel ); const TUid targetAppUid( iAvkonAppUi->Application()->AppDllUid() ); diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmimageconverter.cpp --- a/idlehomescreen/widgetmanager/src/wmimageconverter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmimageconverter.cpp Wed May 12 13:12:59 2010 +0300 @@ -44,12 +44,12 @@ // CWmImageConverter::NewL // --------------------------------------------------------- // -CWmImageConverter* CWmImageConverter::NewL( MConverterObserver* aObserver ) +CWmImageConverter* CWmImageConverter::NewL() { CWmImageConverter* self = new(ELeave) CWmImageConverter(); CleanupStack::PushL( self ); - self->ConstructL( aObserver ); + self->ConstructL(); CleanupStack::Pop(self); return self; } @@ -59,26 +59,19 @@ // --------------------------------------------------------- // CWmImageConverter::CWmImageConverter() - : CActive( EPriorityStandard ) { - iState = EIdle; iBitmap = NULL; iMask = NULL; - iObserver = NULL; - iConversionMethod = EUnrecognized; - CActiveScheduler::Add( this ); } // --------------------------------------------------------- // CWmImageConverter::ConstructL // --------------------------------------------------------- // -void CWmImageConverter::ConstructL( MConverterObserver* aObserver ) +void CWmImageConverter::ConstructL() { User::LeaveIfError( iFs.Connect() ); iFs.ShareProtected(); - iScaler = CBitmapScaler::NewL(); - iObserver = aObserver; } // --------------------------------------------------------- @@ -87,8 +80,6 @@ // CWmImageConverter::~CWmImageConverter() { - Cancel(); - delete iImageDecoder; iFs.Close(); if ( iBitmap ) { @@ -100,7 +91,6 @@ delete iMask; iMask = NULL; } - delete iScaler; } // --------------------------------------------------------- @@ -108,14 +98,26 @@ // --------------------------------------------------------- // TInt CWmImageConverter::HandleIconString( - TInt aWidth, TInt aHeight, - const TDesC& aIconStr ) + const TSize& aIconSize, + const TDesC& aIconStr, + CFbsBitmap*& aBitmap, + CFbsBitmap*& aMask ) { + delete aBitmap; aBitmap = NULL; + delete aMask; aMask = NULL; + TInt err( KErrNone ); - TRAP( err, HandleIconStringL( aWidth, aHeight, aIconStr ); ); - if ( KErrNone != err ) + TRAP( err, HandleIconStringL( aIconSize, aIconStr ); ); + if ( err == KErrNone && iBitmap && iMask ) { - iState = EFailed; + // ownership transferred + aBitmap = iBitmap; + iBitmap = NULL; + aMask = iMask; + iMask = NULL; + } + else + { if ( iBitmap ) { delete iBitmap; @@ -127,6 +129,7 @@ iMask = NULL; } } + return err; } @@ -135,11 +138,9 @@ // --------------------------------------------------------- // void CWmImageConverter::HandleIconStringL( - TInt aWidth, TInt aHeight, + const TSize& aIconSize, const TDesC& aIconStr ) { - iConversionMethod = EUnrecognized; - iState = EDecoding; if ( aIconStr.Length() ) { TAknsItemID skinItemId; @@ -149,36 +150,26 @@ TInt maskId( KErrNotFound ); TUid appUid; iFilename = KNullDesC; - iScaleNeeded = EFalse; - iSize.SetSize( aWidth, aHeight ); + iSize = aIconSize; if ( ResolveSkinIdAndMifId( aIconStr, skinItemId, bitmapId, maskId, iFilename ) ) { - if ( bitmapId >= 0 && skinItemId.iMajor > 0 ) - iConversionMethod = ESkinAndMifIcon; - else if ( bitmapId >= 0 ) - iConversionMethod = EMifIcon; - else - iConversionMethod = ESkinIcon; CreateSkinOrMifIconL( skinItemId, bitmapId, maskId, iFilename ); } else if ( ResolveUid( aIconStr, appUid ) ) { - iConversionMethod = EUidIcon; CreateIconFromUidL( appUid ); } else if ( EndsWith( aIconStr, KSvgExt ) ) { // filename_with_full_path.svg - iConversionMethod = ESvgIcon; CreateIconFromSvgL( aIconStr ); } else if ( BaflUtils::FileExists( iFs, aIconStr ) ) { // filename_with_full_path.png/jpg - iConversionMethod = EImageIcon; CreateIconFromOtherL( aIconStr ); } else @@ -201,7 +192,6 @@ CFbsBitmap* bitmap = NULL; CFbsBitmap* mask = NULL; - if ( aUid.iUid >= KWidgetUidLowerBound && aUid.iUid < KWidgetUidUpperBound ) { @@ -232,34 +222,20 @@ User::LeaveIfError( lsSession.GetAppIcon( aUid, size, *maskedBmp ) ); // handle bitmap - iBitmap = new ( ELeave ) CFbsBitmap; - User::LeaveIfError( iBitmap->Create( - maskedBmp->SizeInPixels(), - maskedBmp->DisplayMode() ) ); - - // scale bitmap - ScaleBitmapL( iSize, iBitmap, maskedBmp ); - + iBitmap = new ( ELeave ) CFbsBitmap; + CopyBitmapL( *iBitmap, *maskedBmp ); + // handle mask if ( maskedBmp->Mask() ) { iMask = new ( ELeave ) CFbsBitmap; - User::LeaveIfError( iMask->Create( - maskedBmp->Mask()->SizeInPixels(), - maskedBmp->Mask()->DisplayMode() ) ); - - // scale mask - ScaleBitmapL( iSize, iMask, maskedBmp->Mask() ); + CopyBitmapL( *iMask, *maskedBmp->Mask() ); } // cleanup CleanupStack::PopAndDestroy( maskedBmp ); CleanupStack::PopAndDestroy( sizeArray ); CleanupStack::PopAndDestroy( &lsSession ); - - // notify - iState = EIdle; - iObserver->NotifyCompletion( KErrNone ); } else if ( aUid.iUid != KNullUid.iUid ) { @@ -286,20 +262,14 @@ iBitmap = bitmap; iMask = mask; - - err = AknIconUtils::SetSize( iBitmap , iSize, EAspectRatioNotPreserved ); + err = AknIconUtils::SetSize( iBitmap , iSize, EAspectRatioPreserved ); if ( KErrNone == err ) { - err = AknIconUtils::SetSize( iMask , iSize, EAspectRatioNotPreserved ); + err = AknIconUtils::SetSize( iMask , iSize, EAspectRatioPreserved ); } - - // notify observer - iState = EIdle; - iObserver->NotifyCompletion( err ); } else { - iState = EIdle; User::Leave( KErrArgument ); } } @@ -363,8 +333,152 @@ iBitmap = bitmap; iMask = mask; - iState = EIdle; - iObserver->NotifyCompletion( KErrNone ); + } + +// --------------------------------------------------------- +// CWmImageConverter::CreateIconFromOtherL +// --------------------------------------------------------- +// +void CWmImageConverter::CreateIconFromOtherL( const TDesC& aFileName ) + { + if (iBitmap) {delete iBitmap; iBitmap = NULL;} + if (iMask) {delete iMask; iMask = NULL;} + + iFilename.Copy( aFileName ); + + // create the decoder + CImageDecoder* imageDecoder = CImageDecoder::FileNewL( + iFs, iFilename, CImageDecoder::EOptionAlwaysThread ); + CleanupStack::PushL( imageDecoder ); + + TSize size = imageDecoder->FrameInfo().iOverallSizeInPixels; + + // create the destination bitmap + iBitmap = new (ELeave) CFbsBitmap(); + User::LeaveIfError( iBitmap->Create( + size, imageDecoder->FrameInfo().iFrameDisplayMode ) ); + + iMask = new (ELeave) CFbsBitmap(); + User::LeaveIfError( iMask->Create( size, EGray256 ) ); + + // start conversion to bitmap + TRequestStatus status; + imageDecoder->Convert( &status, *iBitmap, *iMask ); + User::WaitForRequest( status ); + if( status.Int() == KErrUnderflow ) + { + imageDecoder->ContinueConvert( &status ); + User::WaitForRequest( status ); + } + User::LeaveIfError( status.Int() ); + CleanupStack::PopAndDestroy( imageDecoder ); + } + +// --------------------------------------------------------------------------- +// CWmImageConverter::CreateSkinOrMifIconL +// --------------------------------------------------------------------------- +// +void CWmImageConverter::CreateSkinOrMifIconL( + const TAknsItemID& aItemId, TInt aBitmapId, + TInt aMaskId, const TDesC& aFileName ) + { + iFilename = aFileName; + CFbsBitmap* bitmap = NULL; + CFbsBitmap* mask = NULL; + + // Load from skin + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + if ( skin && aItemId.iMajor != 0 && aItemId.iMinor != 0 ) + { + TInt err( KErrNone ); + CAknsMaskedBitmapItemData* itemData = NULL; + TRAP( err, itemData = + static_cast( + skin->CreateUncachedItemDataL( aItemId, EAknsITMaskedBitmap ) ); ); + if( itemData && KErrNone == err ) + { + CleanupStack::PushL( itemData ); + // Detach bitmaps + bitmap = itemData->Bitmap(); + itemData->SetBitmap( NULL ); + mask = itemData->Mask(); + itemData->SetMask( NULL ); + CleanupStack::PopAndDestroy( itemData ); + } + else + { + // look in imagetable + CAknsImageTableItemData* iconData = NULL; + TRAP( err, iconData = static_cast( + skin->CreateUncachedItemDataL( aItemId, EAknsITImageTable ) ); ); + if( iconData && KErrNone == err ) + { + CleanupStack::PushL( iconData ); + if( iconData->NumberOfImages() ) + { + TAknsItemID iconIId; + iconIId.Set( iconData->ImageIID(0) ); + TRAP( err, AknsUtils::CreateIconL( + skin, iconIId, bitmap, mask, KNullDesC, -1, -1 ); ); + } + CleanupStack::PopAndDestroy( iconData ); + } + } + + if ( KErrNone == err && bitmap ) + { + TInt err = AknIconUtils::SetSize( + bitmap, + iSize, + EAspectRatioPreserved ); + if ( KErrNone == err ) + { + if ( mask ) + { + err = AknIconUtils::SetSize( + mask, + iSize, + EAspectRatioPreserved ); + } + iBitmap = bitmap; + iMask = mask; + return; + } + else + { + if ( bitmap ) { delete bitmap; bitmap = NULL; } + if ( mask ){ delete mask; mask = NULL; } + } + } + } + + if( aBitmapId != KErrNotFound && !bitmap && + aFileName.Length() && BaflUtils::FileExists( iFs, aFileName ) ) + { + if ( aMaskId != KErrNotFound ) + { + // Create icon from Mif filename , bitmap id and mask id + AknIconUtils::CreateIconL( + bitmap, mask, *this, aBitmapId, aMaskId ); + } + else + { + bitmap = AknIconUtils::CreateIconL( *this, aBitmapId ); + } + } + else + { + User::Leave( KErrArgument ); + } + + iBitmap = bitmap; + iMask = mask; + + TInt err = AknIconUtils::SetSize( iBitmap , iSize, EAspectRatioPreserved ); + if ( KErrNone == err && iMask ) + { + err = AknIconUtils::SetSize( iMask , iSize, EAspectRatioPreserved ); + } } // --------------------------------------------------------- @@ -380,263 +494,6 @@ } // --------------------------------------------------------- -// CWmImageConverter::CreateIconFromOtherL -// --------------------------------------------------------- -// -void CWmImageConverter::CreateIconFromOtherL( const TDesC& aFileName ) - { - if ( IsActive() ) - { - User::Leave( KErrNotReady ); - } - - if ( iImageDecoder ) delete iImageDecoder; iImageDecoder = NULL; - if (iBitmap) {delete iBitmap; iBitmap = NULL;} - if (iMask) {delete iMask; iMask = NULL;} - - iFilename.Copy( aFileName ); - - // create the decoder - iImageDecoder = CImageDecoder::FileNewL( iFs, iFilename ); - - TSize size = iImageDecoder->FrameInfo().iOverallSizeInPixels; - - // create the destination bitmap - iBitmap = new (ELeave) CFbsBitmap(); - iBitmap->Create( size, - iImageDecoder->FrameInfo().iFrameDisplayMode ); - - iMask = new (ELeave) CFbsBitmap(); - iMask->Create( size, EGray256 ); - - if ( size != iSize ) - { - iScaleNeeded = ETrue; - } - - // start conversion to bitmap - iImageDecoder->Convert( &iStatus, *iBitmap, *iMask ); - SetActive(); - } - -// --------------------------------------------------------- -// CWmImageConverter::DoCancel -// --------------------------------------------------------- -// -void CWmImageConverter::DoCancel() - { - if( iState == EDecoding && - iConversionMethod == EImageIcon ) - { - iImageDecoder->Cancel(); - iState = EIdle; - if ( iObserver ) - { - iObserver->NotifyCompletion( KErrCancel ); - } - } - else if( iState == EScalingBitmap || - iState == EScalingMask ) - { - iScaler->Cancel(); - iState = EIdle; - if ( iObserver ) - { - iObserver->NotifyCompletion( KErrCancel ); - } - } - else - { - // State is EIdle, do nothing - } - iScaleNeeded = EFalse; - } - -// --------------------------------------------------------- -// CWmImageConverter::RunL -// --------------------------------------------------------- -// -void CWmImageConverter::RunL() - { - switch( iState ) - { - case EDecoding: - { - if( iStatus.Int() == KErrNone ) - { - if ( iScaleNeeded ) - { - ScaleBitmap( iSize.iWidth, iSize.iHeight ); - } - else - { - iState = EIdle; - if ( iObserver ) - { - iObserver->NotifyCompletion( KErrNone ); - } - } - break; - } - else if( iStatus.Int() == KErrUnderflow ) - { - iImageDecoder->ContinueConvert( &iStatus ); - SetActive(); - break; - } - else if ( iStatus.Int() == KErrCorrupt ) - { - iState = EIdle; - iScaleNeeded = EFalse; - if ( iBitmap ) - { - delete iBitmap; - iBitmap = NULL; - } - if ( iMask ) - { - delete iMask; - iMask = NULL; - } - if ( iObserver ) - { - iObserver->NotifyCompletion( KErrCorrupt ); - } - break; - } - else - { - // Unknown error - iState = EIdle; - iScaleNeeded = EFalse; - if ( iBitmap ) - { - delete iBitmap; - iBitmap = NULL; - } - if ( iMask ) - { - delete iMask; - iMask = NULL; - } - if ( iObserver ) - { - iObserver->NotifyCompletion( iStatus.Int() ); - } - break; - } - } - case EScalingBitmap: - { - if( iStatus.Int() == KErrNone && iMask ) - { - ScaleMask( iSize.iWidth, iSize.iHeight ); - } - else - { - iState = EIdle; - iScaleNeeded = EFalse; - if ( iObserver ) - { - iObserver->NotifyCompletion( iStatus.Int() ); - } - } - break; - } - case EScalingMask: - { - iState = EIdle; - iScaleNeeded = EFalse; - if ( iObserver ) - { - iObserver->NotifyCompletion( iStatus.Int() ); - } - break; - } - default: - break; - } - } - -// --------------------------------------------------------- -// CWmImageConverter::RunError -// --------------------------------------------------------- -// -TInt CWmImageConverter::RunError(TInt /*aError*/) - { - // Our RunL does not contain any method calls that would leave, so this method - // should never be called. - iScaleNeeded = EFalse; - return KErrNone; - } - -// --------------------------------------------------------- -// CWmImageConverter::ScaleBitmap -// --------------------------------------------------------- -// -void CWmImageConverter::ScaleBitmap( TInt aWidth, TInt aHeight ) - { - if ( !IsActive() && - iBitmap && - ( iState == EDecoding || iState == EIdle ) ) - { - iState = EScalingBitmap; - // the maintain aspect ratio is by default set to true - iScaler->Scale( &iStatus, *iBitmap, TSize( aWidth,aHeight ), EFalse ); - SetActive(); - } - } - -// --------------------------------------------------------- -// CWmImageConverter::ScaleMask -// --------------------------------------------------------- -// -void CWmImageConverter::ScaleMask( TInt aWidth, TInt aHeight ) - { - if ( !IsActive() && - iState == EScalingBitmap && - iMask ) - { - iState = EScalingMask; - // the maintain aspect ratio is by default set to true - iScaler->Scale( &iStatus, *iMask, TSize(aWidth,aHeight), EFalse ); - SetActive(); - } - } - -// --------------------------------------------------------- -// CWmImageConverter::Bitmap -// --------------------------------------------------------- -// -CFbsBitmap* CWmImageConverter::Bitmap() - { - CFbsBitmap* bitmap = NULL; - if (iState == EIdle && - iBitmap ) - { - bitmap = iBitmap; // ownership taken - iBitmap = NULL; - } - return bitmap; - } - -// --------------------------------------------------------- -// CWmImageConverter::Mask -// --------------------------------------------------------- -// -CFbsBitmap* CWmImageConverter::Mask() - { - CFbsBitmap* mask = NULL; - if (iState == EIdle && - iMask ) - { - mask = iMask; // ownership taken - iMask = NULL; - } - return mask; - } - -// --------------------------------------------------------- // CWmImageConverter::EndsWith // --------------------------------------------------------- // @@ -774,115 +631,6 @@ } // --------------------------------------------------------------------------- -// CWmImageConverter::CreateSkinOrMifIconL -// --------------------------------------------------------------------------- -// -void CWmImageConverter::CreateSkinOrMifIconL( - const TAknsItemID& aItemId, TInt aBitmapId, - TInt aMaskId, const TDesC& aFileName ) - { - iFilename = aFileName; - CFbsBitmap* bitmap = NULL; - CFbsBitmap* mask = NULL; - - // Load from skin - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - if ( skin && aItemId.iMajor != 0 && aItemId.iMinor != 0 ) - { - TInt err( KErrNone ); - CAknsMaskedBitmapItemData* itemData = NULL; - TRAP( err, itemData = - static_cast( - skin->CreateUncachedItemDataL( aItemId, EAknsITMaskedBitmap ) ); ); - if( itemData && KErrNone == err ) - { - CleanupStack::PushL( itemData ); - // Detach bitmaps - bitmap = itemData->Bitmap(); - itemData->SetBitmap( NULL ); - mask = itemData->Mask(); - itemData->SetMask( NULL ); - CleanupStack::PopAndDestroy( itemData ); - } - else - { - // look in imagetable - CAknsImageTableItemData* iconData = NULL; - TRAP( err, iconData = static_cast( - skin->CreateUncachedItemDataL( aItemId, EAknsITImageTable ) ); ); - if( iconData && KErrNone == err ) - { - CleanupStack::PushL( iconData ); - if( iconData->NumberOfImages() ) - { - TAknsItemID iconIId; - iconIId.Set( iconData->ImageIID(0) ); - TRAP( err, AknsUtils::CreateIconL( - skin, iconIId, bitmap, mask, KNullDesC, -1, -1 ); ); - } - CleanupStack::PopAndDestroy( iconData ); - } - } - - if ( KErrNone == err && bitmap ) - { - TInt err = AknIconUtils::SetSize( bitmap , iSize, EAspectRatioNotPreserved ); - if ( KErrNone == err ) - { - if ( mask ) - { - err = AknIconUtils::SetSize( mask , iSize, EAspectRatioNotPreserved ); - } - iBitmap = bitmap; - iMask = mask; - iState = EIdle; - // notify observer - iObserver->NotifyCompletion( KErrNone ); - return; - } - else - { - if ( bitmap ) { delete bitmap; bitmap = NULL; } - if ( mask ){ delete mask; mask = NULL; } - } - } - } - - if( aBitmapId != KErrNotFound && !bitmap && - aFileName.Length() && BaflUtils::FileExists( iFs, aFileName ) ) - { - if ( aMaskId != KErrNotFound ) - { - // Create icon from Mif filename , bitmap id and mask id - AknIconUtils::CreateIconL( - bitmap, mask, *this, aBitmapId, aMaskId ); - } - else - { - bitmap = AknIconUtils::CreateIconL( *this, aBitmapId ); - } - } - else - { - iState = EIdle; - User::Leave( KErrArgument ); - } - - iBitmap = bitmap; - iMask = mask; - - TInt err = AknIconUtils::SetSize( iBitmap , iSize, EAspectRatioNotPreserved ); - if ( KErrNone == err && iMask ) - { - err = AknIconUtils::SetSize( iMask , iSize, EAspectRatioNotPreserved ); - } - - iState = EIdle; - // notify observer - iObserver->NotifyCompletion( err ); - } - -// --------------------------------------------------------------------------- // CWmImageConverter::ParseNextUint() // --------------------------------------------------------------------------- // @@ -909,24 +657,6 @@ } // --------------------------------------------------------------------------- -// CWmImageConverter::SetLogoSize() -// --------------------------------------------------------------------------- -// -void CWmImageConverter::SetLogoSize( const TSize& aSize ) - { - iSize = aSize; - } - -// --------------------------------------------------------------------------- -// CWmImageConverter::ConversionMethod() -// --------------------------------------------------------------------------- -// -CWmImageConverter::TConversionMethod CWmImageConverter::ConversionMethod() - { - return iConversionMethod; - } - -// --------------------------------------------------------------------------- // CWmImageConverter::RetrieveIconFileHandleL // --------------------------------------------------------------------------- // @@ -937,293 +667,33 @@ EFileRead | EFileShareReadersOnly ); if ( KErrNone != err ) { - iState = EIdle; User::Leave( err ); } } // --------------------------------------------------------------------------- -// CWmImageConverter::DoesScaleBitmapUseFallBack -// --------------------------------------------------------------------------- -// -TBool CWmImageConverter::DoesScaleBitmapUseFallBack( CFbsBitmap* aSrcBitmap ) - { - if ( !aSrcBitmap ) - { - return EFalse; - } - - TDisplayMode displayMode = aSrcBitmap->DisplayMode(); - TBool fallbackOnly = EFalse; - - switch ( displayMode ) - { - case EGray2: - case EGray4: - case EGray16: - case EColor16: - case EColor16M: - case ERgb: - case EColor16MA: - fallbackOnly = ETrue; - break; - case EGray256: - case EColor4K: - case EColor64K: - case EColor256: - case EColor16MU: - // These are the supported modes - break; - default: - fallbackOnly = ETrue; - } - - return fallbackOnly; - } - - -// --------------------------------------------------------------------------- -// CWmImageConverter::ScaleBitmapL +// CWmImageConverter::CopyBitmapL // --------------------------------------------------------------------------- // -void CWmImageConverter::ScaleBitmapL( - const TSize& aSize, - CFbsBitmap* aTrgBitmap, - CFbsBitmap* aSrcBitmap ) +void CWmImageConverter::CopyBitmapL( + CFbsBitmap& aTrgBitmap, + CFbsBitmap& aSrcBitmap ) { - if ( !aSrcBitmap ) User::Leave( KErrArgument ); - if ( !aTrgBitmap ) User::Leave( KErrArgument ); - if ( aSrcBitmap->DisplayMode() != aTrgBitmap->DisplayMode() ) - { - User::Leave( KErrArgument ); - } - - // make target to correct size - if ( aTrgBitmap->SizeInPixels() != aSize ) - { - aTrgBitmap->Resize( aSize ); - } - - TRect targetRect( aSize ); - - // calculate aspect ratio - TInt srcHeight = aSrcBitmap->SizeInPixels().iHeight; - TInt srcWidth = aSrcBitmap->SizeInPixels().iWidth; - TReal scaleRatio( 1 ); //no scale as defaul - - //If any dimension is 0, then we do not bother to scale - if ( targetRect.Width() > 0 && targetRect.Height() > 0 ) - { - TReal xRatio = ( ( TReal )srcWidth / ( TReal )targetRect.Width() ); - TReal yRatio = ( ( TReal )srcHeight / ( TReal )targetRect.Height() ); - //Find out appropriate scaling factor - xRatio > yRatio ? ( scaleRatio = xRatio ) : ( scaleRatio = yRatio ); - } - - //Scale the size for target bitmap - targetRect.SetHeight( srcHeight / scaleRatio ); - targetRect.SetWidth( srcWidth / scaleRatio ); - - TSize trgBitmapSize = aTrgBitmap->SizeInPixels(); + TSize size( aSrcBitmap.SizeInPixels() ); + TDisplayMode displayMode( aSrcBitmap.DisplayMode() ); + User::LeaveIfError( aTrgBitmap.Create( size, displayMode ) ); - // calculate the valid drawing area - TRect drawRect = targetRect; - drawRect.Intersection( TRect( TPoint( 0, 0 ), trgBitmapSize ) ); - - if( drawRect.IsEmpty() || - aSrcBitmap->SizeInPixels().iHeight <= 0 || - aSrcBitmap->SizeInPixels().iWidth <= 0 ) - { - User::Leave( KErrArgument ); - } - - TSize srcSize = aSrcBitmap->SizeInPixels(); - - TBool srcTemporary = EFalse; - if ( aSrcBitmap->IsRomBitmap() ) - { - srcTemporary = ETrue; - } - - TDisplayMode displayMode = aSrcBitmap->DisplayMode(); - TBool fallbackOnly = DoesScaleBitmapUseFallBack( aSrcBitmap ); - - if ( fallbackOnly ) - { - CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL( aTrgBitmap ); - CleanupStack::PushL( dev ); - CFbsBitGc* gc = NULL; - User::LeaveIfError( dev->CreateContext( gc ) ); - CleanupStack::PushL( gc ); - - // write alpha information if it exists - if ( aSrcBitmap->DisplayMode() == EColor16MA ) - { - gc->SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); - } - - // targetRect is used because DrawBitmap handles clipping automatically - gc->DrawBitmap( targetRect, aSrcBitmap ); - CleanupStack::PopAndDestroy( 2 ); // dev, gc - return; - } - - // Heap lock for FBServ large chunk to prevent background - // compression of aSrcBitmap after if IsCompressedInRAM returns EFalse - aSrcBitmap->LockHeapLC( ETrue ); // fbsheaplock - TBool fbsHeapLock = ETrue; - if ( aSrcBitmap->IsCompressedInRAM() ) - { - srcTemporary = ETrue; - } - - CFbsBitmap* realSource = aSrcBitmap; - if ( srcTemporary ) - { - CleanupStack::PopAndDestroy(); // fbsheaplock - fbsHeapLock = EFalse; - - realSource = new ( ELeave ) CFbsBitmap(); - CleanupStack::PushL( realSource ); - User::LeaveIfError( - realSource->Create( srcSize, aSrcBitmap->DisplayMode() ) ); - CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL( realSource ); - CleanupStack::PushL( dev ); - CFbsBitGc* gc = NULL; - User::LeaveIfError( dev->CreateContext( gc ) ); - CleanupStack::PushL( gc ); - gc->BitBlt( TPoint( 0, 0 ), aSrcBitmap ); - CleanupStack::PopAndDestroy( 2 ); // dev, gc - } - - if ( !fbsHeapLock ) - { - // Heap lock for FBServ large chunk is only needed with large bitmaps. - if ( realSource->IsLargeBitmap() || aTrgBitmap->IsLargeBitmap() ) - { - aTrgBitmap->LockHeapLC( ETrue ); // fbsheaplock - } - else - { - CleanupStack::PushL( ( TAny* )NULL ); - } - } - - TUint32* srcAddress = realSource->DataAddress(); - TUint32* trgAddress = aTrgBitmap->DataAddress(); - - const TInt xSkip = ( srcSize.iWidth << 8 ) / targetRect.Width(); - const TInt ySkip = ( srcSize.iHeight << 8 ) / targetRect.Height(); - - const TInt drawWidth = drawRect.Width(); - const TInt drawHeight = drawRect.Height(); - - TRect offsetRect( targetRect.iTl, drawRect.iTl ); - const TInt yPosOffset = ySkip * offsetRect.Height(); - const TInt xPosOffset = xSkip * offsetRect.Width(); - - if ( ( displayMode == EGray256 ) || ( displayMode == EColor256 ) ) - { - TInt srcScanLen8 = CFbsBitmap::ScanLineLength( - srcSize.iWidth, displayMode ); - TInt trgScanLen8 = CFbsBitmap::ScanLineLength( - trgBitmapSize.iWidth, displayMode ); - - TUint8* trgAddress8 = reinterpret_cast< TUint8* >( trgAddress ); - - TInt yPos = yPosOffset; - // skip left and top margins in the beginning - trgAddress8 += trgScanLen8 * drawRect.iTl.iY + drawRect.iTl.iX; - - for ( TInt y = 0; y < drawHeight; y++ ) - { - TUint8* srcAddress8 = reinterpret_cast< TUint8* >( srcAddress ) + - ( srcScanLen8 * ( yPos >> 8 ) ); - - TInt xPos = xPosOffset; - for ( TInt x = 0; x < drawWidth; x++ ) - { - *( trgAddress8++ ) = srcAddress8[xPos >> 8]; - xPos += xSkip; - } - - yPos += ySkip; - - trgAddress8 += trgScanLen8 - drawWidth; - } - } - else if ( displayMode == EColor4K || displayMode == EColor64K ) - { - TInt srcScanLen16 = CFbsBitmap::ScanLineLength( - srcSize.iWidth, displayMode ) /2; - TInt trgScanLen16 = CFbsBitmap::ScanLineLength( - trgBitmapSize.iWidth, displayMode ) /2; - - TUint16* trgAddress16 = reinterpret_cast< TUint16* >( trgAddress ); - - TInt yPos = yPosOffset; - // skip left and top margins in the beginning - trgAddress16 += trgScanLen16 * drawRect.iTl.iY + drawRect.iTl.iX; - - for ( TInt y = 0; y < drawHeight; y++ ) - { - TUint16* srcAddress16 = reinterpret_cast< TUint16* >( srcAddress ) + - ( srcScanLen16 * ( yPos >> 8 ) ); - - TInt xPos = xPosOffset; - for ( TInt x = 0; x < drawWidth; x++ ) - { - *( trgAddress16++ ) = srcAddress16[xPos >> 8]; - xPos += xSkip; - } - - yPos += ySkip; - - trgAddress16 += trgScanLen16 - drawWidth; - } - } - else if ( displayMode == EColor16MU ) - { - TInt srcScanLen32 = CFbsBitmap::ScanLineLength( - srcSize.iWidth, displayMode ) /4; - TInt trgScanLen32 = CFbsBitmap::ScanLineLength( - trgBitmapSize.iWidth, displayMode ) /4; - - TUint32* trgAddress32 = reinterpret_cast< TUint32* >( trgAddress ); - - TInt yPos = yPosOffset; - // skip left and top margins in the beginning - trgAddress32 += trgScanLen32 * drawRect.iTl.iY + drawRect.iTl.iX; - - for ( TInt y = 0; y < drawHeight; y++ ) - { - TUint32* srcAddress32 = reinterpret_cast< TUint32* >( srcAddress ) + - ( srcScanLen32 * ( yPos >> 8 ) ); - - TInt xPos = xPosOffset; - for ( TInt x = 0; x < drawWidth; x++ ) - { - *( trgAddress32++ ) = srcAddress32[xPos >> 8]; - xPos += xSkip; - } - - yPos += ySkip; - - trgAddress32 += trgScanLen32 - drawWidth; - } - } - else - { - User::Leave( KErrUnknown ); - } - - CleanupStack::PopAndDestroy(); // fbsheaplock - - if ( srcTemporary ) - { - CleanupStack::PopAndDestroy(); // realSource - } - } + HBufC8* scanLine = HBufC8::NewL( aSrcBitmap.ScanLineLength( + size.iWidth, displayMode ) ); + TPtr8 scanPtr( scanLine->Des() ); + TPoint pp; + for( pp.iY = 0; pp.iY < size.iHeight; ++pp.iY ) + { + aSrcBitmap.GetScanLine( scanPtr, pp, size.iWidth, displayMode ); + aTrgBitmap.SetScanLine( scanPtr, pp.iY ); + } + delete scanLine; + } // --------------------------------------------------------------------------- // CWmImageConverter::Finished @@ -1235,13 +705,47 @@ } // --------------------------------------------------------------------------- -// CWmImageConverter::IsProcessing +// CWmImageConverter::UpdateImageSize // --------------------------------------------------------------------------- // -TBool CWmImageConverter::IsProcessing() +void CWmImageConverter::UpdateImageSize( + const TSize& aSize, + const TDesC& aIconStr, + CFbsBitmap& aBitmap, + CFbsBitmap& aMask ) { - return ( ( ( iState != EIdle && iState != EFailed ) || - IsActive() ) ? ETrue : EFalse ); + if ( aIconStr.Length() && iSize != aSize ) + { + TAknsItemID skinItemId; + skinItemId.iMajor = 0; + skinItemId.iMinor = 0; + TInt bitmapId( KErrNotFound ); + TInt maskId( KErrNotFound ); + TUid appUid; + iFilename = KNullDesC; + iSize = aSize; + + if ( ResolveSkinIdAndMifId( + aIconStr, skinItemId, bitmapId, maskId, iFilename ) ) + { + AknIconUtils::SetSize( &aBitmap, iSize ); + AknIconUtils::SetSize( &aMask, iSize ); + } + else if ( ResolveUid( aIconStr, appUid ) ) + { + if ( appUid.iUid >= KWidgetUidLowerBound && + appUid.iUid < KWidgetUidUpperBound ) + { + //WRT. No resize needed here + return; + } + else if ( appUid.iUid != KNullUid.iUid ) + { + AknIconUtils::SetSize( &aBitmap, iSize ); + AknIconUtils::SetSize( &aMask, iSize ); + } + } + } } // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wminstaller.cpp --- a/idlehomescreen/widgetmanager/src/wminstaller.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wminstaller.cpp Wed May 12 13:12:59 2010 +0300 @@ -17,6 +17,7 @@ */ #include +#include #include "wminstaller.h" #include "wmwidgetdata.h" @@ -26,6 +27,14 @@ // CONSTANTS _LIT8( KWrtMime, "application/x-nokia-widget"); +/* + Note: + same mime type as above is used for wgz & wgt in wk9. + \ext\mw\cwrt\app\platform\s60\WidgetRecognizer\ + Uninstalltion will fail with KErrNotFound for now. +*/ +_LIT8( KCWrtMime, "application/widget"); + // --------------------------------------------------------- // CWmInstaller::NewL // --------------------------------------------------------- @@ -68,7 +77,6 @@ // void CWmInstaller::ConstructL() { - iMime = KWrtMime().AllocL(); iIdle = CIdle::NewL( CActive::EPriorityStandard ); } @@ -110,16 +118,20 @@ // void CWmInstaller::RunL() { - // error has occurred, stop uninstallation animation. - if ( iStatus != KErrNone ) - { - CWmWidgetData* widget = iWmPlugin.GetUninstalledWidgetByUid( iUid ); - if ( widget ) - { - widget->StopUninstallAnimationL(); - } + // if error has occurred, stop uninstallation animation. + CWmWidgetData* widget = + iWmPlugin.GetUninstalledWidgetByUid( iUid ); + if ( widget ) + { + widget->StopUninstallAnimation(); } - + + if ( KErrNone != iStatus.Int() ) + { + // display error note incase of error + CEikonEnv::Static()->HandleError( iStatus.Int() ); + } + // close SWI session if ( iIdle && iIdle->IsActive() ) { @@ -151,7 +163,14 @@ // --------------------------------------------------------- // TInt CWmInstaller::RunError(TInt /*aError*/) - { + { + // if error has occurred, stop uninstallation animation. + CWmWidgetData* widget = + iWmPlugin.GetUninstalledWidgetByUid( iUid ); + if ( widget ) + { + widget->StopUninstallAnimation(); + } // close SWI session if ( iIdle && iIdle->IsActive() ) { @@ -172,9 +191,21 @@ { User::Leave( KErrInUse ); } + else if ( !aData || aData->PublisherUid() == KNullUid || + aData->WrtType() == CWmWidgetData::EUnIdentified ) + { + User::Leave( KErrArgument ); + } else { + delete iMime; + iMime = NULL; + CloseSwiSession( this ); + + // re-open session to swi server User::LeaveIfError( iInstaller.Connect() ); + iMime = ( ( aData->WrtType() == CWmWidgetData::EWgt ) ? + KCWrtMime().AllocL() : KWrtMime().AllocL() ); iUid = aData->PublisherUid(); SwiUI::TUninstallOptions optionsUninstall; optionsUninstall.iBreakDependency = SwiUI::EPolicyAllowed; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmlistbox.cpp --- a/idlehomescreen/widgetmanager/src/wmlistbox.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmlistbox.cpp Wed May 12 13:12:59 2010 +0300 @@ -146,26 +146,24 @@ } // --------------------------------------------------------- -// CWmListItemDrawer::ResizeDefaultBitmaps +// CWmListItemDrawer::UpdateItemHeight // --------------------------------------------------------- // -void CWmListItemDrawer::ResizeDefaultBitmaps() +void CWmListItemDrawer::UpdateItemHeight() { - TAknWindowLineLayout logoPane = - AknLayoutScalable_Apps::listrow_wgtman_pane_g1().LayoutLine(); + // sets item height according to layout + TAknWindowLineLayout listPane = AknLayoutScalable_Apps + ::list_wgtman_pane().LayoutLine(); + TAknLayoutRect listPaneRect; + listPaneRect.LayoutRect( iListBox->Rect(), listPane ); + TAknWindowLineLayout listRowPane = AknLayoutScalable_Apps + ::listrow_wgtman_pane().LayoutLine(); + TAknLayoutRect listRowPaneRect; + listRowPaneRect.LayoutRect( listPaneRect.Rect(), listRowPane ); + TRAP_IGNORE( iListBox->SetItemHeightL( listRowPaneRect.Rect().Height() ); ); + iListBox->View()->ItemDrawer()->SetItemCellSize( listRowPaneRect.Rect().Size() ); + } - TAknLayoutRect layoutRect; - TRect rect = TRect( ItemCellSize() ); - layoutRect.LayoutRect( rect, logoPane ); - - // RESIZE DEFAULT LOGO BITMAPS ACCORDING TO LAYOUT - TSize size = layoutRect.Rect().Size(); - AknIconUtils::SetSize( - iDefaultLogoImage, size, EAspectRatioPreserved ); - AknIconUtils::SetSize( - iDefaultLogoImageMask, size, EAspectRatioPreserved ); - } - // --------------------------------------------------------- // CWmListItemDrawer::DrawItem // --------------------------------------------------------- @@ -201,21 +199,38 @@ KAknsIIDQsnFrList, KAknsIIDQsnFrListCenter ); } - // DRAW LOGO CFbsBitmap* bitmap = const_cast(wData.LogoImage()); CFbsBitmap* mask = const_cast(wData.LogoImageMask()); TAknLayoutRect logoLayout; logoLayout.LayoutRect( itemRect, AknLayoutScalable_Apps::listrow_wgtman_pane_g1().LayoutLine() ); - - if ( !bitmap && !wData.IsPrepairingLogo() ) + if ( ( !bitmap || !mask ) && iDefaultLogoImage && iDefaultLogoImageMask ) { - logoLayout.DrawImage( gc, iDefaultLogoImage, iDefaultLogoImageMask ); + // real logo missing use default + TSize size = logoLayout.Rect().Size(); + if ( iDefaultLogoImage->SizeInPixels() != size ) + { + // Resize default icons only when they are really needed + AknIconUtils::SetSize( + iDefaultLogoImage, size, EAspectRatioPreserved ); + AknIconUtils::SetSize( + iDefaultLogoImageMask, size, EAspectRatioPreserved ); + } + + gc.DrawBitmapMasked( logoLayout.Rect(), + iDefaultLogoImage, + TRect(TPoint(0, 0), iDefaultLogoImage->SizeInPixels()), + iDefaultLogoImageMask, + EFalse ); } else if( bitmap && mask ) { - logoLayout.DrawImage( gc, bitmap, mask ); + gc.DrawBitmapMasked( logoLayout.Rect(), + bitmap, + TRect(TPoint(0, 0), bitmap->SizeInPixels()), + mask, + ETrue ); } // DRAW NAME @@ -282,15 +297,6 @@ } // --------------------------------------------------------- -// CWmListItemDrawer::HandleSkinChanged -// --------------------------------------------------------- -// -void CWmListItemDrawer::HandleSkinChanged() - { - ResizeDefaultBitmaps(); - } - -// --------------------------------------------------------- // CWmListBox::NewL // --------------------------------------------------------- // @@ -471,21 +477,7 @@ iLogoSize = LogoSize(); for ( TInt i=0; iReCreateLogo( iLogoSize ); - } - } - -// --------------------------------------------------------- -// CWmListBox::HandleSkinChanged -// --------------------------------------------------------- -// -void CWmListBox::HandleSkinChanged() - { - CWmListItemDrawer* itemDrawer = - static_cast ( iItemDrawer ); - if ( itemDrawer ) - { - itemDrawer->HandleSkinChanged(); + iVisibleWidgetArray[i]->UpdateLogo( iLogoSize, EFalse ); } } @@ -571,7 +563,7 @@ static_cast ( iItemDrawer ); if ( itemDrawer ) { - return itemDrawer->ResizeDefaultBitmaps(); + itemDrawer->UpdateItemHeight(); } } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmmaincontainer.cpp --- a/idlehomescreen/widgetmanager/src/wmmaincontainer.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmmaincontainer.cpp Wed May 12 13:12:59 2010 +0300 @@ -68,6 +68,9 @@ #include "wmconfiguration.h" #include "wminstaller.h" +#include // content control api +#include // content control api + // CONSTANTS const TInt KTextLimit = 40; // Text-limit for find-field const TInt KMinWidgets = 1; // minimum number of widgets to show findpane @@ -93,6 +96,8 @@ // CWmMainContainer::~CWmMainContainer() { + TRAP_IGNORE(DeactivateFindPaneL(EFalse)); + delete iWidgetLoader; RemoveCtrlsFromStack(); @@ -222,8 +227,18 @@ ::wgtman_btn_pane( variety ).LayoutLine(); TAknWindowLineLayout operatorBtnLayout = AknLayoutScalable_Apps ::wgtman_btn_pane_cp_01( variety ).LayoutLine(); - AknLayoutUtils::LayoutControl( iPortalButtonOne, rect, oviBtnLayout ); - AknLayoutUtils::LayoutControl( iPortalButtonTwo, rect, operatorBtnLayout ); + + // button placement + if ( iConfiguration->PortalButtonsMirrored() ) + { + AknLayoutUtils::LayoutControl( iPortalButtonOne, rect, operatorBtnLayout ); + AknLayoutUtils::LayoutControl( iPortalButtonTwo, rect, oviBtnLayout ); + } + else + { + AknLayoutUtils::LayoutControl( iPortalButtonOne, rect, oviBtnLayout ); + AknLayoutUtils::LayoutControl( iPortalButtonTwo, rect, operatorBtnLayout ); + } } // layout iWidgetsList @@ -256,12 +271,15 @@ // This is a bug fix for ou1cimx1#217716 & ou1cimx1#217667. // For some weird reason homescreen is genarating one extra EEventKey - // when using Nokia SU-8W bluetooth keyboard & backspace key. This if is to + // when using bluetooth keyboard & backspace key. This if is to // ignore that event. Extra event allways has iModifiers set to - // EModifierAutorepeatable. + // EModifierAutorepeatable, EModifierKeyboardExtend and + // EModifierNumLock. if ( aType == EEventKey && - aKeyEvent.iScanCode == EStdKeyBackspace && - aKeyEvent.iModifiers == EModifierAutorepeatable ) + aKeyEvent.iScanCode == EStdKeyBackspace && + aKeyEvent.iModifiers&EModifierKeyboardExtend && + aKeyEvent.iModifiers&EModifierNumLock && + aKeyEvent.iModifiers&EModifierAutorepeatable ) { return EKeyWasConsumed; } @@ -441,7 +459,7 @@ { // widget list top -> up -> ovi button (portrait) if ( aType == EEventKey ) - SetFocusToPortalButton( 0 ); + SetFocusToPortalButton( OperatorButtonHigherPriority ( 0 ) ); keyResponse = EKeyWasConsumed; } else if ( !iLandscape && @@ -451,7 +469,7 @@ { // widget list bottom -> down -> ovi button (portrait) if ( aType == EEventKey ) - SetFocusToPortalButton( 0 ); + SetFocusToPortalButton( OperatorButtonHigherPriority ( 0 ) ); keyResponse = EKeyWasConsumed; } else if ( iLandscape && !iMirrored && @@ -459,7 +477,7 @@ { // widget list -> right -> ovi button (landscape normal) if ( aType == EEventKey ) - SetFocusToPortalButton( 0 ); + SetFocusToPortalButton( OperatorButtonHigherPriority ( 0 ) ); keyResponse = EKeyWasConsumed; } else if ( iLandscape && iMirrored && @@ -467,7 +485,7 @@ { // widget list -> left -> ovi button (landscape mirrored) if ( aType == EEventKey ) - SetFocusToPortalButton( 0 ); + SetFocusToPortalButton( OperatorButtonHigherPriority ( 0 ) ); keyResponse = EKeyWasConsumed; } } @@ -493,8 +511,20 @@ keyResponse = EKeyWasConsumed; } else if ( !iLandscape && !iMirrored && + aKeyEvent.iScanCode == EStdKeyLeftArrow && + iConfiguration->PortalButtonCount() > 1 && + iConfiguration->PortalButtonsMirrored() ) + { + // right portal -> left -> left portal + // (portrait, operator button higher priority ) + if ( aType == EEventKey ) + SetFocusToPortalButton( 1 ); + keyResponse = EKeyWasConsumed; + } + else if ( !iLandscape && !iMirrored && aKeyEvent.iScanCode == EStdKeyRightArrow && - iConfiguration->PortalButtonCount() > 1 ) + iConfiguration->PortalButtonCount() > 1 && + !iConfiguration->PortalButtonsMirrored() ) { // left portal -> right -> right portal (portrait normal) if ( aType == EEventKey ) @@ -502,8 +532,19 @@ keyResponse = EKeyWasConsumed; } else if ( !iLandscape && iMirrored && + aKeyEvent.iScanCode == EStdKeyRightArrow && + iConfiguration->PortalButtonCount() > 1 && + iConfiguration->PortalButtonsMirrored() ) + { + // right portal -> left -> left portal (portrait mirrored) + if ( aType == EEventKey ) + SetFocusToPortalButton( 1 ); + keyResponse = EKeyWasConsumed; + } + else if ( !iLandscape && iMirrored && aKeyEvent.iScanCode == EStdKeyLeftArrow && - iConfiguration->PortalButtonCount() > 1 ) + iConfiguration->PortalButtonCount() > 1 && + !iConfiguration->PortalButtonsMirrored() ) { // right portal -> left -> left portal (portrait mirrored) if ( aType == EEventKey ) @@ -527,8 +568,20 @@ keyResponse = EKeyWasConsumed; } else if ( iLandscape && + aKeyEvent.iScanCode == EStdKeyUpArrow && + iConfiguration->PortalButtonCount() > 1 && + iConfiguration->PortalButtonsMirrored() ) + { + // lower portal -> up -> upper portal + // (landscape, operator button higher priority ) + if ( aType == EEventKey ) + SetFocusToPortalButton( 1 ); + keyResponse = EKeyWasConsumed; + } + else if ( iLandscape && aKeyEvent.iScanCode == EStdKeyDownArrow && - iConfiguration->PortalButtonCount() > 1 ) + iConfiguration->PortalButtonCount() > 1 && + !iConfiguration->PortalButtonsMirrored() ) { // upper portal -> down -> lower portal (landscape) if ( aType == EEventKey ) @@ -558,8 +611,20 @@ keyResponse = EKeyWasConsumed; } else if ( !iLandscape && !iMirrored && + aKeyEvent.iScanCode == EStdKeyRightArrow && + iConfiguration->PortalButtonCount() > 1 && + iConfiguration->PortalButtonsMirrored() ) + { + // left portal -> right -> right portal + // (portrait, operator button higher priority ) + if ( aType == EEventKey ) + SetFocusToPortalButton( 0 ); + keyResponse = EKeyWasConsumed; + } + else if ( !iLandscape && !iMirrored && aKeyEvent.iScanCode == EStdKeyLeftArrow && - iConfiguration->PortalButtonCount() > 1 ) + iConfiguration->PortalButtonCount() > 1 && + !iConfiguration->PortalButtonsMirrored() ) { // right portal -> left -> left portal (portrait normal) if ( aType == EEventKey ) @@ -567,8 +632,19 @@ keyResponse = EKeyWasConsumed; } else if ( !iLandscape && iMirrored && + aKeyEvent.iScanCode == EStdKeyLeftArrow && + iConfiguration->PortalButtonCount() > 1 && + iConfiguration->PortalButtonsMirrored() ) + { + // left portal -> right -> right portal (portrait mirrored) + if ( aType == EEventKey ) + SetFocusToPortalButton( 0 ); + keyResponse = EKeyWasConsumed; + } + else if ( !iLandscape && iMirrored && aKeyEvent.iScanCode == EStdKeyRightArrow && - iConfiguration->PortalButtonCount() > 1 ) + iConfiguration->PortalButtonCount() > 1 && + !iConfiguration->PortalButtonsMirrored() ) { // left portal -> right -> right portal (portrait mirrored) if ( aType == EEventKey ) @@ -592,7 +668,18 @@ keyResponse = EKeyWasConsumed; } else if ( iLandscape && - aKeyEvent.iScanCode == EStdKeyUpArrow ) + aKeyEvent.iScanCode == EStdKeyDownArrow && + iConfiguration->PortalButtonsMirrored() ) + { + // upper portal -> down -> lower portal + // ( landscape operator button higher priority ) + if ( aType == EEventKey ) + SetFocusToPortalButton( 0 ); + keyResponse = EKeyWasConsumed; + } + else if ( iLandscape && + aKeyEvent.iScanCode == EStdKeyUpArrow && + !iConfiguration->PortalButtonsMirrored() ) { // lower portal -> up -> upper portal (landscape) if ( aType == EEventKey ) @@ -620,6 +707,28 @@ return keyResponse; } + +// --------------------------------------------------------- +// CWmMainContainer::OperatorButtonHigherPriority +// --------------------------------------------------------- +// +TInt CWmMainContainer::OperatorButtonHigherPriority( TInt aIndex ) + { + TInt ret = aIndex; + if ( iConfiguration->PortalButtonsMirrored() ) + { + if ( aIndex == 0 ) + { + ret = 1; + } + else if ( aIndex == 1 ) + { + ret = 0; + } + } + return ret; + } + // --------------------------------------------------------- // CWmMainContainer::SetFocusToPortalButton // --------------------------------------------------------- @@ -724,7 +833,9 @@ { if ( !iClosingDown ) { - + TBool eatEvent( EFalse ); + TPointerEvent event( aPointerEvent ); + if (aPointerEvent.iType == TPointerEvent::EButton1Down) { // Check if user clicked a child control @@ -748,9 +859,37 @@ // repaint DrawDeferred(); } + + // stylus popup should not be opened when uninstalling. + // ou1cimx1#302973 + if ( control == iWidgetsList && iWidgetsList->IsFocused() ) + { + TInt itemIndex = iWidgetsList->CurrentListBoxItemIndex(); + TBool itemPointed = iWidgetsList->View()->XYPosToItemIndex( + aPointerEvent.iPosition, + itemIndex ); + if ( itemIndex >= 0 && itemPointed ) + { + CWmWidgetData& data = iWidgetsList->WidgetData( itemIndex ); + if ( &data && data.IsUninstalling() ) + { + event.iType = TPointerEvent::EButton1Up; + eatEvent = ETrue; + } + } + } + } - - CCoeControl::HandlePointerEventL( aPointerEvent ); + + // set downkey event to base class + CCoeControl::HandlePointerEventL( aPointerEvent ); + + // send key up event if selected widget is being uninstalled. + // stylus popup shouldn't be displayed for this item. + if ( eatEvent ) + { + CCoeControl::HandlePointerEventL( event ); + } } } @@ -812,6 +951,17 @@ // void CWmMainContainer::StartLoadingWidgetsL() { + if ( iFindbox && iFindPaneIsVisible ) + { + iFindbox->ResetL(); + iFindbox->SetSearchTextL( KNullDesC ); + CAknFilteredTextListBoxModel* m = + static_cast ( iWidgetsList->Model() ); + if ( m && m->Filter() ) + { + m->Filter()->ResetFilteringL(); + } + } if ( !iWidgetLoader ) { // create the widget loader AO @@ -838,11 +988,6 @@ // notify widgetlist iWidgetsList->HandleLayoutChanged(); } - else if ( KAknsMessageSkinChange == aType ) - { - // notify widgetlist , colored add icon need to be updated - iWidgetsList->HandleSkinChanged(); - } } @@ -950,7 +1095,8 @@ if ( WidgetSelected() && data && !data->IsUninstalling() ) { if ( data->WidgetType() == CWmWidgetData::ECps && - data->PublisherUid() != KNullUid ) + data->PublisherUid() != KNullUid && + data->WrtType() != CWmWidgetData::EUnIdentified ) { retVal = ETrue; } @@ -1025,37 +1171,20 @@ void CWmMainContainer::AddWidgetToHomeScreenL() { CWmWidgetData* data = iWidgetsList->WidgetData(); - if ( !iClosingDown && data && !data->IsUninstalling() ) + if ( !iClosingDown ) { if ( iFindbox && iFindPaneIsVisible ) { - DeactivateFindPaneL(); - } - - // set add to homescreen to be executed later - iWmPlugin.SetPostponedCommandL( - CWmPlugin::EAddToHomescreen, - data->HsContentInfo() ); - - // check if we can add any widgets to hs. - TBool hsContentFull = ETrue; - for ( TInt i=0; iWidgetDataCount(); i++ ) - { - CHsContentInfo& info = iWidgetsList->WidgetData(i).HsContentInfo(); - if ( info.CanBeAdded() ) - { - hsContentFull = EFalse; - break; - } + DeactivateFindPaneL(EFalse); } - // deactivate wm if there's not enough space to add widget to hs. - if ( !data->HsContentInfo().CanBeAdded() && !hsContentFull ) + if ( data && !data->IsUninstalling() ) { - iWmPlugin.ExecuteCommandL(); - } - else - { + // set add to homescreen to be executed later + iWmPlugin.SetPostponedCommandL( + CWmPlugin::EAddToHomescreen, + data->HsContentInfo() ); + iWmPlugin.CloseView(); } } @@ -1089,11 +1218,14 @@ // CWmMainContainer::ActivateFindPaneL // --------------------------------------------------------------------------- // -void CWmMainContainer::ActivateFindPaneL( TBool aActivateAdabtive ) +void CWmMainContainer::ActivateFindPaneL( TBool aActivateAdaptive ) { if ( iFindbox && !iFindPaneIsVisible && iWidgetsList->Model()->NumberOfItems() > KMinWidgets ) { + // reset focus + ResetFocus(); + // set column filter flag TBitFlags32 bitFlag; bitFlag.ClearAll(); // clear all columns @@ -1122,7 +1254,7 @@ // layout listbox and findbox LayoutControls(); - if ( aActivateAdabtive ) + if ( aActivateAdaptive ) { iFindbox->ShowAdaptiveSearchGrid(); } @@ -1143,10 +1275,10 @@ // CWmMainContainer::DeactivateFindPaneL // --------------------------------------------------------------------------- // -void CWmMainContainer::DeactivateFindPaneL() +void CWmMainContainer::DeactivateFindPaneL(TBool aLayout) { if( iFindbox && iFindPaneIsVisible ) - { + { // notify search field we're shutting down TKeyEvent keyEvent = { EKeyNo, EStdKeyNo, 0, 0 }; iFindbox->OfferKeyEventL( keyEvent, EEventKey ); @@ -1162,26 +1294,30 @@ m->Filter()->ResetFilteringL(); m->RemoveFilter(); } - - iFindbox->MakeVisible( EFalse ); - iFindbox->SetFocus( EFalse ); - iFindPaneIsVisible = EFalse; - iWidgetsList->SetFindPaneIsVisible( EFalse ); - LayoutControls(); + ResetFocus(); - // set soft key set - CEikButtonGroupContainer* cbaGroup = - CEikButtonGroupContainer::Current(); - TInt cbaResourceId = ( AknLayoutUtils::MSKEnabled() ? - R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT : - R_AVKON_SOFTKEYS_OPTIONS_BACK ); - - cbaGroup->SetCommandSetL( cbaResourceId ); - cbaGroup->DrawNow(); - - UpdateFocusMode(); - DrawNow(); + iFindbox->MakeVisible( EFalse ); + iFindPaneIsVisible = EFalse; + iWidgetsList->SetFindPaneIsVisible( EFalse ); + + if (aLayout) //no need to draw UI if exiting list + { + LayoutControls(); + + // set soft key set + CEikButtonGroupContainer* cbaGroup = + CEikButtonGroupContainer::Current(); + TInt cbaResourceId = ( AknLayoutUtils::MSKEnabled() ? + R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT : + R_AVKON_SOFTKEYS_OPTIONS_BACK ); + + cbaGroup->SetCommandSetL( cbaResourceId ); + cbaGroup->DrawNow(); + + UpdateFocusMode(); + DrawNow(); + } } } @@ -1327,17 +1463,26 @@ { CWmWidgetData* data = iWidgetsList->WidgetData(); if ( data ) - { - const CFbsBitmap* logo = ( data->LogoImage() ) ? - data->LogoImage() : iWidgetsList->DefaultLogo(); - const CFbsBitmap* mask = ( data->LogoImageMask() ) ? - data->LogoImageMask() : iWidgetsList->DefaultMask(); + { + // Find out if HS is full + TBool hsFull = ETrue; + MHsContentController& controller = iWmPlugin.ContentController(); + CHsContentInfo* activeView = CHsContentInfo::NewLC(); + if ( controller.ActiveViewL( *activeView ) == KErrNone ) + { + hsFull = activeView->IsFull(); + } + CleanupStack::PopAndDestroy( activeView ); CWmDetailsDlg* dlg = CWmDetailsDlg::NewL( - data->Name(), data->Description(), - data->HsContentInfo().CanBeAdded(), - logo, mask ); - + data->Name(), + data->Description(), + !hsFull, + data->HsContentInfo().IconPath(), + *iWidgetsList->DefaultLogo(), + *iWidgetsList->DefaultMask() + ); + if ( dlg && dlg->ExecuteLD() == ECbaAddToHs ) { AddWidgetToHomeScreenL(); @@ -1407,22 +1552,36 @@ // void CWmMainContainer::ProcessForegroundEvent( TBool aForeground ) { - if ( aForeground ) + if ( iFindbox && iFindPaneIsVisible && + iFindbox->IsFocused() ) + { + // keep focus & do nothing + } + else if ( aForeground ) { // set init state when wm comes to foreground. // remove focus from all controls when activating view. - CCoeControl* control = NULL; - CCoeControlArray::TCursor cursor = Components().Begin(); - while( ( control = cursor.Control() ) != NULL ) + ResetFocus( EDrawNow ); + } + } + +// ---------------------------------------------------- +// CWmMainContainer::ResetFocus +// ---------------------------------------------------- +// +void CWmMainContainer::ResetFocus( TDrawNow aDrawNow ) + { + CCoeControl* control = NULL; + CCoeControlArray::TCursor cursor = Components().Begin(); + while( ( control = cursor.Control() ) != NULL ) + { + if( control->IsVisible() && control->IsFocused() ) { - if( control->IsVisible() && control->IsFocused() ) - { - control->SetFocus( EFalse, EDrawNow ); - } - cursor.Next(); + control->SetFocus( EFalse, aDrawNow ); } - UpdateFocusMode(); + cursor.Next(); } + UpdateFocusMode(); } // ---------------------------------------------------- @@ -1434,5 +1593,24 @@ return *iWidgetsList; } +// ---------------------------------------------------- +// CWmMainContainer::FocusChanged +// ---------------------------------------------------- +// +void CWmMainContainer::FocusChanged( TDrawNow aDrawNow ) + { + CCoeControl::FocusChanged( aDrawNow ); + + if ( iFindbox && iFindPaneIsVisible && + !iFindbox->IsFocused() && IsFocused() ) + { + // reset focus to find pane if its lost ( ou1cimx1#308019 ) + ResetFocus(); + iFindbox->SetFocus( ETrue ); + UpdateFocusMode(); + } + } + + // End of File diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp --- a/idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp Wed May 12 13:12:59 2010 +0300 @@ -28,14 +28,14 @@ #include #include #include +#include #include "wmplugin.h" #include "widgetmanager.hrh" #include "wmmaincontainerview.h" #include "wmresourceloader.h" #include "wmmaincontainer.h" -#include - +#include "wmspbgcleaner.h" // --------------------------------------------------------- // CWmMainContainerView::CWmMainContainerView() @@ -46,6 +46,7 @@ iWmPlugin( aWmPlugin ) { iWmMainContainer = NULL; + iWmSpBgCleaner = NULL; } // --------------------------------------------------------- @@ -61,6 +62,13 @@ delete iWmMainContainer; iWmMainContainer = NULL; } + + if ( iWmSpBgCleaner != NULL ) + { + AppUi()->RemoveFromStack( iWmSpBgCleaner ); + delete iWmSpBgCleaner; + iWmSpBgCleaner = NULL; + } } // --------------------------------------------------------- @@ -180,20 +188,25 @@ { // setup status pane layout StatusPane()->SwitchLayoutL( - R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); - StatusPane()->ApplyCurrentSettingsL(); - + R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); // disable transparancy - if ( StatusPane()->IsTransparent() ) + StatusPane()->EnableTransparent( EFalse ); + // apply changes + StatusPane()->ApplyCurrentSettingsL(); + + // create container + if ( iWmSpBgCleaner == NULL ) { - StatusPane()->EnableTransparent( EFalse ); + iWmSpBgCleaner = CWmSpBgCleaner::NewL(); + iWmSpBgCleaner->SetMopParent( this ); + AppUi()->AddToStackL( *this, iWmSpBgCleaner ); } // title in status pane SetTitleL(); - + StatusPane()->DrawNow(); - + // update cba CEikButtonGroupContainer* bgc( Cba() ); CEikCba* cba = static_cast< CEikCba* >( bgc->ButtonGroup() ); @@ -232,27 +245,13 @@ iWmMainContainer = NULL; iWmPlugin.MainViewDeactivated(); } - } -// --------------------------------------------------------- -// CWmMainContainerView::HandleStatusPaneSizeChange -// --------------------------------------------------------- -// -void CWmMainContainerView::HandleStatusPaneSizeChange() - { - CAknView::HandleStatusPaneSizeChange(); - - // this may fail, but we're not able to propagate exceptions here - TVwsViewId view; - AppUi()->GetActiveViewId( view ); - if ( view.iViewUid == Id() ) - { - if ( iWmMainContainer ) - { - iWmMainContainer->SetRect( AppUi()->ClientRect() ); - } - } - + if ( iWmSpBgCleaner != NULL ) + { + AppUi()->RemoveFromStack( iWmSpBgCleaner ); + delete iWmSpBgCleaner; + iWmSpBgCleaner = NULL; + } } // --------------------------------------------------------- @@ -429,7 +428,7 @@ TBool CWmMainContainerView::HandleDeactivateFindPaneL() { if ( iWmMainContainer ) - { + { iWmMainContainer->DeactivateFindPaneL(); } return ETrue; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmplugin.cpp --- a/idlehomescreen/widgetmanager/src/wmplugin.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmplugin.cpp Wed May 12 13:12:59 2010 +0300 @@ -86,7 +86,8 @@ void CWmPlugin::ConstructL() { iWmMainContainer = NULL; - + iPostponedCommand = ENone; + // store static view app ui CEikonEnv* eikonEnv = CEikonEnv::Static(); if ( !eikonEnv ) User::Leave( KErrUnknown ); @@ -117,10 +118,17 @@ iViewAppUi->View( TUid::Uid(EWmMainContainerViewId) ) ); if ( !IsActive() && view && iHsContentController ) { + // stop displaying menubar before starting fullscreen effects + CEikMenuBar* menuBar = CEikonEnv::Static()->AppUiFactory()->MenuBar(); + if ( menuBar && menuBar->IsDisplayed() ) + { + menuBar->StopDisplayingMenuBar(); + } + TRAP_IGNORE( iEffectManager->BeginFullscreenEffectL( KAppStartEffectStyle ); - iViewAppUi->ActivateLocalViewL( + iViewAppUi->ActivateLocalViewL( TUid::Uid( EWmMainContainerViewId ) ); ); } @@ -164,11 +172,12 @@ if ( iViewAppUi->GetActiveViewId( activeViewId ) == KErrNone && activeViewId.iViewUid == TUid::Uid( EWmMainContainerViewId ) ) { - if ( iPreviousViewUid.iViewUid == KNullUid ) + if ( iPreviousViewUid.iViewUid == KNullUid && + iViewAppUi->GetDefaultViewId( iPreviousViewUid ) != KErrNone ) { iPreviousViewUid.iAppUid = iViewAppUi->Application()->AppDllUid(); iPreviousViewUid.iViewUid = TUid::Uid( 1 ); - } + } return ETrue; } @@ -184,12 +193,16 @@ if ( IsActive() ) { iWmMainContainer->SetClosingDown( ETrue ); - TRAP_IGNORE( + TRAPD( err, iEffectManager->BeginFullscreenEffectL( KAppExitEffectStyle ); iViewAppUi->ActivateLocalViewL( iPreviousViewUid.iViewUid ); ); + if ( KErrNone != err ) + { + iWmMainContainer->SetClosingDown( EFalse ); + } } } @@ -198,12 +211,11 @@ // --------------------------------------------------------- // void CWmPlugin::MainViewActivated( - const TVwsViewId& aViewId, + const TVwsViewId& /*aViewId*/, CWmMainContainer* aWmMainContainer ) { - iPreviousViewUid = aViewId; - // verify if we have correct viewid to activate. - if ( iPreviousViewUid.iViewUid == KNullUid ) + // previous view for Wm is always default view. + if ( iViewAppUi->GetDefaultViewId( iPreviousViewUid ) != KErrNone ) { // use default if we got wrong viewid as previous view iPreviousViewUid.iAppUid = iViewAppUi->Application()->AppDllUid(); @@ -234,7 +246,13 @@ iEffectManager->UiRendered(); } - TRAP_IGNORE( ExecuteCommandL(); ); + TRAPD( err, ExecuteCommandL(); ); + if ( KErrNone != err ) + { + delete iPostponedContent; + iPostponedContent = NULL; + iPostponedCommand = ENone; + } } // --------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmportalbutton.cpp --- a/idlehomescreen/widgetmanager/src/wmportalbutton.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmportalbutton.cpp Wed May 12 13:12:59 2010 +0300 @@ -32,7 +32,10 @@ #include // widgetreqistry #include #include +#include +#include +#include "wmimageconverter.h" #include "wmportalbutton.h" #include "wmcommon.h" #include "wmplugin.h" @@ -42,10 +45,7 @@ #include "wmprocessmonitor.h" // CONSTANTS -_LIT( KUrlPrefix, "4 "); - -const TUid KOSSBrowserUidValue = { 0x10008D39 }; // MEMBER FUNCTIONS // --------------------------------------------------------- @@ -78,7 +78,7 @@ // --------------------------------------------------------- // CWmPortalButton::~CWmPortalButton() - { + { delete iButtonIcon; delete iButtonIconMask; @@ -87,6 +87,7 @@ // for de-reference open file count, so it should be deleted last. delete iImageConverter; delete iProcessMonitor; + delete iBrowserLauncher; } // --------------------------------------------------------- @@ -102,6 +103,7 @@ iButtonIcon = NULL; iButtonIconMask = NULL; iProcessMonitor = NULL; + iBrowserLauncher = NULL; } // --------------------------------------------------------- @@ -138,10 +140,13 @@ KAknsIIDQsnFrButtonCenterInactive ); // start image converter for the icon - iImageConverter = CWmImageConverter::NewL( this ); + iImageConverter = CWmImageConverter::NewL(); TSize iconsize( LayoutIconSize() ); iImageConverter->HandleIconString( - iconsize.iWidth, iconsize.iHeight, aIcon ); + iconsize, + aIcon, + iButtonIcon, + iButtonIconMask ); // observe our own press events SetObserver( this ); @@ -160,18 +165,31 @@ { if ( iPortalButtonIndex == 0 ) { + // OVI button if ( !iProcessMonitor ) { iProcessMonitor = CWmProcessMonitor::NewL(); } - if ( !iProcessMonitor->IsActive() ) + // if process monitor is active laucher was allready started. + // this is for ignoring multiple button presses + if ( !iProcessMonitor->IsActive() ) { RunOviL( iWmMainContainer->Configuration() ); } } else if ( iPortalButtonIndex == 1 ) { - RunOperatorL( iWmMainContainer->Configuration() ); + // OPERATOR button + // if this leaves it means we need to start browser + // becouse application info was not given + TRAPD( err, RunOperatorApplicationL( + iWmMainContainer->Configuration() ) ) + if ( err != KErrNone ) + { + StartBrowserL( + iWmMainContainer->Configuration().PortalButtonBrowserUrl( + iPortalButtonIndex ) ); + } } else { @@ -186,8 +204,6 @@ // void CWmPortalButton::RunOviL( CWmConfiguration& aConf ) { - // param is: channel=homescreenwidgets - // laucher uid: 0x2002D07F RApaLsSession session; User::LeaveIfError( session.Connect() ); CleanupClosePushL( session ); @@ -197,13 +213,7 @@ TUid launchUid; launchUid = aConf.PortalButtonClientUid( iPortalButtonIndex ); - TInt err = session.GetAppInfo( appInfo, launchUid ); - if ( err != KErrNone ) - { - //This is temp until we have laucher in SDK - StartBrowserL( aConf ); - } - else + if ( session.GetAppInfo( appInfo, launchUid ) == KErrNone ) { // Form parameter HBufC* param = HBufC::NewLC( aConf.PortalButtonClientParam( iPortalButtonIndex ).Length() ); @@ -226,67 +236,39 @@ // CWmPortalButton::StartBrowserL // --------------------------------------------------------- // -void CWmPortalButton::StartBrowserL( CWmConfiguration& aConf ) +void CWmPortalButton::StartBrowserL( const TDesC& aUrl ) { - RApaLsSession session; - User::LeaveIfError( session.Connect() ); - CleanupClosePushL( session ); + // already running/or request launch or url is empty + if ( iBrowserLauncher || !aUrl.Length() ) { return; } - HBufC* param = NULL; - if ( iPortalButtonIndex == 1 ) - { - // browser start parameter - param = HBufC::NewLC( - aConf.PortalButtonBrowserUrl( iPortalButtonIndex ).Length() + - KUrlPrefix().Length() ); + _LIT( KUrlPrefix, "4 "); + HBufC* param = HBufC::NewLC( aUrl.Length() + KUrlPrefix().Length() ); + param->Des().Append( KUrlPrefix ); + param->Des().Append( aUrl ); - param->Des().Copy( KUrlPrefix ); - param->Des().Append( aConf.PortalButtonBrowserUrl( iPortalButtonIndex ) ); - } - else - { - // becouse launcher knows url we need to have it temp here - // until laucher is available - _LIT( KTempUrl, "4 https://store.ovi.com/applications/"); - param = HBufC::NewLC( KTempUrl().Length() ); - param->Des().Copy( KTempUrl ); - } + // Create browser launcher + CBrowserLauncher* launcher = CBrowserLauncher::NewLC(); + + // Asynchronous operation to launch the browser with given URL + launcher->LaunchBrowserEmbeddedL( + *param, NULL, this, NULL ); - TUid id( KOSSBrowserUidValue ); - TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); - TApaTask task = taskList.FindApp( id ); - if( task.Exists() ) - { - task.BringToForeground(); - HBufC8* param8 = HBufC8::NewLC(param->Length()); - param8->Des().Append(*param); - task.SendMessage(TUid::Uid(0), *param8); // UID not used - CleanupStack::PopAndDestroy(param8); - } - else - { - if( !session.Handle() ) - { - User::LeaveIfError( session.Connect() ); - } - TThreadId thread; - User::LeaveIfError( - session.StartDocument(*param, KOSSBrowserUidValue, thread)); - } - + CleanupStack::Pop( launcher ); + iBrowserLauncher = launcher; + launcher = NULL; + CleanupStack::PopAndDestroy( param ); - CleanupStack::PopAndDestroy( &session ); } // --------------------------------------------------------- -// CWmPortalButton::RunOperatorL +// CWmPortalButton::HandleServerAppExit // --------------------------------------------------------- // -void CWmPortalButton::RunOperatorL( CWmConfiguration& aConf ) +void CWmPortalButton::HandleServerAppExit( TInt aReason ) { - // Current info is that this will be a widget - // meanwhile we just start browser - StartBrowserL( aConf ); + MAknServerAppExitObserver::HandleServerAppExit( aReason ); + delete iBrowserLauncher; + iBrowserLauncher = NULL; } // --------------------------------------------------------- @@ -373,11 +355,12 @@ // resize icon if ( iButtonIcon && iButtonIconMask ) { - TSize size = LayoutIconSize(); - AknIconUtils::SetSize( - iButtonIcon, size, EAspectRatioPreserved ); - AknIconUtils::SetSize( - iButtonIconMask, size, EAspectRatioPreserved ); + iImageConverter->UpdateImageSize( + LayoutIconSize(), + iWmMainContainer->Configuration().PortalButtonIcon( + iPortalButtonIndex ), + *iButtonIcon, + *iButtonIconMask ); } TBool landscape = Layout_Meta_Data::IsLandscapeOrientation(); @@ -386,43 +369,6 @@ } // --------------------------------------------------------- -// CWmPortalButton::NotifyCompletion -// --------------------------------------------------------- -// -void CWmPortalButton::NotifyCompletion( TInt aError ) - { - if ( KErrNone == aError ) - { - // take ownership of icon - delete iButtonIcon; - iButtonIcon = NULL; - iButtonIcon = iImageConverter->Bitmap(); - delete iButtonIconMask; - iButtonIconMask = NULL; - iButtonIconMask = iImageConverter->Mask(); - if ( iButtonIcon && iButtonIconMask ) - { - TSize size = LayoutIconSize(); - if ( iButtonIcon->SizeInPixels() != size ) - { - AknIconUtils::SetSize( - iButtonIcon, size, EAspectRatioPreserved ); - } - if ( iButtonIconMask->SizeInPixels() != size ) - { - AknIconUtils::SetSize( - iButtonIconMask, size, EAspectRatioPreserved ); - } - DrawDeferred(); - } - } - else - { - // no image available. Do nothing. - } - } - -// --------------------------------------------------------- // CWmPortalButton::Draw // --------------------------------------------------------- // @@ -490,7 +436,13 @@ imageLayout.LayoutRect( rect, AknLayoutScalable_Apps ::wgtman_btn_pane_g1( variety ).LayoutLine() ); } - imageLayout.DrawImage( gc, iButtonIcon, iButtonIconMask ); + + gc.DrawBitmapMasked( + imageLayout.Rect(), + iButtonIcon, + TRect(TPoint( 0, 0 ), iButtonIcon->SizeInPixels() ), + iButtonIconMask, + EFalse ); } // draw text if portrait @@ -525,36 +477,15 @@ MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - TRgb textColor( layoutText.Color() ); - - if ( IsDimmed() ) - { - const TInt KAlpha = 77; - textColor = iEikonEnv->ControlColor( EColorButtonText, *this ); - // try over-writing color from theme, ignore error. - AknsUtils::GetCachedColor( - skin, textColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); - textColor.SetAlpha( KAlpha ); - } - else if ( IsFocused() || iButtonPressed ) + TRgb textColor; + TInt err = AknsUtils::GetCachedColor( + skin, + textColor, + KAknsIIDQsnTextColors, + EAknsCIQsnTextColorsCG63 ); + if ( err != KErrNone ) { - textColor = iEikonEnv->ControlColor( EColorButtonTextPressed, *this ); - // try over-writing color from theme, ignore error. - AknsUtils::GetCachedColor( - skin, textColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 ); - } - else if ( textColor.Internal() <= 0 ) - { - textColor = iEikonEnv->ControlColor( EColorButtonText, *this ); - // try over-writing color from theme, ignore error. - AknsUtils::GetCachedColor( - skin, textColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); - } - else - { - // default for button - AknsUtils::GetCachedColor( - skin, textColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG80 ); + textColor = layoutText.Color(); } aGc.SetPenColor( textColor); @@ -594,4 +525,95 @@ baselineOffset, layoutText.Align() ); } +// --------------------------------------------------------- +// CWmPortalButton::RunOperatorApplicationL +// --------------------------------------------------------- +// +void CWmPortalButton::RunOperatorApplicationL( CWmConfiguration& aConf ) + { + CWmConfiguration::TOpAppType type = aConf.PortalButtonApplicationType( 1 ); + if ( type == CWmConfiguration::EUnknown || + type >= CWmConfiguration::EReserved ) + { + // Leave if not found + User::Leave( KErrArgument ); + } + + switch( type ) + { + case CWmConfiguration::ES60: + case CWmConfiguration::EQt: + { + TUid uid = KNullUid; + aConf.PortalButtonApplicationId( 1, uid ); + StartProcessL( uid, aConf.PortalButtonClientParam( 1 ) ); + } + break; + case CWmConfiguration::ECwrt: + { + TUid uid = KNullUid; + aConf.PortalButtonApplicationId( 1, uid ); + StartWidgetL( uid, aConf.PortalButtonClientParam( 1 ) ); + } + break; + case CWmConfiguration::EWrt: + { + TUid uid = KNullUid; + aConf.PortalButtonApplicationId( 1, uid ); + StartWidgetL( uid, KNullDesC ); + } + break; + case CWmConfiguration::EJava: + { + TBuf appId; + aConf.PortalButtonApplicationId( 1, appId ); + //TODO: + } + break; + } + } + +// --------------------------------------------------------- +// CWmPortalButton::StartProcessL +// --------------------------------------------------------- +// +void CWmPortalButton::StartProcessL( TUid aUid, const TDesC& aParam ) + { + RApaLsSession session; + User::LeaveIfError( session.Connect() ); + CleanupClosePushL( session ); + + //get app info + TApaAppInfo appInfo; + User::LeaveIfError( session.GetAppInfo( appInfo, aUid ) ); + // do the launch + RProcess process; + User::LeaveIfError( process.Create( appInfo.iFullName, aParam ) ); + process.Resume(); + + CleanupStack::PopAndDestroy( &session ); + } + +// --------------------------------------------------------- +// CWmPortalButton::StartWidgetL +// --------------------------------------------------------- +// +void CWmPortalButton::StartWidgetL( TUid aAppUid, const TDesC& aParams ) + { + if ( aAppUid == KNullUid ) + User::Leave( KErrArgument ); + + HBufC* params = aParams.AllocLC(); + + RApaLsSession appArc; + User::LeaveIfError( appArc.Connect() ); + CleanupClosePushL( appArc ); + + TThreadId threadId; + User::LeaveIfError( appArc.StartDocument( *params, aAppUid, threadId ) ); + + CleanupStack::PopAndDestroy( &appArc ); + CleanupStack::PopAndDestroy( params ); + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmspbgcleaner.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/widgetmanager/src/wmspbgcleaner.cpp Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: +* statuspane transparency handling implementation +* +*/ + +#include +#include +#include + +#include "wmspbgcleaner.h" + +// CONSTANTS + +// --------------------------------------------------------- +// CWmSpBgCleaner::NewL +// --------------------------------------------------------- +// +CWmSpBgCleaner* CWmSpBgCleaner::NewL() + { + CWmSpBgCleaner* self = CWmSpBgCleaner::NewLC(); + CleanupStack::Pop(); // self; + return self; + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::NewLC +// --------------------------------------------------------- +// +CWmSpBgCleaner* CWmSpBgCleaner::NewLC() + { + CWmSpBgCleaner* self = new ( ELeave ) CWmSpBgCleaner(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::CWmSpBgCleaner +// --------------------------------------------------------- +// +CWmSpBgCleaner::CWmSpBgCleaner() + { + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::ConstructL +// --------------------------------------------------------- +// +void CWmSpBgCleaner::ConstructL() + { + CreateWindowL(); + + TRect statusPaneRect; + AknLayoutUtils::LayoutMetricsRect( + AknLayoutUtils::EStatusPane, statusPaneRect ); + + SetRect( statusPaneRect ); + SetNonFocusing(); + + Window().SetOrdinalPosition( -1 ); + Window().SetBackgroundColor( TRgb::Color16MA(0) ); + Window().SetVisible( ETrue ); + + ActivateL(); + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::~CWmSpBgCleaner +// --------------------------------------------------------- +// +CWmSpBgCleaner::~CWmSpBgCleaner() + { + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::SizeChanged +// --------------------------------------------------------- +// +void CWmSpBgCleaner::SizeChanged() + { + CCoeControl::SizeChanged(); + DrawDeferred(); + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::Draw +// --------------------------------------------------------- +// +void CWmSpBgCleaner::Draw( const TRect& /*aRect*/ ) const + { + CWindowGc& gc = SystemGc(); + TRgb color( TRgb::Color16MA(0) ); + gc.SetPenColor( color ); + gc.SetBrushColor( color ); + gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); + gc.SetPenStyle(CGraphicsContext::ESolidPen ); + gc.SetBrushStyle(CGraphicsContext::ESolidBrush ); + gc.Clear(); + } + +// --------------------------------------------------------- +// CWmSpBgCleaner::HandleResourceChange +// --------------------------------------------------------- +// +void CWmSpBgCleaner::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + + if ( KEikDynamicLayoutVariantSwitch == aType ) + { + TRect statusPaneRect; + AknLayoutUtils::LayoutMetricsRect( + AknLayoutUtils::EStatusPane, statusPaneRect ); + SetRect( statusPaneRect ); + } + } + +// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/src/wmwidgetdata.cpp --- a/idlehomescreen/widgetmanager/src/wmwidgetdata.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/src/wmwidgetdata.cpp Wed May 12 13:12:59 2010 +0300 @@ -36,6 +36,7 @@ #include "wmpersistentwidgetorder.h" #include "wmresourceloader.h" #include "wmcommon.h" +#include "wmimageconverter.h" // --------------------------------------------------------- // CWmWidgetData::NewL @@ -83,35 +84,30 @@ iLogoImageMask = NULL; iHsContentInfo = NULL; iWidgetType = CWmWidgetData::EUnknown; + iWrtType = CWmWidgetData::EUnIdentified; iPublisherUid = KNullUid; iLogoSize = aLogoSize; iAnimationTimer = NULL; - iTimeoutTimer = NULL; iAnimationIndex = 0; iAsyncUninstalling = EFalse; - iFireLogoChanged = EFalse; iMdcaPoint = NULL; - iWidgetName = NULL; } // --------------------------------------------------------- // CWmWidgetData::ConstructL // --------------------------------------------------------- // -void CWmWidgetData::ConstructL( +void CWmWidgetData::ConstructL( CHsContentInfo* aHsContentInfo, RWidgetRegistryClientSession* aRegistryClientSession ) { // start decoding the icon - iImageConverter = CWmImageConverter::NewL( this ); - iWait = new (ELeave) CActiveSchedulerWait(); + iImageConverter = CWmImageConverter::NewL(); iAnimationTimer = CPeriodic::NewL( CActive::EPriorityStandard ); - iTimeoutTimer = CPeriodic::NewL( CActive::EPriorityStandard ); InitL( aHsContentInfo, aRegistryClientSession ); // start logo handling - iImageConverter->SetLogoSize( iLogoSize ); HandleIconString( HsContentInfo().IconPath() ); } @@ -153,19 +149,6 @@ // CWmWidgetData::~CWmWidgetData() { - if ( iTimeoutTimer && - iTimeoutTimer->IsActive() ) - { - iTimeoutTimer->Cancel(); - } - delete iTimeoutTimer; - - delete iWidgetName; - if ( iWait && iWait->IsStarted() ) - { - iWait->AsyncStop(); - } - delete iWait; SetObserver( NULL ); DestroyAnimData(); delete iAnimationTimer; @@ -242,37 +225,6 @@ } // --------------------------------------------------------- -// CWmWidgetData::NotifyCompletion -// --------------------------------------------------------- -// -void CWmWidgetData::NotifyCompletion( TInt aError ) - { - delete iLogoImage; - iLogoImage = NULL; - delete iLogoImageMask; - iLogoImageMask = NULL; - if ( KErrNone != aError ) - { - // no image available. Do nothing. - } - else - { - iLogoImage = iImageConverter->Bitmap(); - iLogoImageMask = iImageConverter->Mask(); - - if ( iWait && iWait->IsStarted() ) - { - iWait->AsyncStop(); - } - if ( iFireLogoChanged ) - { - iFireLogoChanged = EFalse; - FireDataChanged(); - } - } - } - -// --------------------------------------------------------- // CWmWidgetData::HandleIconString // --------------------------------------------------------- // @@ -304,27 +256,17 @@ { size = iLogoSize; } - TInt err = iImageConverter->HandleIconString( - size.iWidth, size.iHeight, *iconStr ); + + iImageConverter->HandleIconString( + size, + *iconStr, + iLogoImage, + iLogoImageMask ); delete iconStr; iconStr = NULL; - // handle result - if ( KErrNone == err && iWait && - IsPrepairingLogo() && iTimeoutTimer ) - { - iTimeoutTimer->Cancel(); - const TInt tickInterval = 200000; - iTimeoutTimer->Start( - tickInterval,tickInterval,TCallBack(TimeoutTick, this)); - iWait->Start(); - } - else if ( KErrNone != err && iFireLogoChanged ) - { - FireDataChanged(); // draw default icon - iFireLogoChanged = EFalse; - } + FireDataChanged(); // draw default icon } // --------------------------------------------------------- @@ -385,7 +327,28 @@ if ( widgetUid != 0 ) { // WRT widget - iPublisherUid = TUid::Uid( widgetUid ); + iPublisherUid = TUid::Uid( widgetUid ); + + // wrt widget type + CWidgetPropertyValue* value( NULL ); + value = aRegistryClientSession->GetWidgetPropertyValueL( + iPublisherUid, ENokiaWidget ); + if ( value && *value == 1 ) + { + iWrtType = CWmWidgetData::EWgz; + } + else if ( value && *value == 2 ) + { + iWrtType = CWmWidgetData::EWgt; + } + else + { + iWrtType = CWmWidgetData::EUnIdentified; + } + + delete value; + value = NULL; + } else { @@ -398,6 +361,17 @@ // CWmWidgetData::Description // --------------------------------------------------------- // +const TDesC& CWmWidgetData::Name() const + { + return ( iAsyncUninstalling ? + iWmResourceLoader.Uninstalling() : + iHsContentInfo->Name() ); + } + +// --------------------------------------------------------- +// CWmWidgetData::Description +// --------------------------------------------------------- +// const TDesC& CWmWidgetData::Description() const { if ( iHsContentInfo->Description().Length() <= 0 && @@ -414,21 +388,25 @@ // CWmWidgetData::ReCreateLogo // --------------------------------------------------------- // -void CWmWidgetData::ReCreateLogo( const TSize& aSize ) - { - delete iLogoImage; - iLogoImage = NULL; - delete iLogoImageMask; - iLogoImageMask = NULL; - - if ( iWait && iWait->IsStarted() ) +void CWmWidgetData::UpdateLogo( const TSize& aSize, TBool aReCreateLogo ) + { + iLogoSize = aSize; + if ( aReCreateLogo ) { - iWait->AsyncStop(); + delete iLogoImage; + iLogoImage = NULL; + delete iLogoImageMask; + iLogoImageMask = NULL; + HandleIconString( HsContentInfo().IconPath() ); } - - iFireLogoChanged = ETrue; - iLogoSize = aSize; - HandleIconString( HsContentInfo().IconPath() ); + else + { + iImageConverter->UpdateImageSize( + iLogoSize, + HsContentInfo().IconPath(), + *iLogoImage, + *iLogoImageMask ); + } } // --------------------------------------------------------- @@ -467,27 +445,13 @@ { // re-convert image // change event will be fired later when bitmap is ready - ReCreateLogo( iLogoSize ); + UpdateLogo( iLogoSize, ETrue ); } return !( sameAppearance && sameLogo ); } // --------------------------------------------------------- -// CWmWidgetData::IsPrepairingLogo -// --------------------------------------------------------- -// -TBool CWmWidgetData::IsPrepairingLogo() - { - TBool prepairing( EFalse ); - if ( !iLogoImage ) - { - prepairing = iImageConverter->IsProcessing(); - } - return prepairing; - } - -// --------------------------------------------------------- // CWmWidgetData::VisualizeUninstall // --------------------------------------------------------- // @@ -495,14 +459,6 @@ { DestroyAnimData(); PrepairAnimL(); - - // set copy of widget name for uninstallation error case. - if ( iHsContentInfo->Name().Compare( iWmResourceLoader.Uninstalling() ) != - KErrNone ) - { - iWidgetName = iHsContentInfo->Name().AllocL(); - iHsContentInfo->SetNameL( iWmResourceLoader.Uninstalling() ); - } iAsyncUninstalling = ETrue; iAnimationIndex = 0; @@ -581,21 +537,6 @@ } // --------------------------------------------------------- -// CWmWidgetData::TimeoutTick -// --------------------------------------------------------- -// -TInt CWmWidgetData::TimeoutTick( TAny* aPtr ) - { - CWmWidgetData* self = static_cast< CWmWidgetData* >( aPtr ); - self->iTimeoutTimer->Cancel(); - if ( self->iWait && self->iWait->IsStarted() ) - { - self->iWait->AsyncStop(); - } - return 1; - } - -// --------------------------------------------------------- // CWmWidgetData::AnimationBitmap // --------------------------------------------------------- // @@ -668,19 +609,11 @@ // CWmWidgetData::StopUninstallAnimation // --------------------------------------------------------- // -void CWmWidgetData::StopUninstallAnimationL() +void CWmWidgetData::StopUninstallAnimation() { + iAsyncUninstalling = EFalse; DestroyAnimData(); - // restore widget name - if ( iWidgetName ) - { - iHsContentInfo->SetNameL( iWidgetName->Des() ); - delete iWidgetName; - iWidgetName = NULL; - } - FireDataChanged(); //redraw - iAsyncUninstalling = EFalse; } // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/tsrc/wmunittest/conf/ui_wmunittest.cfg --- a/idlehomescreen/widgetmanager/tsrc/wmunittest/conf/ui_wmunittest.cfg Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/conf/ui_wmunittest.cfg Wed May 12 13:12:59 2010 +0300 @@ -603,7 +603,6 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConversionMethod EUnrecognized test ImageConverterDelete test HeapCheck delete test @@ -615,36 +614,21 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "foo bar" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "*************" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "uid skin mif logo icon jpg jpeg icon" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "girl.jpg" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "dirty_hack.exe" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "c:/testframework/wmunittest/wmlogo/logo.jpg" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "skin[0x10005a26 0x1000]" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "skin(0x10005a26)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif XXX YYY)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "mif ( 16384 16385)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "skin( 0x100056c6 0x86 ):mif ( c:\testframework\wmunittest\wmlogo\logo.mif )" -test ImageConverterWaitResult FAIL -test ImageConverterConvert " uid(0x10005901)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "uidaan(0x10005901)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "uid (%%%)" -test ImageConverterWaitResult FAIL +test ImageConverterConvert "foo bar" FAIL +test ImageConverterConvert "*************" FAIL +test ImageConverterConvert "uid skin mif logo icon jpg jpeg icon" FAIL +test ImageConverterConvert "girl.jpg" FAIL +test ImageConverterConvert "dirty_hack.exe" FAIL +test ImageConverterConvert "c:/testframework/wmunittest/wmlogo/logo.jpg" FAIL +test ImageConverterConvert "skin[0x10005a26 0x1000]" FAIL +test ImageConverterConvert "skin(0x10005a26)" FAIL +test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif)" FAIL +test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif XXX YYY)" FAIL +test ImageConverterConvert "mif ( 16384 16385)" FAIL +test ImageConverterConvert "skin( 0x100056c6 0x86 ):mif ( c:\testframework\wmunittest\wmlogo\logo.mif )" FAIL +test ImageConverterConvert " uid(0x10005901)" FAIL +test ImageConverterConvert "uidaan(0x10005901)" FAIL +test ImageConverterConvert "uid (%%%)" FAIL test ImageConverterDelete test HeapCheck delete test @@ -662,9 +646,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin(270501603 4145)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinIcon +test ImageConverterConvert "skin(270501603 4145)" OK test ImageConverterDelete test HeapCheck delete test @@ -676,9 +658,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin(0x101F86E3 0x100d)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinIcon +test ImageConverterConvert "skin(0x101F86E3 0x100d)" OK test ImageConverterDelete test HeapCheck delete test @@ -690,9 +670,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin ( 270501603 4145 ) " -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinIcon +test ImageConverterConvert "skin ( 270501603 4145 ) " OK test ImageConverterDelete test HeapCheck delete test @@ -705,8 +683,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin(0 0)" -test ImageConverterWaitResult FAIL +test ImageConverterConvert "skin(0 0)" FAIL test ImageConverterDelete test HeapCheck delete test @@ -718,9 +695,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin(270501603 4145):mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinAndMifIcon +test ImageConverterConvert "skin(270501603 4145):mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" OK test ImageConverterDelete test HeapCheck delete test @@ -732,9 +707,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin(0x101F86E3 0x1031):mif(c:\testframework\wmunittest\wmlogo\logo.mif 0x4000 0x4001)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinAndMifIcon +test ImageConverterConvert "skin(0x101F86E3 0x1031):mif(c:\testframework\wmunittest\wmlogo\logo.mif 0x4000 0x4001)" OK test ImageConverterDelete test HeapCheck delete test @@ -746,9 +719,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "skin ( 0x101F86E3 0x1031 ) :mif ( c:\testframework\wmunittest\wmlogo\logo.mif 0x4000 0x4001 ) " -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinAndMifIcon +test ImageConverterConvert "skin ( 0x101F86E3 0x1031 ) :mif ( c:\testframework\wmunittest\wmlogo\logo.mif 0x4000 0x4001 ) " OK test ImageConverterDelete test HeapCheck delete test @@ -760,9 +731,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EMifIcon +test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" OK test ImageConverterDelete test HeapCheck delete test @@ -774,9 +743,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EMifIcon +test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384)" OK test ImageConverterDelete test HeapCheck delete test @@ -788,9 +755,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 0x4000 0x4001)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EMifIcon +test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 0x4000 0x4001)" OK test ImageConverterDelete test HeapCheck delete test @@ -802,9 +767,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "mif ( c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385 ) " -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EMifIcon +test ImageConverterConvert "mif ( c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385 ) " OK test ImageConverterDelete test HeapCheck delete test @@ -817,8 +780,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "mif(c:\blabla.mif 16384 16385)" -test ImageConverterWaitResult FAIL +test ImageConverterConvert "mif(c:\blabla.mif 16384 16385)" FAIL test ImageConverterDelete test HeapCheck delete test @@ -830,8 +792,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 1 2)" -test ImageConverterWaitResult FAIL +test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 1 2)" FAIL test ImageConverterDelete test HeapCheck delete test @@ -843,9 +804,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "uid(268458241)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EUidIcon +test ImageConverterConvert "uid(268458241)" OK test ImageConverterDelete test HeapCheck delete test @@ -857,9 +816,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "uid(0x10005901)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EUidIcon +test ImageConverterConvert "uid(0x10005901)" OK test ImageConverterDelete test HeapCheck delete test @@ -871,9 +828,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "uid ( 0x10005901 ) " -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EUidIcon +test ImageConverterConvert "uid ( 0x10005901 ) " OK test ImageConverterDelete test HeapCheck delete test @@ -885,8 +840,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "uid(0x0)" -test ImageConverterWaitResult FAIL +test ImageConverterConvert "uid(0x0)" FAIL test ImageConverterDelete test HeapCheck delete test @@ -899,9 +853,7 @@ test HeapSet test InstallWrtWidget "c:\testframework\wmunittest\wmlogo\test.wgz" test ImageConverterCreate -test ImageConverterConvert "uid(0x2000DAD2)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EUidIcon +test ImageConverterConvert "uid(0x2000DAD2)" OK test ImageConverterDelete test UninstallWrtWidget "0x2000DAD2" test HeapCheck @@ -914,9 +866,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.svg" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESvgIcon +test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.svg" OK test ImageConverterDelete test HeapCheck delete test @@ -928,9 +878,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.svg" -test ImageConverterWaitResult FAIL -test ImageConverterConversionMethod ESvgIcon +test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.svg" FAIL test ImageConverterDelete test HeapCheck delete test @@ -942,9 +890,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.png" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EImageIcon +test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.png" OK test ImageConverterDelete test HeapCheck delete test @@ -956,8 +902,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.png" -test ImageConverterWaitResult FAIL +test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.png" FAIL test ImageConverterDelete test HeapCheck delete test @@ -969,9 +914,7 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.jpg" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EImageIcon +test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.jpg" OK test ImageConverterDelete test HeapCheck delete test @@ -983,80 +926,12 @@ create wmunittest test test HeapSet test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.jpg" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - - - -// Tests image converter cancel when idle -[Test] -title Image converter cancel (idle) -create wmunittest test -test HeapSet -test ImageConverterCreate -test CancelConvert -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter cancel (mif conversion) -[Test] -title Image converter cancel (mif) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" -test CancelConvert +test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.jpg" FAIL test ImageConverterDelete test HeapCheck delete test [Endtest] -// Tests image converter cancel (uid conversion) -[Test] -title Image converter cancel (uid) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "uid(268458241)" -test CancelConvert -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter cancel (svg conversion) -[Test] -title Image converter cancel (svg) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.svg" -test CancelConvert -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter cancel (jpg conversion) -[Test] -title Image converter cancel (jpg) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.jpg" -test CancelConvert -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - - //------------------------------------------------------------------------------- // Misc Test cases //------------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/tsrc/wmunittest/group/wmunittest.mmp --- a/idlehomescreen/widgetmanager/tsrc/wmunittest/group/wmunittest.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/group/wmunittest.mmp Wed May 12 13:12:59 2010 +0300 @@ -56,6 +56,7 @@ SOURCE wminstaller.cpp SOURCE wmprocessmonitor.cpp SOURCE wmwidgetorderdata.cpp +SOURCE wmspbgcleaner.cpp SOURCEPATH ../src SOURCE wmunittest.cpp @@ -108,6 +109,7 @@ LIBRARY inetprotutil.lib LIBRARY bitgdi.lib // CFbsBitmapDevice LIBRARY charconv.lib +LIBRARY browserlauncher.lib // libraries needed by the test framework LIBRARY stiftestinterface.lib diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/tsrc/wmunittest/inc/wmunittest.h --- a/idlehomescreen/widgetmanager/tsrc/wmunittest/inc/wmunittest.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/inc/wmunittest.h Wed May 12 13:12:59 2010 +0300 @@ -26,7 +26,6 @@ #include // RFs #include "wmwidgetorderdata.h" -#include "wmimageconverter.h" // MConverterObserver #include #include "wminstaller.h" @@ -67,7 +66,6 @@ * test class for STIF Test Framework TestScripter. */ NONSHARABLE_CLASS(CWmUnitTest) : public CScriptBase, - public MConverterObserver, public MHsContentController { public: // Constructors and destructor @@ -89,16 +87,13 @@ /** From CScriptBase Runs a script line. */ virtual TInt RunMethodL( CStifItemParser& aItem ); - public: // from MConverterObserver - - virtual void NotifyCompletion( TInt aError ); - public: // from MHsContentController TInt WidgetListL( CHsContentInfoArray& aArray ); TInt WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ); TInt ViewListL( CHsContentInfoArray& aArray ); + TInt ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ); TInt AppListL( CHsContentInfoArray& aArray ); TInt AddWidgetL( CHsContentInfo& aInfo ); TInt RemoveWidgetL( CHsContentInfo& aInfo ); @@ -165,12 +160,6 @@ TInt ImageConverterDeleteL( CStifItemParser& aItem ); // calls image converter's main conversion method TInt ImageConverterConvertL( CStifItemParser& aItem ); - // checks image converter callback and checks its result - TInt ImageConverterWaitResultL( CStifItemParser& aItem ); - // gets and checks the conversion method from image converter - TInt ImageConverterConversionMethodL( CStifItemParser& aItem ); - // cancel ongoing convert - TInt CancelConvertL( CStifItemParser& aItem ); // TESTING UNISTALL TInt UninstallL( CStifItemParser& aItem ); diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_all.cpp --- a/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_all.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_all.cpp Wed May 12 13:12:59 2010 +0300 @@ -75,9 +75,6 @@ ENTRY( "ImageConverterCreate", CWmUnitTest::ImageConverterCreateL ), ENTRY( "ImageConverterDelete", CWmUnitTest::ImageConverterDeleteL ), ENTRY( "ImageConverterConvert", CWmUnitTest::ImageConverterConvertL ), - ENTRY( "ImageConverterWaitResult", CWmUnitTest::ImageConverterWaitResultL ), - ENTRY( "ImageConverterConversionMethod", CWmUnitTest::ImageConverterConversionMethodL ), - ENTRY( "CancelConvert", CWmUnitTest::CancelConvertL ), // uninstall ENTRY( "Uninstall", CWmUnitTest::UninstallL ), diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_converter.cpp --- a/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_converter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_converter.cpp Wed May 12 13:12:59 2010 +0300 @@ -36,7 +36,7 @@ if ( iImageConverter != 0 ) User::Leave( KErrArgument ); TInt ret = KErrNone; _CLEANUPCHECK_BEGIN - iImageConverter = CWmImageConverter::NewL( this ); + iImageConverter = CWmImageConverter::NewL(); _CLEANUPCHECK_END _RETURN("ImageConverterCreateL End", ret); } @@ -64,101 +64,24 @@ TInt ret = KErrNone; iConversionReady = EFalse; TPtrC inputStr; - + aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); User::LeaveIfError( aItem.GetNextString( inputStr ) ); if ( inputStr.Length() == 0 ) User::Leave( KErrArgument ); - TInt err = iImageConverter->HandleIconString( 40, 40, inputStr ); - if ( err != KErrNone ) + TInt expectedResult; + User::LeaveIfError( aItem.GetNextInt( expectedResult ) ); + + CFbsBitmap* bitmap = NULL; + CFbsBitmap* mask = NULL; + TInt err = iImageConverter->HandleIconString( + TSize (40, 40), inputStr, bitmap, mask ); + if ( err != KErrNone && expectedResult == -1 ) { - _LOG("ImageConverterConvertL:HandleIconString returns Error!!!"); - iConversionReady = ETrue; - iConversionError = err; + err = KErrNone; } _RETURN("ImageConverterConvertL End", ret ); } -// ----------------------------------------------------------------------------- -// CWmUnitTest::ImageConverterWaitResultL -// ----------------------------------------------------------------------------- -// -TInt CWmUnitTest::ImageConverterWaitResultL( CStifItemParser& aItem ) - { - if ( iImageConverter == 0 ) User::Leave( KErrArgument ); - TInt ret = KErrNone; - TInt expectedResult; - - User::LeaveIfError( aItem.GetNextInt( expectedResult ) ); - - iWaiting = EFalse; - if ( !iConversionReady ) - { - iWaiting = ETrue; - CActiveScheduler::Start(); - iWaiting = EFalse; - } - - // check conversion error - if ( expectedResult == KErrNone && iConversionError != KErrNone ) - { - _LOG("ImageConverterWaitResultL: expected ok, returns error"); - ret = iConversionError; - } - else if ( expectedResult != KErrNone && iConversionError == KErrNone ) - { - _LOG("ImageConverterWaitResultL: expected error, returns ok"); - ret = KErrGeneral; - } - - _RETURN("ImageConverterWaitResultL End", ret); - } - -// ----------------------------------------------------------------------------- -// CWmUnitTest::NotifyCompletion -// ----------------------------------------------------------------------------- -// -void CWmUnitTest::NotifyCompletion( TInt aError ) - { - if ( !iConversionReady ) - { - iConversionReady = ETrue; - iConversionError = aError; - if ( iWaiting ) - { - CActiveScheduler::Stop(); - } - } - } - -// ----------------------------------------------------------------------------- -// CWmUnitTest::ImageConverterConversionMethodL -// ----------------------------------------------------------------------------- -// -TInt CWmUnitTest::ImageConverterConversionMethodL( CStifItemParser& aItem ) - { - if ( iImageConverter == 0 ) User::Leave( KErrArgument ); - TInt ret = KErrNone; - TInt conversionMethod; - - User::LeaveIfError( aItem.GetNextInt( conversionMethod ) ); - - // check conversion method - if ( conversionMethod != iImageConverter->ConversionMethod() ) - ret = KErrGeneral; - - _RETURN("ImageConverterConversionMethodL End", ret); - } - -// ----------------------------------------------------------------------------- -// CWmUnitTest::CancelConvertL -// ----------------------------------------------------------------------------- -// -TInt CWmUnitTest::CancelConvertL( CStifItemParser& /*aItem*/ ) - { - if ( iImageConverter == 0 ) User::Leave( KErrArgument ); - iImageConverter->Cancel(); - _RETURN("CancelConvertL End", KErrNone); - } // End of File diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_plugin.cpp --- a/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_plugin.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_plugin.cpp Wed May 12 13:12:59 2010 +0300 @@ -135,6 +135,11 @@ return KErrNone; } +TInt CWmUnitTest::ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ) + { + return KErrNone; + } + TInt CWmUnitTest::AppListL( CHsContentInfoArray& /*aArray*/ ) { return KErrNone; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/inc/appui.h --- a/idlehomescreen/xmluicontroller/inc/appui.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/inc/appui.h Wed May 12 13:12:59 2010 +0300 @@ -80,6 +80,8 @@ void HandleEnterEditModeL( TBool aEnter ); + void HandleUiReadyEventL(); + private: // new functions @@ -127,7 +129,16 @@ */ void HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, const TVwsViewId& aViewIdToBeDeactivated ); - + +private: + // from CCoeAppUi + + /** + * Gets a list of help contexts for a particular + * application user interface. + */ + CArrayFix* HelpContextL() const; + public: // new functions diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/inc/onlineofflinehelper.h --- a/idlehomescreen/xmluicontroller/inc/onlineofflinehelper.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/inc/onlineofflinehelper.h Wed May 12 13:12:59 2010 +0300 @@ -193,9 +193,12 @@ enum { + // if defined Home Screen is in online mode. EOnline, - EUtilizeOnline, + // if defined there is no need to show automatic offline note + // and automatic offline setting is disabled. ERoamingShown, + // if defined phone profile is offline. EOfflineProfile }; private: diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/src/aieventhandler.cpp --- a/idlehomescreen/xmluicontroller/src/aieventhandler.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/src/aieventhandler.cpp Wed May 12 13:12:59 2010 +0300 @@ -30,7 +30,6 @@ #include "xnnodeappif.h" #include "aistrcnv.h" -#include #include using namespace AiXmlUiController; @@ -59,27 +58,6 @@ const TUid KVideoCallUid = { 0x101F8681 }; // ======== LOCAL FUNCTIONS ======== -// ---------------------------------------------------------------------------- -// Shows the Homescreen specific help item -// ---------------------------------------------------------------------------- -// -static void ShowHelpL( const TDesC& aHelpString ) - { - TUid fwUid = TUid::Uid( AI_UID3_AIFW_COMMON ); - TCoeContextName helpString; - helpString.Copy( aHelpString ); - - CArrayFixFlat* array = - new (ELeave) CArrayFixFlat(1); - CleanupStack::PushL( array ); - - array->AppendL( TCoeHelpContext( fwUid, helpString ) ); - - HlpLauncher::LaunchHelpApplicationL( - CCoeEnv::Static()->WsSession(), array ); - - CleanupStack::Pop( array ); - } // --------------------------------------------------------------------------- // Activates Phone application either in video call or normal view @@ -175,14 +153,9 @@ } else if ( event == AiUiDef::xml::event::KEventShowHelp ) { - if( iUiController.UiEngineL()->IsEditMode() ) - { - ShowHelpL( KSET_HLP_HOME_SCREEN_EDIT ); - } - else - { - ShowHelpL( KSET_HLP_HOME_SCREEN ); - } + HlpLauncher::LaunchHelpApplicationL( + CCoeEnv::Static()->WsSession(), + CCoeEnv::Static()->AppUi()->AppHelpContextL() ); } else if ( event == AiUiDef::xml::event::KEventActivatePhoneView ) { diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/src/appui.cpp --- a/idlehomescreen/xmluicontroller/src/appui.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/src/appui.cpp Wed May 12 13:12:59 2010 +0300 @@ -27,6 +27,7 @@ #include #include #include +#include // User includes #include @@ -85,14 +86,14 @@ // Always reset the phoneforward P&S key on startup just in case RProperty::Set( KPSUidAiInformation, KActiveIdleForwardNumericKeysToPhone, EPSAiForwardNumericKeysToPhone ); - + iEditModeTitle = StringLoader::LoadL( R_QTN_HS_TITLE_EDITMODE ); // Initialize with empty title pane so it's not shown on startup. __HEAP("XML UI: Init - Construct App UI") + __TIME("XML UI: CXnAppUiAdapter::ConstructL", - CXnAppUiAdapter::ConstructL(); - ) + CXnAppUiAdapter::ConstructL() ); CAknAppUiBase::SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | CAknAppUiBase::EDisableSendKeyLong ); @@ -167,20 +168,8 @@ // void CAppUi::ActivateUi() { - __TICK( "CAppUi::ActivateUi" ); - - TVwsViewId activeViewId; - - TInt err( GetActiveViewId( activeViewId ) ); - - if ( err == KErrNotFound ) - { - // Get Xml Ui view id - TVwsViewId xmlViewId( View().ViewId() ); - - TRAP_IGNORE( ActivateLocalViewL( xmlViewId.iViewUid ) ); - } - + __PRINTS( "*** CAppUi::ActivateUi" ); + if ( iDeviceStatusInfo.Uid() == TUid::Null() ) { __PRINTS( "*** CAppUi::ActivateUI - Loading DeviceStatus plugin" ); @@ -192,15 +181,26 @@ KDeviceStatusPluginName, KNs ); iUiCtl.FwStateHandler()->LoadPlugin( - iDeviceStatusInfo, EAiFwSystemStartup ); - } - - TRAP_IGNORE( iUiCtl.FwEventHandler()->HandleUiReadyEventL( iUiCtl ) ); + iDeviceStatusInfo, EAiFwSystemStartup ); + } __PRINTS( "*** CAppUi::ActivateUi - done" ); } // ---------------------------------------------------------------------------- +// CAppUi::HandleUiReadyEventL() +// ---------------------------------------------------------------------------- +// +void CAppUi::HandleUiReadyEventL() + { + __PRINTS( "*** CAppUi::HandleUiReadyEventL" ); + + iUiCtl.FwEventHandler()->HandleUiReadyEventL( iUiCtl ); + + __PRINTS( "*** CAppUi::HandleUiReadyEventL - done" ); + } + +// ---------------------------------------------------------------------------- // CAppUi::PrepareToExit() // ---------------------------------------------------------------------------- // @@ -643,4 +643,30 @@ sp->DrawNow(); } +// ----------------------------------------------------------------------------- +// CAppUi::HelpContextL +// Returns the help context +// ----------------------------------------------------------------------------- +// +CArrayFix* CAppUi::HelpContextL() const + { + TUid fwUid = TUid::Uid( AI_UID3_AIFW_COMMON ); + TCoeContextName helpString; + if( iUiCtl.UiEngineL()->IsEditMode()) + { + helpString.Copy( KSET_HLP_HOME_SCREEN_EDIT ); + } + else + { + helpString.Copy( KSET_HLP_HOME_SCREEN ); + } + + CArrayFixFlat* array = + new( ELeave ) CArrayFixFlat( 1 ); + CleanupStack::PushL( array ); + array->AppendL( TCoeHelpContext( fwUid, helpString ) ); + CleanupStack::Pop( array ); + return array; + } + // End of File. diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/src/contentrenderer.cpp --- a/idlehomescreen/xmluicontroller/src/contentrenderer.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/src/contentrenderer.cpp Wed May 12 13:12:59 2010 +0300 @@ -268,11 +268,10 @@ { HBufC* id2( PropertyValueL( aArray[j].Target(), AiUiDef::xml::property::KId ) ); + CleanupStack::PushL( id2 ); if ( id2 ) { - CleanupStack::PushL( id2 ); - // Same id and same policy if ( i != j && id->Compare( *id2 ) == 0 && ( aArray[i].Policy().Compare( aArray[j].Policy()) == 0 ) ) @@ -571,15 +570,22 @@ { TInt error( KErrNone ); TInt retval( KErrNone ); + + __PRINTS("*** XML UI: CContentRenderer::CanPublish ***"); - __PRINTS("*** UC: Init - Content Validation ***"); + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x" ), + &aPlugin.PublisherInfo().Name(), aPlugin.PublisherInfo().Uid().iUid ); + __TIME("UC: Content Validation", - TRAP( error, retval = CanPublishL( aPlugin, aContent, aIndex ) ); - ); - __HEAP("UC: Content Validation"); - __PRINTS("*** UC: Done - Content Validation ***"); - - return ( error == KErrNone && retval == KErrNone ); + TRAP( error, retval = CanPublishL( aPlugin, aContent, aIndex ) ) ); + + __HEAP("UC: Content Validation"); + + TBool ret( error == KErrNone && retval == KErrNone ); + + __PRINT( __DBG_FORMAT("*** XML UI: CContentRenderer::CanPublish - done, CanPublish: %d ***"), ret ); + + return ret; } // ---------------------------------------------------------------------------- @@ -593,18 +599,23 @@ TInt error( KErrNone ); TInt retval( KErrNone ); - __PRINTS("*** UC: Init - Content Publishing (Resource) ***"); + __PRINTS("*** XML UI: CContentRenderer::Publish (Resource) ***"); + + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x" ), + &aPlugin.PublisherInfo().Name(), aPlugin.PublisherInfo().Uid().iUid ); + __TIME("UC: Content Publishing (Resource)", - TRAP( error, retval = DoPublishL( aPlugin, aContent, aResource, aIndex ) ); - ); + TRAP( error, retval = DoPublishL( aPlugin, aContent, aResource, aIndex ) ) ); + __HEAP("UC: Content Publishing (Resource)"); - __PRINTS("*** UC: Done - Content Publishing (Resource) ***"); - + if( !error && retval ) { error = retval; } + __PRINT( __DBG_FORMAT("*** XML UI: CContentRenderer::Publish (Resource) - done, error: %d ***"), error ); + return error; } @@ -619,18 +630,23 @@ TInt error( KErrNone ); TInt retval( KErrNone ); - __PRINTS("*** UC: Init - Content Publishing (Value-Text) ***"); + __PRINTS("*** XML UI: CContentRenderer::Publish (Value-Text) ***"); + + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x" ), + &aPlugin.PublisherInfo().Name(), aPlugin.PublisherInfo().Uid().iUid ); + __TIME("UC: Content Publishing (Value-Text)", - TRAP( error, retval = DoPublishL( aPlugin, aContent, aText, aIndex ) ); - ); + TRAP( error, retval = DoPublishL( aPlugin, aContent, aText, aIndex ) ) ); + __HEAP("UC: Content Publishing (Value-Text)"); - __PRINTS("*** UC: Done - Content Publishing (Value-Text) ***"); - + if( !error && retval ) { error = retval; } + __PRINT( __DBG_FORMAT("*** XML UI: CContentRenderer::Publish (Value-Text) - done, error: %d ***"), error ); + return error; } @@ -645,18 +661,23 @@ TInt error( KErrNone ); TInt retval( KErrNone ); - __PRINTS("*** UC: Init - Content Publishing (Value-Buf) ***"); + __PRINTS("*** XML UI: CContentRenderer::Publish (Value-Buf) ***"); + + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x" ), + &aPlugin.PublisherInfo().Name(), aPlugin.PublisherInfo().Uid().iUid ); + __TIME("UC: Content Publishing (Value-Buf)", - TRAP( error, retval = DoPublishL( aPlugin, aContent, aBuf, aIndex ) ); - ) + TRAP( error, retval = DoPublishL( aPlugin, aContent, aBuf, aIndex ) ) ); + __HEAP("UC: Content Publishing (Value-Buf)"); - __PRINTS("*** UC: Done - Content Publishing (Value-Buf) ***"); - + if( !error && retval ) { error = retval; } + __PRINT( __DBG_FORMAT("*** XML UI: CContentRenderer::Publish (Value-Buf) - done, error: %d ***"), error ); + return error; } @@ -671,18 +692,23 @@ TInt error( KErrNone ); TInt retval( KErrNone ); - __PRINTS("*** UC: Init - Content Publishing (Value-RFile) ***"); + __PRINTS("*** XML UI: CContentRenderer::Publish (Value-RFile) ***"); + + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x" ), + &aPlugin.PublisherInfo().Name(), aPlugin.PublisherInfo().Uid().iUid ); + __TIME("UC: Content Publishing (Value-RFile)", - TRAP( error, retval = DoPublishL( aPlugin, aContent, aFile, aIndex ) ); - ); + TRAP( error, retval = DoPublishL( aPlugin, aContent, aFile, aIndex ) ) ); + __HEAP("UC: Content Publishing (Value-RFile)"); - __PRINTS("*** UC: Done - Content Publishing (Value-RFile) ***"); - + if( !error && retval ) { error = retval; } + __PRINT( __DBG_FORMAT("*** XML UI: CContentRenderer::Publish (Value-RFile) - done, error: %d ***"), error ); + return error; } @@ -697,18 +723,23 @@ TInt error( KErrNone ); TInt retval( KErrNone ); - __PRINTS("*** UC: Init - Content Publishing (Clean) ***"); + __PRINTS("*** XML UI: CContentRenderer::Clean (Clean) ***"); + + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x" ), + &aPlugin.PublisherInfo().Name(), aPlugin.PublisherInfo().Uid().iUid ); + __TIME("UC: Content Publishing (Clean)", - TRAP( error, retval = DoCleanL( aPlugin, aContent, aIndex ) ); - ); + TRAP( error, retval = DoCleanL( aPlugin, aContent, aIndex ) ) ); + __HEAP("UC: Content Publishing (Clean)"); - __PRINTS("*** UC: Done - Content Publishing (Clean) ***"); - + if( !error && retval ) { error = retval; } + __PRINT( __DBG_FORMAT("*** XML UI: CContentRenderer::Clean (Clean) - done, error: %d ***"), error ); + return error; } @@ -1275,8 +1306,12 @@ { LeaveIfNull( aElement, KErrArgument ); + __PRINTS("*** XML UI: CContentRenderer::ProcessTransactionElementL ***"); + if ( IsImmediateMode() || iStack->IsEmpty() ) - { + { + __PRINTS("* Immediate transaction mode, or transaction stack is empty" ); + // No transaction. Commit element immediately TBool layoutChanged( EFalse ); @@ -1297,9 +1332,13 @@ else { // Append transaction element to transaction + __PRINTS("* Adding transaction element to stack"); + MTransaction* tr( iStack->Top() ); tr->Append( *aElement ); } + + __PRINTS("*** XML UI: CContentRenderer::ProcessTransactionElementL - done ***"); } // ---------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/src/emptycontenttransactionelement.cpp --- a/idlehomescreen/xmluicontroller/src/emptycontenttransactionelement.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/src/emptycontenttransactionelement.cpp Wed May 12 13:12:59 2010 +0300 @@ -20,6 +20,7 @@ #include "xnnewsticker.h" #include "xnbitmap.h" #include "xntext.h" +#include "xntexteditor.h" #include "emptycontenttransactionelement.h" #include "aixmluiconstants.h" #include "aixmluiutils.h" @@ -81,15 +82,25 @@ imageIntr->SetContentBitmaps( NULL, NULL ); } else if ( type->Type() == XnTextInterface::MXnTextInterface::Type() ) // text element - { - // Get control interface - XnTextInterface::MXnTextInterface* textControl = NULL; - XnComponentInterface::MakeInterfaceL( textControl, Target() ); - LeaveIfNull( textControl, KErrNotSupported ); - - // Clears the text from component - textControl->SetTextL( KNullDesC ); - } + { + // Get control interface + XnTextInterface::MXnTextInterface* textControl = NULL; + XnComponentInterface::MakeInterfaceL( textControl, Target() ); + LeaveIfNull( textControl, KErrNotSupported ); + + // Clears the text from component + textControl->SetTextL( KNullDesC ); + } + else if ( type->Type() == XnTextEditorInterface::MXnTextEditorInterface::Type() ) // texteditor element + { + // Get control interface + XnTextEditorInterface::MXnTextEditorInterface* editorControl = NULL; + XnComponentInterface::MakeInterfaceL( editorControl, Target() ); + LeaveIfNull( editorControl, KErrNotSupported ); + + // Clears the text from component + editorControl->SetTextL( KNullDesC ); + } else { CXnNodeAppIf* parent = Target().ParentL(); diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/src/globalqueryhandler.cpp --- a/idlehomescreen/xmluicontroller/src/globalqueryhandler.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/src/globalqueryhandler.cpp Wed May 12 13:12:59 2010 +0300 @@ -81,6 +81,11 @@ { iUiController.AppUi()->SetOnlineStateL( iSetOnline ); } + else + { + iUiController.AppUi()->SetOnlineStateL(!iSetOnline ); + } + } // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluicontroller/src/onlineofflinehelper.cpp --- a/idlehomescreen/xmluicontroller/src/onlineofflinehelper.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluicontroller/src/onlineofflinehelper.cpp Wed May 12 13:12:59 2010 +0300 @@ -166,14 +166,11 @@ // TBool COnlineOfflineHelper::ShowOnlineItem() const { - if ( iUiCtl.FwStateHandler()->OnlineStateInUse() ) - { - TInt value ( KErrNotFound ); - if ( iUiCtl.SettingsRepository().Get( KAIWebStatus, value ) == KErrNone ) - { - return ( !value ); - } - } + TInt value ( KErrNotFound ); + if ( iUiCtl.SettingsRepository().Get( KAIWebStatus, value ) == KErrNone ) + { + return ( !value ); + } return EFalse; } @@ -183,14 +180,11 @@ // TBool COnlineOfflineHelper::ShowOfflineItem() const { - if ( iUiCtl.FwStateHandler()->OnlineStateInUse() ) - { - TInt value ( KErrNotFound ); - if ( iUiCtl.SettingsRepository().Get( KAIWebStatus, value ) == KErrNone ) - { - return ( value ); - } - } + TInt value ( KErrNotFound ); + if ( iUiCtl.SettingsRepository().Get( KAIWebStatus, value ) == KErrNone ) + { + return ( value ); + } return EFalse; } @@ -201,20 +195,24 @@ void COnlineOfflineHelper::ProcessOnlineStateL( TBool aOnline ) { // User has selected online/offline item from menu - if( iUiCtl.FwStateHandler()->OnlineStateInUse() ) - { - // Don't show R_YES_NO_HS_ONLINE query as user selected online - if ( aOnline ) - { - iFlags.Set( EOnline ); - } - else - { - iFlags.Clear( EOnline ); - } - - SetOnline( aOnline ); - } + // Don't show R_YES_NO_HS_ONLINE query as user selected online + if ( aOnline ) + { + iFlags.Set( EOnline ); + if ( iCurrentNwStatus == ENWRegisteredRoaming ) + { + // When user allready is in foreing network and sets + // HS online we want to disable automatic offline setting and not + // show note QTN_HS_AUTOMATIC_OFFLINE + iFlags.Set( ERoamingShown ); + } + } + else + { + iFlags.Clear( EOnline ); + } + + SetOnline( aOnline ); } // ---------------------------------------------------------------------------- @@ -264,22 +262,38 @@ CurrentNetworkSetting(); if( ( iRoamingNetwork == ECmCellularDataUsageConfirm || iRoamingNetwork == ECmCellularDataUsageDisabled ) - && iFlags.IsSet( EOnline ) ) + && iFlags.IsSet( EOnline ) + && iFlags.IsClear( ERoamingShown ) ) { // Process to offline state. // Don't change the user selection. SetOnline( EFalse ); // Show roaming notification CAknGlobalNote* note = CAknGlobalNote::NewLC(); - HBufC* msg( StringLoader::LoadLC( R_QTN_HS_AUTOMATIC_OFFLINE ) ); + HBufC* msg( StringLoader::LoadLC( + R_QTN_HS_AUTOMATIC_OFFLINE ) ); note->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY); note->ShowNoteL( EAknGlobalInformationNote, *msg ); - CleanupStack::PopAndDestroy( 2, note ); // msg + CleanupStack::PopAndDestroy( 2, note ); // msg + + // set roming shown flag. We want to show + // romign note only once while user stays in foreign + // network. If user sets the HS to online this note is + // not showed again and HS will stay online in foreign + // network. + iFlags.Set( ERoamingShown ); } break; case ENWRegisteredOnHomeNetwork: _LOG1( _L(" Home Network Activated ")); + if ( iFlags.IsSet( ERoamingShown ) ) + { + // Clear ERoamingShown when user returns to home + // network. + iFlags.Clear( ERoamingShown ); + } + iCurrentNwStatus = aNWInfo.iRegistrationStatus; CurrentNetworkSetting(); if( iHomeNetwork == ECmCellularDataUsageAutomatic ) diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockface.cpp --- a/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockface.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockface.cpp Wed May 12 13:12:59 2010 +0300 @@ -113,16 +113,6 @@ CXnNodePluginIf* date( aAdapter.Date() ); - TInt ampmWidth( 0 ); - - if( TLocale().TimeFormat() == ETime12 ) - { - // Measure the full width of the ampm string - ampmWidth = AknBidiTextUtils::MeasureTextBoundsWidth( *ampmFont, ampm, - CFont::TMeasureTextInput::EFVisualOrder ); - } - - const TInt deltaHeight( aRect.Height() - clockFont->TextPaneHeight() ); TInt offset( clockFont->TextPaneTopToBaseline() + deltaHeight / 2 ); diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenu.cpp --- a/idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenu.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenu.cpp Wed May 12 13:12:59 2010 +0300 @@ -145,6 +145,17 @@ } // ----------------------------------------------------------------------------- +// CXnMenu::KeyEventNode +// +// ----------------------------------------------------------------------------- +// +CXnNodePluginIf* CXnMenu::KeyEventNode() + { + CXnMenuAdapter* adapter = static_cast< CXnMenuAdapter* >( ControlAdapter() ); + return adapter->KeyEventNode(); + } + +// ----------------------------------------------------------------------------- // CXnMenu::SetObserver // // ----------------------------------------------------------------------------- @@ -171,11 +182,12 @@ // // ----------------------------------------------------------------------------- // -void CXnMenu::TryDisplayingMenuBarL( const TDesC& aMenuNodeId ) +void CXnMenu::TryDisplayingMenuBarL( const TDesC& aMenuNodeId, + TBool aContextMenu ) { CXnMenuAdapter* adapter = static_cast< CXnMenuAdapter* >( ControlAdapter() ); - adapter->TryDisplayingMenuL( aMenuNodeId ); + adapter->TryDisplayingMenuL( aMenuNodeId, aContextMenu ); } // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenuadapter.cpp --- a/idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenuadapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenuadapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -57,7 +57,10 @@ _LIT8( KEditMode, "Menu/EditMode" ); _LIT8( KNormalMode, "Menu/NormalMode" ); +_LIT8( KContextEditMode, "ContextMenu/EditMode" ); +_LIT8( KContextNormalMode, "ContextMenu/NormalMode" ); _LIT8( KAlwaysShown, "Menu/AlwaysShown" ); + _LIT8( KHsShowHelp, "hs_show_help" ); const TInt KMenuCommandFirst = 6000; @@ -1479,19 +1482,24 @@ CleanupClosePushL( groups ); if ( !iUiEngine->IsTextEditorActive() ) - { - if( iUiEngine->EditMode() ) + { + if( iUiEngine->EditMode() ) { - groups.AppendL( &KEditMode ); + groups.AppendL( + iContextMenu ? &KContextEditMode : &KEditMode ); } else { - groups.Append( &KNormalMode ); + groups.AppendL( + iContextMenu ? &KContextNormalMode : &KNormalMode ); } } - - groups.AppendL( &KAlwaysShown ); - + + if ( !iContextMenu ) + { + groups.AppendL( &KAlwaysShown ); + } + // Recursively add menuitems AddMenuItemL( -1, iMenuBarNode, groups ); @@ -1514,40 +1522,45 @@ return resp; } - - const TDesC8* pos( &KNullDesC8 ); + TInt pos( KErrNotFound ); + if( aKeyEvent.iScanCode == EStdKeyDevice0 ) { - pos = &XnPropertyNames::softkey::type::KLeft; + pos = CEikButtonGroupContainer::ELeftSoftkeyPosition; } else if( aKeyEvent.iScanCode == EStdKeyDevice1 ) { - pos = &XnPropertyNames::softkey::type::KRight; + pos = CEikButtonGroupContainer::ERightSoftkeyPosition; } else if( aKeyEvent.iScanCode == EStdKeyDevice3 ) { - pos = &XnPropertyNames::softkey::type::KMiddle; + pos = CEikButtonGroupContainer::EMiddleSoftkeyPosition; } - if( aType == EEventKeyDown ) - { - iKeyEventNode = FindSoftkeyNodeL( *pos ); + CXnSoftkeyItem* softkey( NULL ); + + if ( pos != KErrNotFound ) + { + softkey = SoftkeyItemL( pos ); } - - if( aKeyEvent.iScanCode == EStdKeyDevice0 || - aKeyEvent.iScanCode == EStdKeyDevice1 || - aKeyEvent.iScanCode == EStdKeyDevice3 ) + + if ( softkey ) { - CXnNodePluginIf* node( FindSoftkeyNodeL( *pos ) ); + CXnNodePluginIf* node( softkey->iNode ); + if( aType == EEventKeyDown ) + { + iKeyEventNode = node; + } + if( node && node == iKeyEventNode ) { // Let base class handle the event resp = CXnControlAdapter::OfferKeyEventL( aKeyEvent, aType ); } } - + if( aType == EEventKeyUp ) { iKeyEventNode = NULL; @@ -1725,8 +1738,7 @@ // ----------------------------------------------------------------------------- // void CXnMenuAdapter::SetContainerL( CEikButtonGroupContainer& aContainer ) - { - + { User::LeaveIfNull( &aContainer ); TBool updateNeeded( EFalse ); @@ -1769,16 +1781,19 @@ // ----------------------------------------------------------------------------- // CXnMenuAdapter::TryDisplayingMenuL -// Displays options menu if it is defined for the softkey item +// Displays options menu // ----------------------------------------------------------------------------- // -void CXnMenuAdapter::TryDisplayingMenuL( const TDesC& aMenuNodeId ) +void CXnMenuAdapter::TryDisplayingMenuL( const TDesC& aMenuNodeId, + TBool aContextMenu ) { HBufC8* id = CnvUtfConverter::ConvertFromUnicodeToUtf8L( aMenuNodeId ); CleanupStack::PushL( id ); CXnNodePluginIf* node( iUiEngine->FindNodeByIdL( *id, iRootNode->Namespace() ) ); CleanupStack::PopAndDestroy( id ); + iContextMenu = aContextMenu; + if( node && node->Type()->Type() == KXnMenu ) { TryDisplayingMenuL(); @@ -1817,8 +1832,8 @@ // ----------------------------------------------------------------------------- // void CXnMenuAdapter::StopDisplayingMenu() - { - if( iMenuShown && iMenuBar ) + { + if( iMenuBar ) { iMenuBar->StopDisplayingMenuBar(); } @@ -2097,6 +2112,16 @@ } // ----------------------------------------------------------------------------- +// CXnMenuAdapter::KeyEventNode +// +// ----------------------------------------------------------------------------- +// +CXnNodePluginIf* CXnMenuAdapter::KeyEventNode() + { + return iKeyEventNode; + } + +// ----------------------------------------------------------------------------- // CXnMenuAdapter::HandleScreenDeviceChangedL // // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/inc/xnnewstickercontrol.h --- a/idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/inc/xnnewstickercontrol.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/inc/xnnewstickercontrol.h Wed May 12 13:12:59 2010 +0300 @@ -90,7 +90,13 @@ * @return The title of the given index. */ const TDesC& Title(TInt aIndex) const; - + + /** + * Returns last index from iTitleTexts + * Which is not empty string + */ + TInt LastIndexWithContent(); + /** * Delete all titles. */ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/src/xnnewstickercontrol.cpp --- a/idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/src/xnnewstickercontrol.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/src/xnnewstickercontrol.cpp Wed May 12 13:12:59 2010 +0300 @@ -174,6 +174,22 @@ } // ----------------------------------------------------------------------------- +// CXnNewstickerControl::LastIndexWithContent +// ----------------------------------------------------------------------------- +// +TInt CXnNewstickerControl::LastIndexWithContent() + { + for( TInt i(iTitleTexts.Count()-1); i>=0; --i ) + { + if ( iTitleTexts[ i ]->Des().Length() > 0 ) + { + return i; + } + } + return KErrNotFound; + } + +// ----------------------------------------------------------------------------- // CXnNewstickerControl::ClearTitles // ----------------------------------------------------------------------------- // @@ -252,22 +268,38 @@ { TBool ret( EFalse ); TInt lastIndex( iTitleTexts.Count() - 1 ); + TInt lastIndexWithContent = LastIndexWithContent(); if( aSetDefault ) { + // set last index as default iCurrentTitleIndex = GetNextTitleWithContent( lastIndex, ETrue ); } else if( iCurrentTitleIndex >= lastIndex ) { + // if iCurrentTitleIndex is in last position start from beginning iCurrentTitleIndex = GetNextTitleWithContent( 0 ); } else { - iCurrentTitleIndex = GetNextTitleWithContent( iCurrentTitleIndex + 1 ); + if ( iCurrentTitleIndex + 1 > lastIndexWithContent ) + { + // if lastIndexWithContent is creater than next item + // it means all next items are empty strings + iCurrentTitleIndex = lastIndexWithContent; + } + else + { + // find next index with content + iCurrentTitleIndex + = GetNextTitleWithContent( iCurrentTitleIndex + 1 ); + } } - if( iCurrentTitleIndex == lastIndex) + if( iCurrentTitleIndex == lastIndexWithContent || + lastIndexWithContent == KErrNotFound ) { + // loop done stop periodic timer. ret = ETrue; } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp --- a/idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -226,7 +226,13 @@ iEditor->SetAknEditorFlags( EAknEditorFlagEnablePartialScreen ); SetFlag( iSplitInputFlags, ESplitInputEnabled ); } - + + // for RTL languages + iEditor->SetAknEditorLocalLanguage( User::Language() ); + ( AknLayoutUtils::LayoutMirrored() ? + iEditor->SetAlignment( EHRightVCenter ) : + iEditor->SetAlignment( EHLeftVCenter ) ); + iEditor->SetObserver( this ); // Default not focused diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/bwins/xn3layoutengineu.def --- a/idlehomescreen/xmluirendering/uiengine/bwins/xn3layoutengineu.def Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/bwins/xn3layoutengineu.def Wed May 12 13:12:59 2010 +0300 @@ -40,27 +40,27 @@ ?SetDataL@CXnControlAdapter@@UAEXABVTDesC8@@ABVTDesC16@@H@Z @ 39 NONAME ; void CXnControlAdapter::SetDataL(class TDesC8 const &, class TDesC16 const &, int) ?ComponentNodeImpl@CXnNodePluginIf@@QAEPAVCXnComponentNodeImpl@@XZ @ 40 NONAME ; class CXnComponentNodeImpl * CXnNodePluginIf::ComponentNodeImpl(void) ??0CXnViewsNodeImpl@@IAE@XZ @ 41 NONAME ; CXnViewsNodeImpl::CXnViewsNodeImpl(void) - ?HandlePointerEventL@CXnControlAdapter@@UAEXABUTPointerEvent@@@Z @ 42 NONAME ; void CXnControlAdapter::HandlePointerEventL(struct TPointerEvent const &) - ??1CXnDocument@@UAE@XZ @ 43 NONAME ; CXnDocument::~CXnDocument(void) - ?HandleResourceChangeL@CXnAppUiAdapter@@MAEXH@Z @ 44 NONAME ; void CXnAppUiAdapter::HandleResourceChangeL(int) - ?DoEnterPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 45 NONAME ; void CXnControlAdapter::DoEnterPowerSaveModeL(enum CXnControlAdapter::TModeEvent) - ?CloneL@CXnProperty@@QAEPAV1@XZ @ 46 NONAME ; class CXnProperty * CXnProperty::CloneL(void) - ?ReportTriggerEventL@CXnNodePluginIf@@QAEXABVTDesC8@@00@Z @ 47 NONAME ; void CXnNodePluginIf::ReportTriggerEventL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &) - ?FocusedNodeL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@XZ @ 48 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FocusedNodeL(void) - ?FindContentSourceNodesL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@@Z @ 49 NONAME ; class RPointerArray TXnUiEngineAppIf::FindContentSourceNodesL(class TDesC8 const &) - ?EqualsL@CXnProperty@@QBEHAAV1@@Z @ 50 NONAME ; int CXnProperty::EqualsL(class CXnProperty &) const - ?ScreenDeviceSize@TXnUiEnginePluginIf@@QAE?AVTSize@@XZ @ 51 NONAME ; class TSize TXnUiEnginePluginIf::ScreenDeviceSize(void) - ??0CXnControlAdapter@@IAE@XZ @ 52 NONAME ; CXnControlAdapter::CXnControlAdapter(void) - ?UiEngineL@CXnNodeAppIf@@QAEPAVTXnUiEngineAppIf@@XZ @ 53 NONAME ; class TXnUiEngineAppIf * CXnNodeAppIf::UiEngineL(void) - ?LongTapDetector@CXnControlAdapter@@QBEPAVCAknLongTapDetector@@XZ @ 54 NONAME ; class CAknLongTapDetector * CXnControlAdapter::LongTapDetector(void) const - ??0CXnAppUiAdapter@@QAE@VTUid@@@Z @ 55 NONAME ; CXnAppUiAdapter::CXnAppUiAdapter(class TUid) - ?Rect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 56 NONAME ; class TRect CXnNodePluginIf::Rect(void) - ?AddChildL@CXnNodePluginIf@@QAEXPAV1@@Z @ 57 NONAME ; void CXnNodePluginIf::AddChildL(class CXnNodePluginIf *) - ?SetNode@CXnComponent@@QAEXAAVCXnNodePluginIf@@@Z @ 58 NONAME ; void CXnComponent::SetNode(class CXnNodePluginIf &) - ?ResetStylusCounter@CXnControlAdapter@@QAEXXZ @ 59 NONAME ; void CXnControlAdapter::ResetStylusCounter(void) - ?SetComponent@CXnComponentNodeImpl@@QAEXPAVCXnComponent@@@Z @ 60 NONAME ; void CXnComponentNodeImpl::SetComponent(class CXnComponent *) - ?LayoutUIL@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 61 NONAME ; void TXnUiEnginePluginIf::LayoutUIL(class CXnNodePluginIf *) - ?FocusVisible@TXnUiEnginePluginIf@@QAEHXZ @ 62 NONAME ; int TXnUiEnginePluginIf::FocusVisible(void) + ?IsTextEditorActive@TXnUiEnginePluginIf@@QAEHXZ @ 42 NONAME ; int TXnUiEnginePluginIf::IsTextEditorActive(void) + ?HandlePointerEventL@CXnControlAdapter@@UAEXABUTPointerEvent@@@Z @ 43 NONAME ; void CXnControlAdapter::HandlePointerEventL(struct TPointerEvent const &) + ??1CXnDocument@@UAE@XZ @ 44 NONAME ; CXnDocument::~CXnDocument(void) + ?HandleResourceChangeL@CXnAppUiAdapter@@MAEXH@Z @ 45 NONAME ; void CXnAppUiAdapter::HandleResourceChangeL(int) + ?DoEnterPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 46 NONAME ; void CXnControlAdapter::DoEnterPowerSaveModeL(enum CXnControlAdapter::TModeEvent) + ?CloneL@CXnProperty@@QAEPAV1@XZ @ 47 NONAME ; class CXnProperty * CXnProperty::CloneL(void) + ?ReportTriggerEventL@CXnNodePluginIf@@QAEXABVTDesC8@@00@Z @ 48 NONAME ; void CXnNodePluginIf::ReportTriggerEventL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &) + ?FocusedNodeL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@XZ @ 49 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FocusedNodeL(void) + ?FindContentSourceNodesL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@@Z @ 50 NONAME ; class RPointerArray TXnUiEngineAppIf::FindContentSourceNodesL(class TDesC8 const &) + ?EqualsL@CXnProperty@@QBEHAAV1@@Z @ 51 NONAME ; int CXnProperty::EqualsL(class CXnProperty &) const + ?ScreenDeviceSize@TXnUiEnginePluginIf@@QAE?AVTSize@@XZ @ 52 NONAME ; class TSize TXnUiEnginePluginIf::ScreenDeviceSize(void) + ??0CXnControlAdapter@@IAE@XZ @ 53 NONAME ; CXnControlAdapter::CXnControlAdapter(void) + ?UiEngineL@CXnNodeAppIf@@QAEPAVTXnUiEngineAppIf@@XZ @ 54 NONAME ; class TXnUiEngineAppIf * CXnNodeAppIf::UiEngineL(void) + ?LongTapDetector@CXnControlAdapter@@QBEPAVCAknLongTapDetector@@XZ @ 55 NONAME ; class CAknLongTapDetector * CXnControlAdapter::LongTapDetector(void) const + ??0CXnAppUiAdapter@@QAE@VTUid@@@Z @ 56 NONAME ; CXnAppUiAdapter::CXnAppUiAdapter(class TUid) + ?Rect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 57 NONAME ; class TRect CXnNodePluginIf::Rect(void) + ?AddChildL@CXnNodePluginIf@@QAEXPAV1@@Z @ 58 NONAME ; void CXnNodePluginIf::AddChildL(class CXnNodePluginIf *) + ?SetNode@CXnComponent@@QAEXAAVCXnNodePluginIf@@@Z @ 59 NONAME ; void CXnComponent::SetNode(class CXnNodePluginIf &) + ?ResetStylusCounter@CXnControlAdapter@@QAEXXZ @ 60 NONAME ; void CXnControlAdapter::ResetStylusCounter(void) + ?SetComponent@CXnComponentNodeImpl@@QAEXPAVCXnComponent@@@Z @ 61 NONAME ; void CXnComponentNodeImpl::SetComponent(class CXnComponent *) + ?LayoutUIL@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 62 NONAME ; void TXnUiEnginePluginIf::LayoutUIL(class CXnNodePluginIf *) ?ExitPowerSaveModeL@CXnControlAdapter@@QAEXW4TModeEvent@1@@Z @ 63 NONAME ; void CXnControlAdapter::ExitPowerSaveModeL(enum CXnControlAdapter::TModeEvent) ?GetThemeResource@TXnUiEngineAppIf@@QAEHABVTDesC16@@AAVRFile@@@Z @ 64 NONAME ; int TXnUiEngineAppIf::GetThemeResource(class TDesC16 const &, class RFile &) ?ConstructL@CXnComponent@@IAEXXZ @ 65 NONAME ; void CXnComponent::ConstructL(void) @@ -69,169 +69,159 @@ ?Uid@CXnDocument@@QAE?AVTUid@@XZ @ 68 NONAME ; class TUid CXnDocument::Uid(void) ?FocusChanged@CXnControlAdapter@@UAEXW4TDrawNow@@@Z @ 69 NONAME ; void CXnControlAdapter::FocusChanged(enum TDrawNow) ?SetBlank@CXnControlAdapter@@QAEXH@Z @ 70 NONAME ; void CXnControlAdapter::SetBlank(int) - ?Component@CXnNodeAppIf@@QAEAAVCXnComponent@@XZ @ 71 NONAME ; class CXnComponent & CXnNodeAppIf::Component(void) - ?SetLayoutCapable@CXnNodePluginIf@@QAEXH@Z @ 72 NONAME ; void CXnNodePluginIf::SetLayoutCapable(int) - ?MarginRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 73 NONAME ; class TRect CXnNodePluginIf::MarginRect(void) - ?UiEngineL@CXnAppUiAdapter@@QAEPAVTXnUiEngineAppIf@@XZ @ 74 NONAME ; class TXnUiEngineAppIf * CXnAppUiAdapter::UiEngineL(void) - ?SwipeEnabledL@TXnUiEnginePluginIf@@QAEHXZ @ 75 NONAME ; int TXnUiEnginePluginIf::SwipeEnabledL(void) - ?SetFocusVisibleL@TXnUiEnginePluginIf@@QAEXH@Z @ 76 NONAME ; void TXnUiEnginePluginIf::SetFocusVisibleL(int) - ?ActiveView@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 77 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::ActiveView(void) - ?HandleXuikonEventL@CXnAppUiAdapter@@UAEXAAVCXnNodeAppIf@@0AAVCXnDomNode@@1@Z @ 78 NONAME ; void CXnAppUiAdapter::HandleXuikonEventL(class CXnNodeAppIf &, class CXnNodeAppIf &, class CXnDomNode &, class CXnDomNode &) - ?RenderUIL@TXnUiEngineAppIf@@QAEXPAVCXnNodeAppIf@@@Z @ 79 NONAME ; void TXnUiEngineAppIf::RenderUIL(class CXnNodeAppIf *) - ?PrepareToExit@CXnAppUiAdapter@@MAEXXZ @ 80 NONAME ; void CXnAppUiAdapter::PrepareToExit(void) - ?DoHandlePropertyChangeL@CXnControlAdapter@@UAEXPAVCXnProperty@@@Z @ 81 NONAME ; void CXnControlAdapter::DoHandlePropertyChangeL(class CXnProperty *) - ?ConstructL@CXnControlAdapter@@IAEXAAVCXnNodePluginIf@@@Z @ 82 NONAME ; void CXnControlAdapter::ConstructL(class CXnNodePluginIf &) - ?FocusedNode@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 83 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FocusedNode(void) - ?SetDataL@CXnComponent@@QAEXABVTDesC8@@ABVTDesC16@@H@Z @ 84 NONAME ; void CXnComponent::SetDataL(class TDesC8 const &, class TDesC16 const &, int) - ?OfferKeyEventL@CXnControlAdapter@@UAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 85 NONAME ; enum TKeyResponse CXnControlAdapter::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode) - ?IsDrawingAllowed@CXnControlAdapter@@QBEHXZ @ 86 NONAME ; int CXnControlAdapter::IsDrawingAllowed(void) const - ?DisplayL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 87 NONAME ; class CXnProperty * CXnNodePluginIf::DisplayL(void) - ?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@PAVCXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 88 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class CXnDomPropertyValue *, class CXnDomStringPool &) - ?Rect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 89 NONAME ; class TRect CXnNodeAppIf::Rect(void) - ?NewL@CXnComponentNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 90 NONAME ; class CXnComponentNodeImpl * CXnComponentNodeImpl::NewL(class CXnType *) - ?WidgetsVisible@TXnUiEngineAppIf@@QBEHXZ @ 91 NONAME ; int TXnUiEngineAppIf::WidgetsVisible(void) const - ?Type@CXnNodePluginIf@@QAEPAVCXnType@@XZ @ 92 NONAME ; class CXnType * CXnNodePluginIf::Type(void) - ?MakeXnComponentL@MXnComponentFactory@@EAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 93 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::MakeXnComponentL(class CXnNodePluginIf &, class CXnComponent * &) - ?ActivateViewL@TXnUiEngineAppIf@@QAEXAAVCXnNodeAppIf@@@Z @ 94 NONAME ; void TXnUiEngineAppIf::ActivateViewL(class CXnNodeAppIf &) - ?UnsetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 95 NONAME ; void CXnNodePluginIf::UnsetStateL(class TDesC8 const &) - ?StringValueL@CXnProperty@@QAEPAVHBufC16@@XZ @ 96 NONAME ; class HBufC16 * CXnProperty::StringValueL(void) - ?DisableRenderUiLC@TXnUiEnginePluginIf@@QAEXXZ @ 97 NONAME ; void TXnUiEnginePluginIf::DisableRenderUiLC(void) - ?SetPropertyL@CXnNodeAppIf@@QAEXPAVCXnProperty@@@Z @ 98 NONAME ; void CXnNodeAppIf::SetPropertyL(class CXnProperty *) - ?View@CXnAppUiAdapter@@QBEAAVCAknView@@XZ @ 99 NONAME ; class CAknView & CXnAppUiAdapter::View(void) const - ?ViewNodeImpl@CXnNodePluginIf@@QAEPAVCXnViewNodeImpl@@XZ @ 100 NONAME ; class CXnViewNodeImpl * CXnNodePluginIf::ViewNodeImpl(void) - ?StripQuotes@CXnUtils@@SAXAAPAVHBufC16@@@Z @ 101 NONAME ; void CXnUtils::StripQuotes(class HBufC16 * &) - ?SetPCDataL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 102 NONAME ; void CXnNodePluginIf::SetPCDataL(class TDesC8 const &) - ?VisibilityL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 103 NONAME ; class CXnProperty * CXnNodePluginIf::VisibilityL(void) - ?Draw@CXnControlAdapter@@MBEXABVTRect@@@Z @ 104 NONAME ; void CXnControlAdapter::Draw(class TRect const &) const - ??1CXnApplication@@UAE@XZ @ 105 NONAME ; CXnApplication::~CXnApplication(void) - ?DoesNodeNeedComponentImplL@MXnComponentFactory@@QAEHABVTDesC8@@@Z @ 106 NONAME ; int MXnComponentFactory::DoesNodeNeedComponentImplL(class TDesC8 const &) - ?ConstructL@CXnViewsNodeImpl@@IAEXPAVCXnType@@@Z @ 107 NONAME ; void CXnViewsNodeImpl::ConstructL(class CXnType *) - ?StringPool@TXnUiEngineAppIf@@QAEAAVCXnDomStringPool@@XZ @ 108 NONAME ; class CXnDomStringPool & TXnUiEngineAppIf::StringPool(void) - ?UiEngineL@CXnNodePluginIf@@QAEPAVTXnUiEnginePluginIf@@XZ @ 109 NONAME ; class TXnUiEnginePluginIf * CXnNodePluginIf::UiEngineL(void) - ?ShowFocus@TXnUiEnginePluginIf@@QAEHXZ @ 110 NONAME ; int TXnUiEnginePluginIf::ShowFocus(void) - ?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@@Z @ 111 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &) - ?PluginNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@PAV2@@Z @ 112 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::PluginNodeL(class CXnNodePluginIf *) - ?VerticalPixelValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 113 NONAME ; int TXnUiEnginePluginIf::VerticalPixelValueL(class CXnProperty *, int) - ?SetComponent@CXnControlAdapter@@QAEXPAVCXnComponent@@@Z @ 114 NONAME ; void CXnControlAdapter::SetComponent(class CXnComponent *) - ??0MXnNodePredicate@@QAE@XZ @ 115 NONAME ; MXnNodePredicate::MXnNodePredicate(void) - ??1CXnViewsNodeImpl@@UAE@XZ @ 116 NONAME ; CXnViewsNodeImpl::~CXnViewsNodeImpl(void) - ?HandleControlEventL@CXnControlAdapter@@UAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z @ 117 NONAME ; void CXnControlAdapter::HandleControlEventL(class CCoeControl *, enum MCoeControlObserver::TCoeEvent) - ?ActivateViewL@TXnUiEnginePluginIf@@QAEXAAVCXnNodePluginIf@@@Z @ 118 NONAME ; void TXnUiEnginePluginIf::ActivateViewL(class CXnNodePluginIf &) - ?HandleScreenDeviceChangedL@CXnControlAdapter@@UAEXXZ @ 119 NONAME ; void CXnControlAdapter::HandleScreenDeviceChangedL(void) - ?SizeChanged@CXnControlAdapter@@MAEXXZ @ 120 NONAME ; void CXnControlAdapter::SizeChanged(void) - ?CountComponentControls@CXnControlAdapter@@MBEHXZ @ 121 NONAME ; int CXnControlAdapter::CountComponentControls(void) const - ?HideTooltipsL@CXnNodeAppIf@@QAEXXZ @ 122 NONAME ; void CXnNodeAppIf::HideTooltipsL(void) - ?GetPropertyL@CXnNodeAppIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 123 NONAME ; class CXnProperty * CXnNodeAppIf::GetPropertyL(class TDesC8 const &) const - ?DeactivateFocusedNodeL@TXnUiEnginePluginIf@@QAEXXZ @ 124 NONAME ; void TXnUiEnginePluginIf::DeactivateFocusedNodeL(void) - ?FindNodeByClassL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@0@Z @ 125 NONAME ; class RPointerArray TXnUiEngineAppIf::FindNodeByClassL(class TDesC8 const &, class TDesC8 const &) - ?Match@MXnNodePredicate@@UAEHAAVCXnNode@@@Z @ 126 NONAME ; int MXnNodePredicate::Match(class CXnNode &) - ?GetBitmapAndMask@CXnControlAdapter@@QAEXABVTDesC16@@0AAPAVCFbsBitmap@@1@Z @ 127 NONAME ; void CXnControlAdapter::GetBitmapAndMask(class TDesC16 const &, class TDesC16 const &, class CFbsBitmap * &, class CFbsBitmap * &) - ?NewL@CXnViewsNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 128 NONAME ; class CXnViewsNodeImpl * CXnViewsNodeImpl::NewL(class CXnType *) - ?PaddingRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 129 NONAME ; class TRect CXnNodeAppIf::PaddingRect(void) - ?SetMarginRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 130 NONAME ; void CXnNodePluginIf::SetMarginRect(class TRect const &) - ?IsDialogDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 131 NONAME ; int TXnUiEnginePluginIf::IsDialogDisplaying(void) - ?HandleEventL@CXnAppUiAdapter@@UAEXABVTDesC16@@AAVCXnNodeAppIf@@@Z @ 132 NONAME ; void CXnAppUiAdapter::HandleEventL(class TDesC16 const &, class CXnNodeAppIf &) - ?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 133 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class TDesC8 const &) const - ?SetPropertyArrayL@CXnNodeAppIf@@QAEXPAV?$RPointerArray@VCXnProperty@@@@@Z @ 134 NONAME ; void CXnNodeAppIf::SetPropertyArrayL(class RPointerArray *) - ?RestorePreviousFocusedNode@TXnUiEnginePluginIf@@QAEXXZ @ 135 NONAME ; void TXnUiEnginePluginIf::RestorePreviousFocusedNode(void) - ?RemoveViewL@CXnAppUiAdapter@@QAEXAAVCAknView@@@Z @ 136 NONAME ; void CXnAppUiAdapter::RemoveViewL(class CAknView &) - ?EnterPowerSaveModeL@CXnComponent@@UAEXXZ @ 137 NONAME ; void CXnComponent::EnterPowerSaveModeL(void) - ?SetRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 138 NONAME ; void CXnNodePluginIf::SetRect(class TRect const &) - ??0CXnComponent@@IAE@XZ @ 139 NONAME ; CXnComponent::CXnComponent(void) - ?CollapseWhiteSpace@CXnUtils@@SAXAAVCXnNodePluginIf@@AAVTDes16@@@Z @ 140 NONAME ; void CXnUtils::CollapseWhiteSpace(class CXnNodePluginIf &, class TDes16 &) - ?SetHandleTooltip@CXnNodePluginIf@@QAEXH@Z @ 141 NONAME ; void CXnNodePluginIf::SetHandleTooltip(int) - ??1CXnAppUiAdapter@@UAE@XZ @ 142 NONAME ; CXnAppUiAdapter::~CXnAppUiAdapter(void) - ?NewL@CXnControlAdapter@@SAPAV1@AAVCXnNodePluginIf@@@Z @ 143 NONAME ; class CXnControlAdapter * CXnControlAdapter::NewL(class CXnNodePluginIf &) - ?EnableLongTapAnimation@CXnControlAdapter@@QAEXH@Z @ 144 NONAME ; void CXnControlAdapter::EnableLongTapAnimation(int) - ?SetPaddingRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 145 NONAME ; void CXnNodePluginIf::SetPaddingRect(class TRect const &) - ?SetFocusedNode@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 146 NONAME ; void TXnUiEnginePluginIf::SetFocusedNode(class CXnNodePluginIf *) - ?ExitPowerSaveModeL@CXnComponent@@UAEXXZ @ 147 NONAME ; void CXnComponent::ExitPowerSaveModeL(void) - ?EnableSwipeL@TXnUiEnginePluginIf@@QAEXH@Z @ 148 NONAME ; void TXnUiEnginePluginIf::EnableSwipeL(int) - ?GetPCData@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 149 NONAME ; class TDesC8 const & CXnNodeAppIf::GetPCData(void) const - ?Namespace@CXnNodeAppIf@@QAEABVTDesC8@@XZ @ 150 NONAME ; class TDesC8 const & CXnNodeAppIf::Namespace(void) - ??1CXnComponentNodeImpl@@UAE@XZ @ 151 NONAME ; CXnComponentNodeImpl::~CXnComponentNodeImpl(void) - ?SetPropertyWithoutNotificationL@CXnNodePluginIf@@QAEXPAVCXnProperty@@@Z @ 152 NONAME ; void CXnNodePluginIf::SetPropertyWithoutNotificationL(class CXnProperty *) - ?GetPCData@CXnNodePluginIf@@QBEABVTDesC8@@XZ @ 153 NONAME ; class TDesC8 const & CXnNodePluginIf::GetPCData(void) const - ?SetPCDataL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 154 NONAME ; void CXnNodeAppIf::SetPCDataL(class TDesC8 const &) - ?Resources@TXnUiEnginePluginIf@@QAEAAV?$CArrayPtrSeg@VCXnResource@@@@XZ @ 155 NONAME ; class CArrayPtrSeg & TXnUiEnginePluginIf::Resources(void) - ?SetContentBitmaps@CXnControlAdapter@@QAEXABVTDesC16@@0@Z @ 156 NONAME ; void CXnControlAdapter::SetContentBitmaps(class TDesC16 const &, class TDesC16 const &) - ??1CXnControlAdapter@@UAE@XZ @ 157 NONAME ; CXnControlAdapter::~CXnControlAdapter(void) - ??1MXnNodePredicate@@UAE@XZ @ 158 NONAME ; MXnNodePredicate::~MXnNodePredicate(void) - ?HorizontalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 159 NONAME ; int TXnUiEnginePluginIf::HorizontalTwipValueL(class CXnProperty *, int) - ?ConstructL@CXnAppUiAdapter@@UAEXXZ @ 160 NONAME ; void CXnAppUiAdapter::ConstructL(void) - ?CreateFontL@CXnUtils@@SAXAAVCXnNodePluginIf@@AAPAVCFont@@AAH@Z @ 161 NONAME ; void CXnUtils::CreateFontL(class CXnNodePluginIf &, class CFont * &, int &) - ??0CXnApplication@@QAE@VTUid@@@Z @ 162 NONAME ; CXnApplication::CXnApplication(class TUid) - ?ComponentControl@CXnControlAdapter@@MBEPAVCCoeControl@@H@Z @ 163 NONAME ; class CCoeControl * CXnControlAdapter::ComponentControl(int) const - ?HandleLongTapEventL@CXnControlAdapter@@UAEXABVTPoint@@0@Z @ 164 NONAME ; void CXnControlAdapter::HandleLongTapEventL(class TPoint const &, class TPoint const &) - ?ParentL@CXnNodeAppIf@@QBEPAV1@XZ @ 165 NONAME ; class CXnNodeAppIf * CXnNodeAppIf::ParentL(void) const - ??1CXnComponent@@UAE@XZ @ 166 NONAME ; CXnComponent::~CXnComponent(void) - ?ControlAdapter@CXnComponent@@QAEPAVCXnControlAdapter@@XZ @ 167 NONAME ; class CXnControlAdapter * CXnComponent::ControlAdapter(void) - ?DrawContentImage@CXnControlAdapter@@IBEXXZ @ 168 NONAME ; void CXnControlAdapter::DrawContentImage(void) const - ?Component@CXnComponentNodeImpl@@QAEPAVCXnComponent@@XZ @ 169 NONAME ; class CXnComponent * CXnComponentNodeImpl::Component(void) - ?WidgetsVisible@TXnUiEnginePluginIf@@QBEHXZ @ 170 NONAME ; int TXnUiEnginePluginIf::WidgetsVisible(void) const - ?SetControlAdapter@CXnComponent@@QAEXPAVCXnControlAdapter@@@Z @ 171 NONAME ; void CXnComponent::SetControlAdapter(class CXnControlAdapter *) - ?SetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 172 NONAME ; void CXnNodePluginIf::SetStateL(class TDesC8 const &) - ?DoesComponentNeedCreation@CXnComponentNodeImpl@@QBEHXZ @ 173 NONAME ; int CXnComponentNodeImpl::DoesComponentNeedCreation(void) const - ??0CXnDocument@@QAE@AAVCEikApplication@@VTUid@@@Z @ 174 NONAME ; CXnDocument::CXnDocument(class CEikApplication &, class TUid) - ?FindNodeByClassL@TXnUiEnginePluginIf@@QAE?AV?$RPointerArray@VCXnNodePluginIf@@@@ABVTDesC16@@@Z @ 175 NONAME ; class RPointerArray TXnUiEnginePluginIf::FindNodeByClassL(class TDesC16 const &) - ?InternalDomNodeType@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 176 NONAME ; class TDesC8 const & CXnNodeAppIf::InternalDomNodeType(void) const - ?UiActivated@CXnAppUiAdapter@@UAEXXZ @ 177 NONAME ; void CXnAppUiAdapter::UiActivated(void) - ?StringPool@TXnUiEnginePluginIf@@QAEAAVCXnDomStringPool@@XZ @ 178 NONAME ; class CXnDomStringPool & TXnUiEnginePluginIf::StringPool(void) - ?SetStateL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 179 NONAME ; void CXnNodeAppIf::SetStateL(class TDesC8 const &) - ?Type@CXnNodeAppIf@@QAEPAVCXnType@@XZ @ 180 NONAME ; class CXnType * CXnNodeAppIf::Type(void) - ?BorderRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 181 NONAME ; class TRect CXnNodeAppIf::BorderRect(void) - ?IdL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 182 NONAME ; class CXnProperty * CXnNodePluginIf::IdL(void) - ?RootNodeL@TXnUiEngineAppIf@@QAEAAVCXnNodeAppIf@@XZ @ 183 NONAME ; class CXnNodeAppIf & TXnUiEngineAppIf::RootNodeL(void) - ?CreateXnComponentL@MXnComponentFactory@@QAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 184 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::CreateXnComponentL(class CXnNodePluginIf &, class CXnComponent * &) - ?RefreshMenuL@TXnUiEngineAppIf@@QAEXXZ @ 185 NONAME ; void TXnUiEngineAppIf::RefreshMenuL(void) - ?PaddingRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 186 NONAME ; class TRect CXnNodePluginIf::PaddingRect(void) - ?MeasureAdaptiveContentL@CXnControlAdapter@@UAE?AVTSize@@ABV2@@Z @ 187 NONAME ; class TSize CXnControlAdapter::MeasureAdaptiveContentL(class TSize const &) - ?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@0W4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 188 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class TDesC8 const &, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &) - ?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@AAV2@@Z @ 189 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class CXnProperty &) const - ?HitRegion@TXnUiEnginePluginIf@@QBEPAVCXnControlAdapter@@XZ @ 190 NONAME ; class CXnControlAdapter * TXnUiEnginePluginIf::HitRegion(void) const - ?MarginRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 191 NONAME ; class TRect CXnNodeAppIf::MarginRect(void) - ?EditMode@TXnUiEnginePluginIf@@QAEHXZ @ 192 NONAME ; int TXnUiEnginePluginIf::EditMode(void) - ?FindNodeByIdL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@ABVTDesC8@@0@Z @ 193 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FindNodeByIdL(class TDesC8 const &, class TDesC8 const &) - ?MakeInterfaceL@CXnComponent@@UAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 194 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnComponent::MakeInterfaceL(class TDesC8 const &) - ?EnableRenderUi@CXnUiEngineImpl@@CAXPAX@Z @ 195 NONAME ; void CXnUiEngineImpl::EnableRenderUi(void *) - ?IsMenuDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 196 NONAME ; int TXnUiEnginePluginIf::IsMenuDisplaying(void) - ?IsMenuDisplaying@TXnUiEngineAppIf@@QAEHXZ @ 197 NONAME ; int TXnUiEngineAppIf::IsMenuDisplaying(void) - ?NewL@CXnProperty@@SAPAV1@PAVCXnDomProperty@@@Z @ 198 NONAME ; class CXnProperty * CXnProperty::NewL(class CXnDomProperty *) - ?ConstructL@CXnComponentNodeImpl@@IAEXPAVCXnType@@@Z @ 199 NONAME ; void CXnComponentNodeImpl::ConstructL(class CXnType *) - ?ChildrenL@CXnNodeAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@XZ @ 200 NONAME ; class RPointerArray CXnNodeAppIf::ChildrenL(void) - ?ConvertHslToRgb@CXnUtils@@SA?AVTRgb@@HHH@Z @ 201 NONAME ; class TRgb CXnUtils::ConvertHslToRgb(int, int, int) - ?LoadPublisher@CXnAppUiAdapter@@UAEHAAVCXnNodeAppIf@@H@Z @ 202 NONAME ; int CXnAppUiAdapter::LoadPublisher(class CXnNodeAppIf &, int) - ?LoadBitmap@CXnControlAdapter@@QAEPAVCFbsBitmap@@ABVTDesC16@@@Z @ 203 NONAME ; class CFbsBitmap * CXnControlAdapter::LoadBitmap(class TDesC16 const &) - ??0MXnComponentFactory@@IAE@XZ @ 204 NONAME ; MXnComponentFactory::MXnComponentFactory(void) - ?SetComponent@CXnViewsNodeImpl@@QAEXPAVCXnComponent@@@Z @ 205 NONAME ; void CXnViewsNodeImpl::SetComponent(class CXnComponent *) - ?BorderRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 206 NONAME ; class TRect CXnNodePluginIf::BorderRect(void) - ?CreateDocumentL@CXnApplication@@MAEPAVCApaDocument@@XZ @ 207 NONAME ; class CApaDocument * CXnApplication::CreateDocumentL(void) - ?CreateFontL@CXnUtils@@SAXABVTDesC16@@HVTFontStyle@@AAPAVCFont@@AAH@Z @ 208 NONAME ; void CXnUtils::CreateFontL(class TDesC16 const &, int, class TFontStyle, class CFont * &, int &) - ?GetPluginNodeArrayL@TXnUiEngineAppIf@@QAEHAAV?$RPointerArray@VCXnNodeAppIf@@@@@Z @ 209 NONAME ; int TXnUiEngineAppIf::GetPluginNodeArrayL(class RPointerArray &) - ?MakeXnControlAdapterL@MXnComponentFactory@@EAEPAVCXnControlAdapter@@AAVCXnNodePluginIf@@PAV2@@Z @ 210 NONAME ; class CXnControlAdapter * MXnComponentFactory::MakeXnControlAdapterL(class CXnNodePluginIf &, class CXnControlAdapter *) - ?IsDrawingAllowed@CXnNodePluginIf@@QBEHXZ @ 211 NONAME ; int CXnNodePluginIf::IsDrawingAllowed(void) const - ?MakeInterfaceL@CXnNodeAppIf@@QAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 212 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnNodeAppIf::MakeInterfaceL(class TDesC8 const &) - ?VerticalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 213 NONAME ; int TXnUiEnginePluginIf::VerticalTwipValueL(class CXnProperty *, int) - ?Component@CXnControlAdapter@@QAEPAVCXnComponent@@XZ @ 214 NONAME ; class CXnComponent * CXnControlAdapter::Component(void) - ?FloatValueL@CXnProperty@@QAENXZ @ 215 NONAME ; double CXnProperty::FloatValueL(void) - ?SetUiEngine@TXnUiEngineAppIf@@QAEXPAVCXnUiEngine@@@Z @ 216 NONAME ; void TXnUiEngineAppIf::SetUiEngine(class CXnUiEngine *) - ?FindNodeByIdL@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@ABVTDesC16@@0@Z @ 217 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FindNodeByIdL(class TDesC16 const &, class TDesC16 const &) - ?IsEditMode@TXnUiEngineAppIf@@QAEHXZ @ 218 NONAME ; int TXnUiEngineAppIf::IsEditMode(void) - ?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@AAH@Z @ 219 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &, int &) - ?EnablePartialTouchInput@TXnUiEnginePluginIf@@QAEXAAVCXnNodePluginIf@@H@Z @ 220 NONAME ; void TXnUiEnginePluginIf::EnablePartialTouchInput(class CXnNodePluginIf &, int) - ?RootNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@XZ @ 221 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::RootNodeL(void) - ?CreateAppUiL@CXnDocument@@UAEPAVCEikAppUi@@XZ @ 222 NONAME ; class CEikAppUi * CXnDocument::CreateAppUiL(void) - ?PathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 223 NONAME ; class CXnProperty * CXnNodePluginIf::PathL(void) - ?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@NW4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 224 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, double, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &) - ?MaskPathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 225 NONAME ; class CXnProperty * CXnNodePluginIf::MaskPathL(void) - ?AppDllUid@CXnApplication@@MBE?AVTUid@@XZ @ 226 NONAME ; class TUid CXnApplication::AppDllUid(void) const - ?DoExitPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 227 NONAME ; void CXnControlAdapter::DoExitPowerSaveModeL(enum CXnControlAdapter::TModeEvent) - ?LabelL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 228 NONAME ; class CXnProperty * CXnNodePluginIf::LabelL(void) - ?Component@CXnViewsNodeImpl@@QAEPAVCXnComponent@@XZ @ 229 NONAME ; class CXnComponent * CXnViewsNodeImpl::Component(void) - ?GetRgbValue@CXnUtils@@SAHAAVTRgb@@ABVTDesC8@@@Z @ 230 NONAME ; int CXnUtils::GetRgbValue(class TRgb &, class TDesC8 const &) - ?StringValue@CXnProperty@@QAEABVTDesC8@@XZ @ 231 NONAME ; class TDesC8 const & CXnProperty::StringValue(void) - ?SetVisible@CXnControlAdapter@@QAEXH@Z @ 232 NONAME ; void CXnControlAdapter::SetVisible(int) - ?Node@CXnComponent@@QAEPAVCXnNodePluginIf@@XZ @ 233 NONAME ; class CXnNodePluginIf * CXnComponent::Node(void) - ?ProcessMessageL@CXnAppUiAdapter@@UAEXVTUid@@ABVTDesC8@@@Z @ 234 NONAME ; void CXnAppUiAdapter::ProcessMessageL(class TUid, class TDesC8 const &) - ?IsTextEditorActive@TXnUiEnginePluginIf@@QAEHXZ @ 235 NONAME ; int TXnUiEnginePluginIf::IsTextEditorActive(void) + ?ProcessMessageL@CXnAppUiAdapter@@UAEXVTUid@@ABVTDesC8@@@Z @ 71 NONAME ; void CXnAppUiAdapter::ProcessMessageL(class TUid, class TDesC8 const &) + ?Component@CXnNodeAppIf@@QAEAAVCXnComponent@@XZ @ 72 NONAME ; class CXnComponent & CXnNodeAppIf::Component(void) + ?SetLayoutCapable@CXnNodePluginIf@@QAEXH@Z @ 73 NONAME ; void CXnNodePluginIf::SetLayoutCapable(int) + ?MarginRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 74 NONAME ; class TRect CXnNodePluginIf::MarginRect(void) + ?UiEngineL@CXnAppUiAdapter@@QAEPAVTXnUiEngineAppIf@@XZ @ 75 NONAME ; class TXnUiEngineAppIf * CXnAppUiAdapter::UiEngineL(void) + ?ActiveView@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 76 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::ActiveView(void) + ?HandleXuikonEventL@CXnAppUiAdapter@@UAEXAAVCXnNodeAppIf@@0AAVCXnDomNode@@1@Z @ 77 NONAME ; void CXnAppUiAdapter::HandleXuikonEventL(class CXnNodeAppIf &, class CXnNodeAppIf &, class CXnDomNode &, class CXnDomNode &) + ?RenderUIL@TXnUiEngineAppIf@@QAEXPAVCXnNodeAppIf@@@Z @ 78 NONAME ; void TXnUiEngineAppIf::RenderUIL(class CXnNodeAppIf *) + ?PrepareToExit@CXnAppUiAdapter@@MAEXXZ @ 79 NONAME ; void CXnAppUiAdapter::PrepareToExit(void) + ?DoHandlePropertyChangeL@CXnControlAdapter@@UAEXPAVCXnProperty@@@Z @ 80 NONAME ; void CXnControlAdapter::DoHandlePropertyChangeL(class CXnProperty *) + ?ConstructL@CXnControlAdapter@@IAEXAAVCXnNodePluginIf@@@Z @ 81 NONAME ; void CXnControlAdapter::ConstructL(class CXnNodePluginIf &) + ?FocusedNode@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 82 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FocusedNode(void) + ?SetDataL@CXnComponent@@QAEXABVTDesC8@@ABVTDesC16@@H@Z @ 83 NONAME ; void CXnComponent::SetDataL(class TDesC8 const &, class TDesC16 const &, int) + ?OfferKeyEventL@CXnControlAdapter@@UAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 84 NONAME ; enum TKeyResponse CXnControlAdapter::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode) + ?IsDrawingAllowed@CXnControlAdapter@@QBEHXZ @ 85 NONAME ; int CXnControlAdapter::IsDrawingAllowed(void) const + ?DisplayL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 86 NONAME ; class CXnProperty * CXnNodePluginIf::DisplayL(void) + ?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@PAVCXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 87 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class CXnDomPropertyValue *, class CXnDomStringPool &) + ?Rect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 88 NONAME ; class TRect CXnNodeAppIf::Rect(void) + ?NewL@CXnComponentNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 89 NONAME ; class CXnComponentNodeImpl * CXnComponentNodeImpl::NewL(class CXnType *) + ?WidgetsVisible@TXnUiEngineAppIf@@QBEHXZ @ 90 NONAME ; int TXnUiEngineAppIf::WidgetsVisible(void) const + ?Type@CXnNodePluginIf@@QAEPAVCXnType@@XZ @ 91 NONAME ; class CXnType * CXnNodePluginIf::Type(void) + ?MakeXnComponentL@MXnComponentFactory@@EAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 92 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::MakeXnComponentL(class CXnNodePluginIf &, class CXnComponent * &) + ?UnsetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 93 NONAME ; void CXnNodePluginIf::UnsetStateL(class TDesC8 const &) + ?StringValueL@CXnProperty@@QAEPAVHBufC16@@XZ @ 94 NONAME ; class HBufC16 * CXnProperty::StringValueL(void) + ?DisableRenderUiLC@TXnUiEnginePluginIf@@QAEXXZ @ 95 NONAME ; void TXnUiEnginePluginIf::DisableRenderUiLC(void) + ?SetPropertyL@CXnNodeAppIf@@QAEXPAVCXnProperty@@@Z @ 96 NONAME ; void CXnNodeAppIf::SetPropertyL(class CXnProperty *) + ?View@CXnAppUiAdapter@@QBEAAVCAknView@@XZ @ 97 NONAME ; class CAknView & CXnAppUiAdapter::View(void) const + ?ViewNodeImpl@CXnNodePluginIf@@QAEPAVCXnViewNodeImpl@@XZ @ 98 NONAME ; class CXnViewNodeImpl * CXnNodePluginIf::ViewNodeImpl(void) + ?StripQuotes@CXnUtils@@SAXAAPAVHBufC16@@@Z @ 99 NONAME ; void CXnUtils::StripQuotes(class HBufC16 * &) + ?SetPCDataL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 100 NONAME ; void CXnNodePluginIf::SetPCDataL(class TDesC8 const &) + ?VisibilityL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 101 NONAME ; class CXnProperty * CXnNodePluginIf::VisibilityL(void) + ?Draw@CXnControlAdapter@@MBEXABVTRect@@@Z @ 102 NONAME ; void CXnControlAdapter::Draw(class TRect const &) const + ??1CXnApplication@@UAE@XZ @ 103 NONAME ; CXnApplication::~CXnApplication(void) + ?DoesNodeNeedComponentImplL@MXnComponentFactory@@QAEHABVTDesC8@@@Z @ 104 NONAME ; int MXnComponentFactory::DoesNodeNeedComponentImplL(class TDesC8 const &) + ?ConstructL@CXnViewsNodeImpl@@IAEXPAVCXnType@@@Z @ 105 NONAME ; void CXnViewsNodeImpl::ConstructL(class CXnType *) + ?StringPool@TXnUiEngineAppIf@@QAEAAVCXnDomStringPool@@XZ @ 106 NONAME ; class CXnDomStringPool & TXnUiEngineAppIf::StringPool(void) + ?UiEngineL@CXnNodePluginIf@@QAEPAVTXnUiEnginePluginIf@@XZ @ 107 NONAME ; class TXnUiEnginePluginIf * CXnNodePluginIf::UiEngineL(void) + ?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@@Z @ 108 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &) + ?PluginNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@PAV2@@Z @ 109 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::PluginNodeL(class CXnNodePluginIf *) + ?VerticalPixelValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 110 NONAME ; int TXnUiEnginePluginIf::VerticalPixelValueL(class CXnProperty *, int) + ?SetComponent@CXnControlAdapter@@QAEXPAVCXnComponent@@@Z @ 111 NONAME ; void CXnControlAdapter::SetComponent(class CXnComponent *) + ??0MXnNodePredicate@@QAE@XZ @ 112 NONAME ; MXnNodePredicate::MXnNodePredicate(void) + ??1CXnViewsNodeImpl@@UAE@XZ @ 113 NONAME ; CXnViewsNodeImpl::~CXnViewsNodeImpl(void) + ?HandleControlEventL@CXnControlAdapter@@UAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z @ 114 NONAME ; void CXnControlAdapter::HandleControlEventL(class CCoeControl *, enum MCoeControlObserver::TCoeEvent) + ?HandleScreenDeviceChangedL@CXnControlAdapter@@UAEXXZ @ 115 NONAME ; void CXnControlAdapter::HandleScreenDeviceChangedL(void) + ?SizeChanged@CXnControlAdapter@@MAEXXZ @ 116 NONAME ; void CXnControlAdapter::SizeChanged(void) + ?CountComponentControls@CXnControlAdapter@@MBEHXZ @ 117 NONAME ; int CXnControlAdapter::CountComponentControls(void) const + ?HideTooltipsL@CXnNodeAppIf@@QAEXXZ @ 118 NONAME ; void CXnNodeAppIf::HideTooltipsL(void) + ?GetPropertyL@CXnNodeAppIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 119 NONAME ; class CXnProperty * CXnNodeAppIf::GetPropertyL(class TDesC8 const &) const + ?FindNodeByClassL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@0@Z @ 120 NONAME ; class RPointerArray TXnUiEngineAppIf::FindNodeByClassL(class TDesC8 const &, class TDesC8 const &) + ?Match@MXnNodePredicate@@UAEHAAVCXnNode@@@Z @ 121 NONAME ; int MXnNodePredicate::Match(class CXnNode &) + ?GetBitmapAndMask@CXnControlAdapter@@QAEXABVTDesC16@@0AAPAVCFbsBitmap@@1@Z @ 122 NONAME ; void CXnControlAdapter::GetBitmapAndMask(class TDesC16 const &, class TDesC16 const &, class CFbsBitmap * &, class CFbsBitmap * &) + ?NewL@CXnViewsNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 123 NONAME ; class CXnViewsNodeImpl * CXnViewsNodeImpl::NewL(class CXnType *) + ?PaddingRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 124 NONAME ; class TRect CXnNodeAppIf::PaddingRect(void) + ?SetMarginRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 125 NONAME ; void CXnNodePluginIf::SetMarginRect(class TRect const &) + ?IsDialogDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 126 NONAME ; int TXnUiEnginePluginIf::IsDialogDisplaying(void) + ?HandleEventL@CXnAppUiAdapter@@UAEXABVTDesC16@@AAVCXnNodeAppIf@@@Z @ 127 NONAME ; void CXnAppUiAdapter::HandleEventL(class TDesC16 const &, class CXnNodeAppIf &) + ?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 128 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class TDesC8 const &) const + ?SetPropertyArrayL@CXnNodeAppIf@@QAEXPAV?$RPointerArray@VCXnProperty@@@@@Z @ 129 NONAME ; void CXnNodeAppIf::SetPropertyArrayL(class RPointerArray *) + ?RemoveViewL@CXnAppUiAdapter@@QAEXAAVCAknView@@@Z @ 130 NONAME ; void CXnAppUiAdapter::RemoveViewL(class CAknView &) + ?EnterPowerSaveModeL@CXnComponent@@UAEXXZ @ 131 NONAME ; void CXnComponent::EnterPowerSaveModeL(void) + ?SetRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 132 NONAME ; void CXnNodePluginIf::SetRect(class TRect const &) + ??0CXnComponent@@IAE@XZ @ 133 NONAME ; CXnComponent::CXnComponent(void) + ?CollapseWhiteSpace@CXnUtils@@SAXAAVCXnNodePluginIf@@AAVTDes16@@@Z @ 134 NONAME ; void CXnUtils::CollapseWhiteSpace(class CXnNodePluginIf &, class TDes16 &) + ?SetHandleTooltip@CXnNodePluginIf@@QAEXH@Z @ 135 NONAME ; void CXnNodePluginIf::SetHandleTooltip(int) + ??1CXnAppUiAdapter@@UAE@XZ @ 136 NONAME ; CXnAppUiAdapter::~CXnAppUiAdapter(void) + ?NewL@CXnControlAdapter@@SAPAV1@AAVCXnNodePluginIf@@@Z @ 137 NONAME ; class CXnControlAdapter * CXnControlAdapter::NewL(class CXnNodePluginIf &) + ?EnableLongTapAnimation@CXnControlAdapter@@QAEXH@Z @ 138 NONAME ; void CXnControlAdapter::EnableLongTapAnimation(int) + ?SetPaddingRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 139 NONAME ; void CXnNodePluginIf::SetPaddingRect(class TRect const &) + ?SetFocusedNode@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 140 NONAME ; void TXnUiEnginePluginIf::SetFocusedNode(class CXnNodePluginIf *) + ?ExitPowerSaveModeL@CXnComponent@@UAEXXZ @ 141 NONAME ; void CXnComponent::ExitPowerSaveModeL(void) + ?GetPCData@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 142 NONAME ; class TDesC8 const & CXnNodeAppIf::GetPCData(void) const + ?Namespace@CXnNodeAppIf@@QAEABVTDesC8@@XZ @ 143 NONAME ; class TDesC8 const & CXnNodeAppIf::Namespace(void) + ??1CXnComponentNodeImpl@@UAE@XZ @ 144 NONAME ; CXnComponentNodeImpl::~CXnComponentNodeImpl(void) + ?SetPropertyWithoutNotificationL@CXnNodePluginIf@@QAEXPAVCXnProperty@@@Z @ 145 NONAME ; void CXnNodePluginIf::SetPropertyWithoutNotificationL(class CXnProperty *) + ?GetPCData@CXnNodePluginIf@@QBEABVTDesC8@@XZ @ 146 NONAME ; class TDesC8 const & CXnNodePluginIf::GetPCData(void) const + ?SetPCDataL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 147 NONAME ; void CXnNodeAppIf::SetPCDataL(class TDesC8 const &) + ?Resources@TXnUiEnginePluginIf@@QAEAAV?$CArrayPtrSeg@VCXnResource@@@@XZ @ 148 NONAME ; class CArrayPtrSeg & TXnUiEnginePluginIf::Resources(void) + ?SetContentBitmaps@CXnControlAdapter@@QAEXABVTDesC16@@0@Z @ 149 NONAME ; void CXnControlAdapter::SetContentBitmaps(class TDesC16 const &, class TDesC16 const &) + ??1CXnControlAdapter@@UAE@XZ @ 150 NONAME ; CXnControlAdapter::~CXnControlAdapter(void) + ??1MXnNodePredicate@@UAE@XZ @ 151 NONAME ; MXnNodePredicate::~MXnNodePredicate(void) + ?HorizontalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 152 NONAME ; int TXnUiEnginePluginIf::HorizontalTwipValueL(class CXnProperty *, int) + ?ConstructL@CXnAppUiAdapter@@UAEXXZ @ 153 NONAME ; void CXnAppUiAdapter::ConstructL(void) + ?CreateFontL@CXnUtils@@SAXAAVCXnNodePluginIf@@AAPAVCFont@@AAH@Z @ 154 NONAME ; void CXnUtils::CreateFontL(class CXnNodePluginIf &, class CFont * &, int &) + ??0CXnApplication@@QAE@VTUid@@@Z @ 155 NONAME ; CXnApplication::CXnApplication(class TUid) + ?ComponentControl@CXnControlAdapter@@MBEPAVCCoeControl@@H@Z @ 156 NONAME ; class CCoeControl * CXnControlAdapter::ComponentControl(int) const + ?HandleLongTapEventL@CXnControlAdapter@@UAEXABVTPoint@@0@Z @ 157 NONAME ; void CXnControlAdapter::HandleLongTapEventL(class TPoint const &, class TPoint const &) + ?ParentL@CXnNodeAppIf@@QBEPAV1@XZ @ 158 NONAME ; class CXnNodeAppIf * CXnNodeAppIf::ParentL(void) const + ??1CXnComponent@@UAE@XZ @ 159 NONAME ; CXnComponent::~CXnComponent(void) + ?ControlAdapter@CXnComponent@@QAEPAVCXnControlAdapter@@XZ @ 160 NONAME ; class CXnControlAdapter * CXnComponent::ControlAdapter(void) + ?DrawContentImage@CXnControlAdapter@@IBEXXZ @ 161 NONAME ; void CXnControlAdapter::DrawContentImage(void) const + ?Component@CXnComponentNodeImpl@@QAEPAVCXnComponent@@XZ @ 162 NONAME ; class CXnComponent * CXnComponentNodeImpl::Component(void) + ?WidgetsVisible@TXnUiEnginePluginIf@@QBEHXZ @ 163 NONAME ; int TXnUiEnginePluginIf::WidgetsVisible(void) const + ?SetControlAdapter@CXnComponent@@QAEXPAVCXnControlAdapter@@@Z @ 164 NONAME ; void CXnComponent::SetControlAdapter(class CXnControlAdapter *) + ?SetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 165 NONAME ; void CXnNodePluginIf::SetStateL(class TDesC8 const &) + ?DoesComponentNeedCreation@CXnComponentNodeImpl@@QBEHXZ @ 166 NONAME ; int CXnComponentNodeImpl::DoesComponentNeedCreation(void) const + ??0CXnDocument@@QAE@AAVCEikApplication@@VTUid@@@Z @ 167 NONAME ; CXnDocument::CXnDocument(class CEikApplication &, class TUid) + ?FindNodeByClassL@TXnUiEnginePluginIf@@QAE?AV?$RPointerArray@VCXnNodePluginIf@@@@ABVTDesC16@@@Z @ 168 NONAME ; class RPointerArray TXnUiEnginePluginIf::FindNodeByClassL(class TDesC16 const &) + ?InternalDomNodeType@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 169 NONAME ; class TDesC8 const & CXnNodeAppIf::InternalDomNodeType(void) const + ?StringPool@TXnUiEnginePluginIf@@QAEAAVCXnDomStringPool@@XZ @ 170 NONAME ; class CXnDomStringPool & TXnUiEnginePluginIf::StringPool(void) + ?SetStateL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 171 NONAME ; void CXnNodeAppIf::SetStateL(class TDesC8 const &) + ?Type@CXnNodeAppIf@@QAEPAVCXnType@@XZ @ 172 NONAME ; class CXnType * CXnNodeAppIf::Type(void) + ?BorderRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 173 NONAME ; class TRect CXnNodeAppIf::BorderRect(void) + ?IdL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 174 NONAME ; class CXnProperty * CXnNodePluginIf::IdL(void) + ?RootNodeL@TXnUiEngineAppIf@@QAEAAVCXnNodeAppIf@@XZ @ 175 NONAME ; class CXnNodeAppIf & TXnUiEngineAppIf::RootNodeL(void) + ?CreateXnComponentL@MXnComponentFactory@@QAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 176 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::CreateXnComponentL(class CXnNodePluginIf &, class CXnComponent * &) + ?RefreshMenuL@TXnUiEngineAppIf@@QAEXXZ @ 177 NONAME ; void TXnUiEngineAppIf::RefreshMenuL(void) + ?PaddingRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 178 NONAME ; class TRect CXnNodePluginIf::PaddingRect(void) + ?MeasureAdaptiveContentL@CXnControlAdapter@@UAE?AVTSize@@ABV2@@Z @ 179 NONAME ; class TSize CXnControlAdapter::MeasureAdaptiveContentL(class TSize const &) + ?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@0W4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 180 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class TDesC8 const &, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &) + ?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@AAV2@@Z @ 181 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class CXnProperty &) const + ?MarginRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 182 NONAME ; class TRect CXnNodeAppIf::MarginRect(void) + ?EditMode@TXnUiEnginePluginIf@@QAEHXZ @ 183 NONAME ; int TXnUiEnginePluginIf::EditMode(void) + ?FindNodeByIdL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@ABVTDesC8@@0@Z @ 184 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FindNodeByIdL(class TDesC8 const &, class TDesC8 const &) + ?MakeInterfaceL@CXnComponent@@UAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 185 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnComponent::MakeInterfaceL(class TDesC8 const &) + ?EnableRenderUi@CXnUiEngineImpl@@CAXPAX@Z @ 186 NONAME ; void CXnUiEngineImpl::EnableRenderUi(void *) + ?IsMenuDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 187 NONAME ; int TXnUiEnginePluginIf::IsMenuDisplaying(void) + ?IsMenuDisplaying@TXnUiEngineAppIf@@QAEHXZ @ 188 NONAME ; int TXnUiEngineAppIf::IsMenuDisplaying(void) + ?NewL@CXnProperty@@SAPAV1@PAVCXnDomProperty@@@Z @ 189 NONAME ; class CXnProperty * CXnProperty::NewL(class CXnDomProperty *) + ?ConstructL@CXnComponentNodeImpl@@IAEXPAVCXnType@@@Z @ 190 NONAME ; void CXnComponentNodeImpl::ConstructL(class CXnType *) + ?ChildrenL@CXnNodeAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@XZ @ 191 NONAME ; class RPointerArray CXnNodeAppIf::ChildrenL(void) + ?ConvertHslToRgb@CXnUtils@@SA?AVTRgb@@HHH@Z @ 192 NONAME ; class TRgb CXnUtils::ConvertHslToRgb(int, int, int) + ?LoadPublisher@CXnAppUiAdapter@@UAEHAAVCXnNodeAppIf@@H@Z @ 193 NONAME ; int CXnAppUiAdapter::LoadPublisher(class CXnNodeAppIf &, int) + ?LoadBitmap@CXnControlAdapter@@QAEPAVCFbsBitmap@@ABVTDesC16@@@Z @ 194 NONAME ; class CFbsBitmap * CXnControlAdapter::LoadBitmap(class TDesC16 const &) + ??0MXnComponentFactory@@IAE@XZ @ 195 NONAME ; MXnComponentFactory::MXnComponentFactory(void) + ?SetComponent@CXnViewsNodeImpl@@QAEXPAVCXnComponent@@@Z @ 196 NONAME ; void CXnViewsNodeImpl::SetComponent(class CXnComponent *) + ?BorderRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 197 NONAME ; class TRect CXnNodePluginIf::BorderRect(void) + ?CreateDocumentL@CXnApplication@@MAEPAVCApaDocument@@XZ @ 198 NONAME ; class CApaDocument * CXnApplication::CreateDocumentL(void) + ?HandleUiReadyEventL@CXnAppUiAdapter@@UAEXXZ @ 199 NONAME ; void CXnAppUiAdapter::HandleUiReadyEventL(void) + ?CreateFontL@CXnUtils@@SAXABVTDesC16@@HVTFontStyle@@AAPAVCFont@@AAH@Z @ 200 NONAME ; void CXnUtils::CreateFontL(class TDesC16 const &, int, class TFontStyle, class CFont * &, int &) + ?GetPluginNodeArrayL@TXnUiEngineAppIf@@QAEHAAV?$RPointerArray@VCXnNodeAppIf@@@@@Z @ 201 NONAME ; int TXnUiEngineAppIf::GetPluginNodeArrayL(class RPointerArray &) + ?MakeXnControlAdapterL@MXnComponentFactory@@EAEPAVCXnControlAdapter@@AAVCXnNodePluginIf@@PAV2@@Z @ 202 NONAME ; class CXnControlAdapter * MXnComponentFactory::MakeXnControlAdapterL(class CXnNodePluginIf &, class CXnControlAdapter *) + ?IsDrawingAllowed@CXnNodePluginIf@@QBEHXZ @ 203 NONAME ; int CXnNodePluginIf::IsDrawingAllowed(void) const + ?MakeInterfaceL@CXnNodeAppIf@@QAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 204 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnNodeAppIf::MakeInterfaceL(class TDesC8 const &) + ?VerticalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 205 NONAME ; int TXnUiEnginePluginIf::VerticalTwipValueL(class CXnProperty *, int) + ?Component@CXnControlAdapter@@QAEPAVCXnComponent@@XZ @ 206 NONAME ; class CXnComponent * CXnControlAdapter::Component(void) + ?FloatValueL@CXnProperty@@QAENXZ @ 207 NONAME ; double CXnProperty::FloatValueL(void) + ?SetUiEngine@TXnUiEngineAppIf@@QAEXPAVCXnUiEngine@@@Z @ 208 NONAME ; void TXnUiEngineAppIf::SetUiEngine(class CXnUiEngine *) + ?FindNodeByIdL@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@ABVTDesC16@@0@Z @ 209 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FindNodeByIdL(class TDesC16 const &, class TDesC16 const &) + ?IsEditMode@TXnUiEngineAppIf@@QAEHXZ @ 210 NONAME ; int TXnUiEngineAppIf::IsEditMode(void) + ?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@AAH@Z @ 211 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &, int &) + ?EnablePartialTouchInput@TXnUiEnginePluginIf@@QAEXAAVCXnNodePluginIf@@H@Z @ 212 NONAME ; void TXnUiEnginePluginIf::EnablePartialTouchInput(class CXnNodePluginIf &, int) + ?RootNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@XZ @ 213 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::RootNodeL(void) + ?CreateAppUiL@CXnDocument@@UAEPAVCEikAppUi@@XZ @ 214 NONAME ; class CEikAppUi * CXnDocument::CreateAppUiL(void) + ?PathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 215 NONAME ; class CXnProperty * CXnNodePluginIf::PathL(void) + ?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@NW4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 216 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, double, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &) + ?MaskPathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 217 NONAME ; class CXnProperty * CXnNodePluginIf::MaskPathL(void) + ?AppDllUid@CXnApplication@@MBE?AVTUid@@XZ @ 218 NONAME ; class TUid CXnApplication::AppDllUid(void) const + ?DoExitPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 219 NONAME ; void CXnControlAdapter::DoExitPowerSaveModeL(enum CXnControlAdapter::TModeEvent) + ?LabelL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 220 NONAME ; class CXnProperty * CXnNodePluginIf::LabelL(void) + ?Component@CXnViewsNodeImpl@@QAEPAVCXnComponent@@XZ @ 221 NONAME ; class CXnComponent * CXnViewsNodeImpl::Component(void) + ?GetRgbValue@CXnUtils@@SAHAAVTRgb@@ABVTDesC8@@@Z @ 222 NONAME ; int CXnUtils::GetRgbValue(class TRgb &, class TDesC8 const &) + ?StringValue@CXnProperty@@QAEABVTDesC8@@XZ @ 223 NONAME ; class TDesC8 const & CXnProperty::StringValue(void) + ?SetVisible@CXnControlAdapter@@QAEXH@Z @ 224 NONAME ; void CXnControlAdapter::SetVisible(int) + ?Node@CXnComponent@@QAEPAVCXnNodePluginIf@@XZ @ 225 NONAME ; class CXnNodePluginIf * CXnComponent::Node(void) diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/eabi/xn3layoutengineu.def --- a/idlehomescreen/xmluirendering/uiengine/eabi/xn3layoutengineu.def Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/eabi/xn3layoutengineu.def Wed May 12 13:12:59 2010 +0300 @@ -56,77 +56,77 @@ _ZN14CXnApplicationD2Ev @ 55 NONAME _ZN15CXnAppUiAdapter10ConstructLEv @ 56 NONAME _ZN15CXnAppUiAdapter11RemoveViewLER8CAknView @ 57 NONAME - _ZN15CXnAppUiAdapter11UiActivatedEv @ 58 NONAME - _ZN15CXnAppUiAdapter12HandleEventLERK7TDesC16R12CXnNodeAppIf @ 59 NONAME - _ZN15CXnAppUiAdapter13LoadPublisherER12CXnNodeAppIfi @ 60 NONAME - _ZN15CXnAppUiAdapter13PrepareToExitEv @ 61 NONAME + _ZN15CXnAppUiAdapter12HandleEventLERK7TDesC16R12CXnNodeAppIf @ 58 NONAME + _ZN15CXnAppUiAdapter13LoadPublisherER12CXnNodeAppIfi @ 59 NONAME + _ZN15CXnAppUiAdapter13PrepareToExitEv @ 60 NONAME + _ZN15CXnAppUiAdapter15ProcessMessageLE4TUidRK6TDesC8 @ 61 NONAME _ZN15CXnAppUiAdapter16DestroyPublisherER12CXnNodeAppIfi @ 62 NONAME _ZN15CXnAppUiAdapter16DynInitMenuItemLERK7TDesC16P13RPointerArrayI12CXnNodeAppIfE @ 63 NONAME _ZN15CXnAppUiAdapter18HandleXuikonEventLER12CXnNodeAppIfS1_R10CXnDomNodeS3_ @ 64 NONAME - _ZN15CXnAppUiAdapter20HandleEnterEditModeLEi @ 65 NONAME - _ZN15CXnAppUiAdapter21HandleResourceChangeLEi @ 66 NONAME - _ZN15CXnAppUiAdapter9UiEngineLEv @ 67 NONAME - _ZN15CXnAppUiAdapterC1E4TUid @ 68 NONAME - _ZN15CXnAppUiAdapterC2E4TUid @ 69 NONAME - _ZN15CXnAppUiAdapterD0Ev @ 70 NONAME - _ZN15CXnAppUiAdapterD1Ev @ 71 NONAME - _ZN15CXnAppUiAdapterD2Ev @ 72 NONAME - _ZN15CXnNodePluginIf10BorderRectEv @ 73 NONAME - _ZN15CXnNodePluginIf10MarginRectEv @ 74 NONAME - _ZN15CXnNodePluginIf10SetPCDataLERK6TDesC8 @ 75 NONAME - _ZN15CXnNodePluginIf11PaddingRectEv @ 76 NONAME - _ZN15CXnNodePluginIf11UnsetStateLERK6TDesC8 @ 77 NONAME - _ZN15CXnNodePluginIf11VisibilityLEv @ 78 NONAME - _ZN15CXnNodePluginIf12SetPropertyLEP11CXnProperty @ 79 NONAME - _ZN15CXnNodePluginIf12ViewNodeImplEv @ 80 NONAME - _ZN15CXnNodePluginIf13SetBorderRectERK5TRect @ 81 NONAME - _ZN15CXnNodePluginIf13SetMarginRectERK5TRect @ 82 NONAME - _ZN15CXnNodePluginIf14IsFocusedStateEv @ 83 NONAME - _ZN15CXnNodePluginIf14MakeInterfaceLERK6TDesC8 @ 84 NONAME - _ZN15CXnNodePluginIf14SetPaddingRectERK5TRect @ 85 NONAME - _ZN15CXnNodePluginIf16SetHandleTooltipEi @ 86 NONAME - _ZN15CXnNodePluginIf16SetLayoutCapableEi @ 87 NONAME - _ZN15CXnNodePluginIf17ComponentNodeImplEv @ 88 NONAME - _ZN15CXnNodePluginIf19ReportTriggerEventLERK6TDesC8S2_S2_ @ 89 NONAME - _ZN15CXnNodePluginIf31SetPropertyWithoutNotificationLEP11CXnProperty @ 90 NONAME - _ZN15CXnNodePluginIf3IdLEv @ 91 NONAME - _ZN15CXnNodePluginIf4RectEv @ 92 NONAME - _ZN15CXnNodePluginIf4TypeEv @ 93 NONAME - _ZN15CXnNodePluginIf5PathLEv @ 94 NONAME - _ZN15CXnNodePluginIf6AppIfLEv @ 95 NONAME - _ZN15CXnNodePluginIf6LabelLEv @ 96 NONAME - _ZN15CXnNodePluginIf7SetRectERK5TRect @ 97 NONAME - _ZN15CXnNodePluginIf8DisplayLEv @ 98 NONAME - _ZN15CXnNodePluginIf9AddChildLEPS_ @ 99 NONAME - _ZN15CXnNodePluginIf9ChildrenLEv @ 100 NONAME - _ZN15CXnNodePluginIf9MaskPathLEv @ 101 NONAME - _ZN15CXnNodePluginIf9NamespaceEv @ 102 NONAME - _ZN15CXnNodePluginIf9SetDirtyLEv @ 103 NONAME - _ZN15CXnNodePluginIf9SetStateLERK6TDesC8 @ 104 NONAME - _ZN15CXnNodePluginIf9UiEngineLEv @ 105 NONAME - _ZN15CXnUiEngineImpl14EnableRenderUiEPv @ 106 NONAME - _ZN16CXnViewsNodeImpl10ConstructLEP7CXnType @ 107 NONAME - _ZN16CXnViewsNodeImpl12SetComponentEP12CXnComponent @ 108 NONAME - _ZN16CXnViewsNodeImpl4NewLEP7CXnType @ 109 NONAME - _ZN16CXnViewsNodeImpl9ComponentEv @ 110 NONAME - _ZN16CXnViewsNodeImplC1Ev @ 111 NONAME - _ZN16CXnViewsNodeImplC2Ev @ 112 NONAME - _ZN16CXnViewsNodeImplD0Ev @ 113 NONAME - _ZN16CXnViewsNodeImplD1Ev @ 114 NONAME - _ZN16CXnViewsNodeImplD2Ev @ 115 NONAME - _ZN16MXnNodePredicate5MatchER7CXnNode @ 116 NONAME - _ZN16MXnNodePredicateC1Ev @ 117 NONAME - _ZN16MXnNodePredicateC2Ev @ 118 NONAME - _ZN16MXnNodePredicateD0Ev @ 119 NONAME - _ZN16MXnNodePredicateD1Ev @ 120 NONAME - _ZN16MXnNodePredicateD2Ev @ 121 NONAME - _ZN16TXnUiEngineAppIf10ActiveViewEv @ 122 NONAME - _ZN16TXnUiEngineAppIf10IsEditModeEv @ 123 NONAME - _ZN16TXnUiEngineAppIf10StringPoolEv @ 124 NONAME - _ZN16TXnUiEngineAppIf11FocusedNodeEv @ 125 NONAME - _ZN16TXnUiEngineAppIf11SetUiEngineEP11CXnUiEngine @ 126 NONAME - _ZN16TXnUiEngineAppIf12RefreshMenuLEv @ 127 NONAME - _ZN16TXnUiEngineAppIf13ActivateViewLER12CXnNodeAppIf @ 128 NONAME + _ZN15CXnAppUiAdapter19HandleUiReadyEventLEv @ 65 NONAME + _ZN15CXnAppUiAdapter20HandleEnterEditModeLEi @ 66 NONAME + _ZN15CXnAppUiAdapter21HandleResourceChangeLEi @ 67 NONAME + _ZN15CXnAppUiAdapter9UiEngineLEv @ 68 NONAME + _ZN15CXnAppUiAdapterC1E4TUid @ 69 NONAME + _ZN15CXnAppUiAdapterC2E4TUid @ 70 NONAME + _ZN15CXnAppUiAdapterD0Ev @ 71 NONAME + _ZN15CXnAppUiAdapterD1Ev @ 72 NONAME + _ZN15CXnAppUiAdapterD2Ev @ 73 NONAME + _ZN15CXnNodePluginIf10BorderRectEv @ 74 NONAME + _ZN15CXnNodePluginIf10MarginRectEv @ 75 NONAME + _ZN15CXnNodePluginIf10SetPCDataLERK6TDesC8 @ 76 NONAME + _ZN15CXnNodePluginIf11PaddingRectEv @ 77 NONAME + _ZN15CXnNodePluginIf11UnsetStateLERK6TDesC8 @ 78 NONAME + _ZN15CXnNodePluginIf11VisibilityLEv @ 79 NONAME + _ZN15CXnNodePluginIf12SetPropertyLEP11CXnProperty @ 80 NONAME + _ZN15CXnNodePluginIf12ViewNodeImplEv @ 81 NONAME + _ZN15CXnNodePluginIf13SetBorderRectERK5TRect @ 82 NONAME + _ZN15CXnNodePluginIf13SetMarginRectERK5TRect @ 83 NONAME + _ZN15CXnNodePluginIf14IsFocusedStateEv @ 84 NONAME + _ZN15CXnNodePluginIf14MakeInterfaceLERK6TDesC8 @ 85 NONAME + _ZN15CXnNodePluginIf14SetPaddingRectERK5TRect @ 86 NONAME + _ZN15CXnNodePluginIf16SetHandleTooltipEi @ 87 NONAME + _ZN15CXnNodePluginIf16SetLayoutCapableEi @ 88 NONAME + _ZN15CXnNodePluginIf17ComponentNodeImplEv @ 89 NONAME + _ZN15CXnNodePluginIf19ReportTriggerEventLERK6TDesC8S2_S2_ @ 90 NONAME + _ZN15CXnNodePluginIf31SetPropertyWithoutNotificationLEP11CXnProperty @ 91 NONAME + _ZN15CXnNodePluginIf3IdLEv @ 92 NONAME + _ZN15CXnNodePluginIf4RectEv @ 93 NONAME + _ZN15CXnNodePluginIf4TypeEv @ 94 NONAME + _ZN15CXnNodePluginIf5PathLEv @ 95 NONAME + _ZN15CXnNodePluginIf6AppIfLEv @ 96 NONAME + _ZN15CXnNodePluginIf6LabelLEv @ 97 NONAME + _ZN15CXnNodePluginIf7SetRectERK5TRect @ 98 NONAME + _ZN15CXnNodePluginIf8DisplayLEv @ 99 NONAME + _ZN15CXnNodePluginIf9AddChildLEPS_ @ 100 NONAME + _ZN15CXnNodePluginIf9ChildrenLEv @ 101 NONAME + _ZN15CXnNodePluginIf9MaskPathLEv @ 102 NONAME + _ZN15CXnNodePluginIf9NamespaceEv @ 103 NONAME + _ZN15CXnNodePluginIf9SetDirtyLEv @ 104 NONAME + _ZN15CXnNodePluginIf9SetStateLERK6TDesC8 @ 105 NONAME + _ZN15CXnNodePluginIf9UiEngineLEv @ 106 NONAME + _ZN15CXnUiEngineImpl14EnableRenderUiEPv @ 107 NONAME + _ZN16CXnViewsNodeImpl10ConstructLEP7CXnType @ 108 NONAME + _ZN16CXnViewsNodeImpl12SetComponentEP12CXnComponent @ 109 NONAME + _ZN16CXnViewsNodeImpl4NewLEP7CXnType @ 110 NONAME + _ZN16CXnViewsNodeImpl9ComponentEv @ 111 NONAME + _ZN16CXnViewsNodeImplC1Ev @ 112 NONAME + _ZN16CXnViewsNodeImplC2Ev @ 113 NONAME + _ZN16CXnViewsNodeImplD0Ev @ 114 NONAME + _ZN16CXnViewsNodeImplD1Ev @ 115 NONAME + _ZN16CXnViewsNodeImplD2Ev @ 116 NONAME + _ZN16MXnNodePredicate5MatchER7CXnNode @ 117 NONAME + _ZN16MXnNodePredicateC1Ev @ 118 NONAME + _ZN16MXnNodePredicateC2Ev @ 119 NONAME + _ZN16MXnNodePredicateD0Ev @ 120 NONAME + _ZN16MXnNodePredicateD1Ev @ 121 NONAME + _ZN16MXnNodePredicateD2Ev @ 122 NONAME + _ZN16TXnUiEngineAppIf10ActiveViewEv @ 123 NONAME + _ZN16TXnUiEngineAppIf10IsEditModeEv @ 124 NONAME + _ZN16TXnUiEngineAppIf10StringPoolEv @ 125 NONAME + _ZN16TXnUiEngineAppIf11FocusedNodeEv @ 126 NONAME + _ZN16TXnUiEngineAppIf11SetUiEngineEP11CXnUiEngine @ 127 NONAME + _ZN16TXnUiEngineAppIf12RefreshMenuLEv @ 128 NONAME _ZN16TXnUiEngineAppIf13FindNodeByIdLERK6TDesC8S2_ @ 129 NONAME _ZN16TXnUiEngineAppIf13FindNodeByIdLERK7TDesC16S2_ @ 130 NONAME _ZN16TXnUiEngineAppIf16FindNodeByClassLERK6TDesC8S2_ @ 131 NONAME @@ -182,108 +182,98 @@ _ZN19MXnComponentFactoryD2Ev @ 181 NONAME _ZN19TXnUiEnginePluginIf10StringPoolEv @ 182 NONAME _ZN19TXnUiEnginePluginIf11PluginNodeLEP15CXnNodePluginIf @ 183 NONAME - _ZN19TXnUiEnginePluginIf12EnableSwipeLEi @ 184 NONAME - _ZN19TXnUiEnginePluginIf12FocusVisibleEv @ 185 NONAME - _ZN19TXnUiEnginePluginIf12FocusedNodeLEv @ 186 NONAME - _ZN19TXnUiEnginePluginIf13ActivateViewLER15CXnNodePluginIf @ 187 NONAME - _ZN19TXnUiEnginePluginIf13AddDirtyNodeLER15CXnNodePluginIf @ 188 NONAME - _ZN19TXnUiEnginePluginIf13FindNodeByIdLERK6TDesC8S2_ @ 189 NONAME - _ZN19TXnUiEnginePluginIf13FindNodeByIdLERK7TDesC16S2_ @ 190 NONAME - _ZN19TXnUiEnginePluginIf13SwipeEnabledLEv @ 191 NONAME - _ZN19TXnUiEnginePluginIf14SetFocusedNodeEP15CXnNodePluginIf @ 192 NONAME - _ZN19TXnUiEnginePluginIf16FindNodeByClassLERK7TDesC16 @ 193 NONAME - _ZN19TXnUiEnginePluginIf16IsMenuDisplayingEv @ 194 NONAME - _ZN19TXnUiEnginePluginIf16ScreenDeviceSizeEv @ 195 NONAME - _ZN19TXnUiEnginePluginIf16SetFocusVisibleLEi @ 196 NONAME - _ZN19TXnUiEnginePluginIf17DisableRenderUiLCEv @ 197 NONAME - _ZN19TXnUiEnginePluginIf18IsDialogDisplayingEv @ 198 NONAME - _ZN19TXnUiEnginePluginIf18VerticalTwipValueLEP11CXnPropertyi @ 199 NONAME - _ZN19TXnUiEnginePluginIf19VerticalPixelValueLEP11CXnPropertyi @ 200 NONAME - _ZN19TXnUiEnginePluginIf20HorizontalTwipValueLEP11CXnPropertyi @ 201 NONAME - _ZN19TXnUiEnginePluginIf21HorizontalPixelValueLEP11CXnPropertyi @ 202 NONAME - _ZN19TXnUiEnginePluginIf22DeactivateFocusedNodeLEv @ 203 NONAME - _ZN19TXnUiEnginePluginIf23EnablePartialTouchInputER15CXnNodePluginIfi @ 204 NONAME - _ZN19TXnUiEnginePluginIf26RestorePreviousFocusedNodeEv @ 205 NONAME - _ZN19TXnUiEnginePluginIf8EditModeEv @ 206 NONAME - _ZN19TXnUiEnginePluginIf9LayoutUILEP15CXnNodePluginIf @ 207 NONAME - _ZN19TXnUiEnginePluginIf9RenderUILEP15CXnNodePluginIf @ 208 NONAME - _ZN19TXnUiEnginePluginIf9ResourcesEv @ 209 NONAME - _ZN19TXnUiEnginePluginIf9RootNodeLEv @ 210 NONAME - _ZN19TXnUiEnginePluginIf9ShowFocusEv @ 211 NONAME - _ZN20CXnComponentNodeImpl10ConstructLEP7CXnType @ 212 NONAME - _ZN20CXnComponentNodeImpl12SetComponentEP12CXnComponent @ 213 NONAME - _ZN20CXnComponentNodeImpl14MakeInterfaceLERK6TDesC8 @ 214 NONAME - _ZN20CXnComponentNodeImpl25SetComponentNeedsCreationEi @ 215 NONAME - _ZN20CXnComponentNodeImpl4NewLEP7CXnType @ 216 NONAME - _ZN20CXnComponentNodeImpl9ComponentEv @ 217 NONAME - _ZN20CXnComponentNodeImplC1Ev @ 218 NONAME - _ZN20CXnComponentNodeImplC2Ev @ 219 NONAME - _ZN20CXnComponentNodeImplD0Ev @ 220 NONAME - _ZN20CXnComponentNodeImplD1Ev @ 221 NONAME - _ZN20CXnComponentNodeImplD2Ev @ 222 NONAME - _ZN8CXnUtils11CreateFontLER15CXnNodePluginIfRP5CFontRi @ 223 NONAME - _ZN8CXnUtils11CreateFontLERK7TDesC16i10TFontStyleRP5CFontRi @ 224 NONAME - _ZN8CXnUtils11GetRgbValueER4TRgbRK6TDesC8 @ 225 NONAME - _ZN8CXnUtils11StripQuotesERP7HBufC16 @ 226 NONAME - _ZN8CXnUtils12FindResourceER12CArrayPtrSegI11CXnResourceERK7TDesC16Ri @ 227 NONAME - _ZN8CXnUtils12ScaleBitmapLERK5TRectP10CFbsBitmapS4_ @ 228 NONAME - _ZN8CXnUtils13TextAlignmentER15CXnNodePluginIf @ 229 NONAME - _ZN8CXnUtils15ConvertHslToRgbEiii @ 230 NONAME - _ZN8CXnUtils18CollapseWhiteSpaceER15CXnNodePluginIfR6TDes16 @ 231 NONAME - _ZN8CXnUtils18ResolveSkinItemIDLERK7TDesC16R11TAknsItemIDRi @ 232 NONAME - _ZN8CXnUtils20HandlePowerSaveModeLEP7CXnNodeii @ 233 NONAME - _ZNK11CXnProperty7EqualsLERS_ @ 234 NONAME - _ZNK12CXnNodeAppIf12GetPropertyLER11CXnProperty @ 235 NONAME - _ZNK12CXnNodeAppIf12GetPropertyLERK6TDesC8 @ 236 NONAME - _ZNK12CXnNodeAppIf19InternalDomNodeTypeEv @ 237 NONAME - _ZNK12CXnNodeAppIf7ParentLEv @ 238 NONAME - _ZNK12CXnNodeAppIf9GetPCDataEv @ 239 NONAME - _ZNK14CXnApplication9AppDllUidEv @ 240 NONAME - _ZNK15CXnAppUiAdapter4ViewEv @ 241 NONAME - _ZNK15CXnNodePluginIf12GetPropertyLER11CXnProperty @ 242 NONAME - _ZNK15CXnNodePluginIf12GetPropertyLERK6TDesC8 @ 243 NONAME - _ZNK15CXnNodePluginIf7ControlEv @ 244 NONAME - _ZNK15CXnNodePluginIf7ParentLEv @ 245 NONAME - _ZNK15CXnNodePluginIf9GetPCDataEv @ 246 NONAME - _ZNK16TXnUiEngineAppIf14WidgetsVisibleEv @ 247 NONAME - _ZNK17CXnControlAdapter15LongTapDetectorEv @ 248 NONAME - _ZNK17CXnControlAdapter16ComponentControlEi @ 249 NONAME - _ZNK17CXnControlAdapter16DrawContentImageEv @ 250 NONAME - _ZNK17CXnControlAdapter16IsDrawingAllowedEv @ 251 NONAME - _ZNK17CXnControlAdapter22CountComponentControlsEv @ 252 NONAME - _ZNK17CXnControlAdapter4DrawERK5TRect @ 253 NONAME - _ZNK17CXnControlAdapter4DrawERK5TRectR9CWindowGc @ 254 NONAME - _ZNK19TXnUiEnginePluginIf14WidgetsVisibleEv @ 255 NONAME - _ZNK19TXnUiEnginePluginIf9HitRegionEv @ 256 NONAME - _ZNK20CXnComponentNodeImpl25DoesComponentNeedCreationEv @ 257 NONAME - _ZTI11CXnDocument @ 258 NONAME - _ZTI11CXnProperty @ 259 NONAME - _ZTI12CXnComponent @ 260 NONAME - _ZTI14CXnApplication @ 261 NONAME - _ZTI15CXnAppUiAdapter @ 262 NONAME - _ZTI16CXnViewsNodeImpl @ 263 NONAME - _ZTI16MXnNodePredicate @ 264 NONAME - _ZTI17CXnControlAdapter @ 265 NONAME - _ZTI18CXnListQueryDialog @ 266 NONAME - _ZTI19MXnComponentFactory @ 267 NONAME - _ZTI20CXnComponentNodeImpl @ 268 NONAME - _ZTI27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 269 NONAME - _ZTIN21CXnControlAdapterImpl13TIconProviderE @ 270 NONAME - _ZTV11CXnDocument @ 271 NONAME - _ZTV11CXnProperty @ 272 NONAME - _ZTV12CXnComponent @ 273 NONAME - _ZTV14CXnApplication @ 274 NONAME - _ZTV15CXnAppUiAdapter @ 275 NONAME - _ZTV16CXnViewsNodeImpl @ 276 NONAME - _ZTV16MXnNodePredicate @ 277 NONAME - _ZTV17CXnControlAdapter @ 278 NONAME - _ZTV18CXnListQueryDialog @ 279 NONAME - _ZTV19MXnComponentFactory @ 280 NONAME - _ZTV20CXnComponentNodeImpl @ 281 NONAME - _ZTV27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 282 NONAME - _ZTVN21CXnControlAdapterImpl13TIconProviderE @ 283 NONAME - _ZThn52_N17CXnControlAdapter19HandleControlEventLEP11CCoeControlN19MCoeControlObserver9TCoeEventE @ 284 NONAME - _ZThn60_N17CXnControlAdapter19HandleLongTapEventLERK6TPointS2_ @ 285 NONAME - _ZN15CXnAppUiAdapter15ProcessMessageLE4TUidRK6TDesC8 @ 286 NONAME - _ZN19TXnUiEnginePluginIf18IsTextEditorActiveEv @ 287 NONAME + _ZN19TXnUiEnginePluginIf12FocusedNodeLEv @ 184 NONAME + _ZN19TXnUiEnginePluginIf13AddDirtyNodeLER15CXnNodePluginIf @ 185 NONAME + _ZN19TXnUiEnginePluginIf13FindNodeByIdLERK6TDesC8S2_ @ 186 NONAME + _ZN19TXnUiEnginePluginIf13FindNodeByIdLERK7TDesC16S2_ @ 187 NONAME + _ZN19TXnUiEnginePluginIf14SetFocusedNodeEP15CXnNodePluginIf @ 188 NONAME + _ZN19TXnUiEnginePluginIf16FindNodeByClassLERK7TDesC16 @ 189 NONAME + _ZN19TXnUiEnginePluginIf16IsMenuDisplayingEv @ 190 NONAME + _ZN19TXnUiEnginePluginIf16ScreenDeviceSizeEv @ 191 NONAME + _ZN19TXnUiEnginePluginIf17DisableRenderUiLCEv @ 192 NONAME + _ZN19TXnUiEnginePluginIf18IsDialogDisplayingEv @ 193 NONAME + _ZN19TXnUiEnginePluginIf18IsTextEditorActiveEv @ 194 NONAME + _ZN19TXnUiEnginePluginIf18VerticalTwipValueLEP11CXnPropertyi @ 195 NONAME + _ZN19TXnUiEnginePluginIf19VerticalPixelValueLEP11CXnPropertyi @ 196 NONAME + _ZN19TXnUiEnginePluginIf20HorizontalTwipValueLEP11CXnPropertyi @ 197 NONAME + _ZN19TXnUiEnginePluginIf21HorizontalPixelValueLEP11CXnPropertyi @ 198 NONAME + _ZN19TXnUiEnginePluginIf23EnablePartialTouchInputER15CXnNodePluginIfi @ 199 NONAME + _ZN19TXnUiEnginePluginIf8EditModeEv @ 200 NONAME + _ZN19TXnUiEnginePluginIf9LayoutUILEP15CXnNodePluginIf @ 201 NONAME + _ZN19TXnUiEnginePluginIf9RenderUILEP15CXnNodePluginIf @ 202 NONAME + _ZN19TXnUiEnginePluginIf9ResourcesEv @ 203 NONAME + _ZN19TXnUiEnginePluginIf9RootNodeLEv @ 204 NONAME + _ZN20CXnComponentNodeImpl10ConstructLEP7CXnType @ 205 NONAME + _ZN20CXnComponentNodeImpl12SetComponentEP12CXnComponent @ 206 NONAME + _ZN20CXnComponentNodeImpl14MakeInterfaceLERK6TDesC8 @ 207 NONAME + _ZN20CXnComponentNodeImpl25SetComponentNeedsCreationEi @ 208 NONAME + _ZN20CXnComponentNodeImpl4NewLEP7CXnType @ 209 NONAME + _ZN20CXnComponentNodeImpl9ComponentEv @ 210 NONAME + _ZN20CXnComponentNodeImplC1Ev @ 211 NONAME + _ZN20CXnComponentNodeImplC2Ev @ 212 NONAME + _ZN20CXnComponentNodeImplD0Ev @ 213 NONAME + _ZN20CXnComponentNodeImplD1Ev @ 214 NONAME + _ZN20CXnComponentNodeImplD2Ev @ 215 NONAME + _ZN8CXnUtils11CreateFontLER15CXnNodePluginIfRP5CFontRi @ 216 NONAME + _ZN8CXnUtils11CreateFontLERK7TDesC16i10TFontStyleRP5CFontRi @ 217 NONAME + _ZN8CXnUtils11GetRgbValueER4TRgbRK6TDesC8 @ 218 NONAME + _ZN8CXnUtils11StripQuotesERP7HBufC16 @ 219 NONAME + _ZN8CXnUtils12FindResourceER12CArrayPtrSegI11CXnResourceERK7TDesC16Ri @ 220 NONAME + _ZN8CXnUtils12ScaleBitmapLERK5TRectP10CFbsBitmapS4_ @ 221 NONAME + _ZN8CXnUtils13TextAlignmentER15CXnNodePluginIf @ 222 NONAME + _ZN8CXnUtils15ConvertHslToRgbEiii @ 223 NONAME + _ZN8CXnUtils18CollapseWhiteSpaceER15CXnNodePluginIfR6TDes16 @ 224 NONAME + _ZN8CXnUtils18ResolveSkinItemIDLERK7TDesC16R11TAknsItemIDRi @ 225 NONAME + _ZN8CXnUtils20HandlePowerSaveModeLEP7CXnNodeii @ 226 NONAME + _ZNK11CXnProperty7EqualsLERS_ @ 227 NONAME + _ZNK12CXnNodeAppIf12GetPropertyLER11CXnProperty @ 228 NONAME + _ZNK12CXnNodeAppIf12GetPropertyLERK6TDesC8 @ 229 NONAME + _ZNK12CXnNodeAppIf19InternalDomNodeTypeEv @ 230 NONAME + _ZNK12CXnNodeAppIf7ParentLEv @ 231 NONAME + _ZNK12CXnNodeAppIf9GetPCDataEv @ 232 NONAME + _ZNK14CXnApplication9AppDllUidEv @ 233 NONAME + _ZNK15CXnAppUiAdapter4ViewEv @ 234 NONAME + _ZNK15CXnNodePluginIf12GetPropertyLER11CXnProperty @ 235 NONAME + _ZNK15CXnNodePluginIf12GetPropertyLERK6TDesC8 @ 236 NONAME + _ZNK15CXnNodePluginIf7ControlEv @ 237 NONAME + _ZNK15CXnNodePluginIf7ParentLEv @ 238 NONAME + _ZNK15CXnNodePluginIf9GetPCDataEv @ 239 NONAME + _ZNK16TXnUiEngineAppIf14WidgetsVisibleEv @ 240 NONAME + _ZNK17CXnControlAdapter15LongTapDetectorEv @ 241 NONAME + _ZNK17CXnControlAdapter16ComponentControlEi @ 242 NONAME + _ZNK17CXnControlAdapter16DrawContentImageEv @ 243 NONAME + _ZNK17CXnControlAdapter16IsDrawingAllowedEv @ 244 NONAME + _ZNK17CXnControlAdapter22CountComponentControlsEv @ 245 NONAME + _ZNK17CXnControlAdapter4DrawERK5TRect @ 246 NONAME + _ZNK17CXnControlAdapter4DrawERK5TRectR9CWindowGc @ 247 NONAME + _ZNK19TXnUiEnginePluginIf14WidgetsVisibleEv @ 248 NONAME + _ZNK20CXnComponentNodeImpl25DoesComponentNeedCreationEv @ 249 NONAME + _ZTI11CXnDocument @ 250 NONAME + _ZTI11CXnProperty @ 251 NONAME + _ZTI12CXnComponent @ 252 NONAME + _ZTI14CXnApplication @ 253 NONAME + _ZTI15CXnAppUiAdapter @ 254 NONAME + _ZTI16CXnViewsNodeImpl @ 255 NONAME + _ZTI16MXnNodePredicate @ 256 NONAME + _ZTI17CXnControlAdapter @ 257 NONAME + _ZTI18CXnListQueryDialog @ 258 NONAME + _ZTI19MXnComponentFactory @ 259 NONAME + _ZTI20CXnComponentNodeImpl @ 260 NONAME + _ZTI27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 261 NONAME + _ZTIN21CXnControlAdapterImpl13TIconProviderE @ 262 NONAME + _ZTV11CXnDocument @ 263 NONAME + _ZTV11CXnProperty @ 264 NONAME + _ZTV12CXnComponent @ 265 NONAME + _ZTV14CXnApplication @ 266 NONAME + _ZTV15CXnAppUiAdapter @ 267 NONAME + _ZTV16CXnViewsNodeImpl @ 268 NONAME + _ZTV16MXnNodePredicate @ 269 NONAME + _ZTV17CXnControlAdapter @ 270 NONAME + _ZTV18CXnListQueryDialog @ 271 NONAME + _ZTV19MXnComponentFactory @ 272 NONAME + _ZTV20CXnComponentNodeImpl @ 273 NONAME + _ZTV27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 274 NONAME + _ZTVN21CXnControlAdapterImpl13TIconProviderE @ 275 NONAME + _ZThn52_N17CXnControlAdapter19HandleControlEventLEP11CCoeControlN19MCoeControlObserver9TCoeEventE @ 276 NONAME + _ZThn60_N17CXnControlAdapter19HandleLongTapEventLERK6TPointS2_ @ 277 NONAME diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/group/xnlayoutengine.mmp --- a/idlehomescreen/xmluirendering/uiengine/group/xnlayoutengine.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/group/xnlayoutengine.mmp Wed May 12 13:12:59 2010 +0300 @@ -65,11 +65,6 @@ SOURCE xneditmode.cpp SOURCE xneditor.cpp SOURCE xnpropertysubscriber.cpp -SOURCE xngesturehelper.cpp -SOURCE xngesture.cpp -SOURCE xngesturerecogniser.cpp -SOURCE xnpointarray.cpp -SOURCE xnhittest.cpp SOURCE xnplugindata.cpp SOURCE xnviewdata.cpp SOURCE xnrootdata.cpp @@ -86,6 +81,8 @@ SOURCE xnextrenderingpluginwrapper.cpp SOURCE xnbackgroundmanager.cpp SOURCE xnviewcontroladapter.cpp +SOURCE xnspbgcleaner.cpp +SOURCE xnwaitdialog.cpp START RESOURCE xnuiengine.rss HEADER @@ -113,6 +110,7 @@ LIBRARY bafl.lib LIBRARY eikcoctl.lib LIBRARY eikcore.lib +LIBRARY eikdlg.lib LIBRARY egul.lib LIBRARY fbscli.lib LIBRARY ws32.lib @@ -156,6 +154,7 @@ LIBRARY disknotifyhandler.lib LIBRARY platformenv.lib LIBRARY hspluginsettings.lib +LIBRARY akntouchgesturefw.lib #if defined(_XN3_DEBUG_) || defined(AI3_DEBUG_PERFORMANCE) LIBRARY flogger.lib diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h Wed May 12 13:12:59 2010 +0300 @@ -21,7 +21,8 @@ // System includes #include - +#include // for MProgressDialogCallback +#include "xnpropertysubscriber.h" // for CXnPropertySubscriber // Forward declarations class CXnUiEngine; @@ -34,6 +35,7 @@ class CHsCcProviderClient; class CXnEffectManager; class MHsContentControl; +class CXnWaitDialog; // Constants @@ -46,7 +48,9 @@ * @lib xn3layoutengine.lib * @since Series 60 3.1 */ -NONSHARABLE_CLASS( CXnAppUiAdapterImpl ) : public CBase +NONSHARABLE_CLASS( CXnAppUiAdapterImpl ) : public CBase, + public MXnPropertyChangeObserver, + public MProgressDialogCallback { public: // Constructors and destructor @@ -156,6 +160,15 @@ */ void HandleResourceChangeL( TInt aType ); +public: // From MProgressDialogCallback + + /** + * Callback method from MProgressDialogCallback interface. + * Gets called when a dialog is dismissed. + * @param aButtonId Id of the pushed button. + */ + void DialogDismissedL( TInt aButtonId ); + private: /** @@ -164,6 +177,18 @@ CXnAppUiAdapterImpl( TUid aApplicationUid, CXnAppUiAdapter& aAdapter ); +private: + // from MXnPropertyChangeObserver + void PropertyChangedL( const TUint32 aKey, const TInt aValue ); + +private: + // new functions + + /** + * Launches wait dialog during backup/restore. + */ + void DisplayWaitDialogL(); + private: // Data /** AppUi, Not owned. */ @@ -185,7 +210,11 @@ /** Effect manager, Owned */ CXnEffectManager* iEffectManager; /** Resource offset */ - TInt iResourceOffset; + TInt iResourceOffset; + /** Wait dialog, Owned */ + CXnWaitDialog* iXnWaitDialog; + /** Publish&Subscribe observer for Backup & Restore, Owned */ + CXnPropertySubscriber* iBackupRestoreObserver; }; #endif // XNAPPUIADAPTERIMPL_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnbackgroundmanager.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnbackgroundmanager.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnbackgroundmanager.h Wed May 12 13:12:59 2010 +0300 @@ -28,6 +28,7 @@ class CXnViewManager; class CXnViewData; class CAknsLayeredBackgroundControlContext; +class CXnOomSysHandler; namespace hspswrapper { @@ -115,7 +116,7 @@ */ void WallpaperChanged( const CXnViewData& aOldView, const CXnViewData& aNewView ); - + /** * Draws wallpaper immediately, or once the window comes visible. * @@ -162,7 +163,7 @@ /** * From MDiskNotifyHandlerCallback. */ - void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent ); + void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent ); private: @@ -189,6 +190,8 @@ TInt AddCommonWallpaperL( const TDesC& aFileName, TBool aSave = ETrue ); void ReadWallpaperFromCenrepL(); void DrawEditModeBackgroundSkin() const; + CXnOomSysHandler& OomSysHandler() const; + void DrawStatusPaneMask() const; /** * Callback function to be used with CPeriodic. @@ -240,7 +243,7 @@ * Stores wallpaper type. */ CXnBackgroundManager::WppType iType; - + /** * Internal wallpaper update in progress */ @@ -258,6 +261,13 @@ */ CFbsBitmap* iBgImage; + /** + * Pointer to status pane mask. Drawn on top of a wallpaper in + * the status pane area. + * Own. + */ + CFbsBitmap* iSpMask; + /** * Path of the wallpaper image, including filename. * This is used only if same wallpaper @@ -272,6 +282,12 @@ */ CPeriodic* iTimer; + /** + * OOM system handler. + * Own. + */ + CXnOomSysHandler* iOomSysHandler; + }; #endif // CXNBACKGROUNDMANAGER_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnbgcontrol.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnbgcontrol.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Background appearance drawer -* -*/ - - -#ifndef _XNBGCONTROL_H -#define _XNBGCONTROL_H - -// System includes -#include -#include - -// User includes -#include "xnuistatelistener.h" - -// Forward declarations - -/** - * Background appearance drawer - * - * @ingroup group_xnlayoutengine - * @lib xn3layoutengine.lib - * @since S60 5.0 - */ -NONSHARABLE_CLASS( CXnBgControl ) : public CCoeControl , public MXnUiStateObserver - { -public: - // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CXnBgControl* NewL(); - - /** - * Two-phased constructor. Leaving on stack - */ - static CXnBgControl* NewLC(); - - /** - * Destructor - */ - ~CXnBgControl(); - -private: - // private constructors - - /** - * Leaving constructor - */ - void ConstructL(); - - /** - * C++ default constructor - */ - CXnBgControl(); - -public: - // from CCoeControl - - /** - * @see CCoeControl - */ - TInt CountComponentControls() const; - - /** - * @see CCoeControl - */ - CCoeControl* ComponentControl( TInt aIndex ) const; - - /** - * @see CCoeControl - */ - void SizeChanged(); - - /** - * @see CCoeControl - */ - void Draw( const TRect& aRect ) const; - - /** - * @see CCoeControl - */ - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - -public: - // new functions - void SetCompoundControl( CCoeControl* aControl ); - - /** - * Service for removing grabbing controls - */ - void ResetGrabbingL(); - -private: - // new functions - - /** - * Removes recursively grabbing controls - */ - void RemoveGrabbingControL( const CCoeControl* aControl, const TPointerEvent& aEvent ) const; - -private: - // from MXnUiStateObserver - - /** - * @see MXnUiStateObserver - */ - void NotifyForegroundChanged( TForegroundStatus aStatus ); - - /** - * @see MXnUiStateObserver - */ - void NotifyLightStatusChanged( TBool aLightsOn ); - - /** - * @see MXnUiStateObserver - */ - void NotifyInCallStateChaged( TBool aInCall ); - -private: - // data - - /** Compound Control, Not owned */ - CCoeControl* iControl; - - /** stored point of EButton1Down */ - TPoint iHitpoint; - - }; - -#endif // _XNBGCONTROL_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xncontroladapterimpl.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xncontroladapterimpl.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xncontroladapterimpl.h Wed May 12 13:12:59 2010 +0300 @@ -25,9 +25,7 @@ #include #include #include - -// User includes -#include "xngesturehelper.h" +#include // Forward declarations class CXnNodePluginIf; @@ -45,19 +43,7 @@ const TInt KSpaceChar = 32; const TInt KRightParenthesis = ')'; -/** - * XnGestureHelper namespace - * Used for the whole gesture family - Gesture recognizer, gesture helper, - * Point array - */ -namespace XnGestureHelper - { - class CXnGestureHelper; - } - -using XnGestureHelper::CXnGestureHelper; - - +using namespace AknTouchGestureFw; // Class declaration /** @@ -68,7 +54,8 @@ * @since Series 60 3.1 */ NONSHARABLE_CLASS( CXnControlAdapterImpl ) : public CBase, - public MAknsEffectAnimObserver + public MAknsEffectAnimObserver, + public MAknTouchGestureFwObserver { public: @@ -444,12 +431,11 @@ CXnProperty* aProperty ); /** - * Forwards event to gesture helper + * Sets up gesture on buttondown event * * @param aPointerEvent Event to be forwarded - * @return ETrue when swipe took place, EFalse otherwise */ - TBool PassEventToGestureHelperL( + void InitializeGestureL( const TPointerEvent& aPointerEvent ); /* @@ -464,6 +450,14 @@ */ RPointerArray< CXnControlAdapter >& ChildAdapters(); +private: // from MAknTouchGestureFwObserver + /** + * Implements gesture handling + * + * @see MAknTouchGestureFwObserver + */ + void HandleTouchGestureL( MAknTouchGestureFwEvent& aEvent ); + protected: // New functions @@ -493,6 +487,7 @@ void DrawBackgroundImageL( const TRect& aRect, CXnNode& aNode, CWindowGc& aGc, CFbsBitmap* aBitmap, CFbsBitmap* aMask ); RFs& FsSession(); + TBool IsDragThresholdExceeded( const TPoint& aPoint ); private: // Data @@ -551,12 +546,16 @@ TAknsItemID iAnimIID; /** flag: skin animation id is resolved from the CSS property */ TBool iAnimIDResolved; - /** pointer to gesturehelper */ - CXnGestureHelper* iGestureHelper; /** flag: for storing blank state */ TBool iBlank; /** flag: to detect whether longtap occured */ TBool iLongtap; + /** Gesture framework, owned. */ + CAknTouchGestureFw* iGestureFw; + /** Gesture destination, Not owned. */ + CXnNode* iGestureDestination; + /** Starting point of button down event. */ + TPoint iButtonDownStartPoint; }; #endif //__XNCONTROLADAPTERIMPL_H__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xneditor.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xneditor.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xneditor.h Wed May 12 13:12:59 2010 +0300 @@ -39,6 +39,7 @@ class CXnViewData; class CRepository; class CXnBackgroundManager; +class CXnOomSysHandler; namespace hspswrapper { @@ -203,7 +204,9 @@ TInt WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ); TInt ViewListL( CHsContentInfoArray& aArray ); - + + TInt ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ); + TInt AppListL( CHsContentInfoArray& aArray ); TInt AddWidgetL( CHsContentInfo& aInfo ); @@ -238,20 +241,21 @@ private: // new functions - void TemplatedWidgetsL( RPointerArray< CHsContentInfo >& aWidgets ); - - void HSPSPluginsL( RPointerArray< CHsContentInfo >& aWidgets, - const TDesC8& aType ); - - CPublisherInfo* PublisherInfoL( const CHsContentInfo& aContentInfo ); + CPublisherInfo* PublisherInfoL( const CHsContentInfo& aContentInfo ); TInt TemplateWidgetCanBeAddedRemovedL( CHsContentInfo& aContentInfo ); TInt NonTemplateWidgetCanBeAddedRemovedL( CHsContentInfo& aContentInfo ); TBool IsCurrentViewFull(); - void FilterWidgetListL( CHsContentInfoArray& aContentInfoArray, + + /** + * Filters plugins from the list and checks whether the plugins can be added or removed. + */ + void FilterPluginsL( CHsContentInfoArray& aContentInfoArray, TBool aIgnoreViewFull ); + void FilterViewListL( CHsContentInfoArray& aContentInfoArray ); + CXnOomSysHandler& OomSysHandler() const; /** * Notifies the MHsContentControl and the MHsContentControlUi if widget list was changed. @@ -269,6 +273,44 @@ CHsContentInfo* CreateContentInfoLC( CXnPluginData& aPlugin, RPointerArray< CHsContentInfo >& aInfos ); + /** + * Appends plugin configurations to the content info array. + */ + void AppendPluginsL( + RPointerArray< hspswrapper::CPluginInfo > aPlugins, + RPointerArray< CHsContentInfo >& aWidgets ); + + /** + * Resets runtime cache. + */ + void ResetCache(); + + /** + * Retrieves native application configuration plugins from HSPS + */ + void HspsApplicationPluginsL( RPointerArray< CHsContentInfo >& aWidgets ); + + /** + * Retrieves native view configuration plugins from HSPS + */ + void HspsViewPluginsL( RPointerArray< CHsContentInfo >& aWidgets ); + + /** + * Retrieves widget and template configuration plugins from HSPS + */ + void HspsWidgetPluginsL( RPointerArray< CHsContentInfo >& aWidgets ); + void DoHspsWidgetPluginsL(); + + /** + * Retrieves publishers from CPS and them with the HSPS's template plugins + */ + void CpsWidgetPluginsL( RPointerArray< CHsContentInfo >& aWidgets ); + + /** + * Checks whether the view is full + */ + TBool IsViewFull( CXnViewData& aViewData ); + private: // from MXnViewObserver @@ -320,6 +362,9 @@ TBool iWidgetsVisibilityState; /** Central repository , to choose plugin, owned*/ CRepository* iRepository; + /** Plugins cache, owned */ + RPointerArray< hspswrapper::CPluginInfo > iPluginsCache; + CXnOomSysHandler* iOomSysHandler; }; #endif // C_XNEDITOR_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xneffectmanager.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xneffectmanager.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xneffectmanager.h Wed May 12 13:12:59 2010 +0300 @@ -43,6 +43,14 @@ #define KGfxControlActionAppear 3 #define KGfxControlActionDisappear 4 +#define KGfxControlActionAppearPrt 3 +#define KGfxControlActionDisappearPrt 5 +#define KGfxControlActionAppearLsc 6 +#define KGfxControlActionDisappearLsc 7 + +#define KGfxControlActionBgImgToImgAppear 3 +#define KGfxControlActionBgAnimToImgAppear 5 + // Full screen effect ids #define KGfxContextOpenWallpaperView 1007 #define KGfxContextCloseWallpaperView 1008 diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xngesture.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xngesture.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,369 +0,0 @@ -/* -* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture class -* -*/ - - -#ifndef _XNGESTURE_H_ -#define _XNGESTURE_H_ - -// System includes -#include - -// User includes -#include "xnpointarray.h" -#include "xngesturerecogniser.h" - -// Namespace declaration - -/** - * XnGestureHelper namespace - * Used for the whole gesture family - Gesture recognizer, gesture helper, - * Point array - */ -namespace XnGestureHelper - { - - /** - * Struct for a point in floating-point represanation - */ - NONSHARABLE_STRUCT( TRealPoint ) - { - inline TRealPoint(); - inline TRealPoint( const TRealPoint& aPoint ); - inline TRealPoint( TReal aX, TReal aY ); - inline TBool operator==( const TRealPoint& aPoint ) const; - - TReal32 iX; - TReal32 iY; - }; - - // Class declaration - - /** - * TGesture represents the gesture that the user has made. - * Implements MGestureEvent interface to allow clients to - * inspect the gesture - * - * @ingroup group_xnlayoutengine - */ - NONSHARABLE_CLASS( CXnGesture ) : public CBase - { - public: - - /** - * X and Y axes, or both - */ - enum TAxis - { - EAxisBoth, - EAxisHorizontal, - EAxisVertical - }; - - public: - - /** destructor */ - ~CXnGesture(); - - /** - * Sets the gesture as empty. resets timers to receive points - * immediately - */ - void Reset(); - - /** - * Check the gesture if it is empty - * - * @return ETrue if the gesture has no points - */ - TBool IsEmpty() const; - - /** - * Add a point to the sequence of points that forms the gesture - * Call Reset() just before adding the first point - * - * @param aPoint the point to add - * @return error code - */ - TInt AddPoint( const TPoint& aPoint ); - - /** - * Checks if the point it is close to holding point - * - * @param aPoint Point to be examined - * @return ETrue if the point is very near the holding point - */ - TBool IsNearHoldingPoint( const TPoint& aPoint ) const; - - /** - * Set the latest point as the holding point - */ - void SetHoldingPoint(); - - /** - * Checks if the examined point is at the last point's position - * - * @param aPoint Point to be examined - * @return ETrue if aPoint is the same as point added last - */ - TBool IsLatestPoint( const TPoint& aPoint ) const; - - /** - * After call, Code(...) will return appropriate holding gesture code. - */ - void StartHolding(); - - /** - * After call, Code(...) will return a "hold released" gesture code - * when the gesture is completed. Meanwhile, code will be drag. - */ - void ContinueHolding(); - - /** - * Set as stylus released - */ - void SetReleased(); - - /** - * Set the gesture as complete. Gesture is completed at pointer up - */ - void SetComplete(); - - /** - * After call, Code(...) will return a "cancelled" gesture code - */ - void SetCancelled(); - - /** - * Checks if the gesture is a tap - * - * @return Whether the current gesture is a tap - * (and hence not a swipe). Does not consider holding or - * other state information (such as whether the gesture was - * just started or is dragging). Results are based purely on - * the current stream of points. - */ - TBool IsTap() const; - - /** - * From MGestureEvent - * Checks and return current gesture status at desired axis - * - * @param aRelevantAxis Axis to be examined - * @return Gesture status - */ - TXnGestureCode Code( TAxis aRelevantAxis ) const; - - /** - * From MGestureEvent - * Checks and returns holding status - * - * @return Return holding - */ - TBool IsHolding() const; - - /** - * From MGestureEvent - * Returns first position form iPoints - * - * @return Returns first point - */ - TPoint StartPos() const; - - /** - * From MGestureEvent - * Returns current (last) position from iPoints - * - * @return Returns last point - */ - TPoint CurrentPos() const; - - /** - * From MGestureEvent - * Returns speed of X, Y movement - * - * @return Speed in X, Y axis - */ - TRealPoint Speed() const; - - /** - * From MGestureEvent - * Scales the speed - * - * @return Scaled speed - */ - TRealPoint SpeedPercent( const TRect& aEdges ) const; - - /** - * From MGestureEvent - * Cheks and returns distance between start and current position - * - * @return Distance between two points - */ - TPoint Distance() const; - - /** - * Checks and returns gesture - * - * @param aRelevantAxis See @ref MGestureEvent::Code - * @return gesture code by analysing the sequence of points - */ - TXnGestureCode CodeFromPoints( TAxis aRelevantAxis ) const; - - TXnGestureCode LastDirection( TAxis aRelevantAxis ) const; - - private: - - /** Information of an earlier gesture */ - struct TGestureRecord - { - enum TType - { - ETypeOther, - ETypeTap, - ETypeDoubleTap - }; - - TGestureRecord(); - TGestureRecord( TType aType, TTime aCompletionTime, TPoint aPos ); - - /** type of the gesture */ - TType iType; - /** completion time fo the gesture */ - TTime iCompletionTime; - /** point of completion */ - TPoint iPos; - }; - - /** - * Returns elapsed time - * - * @return elapsed time between the latest and previous points - */ - inline TTimeIntervalMicroSeconds32 TimeFromPreviousPoint() const; - - /** - * Checks whether the movement has stopped - * - * @return ETrue if user has stopped moving the stylus before lifting - * it - */ - inline TBool IsMovementStopped() const; - - /** - * Offset of the last entry - * - * @return aOffset'th last entry in the list of points - */ - inline const TXnPointEntry& NthLastEntry( TInt aOffset ) const; - - /** - * Calles NthLastEntry for previous point - * - * @return previous point (may not be exactly the point before last) - */ - inline const TXnPointEntry& PreviousEntry() const; - - /** - * Returns the point before the last one - * - * @return position of point received just before the latest point - */ - inline TPoint PreviousPos() const; - - /** - * Return if the tap was a double tap - * - * @return ETrue if tap should be a double tap - */ - TBool IsTapDoubleTap() const; - - /** - * Returns current gesture type - * - * @return the type of the current gesture - */ - TGestureRecord::TType Type() const; - - private: - // Enumerators for holding and completion state - - /** - * the different states that indicate whether user has made a holding - * gesture - */ - enum THoldingState - { - /** before holding activated (i.e., holding not activated) */ - ENotHolding = 0, - /** holding activated just now (lasts just one callback round) */ - EHoldStarting, - /** holding activated earlier */ - EHolding - }; - - /** - * Completion states - */ - enum TCompletionState - { - // Note: implementation assumes this order of enums - ENotComplete = 0, - ECancelled, - EComplete, - EReleased - }; - - private: - // Members - - /** - * sequence of points that make up the gesture, owned. - */ - RArray< TXnPointEntry > iPoints; - - /** - * index in iPoints of the point in which user started holding - */ - TInt iHoldingPointIndex; - - /** - * state that indicates is user has held the pointer down in one - * position for long time to indicate a holding gesture - */ - THoldingState iHoldingState; - - /** - * gesture only becomes complete when user lifts the pointer - */ - TCompletionState iState; - - /** - * time when the stylus was lifted. - */ - TTime iCompletionTime; - - /** - * previous gesture information for double tap - */ - TGestureRecord iPreviousGesture; - }; - } // namespace XnGestureHelper - -// Inline functions -#include "xngesture.inl" - -#endif // _XNGESTURE_H_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xngesture.inl --- a/idlehomescreen/xmluirendering/uiengine/inc/xngesture.inl Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture class - inline section -* -*/ - - -// Protection for nested includes -#ifndef _XNGESTURE_INL_ -#define _XNGESTURE_INL_ - -// ----------------------------------------------------------------------------- -// TRealPoint inline implementation -// ----------------------------------------------------------------------------- -// -namespace XnGestureHelper - { - - // ------------------------------------------------------------------------- - // Default Constructor for the real point - // ------------------------------------------------------------------------- - // - inline TRealPoint::TRealPoint() : - iX( 0 ), iY( 0 ) - { - } - - - // ------------------------------------------------------------------------- - // Copy constructor for real point - // ------------------------------------------------------------------------- - // - inline TRealPoint::TRealPoint( const TRealPoint& aPoint ) : - iX( aPoint.iX ), iY( aPoint.iY ) - { - } - - // ------------------------------------------------------------------------- - // Copy constructor for real point - // ------------------------------------------------------------------------- - // - inline TRealPoint::TRealPoint( TReal aX, TReal aY ) : - iX( aX ), iY( aY ) - { - } - - // ------------------------------------------------------------------------- - // Default constructor for real point - // ------------------------------------------------------------------------- - // - inline TBool TRealPoint::operator==( const TRealPoint& aPoint ) const - { - return iX == aPoint.iX && iY == aPoint.iY; - } - } - -#endif //_XNGESTURE_INL_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xngesturedefs.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xngesturedefs.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture helper constant definitions -* -*/ - - -#ifndef _XNGESTUREDEFS_H_ -#define _XNGESTUREDEFS_H_ - -// System includes -#include - -/** - * This flag controls whether helpers emits a double tap or a tap gesture - * for a second tap - */ -#define _GESTURE_DOUBLE_TAP_SUPPORT - -/** - * XnGestureHelper namespace - * Used for the whole gesture family - Gesture recognizer, gesture helper, - * Point array - */ -namespace XnGestureHelper - { - /** time to hold the stylus in the same position to activate - * holding, in microseconds - */ - const TInt KHoldDuration = 500000; - - /** - * time to tap again for the second tap to be a double tap, in - * microseconds - */ - const TInt KMaxDoubleTapDuration = 400000; - - /** - * time in which speed becomes zero if user stops stylus movement before - * lifting the pointer, in microseconds - */ - const TInt KSpeedStopTime = 100000; - - /** - * tolerance in degrees to either side of an angle, for direction to be - * the same as reference angle - */ - const TReal KAngleTolerance = 35; - - /** - * maximum pointer movement from pointer down position for a gesture be - * a tap or hold gesture - */ - const TInt KSamePointTolerance = 3; - - /** - * minimum length of a valid swipe in pixels. should be larger than - * KTapTolerance - */ - const TReal KMinSwipeLength = 100; - - /** Nth pointer event before the latest point */ - const TInt KPreviousPointOffset = 3; - - - /** - * Panic codes - */ - enum TGesturePanic - { - EGesturePanicIllegalLogic - }; - - /** - * Panics the thread - * - * @param aReason Panic reason - */ - inline void Panic( TGesturePanic aReason ) - { - _LIT( KComponentName, "XnGestureHelper" ); - User::Panic( KComponentName, aReason ); - } - } // namespace XnGestureHelper - -#endif // _XNGESTUREDEFS_H_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xngesturehelper.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xngesturehelper.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture helper implementation -* -*/ - - -#ifndef _XNGESTUREHELPER_H_ -#define _XNGESTUREHELPER_H_ - -// System includes -#include - -// User includes -#include "xngesturerecogniser.h" - -// Forward declarations -class CXnNode; -struct TPointerEvent; - -/** - * XnGestureHelper namespace - * Used for the whole gesture family - Gesture recognizer, gesture helper, - * Point array - */ -namespace XnGestureHelper - { - - // Forward declarations - class CHoldingTimer; - class CXnGesture; - - // Constants - const TInt KGestureMinSpeed = 25; - const TInt KGestureMinLength = 100; - - /** - * Implementation of CGestureHelper interface - * - * @ingroup group_xnlayoutengine - */ - NONSHARABLE_CLASS( CXnGestureHelper ) : public CBase - { - - /** private implementation class */ - friend class CHoldingTimer; - - public: - - /** 2-phase constructor */ - static CXnGestureHelper* NewL( CXnNode& aNode ); - - /** Destructor */ - ~CXnGestureHelper(); - - /** - * See GestureHelper, SetHoldingEnabled function - * - * @see CGestureHelper::SetHoldingEnabled - */ - void SetHoldingEnabled( TBool aEnabled ); - - /** - * See Gesturehelper, IsHoldingEnabled function - * - * @see CGestureHelper::IsHoldingEnabled - */ - TBool IsHoldingEnabled() const; - - /** - * Gets the owner - * - * @return Owner - */ - CXnNode* Owner() const; - - /** - * Sets destination - * - * @aParam Destination - */ - void SetDestination( CXnNode* aDestination ); - - /** - * Gets destination - * - * @return Destination - */ - CXnNode* Destination() const; - - /** - * See GestureHelper Handlepointervent - * - * @see CGestureHelper::HandlePointerEventL - */ - TXnGestureCode HandlePointerEventL( const TPointerEvent& aEvent ); - - /** Reset helper state */ - void Reset(); - - private: - - /** Constructor */ - CXnGestureHelper( CXnNode& aNode ); - - /** - * Returns if the helper is processing - * - * @return ETrue if the helper has not started processing a gesture - */ - inline TBool IsIdle() const; - - /** - * Add a point to the sequence of points that make up the gesture - */ - inline void AddPointL( const TPointerEvent& aEvent ); - - /** - * Add a point to the sequence of points that make up the gesture - * - * @return - */ - inline TInt AddPoint( const TPointerEvent& aEvent ); - - /** - * Activates holding and notifies observer that holding has been - * started - */ - void StartHoldingL(); - - /** - * Check if swipe if between defined values - * - * @return Swiping left/right/none - */ - TXnGestureCode ValidSwipe() const; - - private: - - /** - * Gesture owner, Not owned. - */ - CXnNode& iOwner; - - /** - * Gesture is the logical representation of a sequence of points - * arriving at certain times - */ - CXnGesture* iGesture; - - /** - * holding is activated when user keeps pointer down in the same place - * for a longer period. the holding timer activates off when enough - * time has passed. - */ - CHoldingTimer* iHoldingTimer; - - /** - * Gesture destination, Not owned. - */ - CXnNode* iDestination; - - TXnGestureCode iDirection; - }; - } // GestureHelper - -#endif // _XNGESTUREHELPER_H_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xngesturerecogniser.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xngesturerecogniser.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Algorithm to recognise gesture from a stream of points -* -*/ - - -#ifndef _XNGESTURERECOGNISER_H_ -#define _XNGESTURERECOGNISER_H_ - -// System includes -#include - - -/** - * XnGestureHelper namespace - * Used for the whole gesture family - Gesture recognizer, gesture helper, - * Point array - */ -namespace XnGestureHelper - { - - // Forward declarations - class TXnPointArray; - - /** - * flag that indicates gesture code is a holding code - * clients should use MGestureEvent::IsHolding - */ - const TInt EFlagHold = 0x10000000; - - /** - * Gesture codes and states - */ - enum TXnGestureCode - { - // states - /** gesture just started (user pressed stylus down)*/ - EGestureStart = 0x00000001, - /** user moved stylus (may be holding or not holding) */ - EGestureDrag = 0x00000002, - /** user lifted stylus while user was holding */ - EGestureReleased = 0x00000003, - - // gestures - /** gesture was not recognised */ - EGestureUnknown = 0x00000005, - /** these codes are sent when user lifts stylus - * (if holding not started) - */ - EGestureTap = 0x00000006, - /** first tap emits EGestureTap */ - EGestureDoubleTap = 0x00000007, - /** swipe left */ - EGestureSwipeLeft = 0x00000008, - /** swipe right */ - EGestureSwipeRight = 0x00000009, - /** swipe up */ - EGestureSwipeUp = 0x0000000A, - /** swipe down */ - EGestureSwipeDown = 0x0000000B, - EGestureCanceled = 0x0000000C, - /** - * these codes are sent when user initiates holding by keeping stylus - * in same place for a longer duration - */ - EGestureHoldLeft = EGestureSwipeLeft | EFlagHold, - EGestureHoldRight = EGestureSwipeRight | EFlagHold, - EGestureHoldUp = EGestureSwipeUp | EFlagHold, - EGestureHoldDown = EGestureSwipeDown | EFlagHold - }; - - //Class declaration - - /** - * Set of algorithms to recognise gesture from a stream of points - * Note: Not a static class or a function pointer, just to make it - * sligthly easier to replace it with a heavier implementation - * - * @ingroup group_xnlayoutengine - */ - NONSHARABLE_CLASS( TXnGestureRecogniser ) - { - public: - - /** - * Translates points into a gesture code - * @param aPoints Points that form the gestures. Client is not - * required to pass in repeated points (sequential - * points that are almost in the same place) - * @param aIsHolding ETrue if gesture was ended at pointer being held - * down at same position - * EFalse if gesture ended at pointer being released - * @return recognised gesture id or EUnknownGesture - */ - TXnGestureCode GestureCode( const TXnPointArray& aPoints ) const; - - TXnGestureCode LastDirection( const TXnPointArray& aPoints ) const; - }; - } // namespace XnGestureHelper - -#endif // _XNGESTURERECOGNISER_H_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnhittest.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnhittest.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Class to hold hit region information -* -*/ - - -#ifndef _XNHITTEST_H -#define _XNHITTEST_H - -// System includes -#include -#include - -// Forward declarations -class CXnControlAdapter; - -namespace XnHitTest - { - const TInt EIgnoreEventsUntilNextPointerUp = 0x01; - const TInt EIgnoreStylusUpTriggers = 0x02; - } - -// Class declaration - -/** - * Holds hit region information - * - * @ingroup group_xnlayoutengine - * @lib xn3layoutengine.lib - * @since S60 5.0 - */ -NONSHARABLE_CLASS( CXnHitTest ) : public CBase, - public MCoeMessageMonitorObserver - { -public: - // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CXnHitTest* NewL(); - - /** - * Two-phased constructor. Leaving on stack - */ - static CXnHitTest* NewLC(); - - ~CXnHitTest(); - -private: - CXnHitTest(); - -private: - // from MCoeMessageMonitorObserver - - /** - * @see MCoeMessageMonitorObserver documentation - */ - void MonitorWsMessage( const TWsEvent& aEvent ); - -public: - // New functions - - /** - * Adds a control to hit region. - * - * @since S60 5.0 - * @param aControl The control to be added. - */ - void AddControl( CXnControlAdapter* aControl ); - - /** - * Removes a control from hit region. - * - * @since S60 5.0 - * @param aControl The control to be removed. - */ - void RemoveControl( CXnControlAdapter* aControl ); - - /** - * Set flags - * - * @since S60 5.0 - * @param aFlags flags to be added - */ - void SetFlags( const TInt aFlags ); - - /** - * Clear flags - * - * @since S60 5.0 - * @param aFlags flags to be cleared, 0x0F default - */ - void ClearFlags( const TInt aFlags = 0x0F ); - - /** - * Get flags - * - * @since S60 5.0 - * @return Flags - */ - TInt Flags() const; - - /** - * Flushes hit test state - * - * @since S60 5.0 - */ - void Flush(); - - /** - * Gets hit region count - * - * @since S60 5.0 - * @return Count - */ - TInt HitRegionCount() const; - - /** - * Gets hit region - * - * @since S60 5.0 - * @return Region - */ - CXnControlAdapter* HitRegion() const; - - /** - * Tests whether a pointer event occurred inside the control's hit region. - * - * @since S60 5.0 - * @param aPointEvent The pointer event. - * @param aControl - * @return ETrue if the specified point lies inside the hit region, - * EFalse if not. - */ - TBool HitRegionContainsL( const TPointerEvent& aPointerEvent, - const CXnControlAdapter& aControl ); - - /** - * Gets the last pointer event - * - * @since S60 5.0 - * @return Last pointer event - */ - const TPointerEvent& PointerEvent() const; - -protected: - /** - * Two-phased constructor. - */ - void ConstructL(); - -private: - // data - - /** Hit region */ - RPointerArray< CXnControlAdapter > iHitRegion; - /** Pointer event */ - TPointerEvent iPointerEvent; - /** Flags */ - TInt iFlags; - }; - -#endif // _XNHITTEST_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnkeyeventdispatcher.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnkeyeventdispatcher.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnkeyeventdispatcher.h Wed May 12 13:12:59 2010 +0300 @@ -160,15 +160,28 @@ */ void ClearPassiveFocusedNodesL(); + /** + * Clears dispatcher's internal state. + * + * @since S60 5.2 + */ + void ClearStateL(); + + /** + * Returns the last pointer event + * + * @since S60 5.2 + * @return Last pointer event + */ + const TPointerEvent& PointerEvent() const; + private: // new functions void SetNodeL( CXnNode* aToLose, CXnNode* aToGain, TBool aNotify, TInt aSource = 0 ); - void ResolveAndSetFocusL(); - - void ClearStateL(); + void ResolveAndSetFocusL(); protected: // New functions @@ -223,6 +236,8 @@ CEikButtonGroupContainer* iCbaContainer; /** For storing the nodes that have passive focus. */ RPointerArray< CXnNode > iPassiveFocusedNodes; + /** Last pointer event */ + TPointerEvent iPointerEvent; }; #endif //__XNKEYEVENTDISPATCHER_H__ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnpointarray.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnpointarray.h Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Array of points -* -*/ - - -#ifndef _XNPOINTARRAY_H_ -#define _XNPOINTARRAY_H_ - -// System includes -#include - -/** - * XnGestureHelper namespace - * Used for the whole gesture family - Gesture recognizer, gesture helper, - * Point array - */ -namespace XnGestureHelper - { - - /** - * Represents a single point given at certain time - */ - struct TXnPointEntry - { - - /** constructor */ - inline TXnPointEntry( const TPoint& aPos, const TTime& aTime ); - - TPoint iPos; - TTime iTime; - }; - - /** - * Array of points that wraps another point array - * The purpose of this class is to allow deriving classes to override [] - * and in that member function adjust the point, e.g., by setting one - * axis to always a constant value. This allows providing a sequence of - * points to the recogniser in which the other axis is ignored. - * - * @ingroup group_xnlayoutengine - */ - NONSHARABLE_CLASS( TXnPointArray ) - { - public: - - /** - * Constructor - * - * @param aPoints points array to wrap (and filter) - */ - TXnPointArray( const RArray< TXnPointEntry >& aPoints ); - - /** - * Length of the array - * - * @return Length of the array - */ - TInt Count() const; - - /** - * Returns point at position, may be filtered - * virtual so deriving classes can modify the point - * (e.g., filter one axis) - * - * @return A filtered point at aIndex. Default implementation same - * as Raw(...) - */ - virtual TPoint operator[]( TInt aIndex ) const; - - /** - * Nonfiltered index - * - * @return An raw, non-filtered point at aIndex - */ - const TPoint& Raw( TInt aIndex ) const; - - private: - - /** Array of points, Not owned */ - const RArray< TXnPointEntry >& iPoints; - }; - } // namespace XnGestureHelper - - -// Inline functions -#include "xnpointarray.inl" - -#endif // _XNPOINTARRAY_H_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnpointarray.inl --- a/idlehomescreen/xmluirendering/uiengine/inc/xnpointarray.inl Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Array of points - inline functions -* -*/ - - -#ifndef _XNPOINTARRAY_INL_ -#define _XNPOINTARRAY_INL_ - -namespace XnGestureHelper - { - - // ----------------------------------------------------------------------- - // TXnPointEntry's Constructor - // ----------------------------------------------------------------------- - // - inline TXnPointEntry::TXnPointEntry( const TPoint& aPos, - const TTime& aTime ) : iPos( aPos ), iTime( aTime ) - { - }; - } - -#endif // _XNPOINTARRAY_INL_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnspbgcleaner.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnspbgcleaner.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,73 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: +* Declares statuspane's background cleaner. +* +*/ + +#ifndef __XNSPBGCLEANER_ +#define __XNSPBGCLEANER_ + +// Forward declarations + +/** + * Statuspane background cleaner. + * + * @class CXnSpBgCleaner xnspbgcleaner.h + */ +NONSHARABLE_CLASS( CXnSpBgCleaner ) : public CCoeControl + { +public: + /** + * Two-phased constructors. + */ + static CXnSpBgCleaner* NewL(); + static CXnSpBgCleaner* NewLC(); + + /** Destructor */ + ~CXnSpBgCleaner(); + +private: + /** constructor */ + CXnSpBgCleaner(); + + /** 2nd phase constructor */ + void ConstructL(); + +protected: // from base class CCoeControl + + /** + * Handles a change to the control's resources + * + * @see CCoeControl::HandleResourceChange + */ + void HandleResourceChange( TInt aType ); + + /** + * Sets the control's extent, specifying a rectangle. + * + * @see CCoeControl::SizeChanged + */ + void SizeChanged(); + + /* + * Draws the control. + * + * @see CCoeControl::Draw + */ + void Draw( const TRect& aRect ) const; + + }; + +#endif // __XNSPBGCLEANER_ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnuiengineimpl.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnuiengineimpl.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnuiengineimpl.h Wed May 12 13:12:59 2010 +0300 @@ -38,7 +38,6 @@ class CXnEditor; class CXnResource; class CXnEditMode; -class CXnHitTest; class CXnViewManager; class CXnViewData; class CXnPluginData; @@ -80,14 +79,13 @@ /** Is partial screen input open */ TBool iPartialScreenOpen; /** Partial screen block progression. Own. */ - HBufC8* iPartialScreenBlock; - - TXnSplitScreenState(): iPartialScreenBlock( NULL ){} - - ~TXnSplitScreenState() - { - delete iPartialScreenBlock; - } + const TDesC8* iPartialScreenBlock; + + // ctor + TXnSplitScreenState() : + iPartialScreenEditorNode( NULL ), + iPartialScreenOpen( EFalse ), + iPartialScreenBlock( NULL ) {} }; @@ -470,14 +468,6 @@ RPointerArray< CXnNode >* Plugins(); /** - * Gets hit test - * - * @since S60 5.1 - * @return the hittest - */ - CXnHitTest& HitTest() const; - - /** * Gets theme resource file * * @since S60 5.1 @@ -615,19 +605,13 @@ /** * Set partial screen block * - * @since Series 60 5.2 + * @since Series 60 5.2 + * @param CXnNode aParent parent node * @param TDesC8 aBlockProgression set layout direction */ - void SetPartialScreenBlockProgressionL( const TDesC8& aBlockProgression ); - - /** - * Store partial screen block - * - * @since Series 60 5.2 - * @param TDesC8 aBlockProgression set layout direction - */ - void StorePartialScreenBlockProgressionL(); - + void SetPartialScreenBlockProgressionL( + CXnNode* aParent, const TDesC8& aBlockProgression ); + /** * Handles skin change resource change * @@ -752,8 +736,6 @@ TRect iClientRect; /** Owned. Edit mode storage; */ CXnEditMode* iEditMode; - /** Owned. hittest */ - CXnHitTest* iHitTest; /** Disable count */ TInt iDisableCount; /**Split screen states*/ diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnviewadapter.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnviewadapter.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnviewadapter.h Wed May 12 13:12:59 2010 +0300 @@ -182,9 +182,11 @@ * @since S60 5.0 * @param aContainer Container to activate * @param aEnterEditState ETrue if activated container should be set to edit state. + * @param aForceActivation if ETrue forces deactivation and then activation even if + * the conntainer remains the same */ void ActivateContainerL( CXnViewData& aContainer, - TBool aEnterEditState = EFalse ); + TBool aEnterEditState = EFalse, TBool aForceActivation = EFalse ); /** * Deactivates the current container from view. diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnwaitdialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnwaitdialog.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: +* Declares wait dialog that doesn't consume key events. +* +*/ + + +#ifndef _XNWAITDIALOG_H +#define _XNWAITDIALOG_H + +// INCLUDES +#include + +// CONSTANTS + +// MACROS + +// DATA TYPES + +// FUNCTION PROTOTYPES + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + + +/** + * Wait Dialog without key event handling + * + * @ingroup group_xnlayoutengine + * @lib xn3layoutengine.lib + * @since S60 5.0 + */ +NONSHARABLE_CLASS( CXnWaitDialog ) : public CAknWaitDialog + { + +public: + // Constructors and destructor + + /** + * Class constructor + * + * @param aSelfPtr Pointer to itself. The pointer needs to be + * valid when the dialog is dismissed and must not + * be on the stack. + * @param aVisibilityDelayOff If set ETrue the dialog will be visible + * immediality. Use only when the length of + * the process is ALWAYS over 1.5 seconds. + */ + CXnWaitDialog( CEikDialog** aSelfPtr, TBool aVisibilityDelayOff ); + + /** + * Destructor + */ + ~CXnWaitDialog(); + +public: // From CAknWaitDialog + + /** + * From CAknWaitDialog + * @since S60 5.2 + * @param aKeyEvent the key event + * @param aType the type of the event + * @return TKeyResponse key event was used by this control or not + */ + TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType ); + }; +#endif // _XNWAITDIALOG_H + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h Wed May 12 13:12:59 2010 +0300 @@ -32,22 +32,12 @@ class CXnUiEngine; class TVwsViewId; class CPeriodic; +class CXnSpBgCleaner; +class CAknWaitDialog; // Constants const TUid KWallpaperViewUid = { 0x200286DB }; -/** -* Data structure to be used with timer callback. -* -* @since S60 v5.0 -*/ -NONSHARABLE_STRUCT( TXnWallpaperViewData ) - { - TBool iMultiple; - TUid iAppUid; - TUid iViewUid; - }; - // CLASS DECLARATION /** @@ -58,6 +48,13 @@ */ NONSHARABLE_CLASS( CXnWallpaperView ) : public CAknView { + /** View states */ + enum TViewState + { + EIdle, + EImageSelection, + EViewDeactivation + }; public: /** @@ -102,8 +99,16 @@ /** * Callback function to be used with CPeriodic. */ - static TInt TimerCallbackL( TAny *aPtr ); + static TInt TimerCallback( TAny *aPtr ); + void DoHandleCallBackL(); + /** + * Show error dialog + * + * @param aResourceId Resource id to string to be displayed. + */ + static void ShowErrorDialogL( const TInt aResourceId ); + private: // data /** @@ -125,9 +130,19 @@ CXnAppUiAdapter& iAppUi; /** - * Data structure, that is transferred to TimerCallback. + * Switch for multiple image selection. + */ + TBool iMultiple; + + /** + * Previous view id */ - TXnWallpaperViewData iData; + TVwsViewId iPreviousViewUid; + + /** + * States of wallpaperview + */ + TViewState iViewState; /** * Periodic timer. @@ -139,6 +154,18 @@ * Resource file offset */ TInt iResourceOffset; + + /** + * Statuspane background cleaner. + * Own. + */ + CXnSpBgCleaner* iXnSpBgCleaner; + + /** + * Wait dialog. + * Own. + */ + CAknWaitDialog* iWaitDialog; }; #endif // CXNWALLPAPERVIEW_H diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/inc/xnwidgetextensionadapter.h --- a/idlehomescreen/xmluirendering/uiengine/inc/xnwidgetextensionadapter.h Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/inc/xnwidgetextensionadapter.h Wed May 12 13:12:59 2010 +0300 @@ -63,6 +63,13 @@ * Destructor. */ ~CXnWidgetExtensionAdapter(); +public: + /** + * From CCoeAppUiBase. + * Informs the components about the screen layout switch. + */ + void HandleScreenDeviceChangedL(); + private: // Functions from base classes @@ -74,12 +81,17 @@ /** * see CCoeControl */ - void HandlePointerEventL(const TPointerEvent& aPointerEvent); + void HandlePointerEventL( const TPointerEvent& aPointerEvent ); /** * see CCoeControl */ - void Draw(const TRect& aRect) const; + void Draw( const TRect& aRect ) const; + + /** + * @see CXnControlAdapter + */ + void DoHandlePropertyChangeL( CXnProperty* aProperty = NULL ); private: // from MXnUiStateObserver @@ -128,7 +140,9 @@ // New functions void HidePopupL(); - + + void ChangePopupPosition(); + void CalculatePosition(); private: diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnappuiadapter.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -287,11 +287,11 @@ } // ----------------------------------------------------------------------------- -// CXnAppUiAdapter::UiActivated +// CXnAppUiAdapter::HandleUiReadyEventL // // ----------------------------------------------------------------------------- // -EXPORT_C void CXnAppUiAdapter::UiActivated() +EXPORT_C void CXnAppUiAdapter::HandleUiReadyEventL() { // Default empty implementation } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnappuiadapterimpl.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapterimpl.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapterimpl.cpp Wed May 12 13:12:59 2010 +0300 @@ -22,6 +22,9 @@ #include #include #include +#include +#include +#include // User includes #include "xnappuiadapter.h" @@ -34,6 +37,7 @@ #include "xneditor.h" #include "xnwallpaperview.h" #include "xneffectmanager.h" +#include "xnwaitdialog.h" #include "xnappuiadapterimpl.h" @@ -121,6 +125,9 @@ iEffectManager = CXnEffectManager::NewL(); + iBackupRestoreObserver = CXnPropertySubscriber::NewL( + KUidSystemCategory, conn::KUidBackupRestoreKey, *this ); + __TIME_ENDMARK( "CXnAppUiAdapterImpl::ConstructL, done", time ); } @@ -147,7 +154,14 @@ // ----------------------------------------------------------------------------- // CXnAppUiAdapterImpl::~CXnAppUiAdapterImpl() - { + { + if ( iXnWaitDialog ) + { + TRAP_IGNORE( iXnWaitDialog->ProcessFinishedL(); ); + } + + delete iBackupRestoreObserver; + delete iUiEngine; delete iUiStateListener; @@ -256,4 +270,54 @@ iUiStateListener->HandleResourceChangeL( aType ); } +// ----------------------------------------------------------------------------- +// CXnAppUiAdapterImpl::DisplayWaitDialogL +// Displays wait dialog during backup/restore. +// ----------------------------------------------------------------------------- +// +void CXnAppUiAdapterImpl::DisplayWaitDialogL() + { + if ( !iXnWaitDialog ) + { + iXnWaitDialog = new( ELeave ) CXnWaitDialog( + reinterpret_cast( &iXnWaitDialog ), ETrue ); + iXnWaitDialog->SetCallback( this ); + iXnWaitDialog->ExecuteLD( R_BACKUP_RESTORE_WAIT_DIALOG ); + } + } + +// ----------------------------------------------------------------------------- +// CXnAppUiAdapterImpl::BackupRestoreEvent +// Property changed notification callback +// ----------------------------------------------------------------------------- +// +void CXnAppUiAdapterImpl::PropertyChangedL( const TUint32 aKey, const TInt aValue ) + { + const TUint mask( conn::KBURPartTypeMask ^ conn::EBURNormal ); + if ( aKey == conn::KUidBackupRestoreKey ) + { + if ( aValue & mask ) + { + // Any type of backup or restore operation started + DisplayWaitDialogL(); + } + else if ( iXnWaitDialog ) + { + // Any type of backup or restore operation ended + iXnWaitDialog->ProcessFinishedL(); + // ProcessFinishedL() will NULL iXnWaitDialog + } + } + } + +// ---------------------------------------------------------------------------- +// CXnAppUiAdapterImpl::DialogDismissedL() +// Callback method from MProgressDialogCallback interface. +// ---------------------------------------------------------------------------- +// +void CXnAppUiAdapterImpl::DialogDismissedL(TInt /*aButtonId*/) + { + // No implementation required. + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp Wed May 12 13:12:59 2010 +0300 @@ -27,6 +27,7 @@ #include "xnwallpaperview.h" #include "xnrootdata.h" #include "xnuiengine.h" +#include "xnoomsyshandler.h" #include "xneffectmanager.h" // SYSTEM INCLUDE FILES @@ -45,6 +46,7 @@ #include #include #include +#include using namespace hspswrapper; @@ -101,8 +103,10 @@ CheckFeatureTypeL(); iTimer = CPeriodic::NewL( CActive::EPriorityIdle ); - + GfxTransEffect::Register( this, KGfxContextBgAppear ); + + iOomSysHandler = CXnOomSysHandler::NewL(); } // ----------------------------------------------------------------------------- @@ -136,6 +140,8 @@ delete iBgContext; delete iBgImage; delete iBgImagePath; + delete iOomSysHandler; + delete iSpMask; } // ----------------------------------------------------------------------------- @@ -177,6 +183,7 @@ { SystemGc().DrawBitmap( iRect, wallpaper ); } + DrawStatusPaneMask(); } // Skin bg is used by default @@ -214,6 +221,34 @@ } } iBgContext->SetRect( iRect ); + + // create status pane mask image and set size + if( iSpMask ) + { + delete iSpMask; + iSpMask = NULL; + } + + TRect spRect; + AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, spRect ); + + TInt err( KErrNone ); + + if( Layout_Meta_Data::IsLandscapeOrientation() ) + { + TRAP( err, iSpMask = AknsUtils::CreateBitmapL( AknsUtils::SkinInstance(), + KAknsIIDQgnGrafBgLscTopMaskIcon ) ); + } + else + { + TRAP( err, iSpMask = AknsUtils::CreateBitmapL( AknsUtils::SkinInstance(), + KAknsIIDQgnGrafBgPrtTopMaskIcon ) ); + } + + if( iSpMask ) + { + AknIconUtils::SetSize( iSpMask, spRect.Size(), EAspectRatioNotPreserved ); + } } // ----------------------------------------------------------------------------- @@ -353,7 +388,7 @@ { return iType; } - + // ----------------------------------------------------------------------------- // CXnBackgroundManager::WallpaperChanged // ----------------------------------------------------------------------------- @@ -505,12 +540,19 @@ } else if ( selectedIndex == 1 ) { + if ( CXnOomSysHandler::HeapAvailable( CXnOomSysHandler::EMem6MB ) ) + { CXnAppUiAdapter& appui( iViewManager.AppUiAdapter() ); appui.EffectManager()->BeginFullscreenEffectL( KGfxContextOpenWallpaperView, iViewManager.ActiveViewData() ); appui.ActivateLocalViewL( KWallpaperViewUid, KDummyUid, KSingle ); + } + else + { + OomSysHandler().HandlePotentialOomL(); + } } } CleanupStack::Pop( query ); @@ -661,7 +703,7 @@ if( path != KNullDesC && !bitmap ) { TInt err = CacheWallpaperL( path, *viewData ); - if( err == KErrNone ) + if( err == KErrNone && viewData == &iViewManager.ActiveViewData() ) { drawingNeeded = ETrue; } @@ -670,6 +712,13 @@ if( drawingNeeded ) { UpdateScreen(); + + TInt err = AknsWallpaperUtils::SetIdleWallpaper( + iViewManager.ActiveViewData().WallpaperImagePath(), NULL ); + if( err == KErrNone ) + { + iIntUpdate++; + } } } else @@ -731,14 +780,15 @@ // Add new to the cache if( aFileName != KNullDesC ) { - if( CacheWallpaperL( aFileName, viewData ) == KErrNone ) + err = CacheWallpaperL( aFileName, viewData ); + + if( err == KErrNone ) { SaveWallpaperL(); // to HSPS } else { - // image is corrupted or format is not supported - return KErrCACorruptContent; + return err; } } // WallpaperImage changed back to default. Update view data. @@ -783,13 +833,13 @@ { iBgImagePath = aFileName.AllocL(); - TBool err( KErrNone ); + err = KErrNone; TRAP( err, iSkinSrv.AddWallpaperL( aFileName, iRect.Size() ) ); - if( err ) + if( err != KErrNone ) { - // image is corrupted or format is not supported - return KErrCACorruptContent; + return err; } + TRAP( err, iBgImage = iSkinSrv.WallpaperImageL( aFileName ) ); if( err ) { @@ -929,5 +979,29 @@ return EFalse; } +// ----------------------------------------------------------------------------- +// CXnBackgroundManager::DrawStatusPaneMask +// ----------------------------------------------------------------------------- +// +void CXnBackgroundManager::DrawStatusPaneMask() const + { + if( iSpMask ) + { + TSize bmpSize = iSpMask->SizeInPixels(); + TRect spRect( 0, 0, bmpSize.iWidth, bmpSize.iHeight ); + SystemGc().DrawBitmap( spRect, iSpMask ); + } + } + +// ----------------------------------------------------------------------------- +// CXnBackgroundManager::OOMSysHandler +// ----------------------------------------------------------------------------- +// +CXnOomSysHandler& CXnBackgroundManager::OomSysHandler() const + { + __ASSERT_DEBUG( iOomSysHandler , User::Panic( _L("xnbackgroundmanager"), 0 ) ); + + return *iOomSysHandler; + } // End of File diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnbgcontrol.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnbgcontrol.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,315 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Background appearance drawer -* -*/ - -// System includes -#include - -// User includes -#include "xnappuiadapter.h" -#include "xnuiengine.h" -#include "xneditmode.h" - -#include "xnbgcontrol.h" - -// Constants - -// ============================ LOCAL FUNCTIONS ================================ - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// CXnBgControl::NewL() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CXnBgControl* CXnBgControl::NewL() - { - CXnBgControl* self = CXnBgControl::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::NewLC() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CXnBgControl* CXnBgControl::NewLC() - { - CXnBgControl* self = new ( ELeave ) CXnBgControl(); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::~CXnBgControl() -// C++ default destructor. -// ----------------------------------------------------------------------------- -// -CXnBgControl::~CXnBgControl() - { - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::CXnBgControl() -// C++ default constructor. -// ----------------------------------------------------------------------------- -// -CXnBgControl::CXnBgControl() - : iHitpoint( TPoint( -1,-1 ) ) - { - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::ConstructL() -// 2nd phase constructor -// ----------------------------------------------------------------------------- -// -void CXnBgControl::ConstructL() - { - CreateWindowL(); - - TRgb backgroundColour = KRgbWhite; - if( KErrNone == Window().SetTransparencyAlphaChannel() ) - { - backgroundColour.SetAlpha( 0 ); - } - Window().SetBackgroundColor( backgroundColour ); - - EnableDragEvents(); - - Window().SetPointerGrab( ETrue ); - - - ActivateL(); - - MakeVisible( ETrue ); - - SetComponentsToInheritVisibility( ETrue ); - - static_cast< CXnAppUiAdapter* >( iAvkonAppUi ) - ->UiStateListener().AddObserver( *this ); - - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::CountComponentControls() -// -// ----------------------------------------------------------------------------- -// -TInt CXnBgControl::CountComponentControls() const - { - if ( iControl ) - { - return 1; - } - - return 0; - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::ComponentControl() -// -// ----------------------------------------------------------------------------- -// -CCoeControl* CXnBgControl::ComponentControl( TInt aIndex ) const - { - if ( aIndex == 0 ) - { - return iControl; - } - - return NULL; - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::SizeChanged() -// -// ----------------------------------------------------------------------------- -// -void CXnBgControl::SizeChanged() - { - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::Draw() -// -// ----------------------------------------------------------------------------- -// -void CXnBgControl::Draw( const TRect& aRect ) const - { - CXnAppUiAdapter* appui( - static_cast< CXnAppUiAdapter* >( iAvkonAppUi ) ); - - TInt state( appui->UiEngine().EditMode()->EditState() ); - - CWindowGc& gc( SystemGc() ); - - if ( state == CXnEditMode::EShootContent ) - { - // No background needed for dragging widget screenshot - } - else - { - gc.Clear( aRect ); - } - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::SetCompoundControl() -// -// ----------------------------------------------------------------------------- -// -void CXnBgControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) - { - switch( aPointerEvent.iType ) - { - case TPointerEvent::EButton1Down: - iHitpoint = aPointerEvent.iPosition; - break; - - case TPointerEvent::EButton1Up: - break; - - default: - break; - } - - CXnAppUiAdapter* appui( static_cast< CXnAppUiAdapter* >( iAvkonAppUi ) ); - - appui->UiEngine().DisableRenderUiLC(); - - CCoeControl::HandlePointerEventL( aPointerEvent ); - - appui->UiEngine().RenderUIL(); - - CleanupStack::PopAndDestroy(); - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::SetCompoundControl() -// -// ----------------------------------------------------------------------------- -// -void CXnBgControl::SetCompoundControl( CCoeControl* aControl ) - { - if ( iControl == aControl ) - { - return; - } - - if ( iControl ) - { - // Remove parents - iControl->SetParent( NULL ); - iControl->SetMopParent( NULL ); - - iControl->MakeVisible( EFalse ); - } - - if ( aControl ) - { - // Set self as parent - aControl->SetParent( this ); - aControl->SetMopParent( this ); - - aControl->MakeVisible( ETrue ); - } - - iControl = aControl; - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::ResetGrabbingL() -// Service for removing grabbing controls -// ----------------------------------------------------------------------------- -// -void CXnBgControl::ResetGrabbingL() - { - TPointerEvent event; - event.iType = TPointerEvent::EButton1Up; - - RemoveGrabbingControL( this, event ); - - iHitpoint.SetXY( -1, -1 ); - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::RemoveGrabbingControL() -// Removes recursively grabbing controls -// ----------------------------------------------------------------------------- -// -void CXnBgControl::RemoveGrabbingControL( const CCoeControl* aControl, - const TPointerEvent& aEvent ) const - { - TInt count = aControl->CountComponentControls(); - - for( TInt i = 0; i < count; i++ ) - { - CCoeControl* child = aControl->ComponentControl( i ); - - if( child && child->Rect().Contains( iHitpoint ) ) - { - child->CCoeControl::HandlePointerEventL( aEvent ); - RemoveGrabbingControL( child, aEvent ); - } - } - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::NotifyForegroundChanged() -// Notifies foreground changes. -// ----------------------------------------------------------------------------- -// -void CXnBgControl::NotifyForegroundChanged( TForegroundStatus aStatus ) - { - switch( aStatus ) - { - case EForeground: - break; - - case EUnknown: - case EBackground: - case EPartialForeground: - default: - TRAP_IGNORE( ResetGrabbingL(); ) - break; - } - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::NotifyLightStatusChanged() -// Notifies primary display light status is changed. -// ----------------------------------------------------------------------------- -// -void CXnBgControl::NotifyLightStatusChanged( TBool /*aLightsOn*/ ) - { - - } - -// ----------------------------------------------------------------------------- -// CXnBgControl::NotifyInCallStateChaged() -// Notifies in-call state is changed. -// ----------------------------------------------------------------------------- -// -void CXnBgControl::NotifyInCallStateChaged( TBool /*aInCall*/ ) - { - - } - -// End of file - diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xncomposer.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xncomposer.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xncomposer.cpp Wed May 12 13:12:59 2010 +0300 @@ -102,7 +102,7 @@ // @return returns pointer to desired node, NULL if nothing found // --------------------------------------------------------------------------- // -CXnDomNode* FindNodeByName( CXnDomNode* aNode, const TDesC8& aName ) +static CXnDomNode* FindNodeByName( CXnDomNode* aNode, const TDesC8& aName ) { if ( !aNode ) { @@ -131,12 +131,57 @@ } // --------------------------------------------------------------------------- +// Finds template publisher name +// +// --------------------------------------------------------------------------- +// +static const TDesC8& FindTemplatePublisherName( CXnDomNode* aNode ) + { + if ( !aNode ) + { + return KNullDesC8(); + } + + CXnDomList& list( aNode->ChildNodes() ); + + for ( TInt i = 0; i < list.Length(); i++ ) + { + CXnDomNode* node = static_cast< CXnDomNode* >( list.Item( i ) ); + + // Find element + if ( node->Name() == KConfigurationModel ) + { + CXnDomList& attributes( node->AttributeList() ); + + CXnDomAttribute* name( + static_cast< CXnDomAttribute* >( + attributes.FindByName( XnPropertyNames::action::KName ) ) ); + + // Find attribute name="publisher" + if ( name && name->Value() == KPublisher ) + { + CXnDomAttribute* value( + static_cast< CXnDomAttribute* >( + attributes.FindByName( XnPropertyNames::action::KValue ) ) ); + + if ( value ) + { + return value->Value(); + } + } + } + } + + return KNullDesC8(); + } + +// --------------------------------------------------------------------------- // FindNodeById // Finds recursively node by id // @return returns pointer to desired node, NULL if nothing found // --------------------------------------------------------------------------- // -CXnDomNode* FindNodeById( CXnDomNode* aNode, const TDesC8& aId ) +static CXnDomNode* FindNodeById( CXnDomNode* aNode, const TDesC8& aId ) { if ( !aNode ) { @@ -595,12 +640,16 @@ if( bgManager.WallpaperType() == CXnBackgroundManager::EPageSpecific ) { HBufC* bgImage = ItemValueL( *configuration, KWallpaper, KPath ); - CleanupStack::PushL( bgImage ); - if( bgImage && bgImage->Length() > 0 ) + if ( bgImage ) { - bgManager.CacheWallpaperL( bgImage->Des(), aViewData ); + CleanupStack::PushL( bgImage ); + bgImage->Des().Trim(); + if( bgImage && bgImage->Length() > 0 ) + { + bgManager.CacheWallpaperL( bgImage->Des(), aViewData ); + } + CleanupStack::PopAndDestroy( bgImage ); } - CleanupStack::PopAndDestroy( bgImage ); } if ( pluginNode ) { @@ -736,20 +785,9 @@ if ( info.Type() == KKeyTemplate ) { - CXnDomNode* node( FindNodeByName( widgetRoot, KContentSourceNode ) ); + const TDesC8& name( FindTemplatePublisherName( widgetRoot ) ); - if ( node ) - { - CXnDomList& attributes( node->AttributeList() ); - - CXnDomAttribute* attribute( static_cast< CXnDomAttribute* >( - attributes.FindByName( KName ) ) ); - - if ( attribute ) - { - aPluginData.SetPublisherNameL( attribute->Value() ); - } - } + aPluginData.SetPublisherNameL( name ); } retval = KErrNone; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp Wed May 12 13:12:59 2010 +0300 @@ -21,6 +21,7 @@ #include #include #include +//skinning support #include #include #include @@ -52,7 +53,6 @@ #include "xndomlist.h" #include "xnodt.h" #include "xnresource.h" -#include "xnhittest.h" #include "xnplugindata.h" #include "xnnode.h" #include "xnpanic.h" @@ -62,9 +62,6 @@ #include "xneditmode.h" _LIT8(KScrollableBoxNodeName, "scrollablebox"); - -using namespace XnGestureHelper; -#include "xngesture.h" // Constants const TInt KSkinGfxInnerRectShrink = 5; @@ -73,7 +70,9 @@ const TInt KLongTapStartShortDelay( 150000 ); // 0.15s for Sk const TInt KLongTapStartLongDelay( 500000 ); // 0.5s const TInt KLongTapTimeShortDelay( 600000 ); // 0.6s for SK -const TInt KLongTapTimeLongDelay( 1500000 ); // 1.5s +const TInt KLongTapTimeLongDelay( 1500000 ); // 1.5s + +const TInt KDragThreshold = 20; // pixels // LOCAL FUNCTION PROTOTYPES static TRgb ConvertHslToRgb( TInt aHue, TInt aSaturation, TInt aLightness ); @@ -3355,44 +3354,6 @@ // ----------------------------------------------------------------------------- // SoftkeyNode -// Gets the node of softkey according to index -// ----------------------------------------------------------------------------- -// -static CXnNode* SoftkeyNodeL( CXnNode* aMenuBarNode, const TDesC8& aSoftkey ) - { - if ( aMenuBarNode ) - { - XnMenuInterface::MXnMenuInterface* menuIf( NULL ); - XnComponentInterface::MakeInterfaceL( menuIf, aMenuBarNode->AppIfL() ); - CXnNodePluginIf* skNode( NULL ); - if ( menuIf ) - { - if ( aSoftkey == XnPropertyNames::softkey::type::KLeft ) - { - skNode = menuIf->SoftKeyL( - XnMenuInterface::MXnMenuInterface::ELeft ); - } - else if ( aSoftkey == XnPropertyNames::softkey::type::KMiddle ) - { - skNode = menuIf->SoftKeyL( - XnMenuInterface::MXnMenuInterface::ECenter ); - } - else if ( aSoftkey == XnPropertyNames::softkey::type::KRight ) - { - skNode = menuIf->SoftKeyL( - XnMenuInterface::MXnMenuInterface::ERight ); - } - } - if ( skNode ) - { - return &skNode->Node(); - } - } - return NULL; - } - -// ----------------------------------------------------------------------------- -// SoftkeyNode // Gets the node of softkey according to pointer location // ----------------------------------------------------------------------------- // @@ -3653,11 +3614,8 @@ iAnimation->Stop(); delete iAnimation; } - - if ( iGestureHelper ) - { - delete iGestureHelper; - } + + delete iGestureFw; } // ----------------------------------------------------------------------------- @@ -3721,29 +3679,21 @@ for ( ; temp; temp = temp->Parent() ) { if ( temp == menuBar ) - { - // This is softkey node - const TDesC8* pos( NULL ); - node = NULL; - - if ( aKeyEvent.iScanCode == EStdKeyDevice0 ) - { - pos = &XnPropertyNames::softkey::type::KLeft; - } - else if ( aKeyEvent.iScanCode == EStdKeyDevice1 ) + { + // This is softkey node + XnMenuInterface::MXnMenuInterface* menuIf( NULL ); + XnComponentInterface::MakeInterfaceL( menuIf, menuBar->AppIfL() ); + + if ( menuIf ) { - pos = &XnPropertyNames::softkey::type::KRight; - } - else if ( aKeyEvent.iScanCode == EStdKeyDevice3 ) - { - pos = &XnPropertyNames::softkey::type::KMiddle; + CXnNodePluginIf* eventNode( menuIf->KeyEventNode() ); + + if ( eventNode ) + { + node = &eventNode->Node(); + } } - - if ( pos ) - { - node = SoftkeyNodeL( menuBar, *pos ); - } - + break; } } @@ -3758,7 +3708,7 @@ aKeyEvent.iScanCode == EStdKeyDevice3 ) // MSK { if ( aType == EEventKeyDown ) - { + { iLongtap = EFalse; if ( aKeyEvent.iScanCode == EStdKeyDevice3 || @@ -3907,8 +3857,8 @@ control->IgnoreEventsUntilNextPointerUp(); control->ResetGrabbing(); } - - // Indicate long tap has taken plave + + // Indicate long tap has taken place iLongtap = ETrue; CXnNode* hold = BuildTriggerNodeL( *engine, @@ -3924,6 +3874,23 @@ } // ----------------------------------------------------------------------------- +// CXnControlAdapterImpl::IsDragThresholdExceeded +// Checks if drag threshold is exceeded +// ----------------------------------------------------------------------------- +// +TBool CXnControlAdapterImpl::IsDragThresholdExceeded( const TPoint& aPoint ) + { + TBool ret = EFalse; + TPoint distance = aPoint - iButtonDownStartPoint; + if ( Abs( distance.iX ) >= KDragThreshold || + Abs( distance.iY ) >= KDragThreshold ) + { + ret = ETrue; + } + return ret; + } + +// ----------------------------------------------------------------------------- // CXnControlAdapterImpl::HandlePointerEventL // Handle pointer events // ----------------------------------------------------------------------------- @@ -3935,23 +3902,15 @@ CXnNode* node( &iNode.Node() ); CXnUiEngine* engine( node->UiEngine() ); - - if(!engine->IsPartialInputActive()) - { - // Forward event to gesture helper - if( PassEventToGestureHelperL( aPointerEvent ) ) - { - CXnAppUiAdapter& appui( engine->AppUiAdapter() ); - CXnViewData& data( appui.ViewManager().ActiveViewData() ); - - CXnViewControlAdapter* control = - static_cast< CXnViewControlAdapter* >( data.ViewNode()->Control() ); - - control->ResetGrabbing(); - - // Swipe took place, consume this event - return ETrue; - } + + if ( !engine->IsPartialInputActive() ) + { + InitializeGestureL( aPointerEvent ); + } + else + { + // reset destination + iGestureDestination = NULL; } TBool menuBar( node == engine->MenuBarNode() ); @@ -4011,6 +3970,7 @@ if ( event.iType == TPointerEvent::EButton1Down ) { iLongtap = EFalse; + node->HideTooltipsL(); if ( !menuBar ) { @@ -4019,6 +3979,8 @@ if ( !menuBar && !engine->FocusedNode() ) { + // save starting point + iButtonDownStartPoint = event.iPosition; // Require focus to be shown engine->AppUiAdapter().ShowFocus(); @@ -4033,25 +3995,18 @@ node->SetStateL( XnPropertyNames::style::common::KFocus, XnEventSource::EStylus ); - node->SetStateL( - XnPropertyNames::style::common::KPressedDown ); } } else if ( event.iType == TPointerEvent::EDrag ) { if ( node->IsStateSet( XnPropertyNames::style::common::KFocus ) ) { - if ( !node->MarginRect().Contains( event.iPosition ) ) + if ( IsDragThresholdExceeded( event.iPosition ) || + !node->MarginRect().Contains( event.iPosition ) ) { - // Remove pressed down + // Remove focus node->UnsetStateL( - XnPropertyNames::style::common::KPressedDown ); - } - if ( node->MarginRect().Contains( event.iPosition ) ) - { - // Add pressed down - node->SetStateL( - XnPropertyNames::style::common::KPressedDown ); + XnPropertyNames::style::common::KFocus ); } } } @@ -4064,8 +4019,7 @@ node->SetStateL( XnPropertyNames::style::common::KActive ); } else if ( ( node->MarginRect().Contains( event.iPosition ) && - node->IsStateSet( XnPropertyNames::style::common::KFocus ) && - node->IsStateSet( XnPropertyNames::style::common::KPressedDown ) ) ) + node->IsStateSet( XnPropertyNames::style::common::KFocus ) ) ) { #ifdef RD_TACTILE_FEEDBACK MTouchFeedback* feedback( MTouchFeedback::Instance() ); @@ -5513,7 +5467,8 @@ if ( CreateGestureHelperL( aNode.Node() ) ) { - iGestureHelper = CXnGestureHelper::NewL( aNode.Node() ); + iGestureFw = CAknTouchGestureFw::NewL( *this, aAdapter ); + iGestureFw->SetGestureInterestL( EAknTouchGestureFwGroupFlick ); } } @@ -5853,104 +5808,58 @@ } // ----------------------------------------------------------------------------- -// PassEventToGestureHelperL -// Forwards event to gesturehelper +// InitializeGestureL +// Sets up gesture // ----------------------------------------------------------------------------- // -TBool CXnControlAdapterImpl::PassEventToGestureHelperL( +void CXnControlAdapterImpl::InitializeGestureL( const TPointerEvent& aPointerEvent ) { - TBool ret( EFalse ); + if ( !iGestureFw || aPointerEvent.iType != TPointerEvent::EButton1Down ) + { + return; + } + + CXnUiEngine* engine( iNode.Node().UiEngine() ); + // Set default destination + iGestureDestination = &iNode.Node(); + + RPointerArray< CXnPluginData >& plugins( + engine->ViewManager()->ActiveViewData().PluginData() ); - CXnNode* node( &iNode.Node() ); - CXnUiEngine* engine( node->UiEngine() ); - - if ( iGestureHelper && iGestureHelper->Owner() == node ) - { - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - // Set default destination - iGestureHelper->SetDestination( iGestureHelper->Owner() ); + for ( TInt i = 0; i < plugins.Count(); i++ ) + { + CXnPluginData* plugin( plugins[i] ); + + if ( plugin->Occupied() ) + { + CXnNode* widget( plugin->Node()->LayoutNode() ); - RPointerArray< CXnPluginData >& plugins( - engine->ViewManager()->ActiveViewData().PluginData() ); - - for ( TInt i = 0; i < plugins.Count(); i++ ) + if ( widget->MarginRect().Contains( aPointerEvent.iPosition ) ) { - CXnPluginData* plugin( plugins[i] ); - - if ( plugin->Occupied() ) + // Resolve swipe destination + CXnProperty* prop( widget->GetPropertyL( + XnPropertyNames::common::KSwipeDestination ) ); + + if ( prop ) { - CXnNode* widget( plugin->Node()->LayoutNode() ); - - if ( widget->MarginRect().Contains( aPointerEvent.iPosition ) ) - { - // Resolve swipe destination - CXnProperty* prop( widget->GetPropertyL( - XnPropertyNames::common::KSwipeDestination ) ); + const TDesC8& value( prop->StringValue() ); - if ( prop ) - { - const TDesC8& value( prop->StringValue() ); - - if( value == XnPropertyNames::KWidget ) - { - // Set widget as destination - iGestureHelper->SetDestination( widget ); - } - else if( value == XnPropertyNames::KNone ) - { - // Set no destination - iGestureHelper->SetDestination( NULL ); - } - } - - break; + if( value == XnPropertyNames::KWidget ) + { + // Set widget as destination + iGestureDestination = widget; + } + else if( value == XnPropertyNames::KNone ) + { + // Set no destination + iGestureDestination = NULL; } } + break; } } - - TXnGestureCode result( iGestureHelper->HandlePointerEventL( aPointerEvent ) ); - - const TDesC8* swipe( NULL ); - - if ( result == EGestureSwipeLeft ) - { - swipe = &XnPropertyNames::action::trigger::name::swipe::direction::KLeft; - } - else if ( result == EGestureSwipeRight ) - { - swipe = &XnPropertyNames::action::trigger::name::swipe::direction::KRight; - } - - if ( swipe ) - { - CXnNode* destination( iGestureHelper->Destination() ); - - if ( destination ) - { - if ( destination == iGestureHelper->Owner() ) - { - CancelFocusRefusalL( *engine ); - } - - // Remove focus - engine->AppUiAdapter().HideFocus(); - - CXnNode* trigger( BuildSwipeTriggerNodeLC( *engine, *swipe ) ); - destination->ReportXuikonEventL( *trigger ); - CleanupStack::PopAndDestroy( trigger ); - - // If needed we can call here for example HandleSwipeL() - - // Consume this event - ret = ETrue; - } - } - } - - return ret; + } } // ----------------------------------------------------------------------------- @@ -5977,6 +5886,52 @@ return iAdapter->ControlEnv()->FsSession(); } +// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- +// +void CXnControlAdapterImpl::HandleTouchGestureL( MAknTouchGestureFwEvent& aEvent ) + { + if ( aEvent.Group() == EAknTouchGestureFwGroupFlick ) + { + TAknTouchGestureFwType type = aEvent.Type(); + + const TDesC8* swipe( NULL ); + + if ( type == EAknTouchGestureFwFlickLeft ) + { + swipe = &XnPropertyNames::action::trigger::name::swipe::direction::KLeft; + } + else if ( type == EAknTouchGestureFwFlickRight ) + { + swipe = &XnPropertyNames::action::trigger::name::swipe::direction::KRight; + } + + if ( swipe && iGestureDestination ) + { + CXnUiEngine* engine = iNode.Node().UiEngine(); + if ( iGestureDestination == &iNode.Node() ) + { + CancelFocusRefusalL( *engine ); + } + + // Remove focus + engine->AppUiAdapter().HideFocus(); + + CXnNode* trigger( BuildSwipeTriggerNodeLC( *engine, *swipe ) ); + iGestureDestination->ReportXuikonEventL( *trigger ); + CleanupStack::PopAndDestroy( trigger ); + + CXnAppUiAdapter& appui( engine->AppUiAdapter() ); + CXnViewData& data( appui.ViewManager().ActiveViewData() ); + + CXnViewControlAdapter* control = + static_cast< CXnViewControlAdapter* >( data.ViewNode()->Control() ); + + control->ResetGrabbing(); + } + } + } + // ============================= TIconProvider =============================== diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xneditmode.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xneditmode.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xneditmode.cpp Wed May 12 13:12:59 2010 +0300 @@ -335,41 +335,51 @@ // ----------------------------------------------------------------------------- // void CXnEditMode::MakeVisible( TBool aVisible ) - { + { + CXnAppUiAdapter& appui( iUiEngine.AppUiAdapter() ); + CXnViewControlAdapter* control = + static_cast< CXnViewControlAdapter* >( + appui.ViewManager().ActiveViewData().ViewNode()->Control() ); + RWindow& window( Window() ); + TBool visible( IsVisible() ? ETrue : EFalse ); - if ( aVisible == visible ) { - return; + if( aVisible ) + { + // If a new Homescreen page has been added in Edit mode, bring the control back to the front + control->DrawableWindow()->SetPointerGrab( EFalse ); + + window.SetOrdinalPosition( 0 ); + window.SetPointerGrab( ETrue ); + window.ClaimPointerGrab(); + } + + return; } CCoeControl::MakeVisible( aVisible ); - - CXnAppUiAdapter& appui( iUiEngine.AppUiAdapter() ); // Remove focus appui.HideFocus(); - - CXnViewControlAdapter* control = static_cast< CXnViewControlAdapter* >( - appui.ViewManager().ActiveViewData().ViewNode()->Control() ); - + if ( aVisible ) { control->DrawableWindow()->SetPointerGrab( EFalse ); - Window().SetOrdinalPosition( 0 ); - Window().SetPointerGrab( ETrue ); - Window().ClaimPointerGrab(); + window.SetOrdinalPosition( 0 ); + window.SetPointerGrab( ETrue ); + window.ClaimPointerGrab(); TRAP_IGNORE( appui.HandleEnterEditModeL( ETrue ) ); } else { - Window().SetPointerGrab( EFalse ); + window.SetPointerGrab( EFalse ); control->DrawableWindow()->SetPointerGrab( ETrue ); - TRAP_IGNORE( appui.HandleEnterEditModeL( EFalse ) ); + TRAP_IGNORE( appui.HandleEnterEditModeL( EFalse ) ); } // Update background @@ -646,7 +656,7 @@ CXnNode* focused( iUiEngine.FocusedNode() ); if ( focused && ( aKeyEvent.iScanCode == EStdKeyDevice3 || - aKeyEvent.iScanCode == EStdKeyEnter ) ) + aKeyEvent.iCode == EKeyEnter ) ) { CXnPluginData* plugin( iUiEngine.ViewManager()-> ActiveViewData().Plugin( focused ) ); @@ -670,7 +680,7 @@ if ( menuIf ) { - menuIf->TryDisplayingMenuBarL( *id ); + menuIf->TryDisplayingMenuBarL( *id, ETrue ); iUiEngine.Editor()->SetTargetPlugin( focused ); } } @@ -831,6 +841,8 @@ { iDraggingNode = NULL; iTargetNode = NULL; + + iUiEngine.Editor()->SetTargetPlugin( NULL ); iState = aState; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xneditor.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xneditor.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xneditor.cpp Wed May 12 13:12:59 2010 +0300 @@ -61,6 +61,8 @@ #include "xneditor.h" #include "xnpanic.h" +#include "xnoomsyshandler.h" + using namespace hspswrapper; using namespace cpswrapper; @@ -93,7 +95,7 @@ // ====================== LOCAL FUNTION PROTOTYPES ============================ static void DeletePluginInfos( TAny* aObject ); static void DeleteItemMaps( TAny* aObject ); -static void DeleteWidgetInfo( TAny* aObject ); +static void DeleteContentInfo( TAny* aObject ); static TPtrC ParseWidgetName( const CHsContentInfo& aContentInfo ); static void SetPropertyL( CXnNode& aNode, const TDesC8& aAttribute, @@ -130,13 +132,13 @@ } // --------------------------------------------------------------------------- -// DeleteWidgetInfo +// DeleteContentInfo // --------------------------------------------------------------------------- // -static void DeleteWidgetInfo( TAny* aObject ) +static void DeleteContentInfo( TAny* aObject ) { - reinterpret_cast< - RPointerArray< CHsContentInfo >* >( aObject )->ResetAndDestroy(); + reinterpret_cast* >( + aObject )->ResetAndDestroy(); } // --------------------------------------------------------------------------- @@ -306,6 +308,7 @@ iCpsWrapper = CCpsWrapper::NewL( *this ); iHspsWrapper = CHspsWrapper::NewL( aUid, this ); iRepository= CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) ); + iOomSysHandler = CXnOomSysHandler::NewL(); } // --------------------------------------------------------------------------- @@ -315,11 +318,15 @@ CXnEditor::~CXnEditor() { iViewManager.RemoveObserver( *this ); - + if( iPluginsCache.Count() ) + { + iPluginsCache.ResetAndDestroy(); + } delete iCpsWrapper; delete iHspsWrapper; delete iPublisherMap; delete iRepository; + delete iOomSysHandler; } // ----------------------------------------------------------------------------- @@ -328,28 +335,14 @@ // TBool CXnEditor::IsCurrentViewFull() { - TBool viewFull = ETrue; - - RPointerArray< CXnPluginData >& plugins( - iViewManager.ActiveViewData().PluginData() ); - - for ( TInt i = 0; i < plugins.Count(); i++ ) - { - if ( !plugins[i]->Occupied() ) - { - viewFull = EFalse; - break; - } - } - - return viewFull; + return IsViewFull( iViewManager.ActiveViewData() ); } // ----------------------------------------------------------------------------- -// CXnEditor::FilterWidgetListL +// CXnEditor::FilterPluginsL // ----------------------------------------------------------------------------- // -void CXnEditor::FilterWidgetListL( CHsContentInfoArray& aContentInfoArray, +void CXnEditor::FilterPluginsL( CHsContentInfoArray& aContentInfoArray, TBool aIgnoreViewFull ) { RPointerArray< CHsContentInfo >& list( aContentInfoArray.Array() ); @@ -423,14 +416,6 @@ if ( plugin->PublisherName() == aInfo.PublisherId() ) { - if ( plugin->Removable() ) - { - // To enable widget remove - aInfo.SetPluginIdL( plugin->PluginId() ); - - retval |= ECanBeRemoved; - } - widgetCount++; } } @@ -472,14 +457,6 @@ if ( plugin->PluginUid().CompareF( aInfo.Uid() ) == 0 ) { - if ( plugin->Removable() ) - { - // To enable widget remove - aInfo.SetPluginIdL( plugin->PluginId() ); - - retval |= ECanBeRemoved; - } - widgetCount++; } } @@ -502,40 +479,17 @@ { RPointerArray< CHsContentInfo >& list( aContentInfoArray.Array() ); - RPointerArray< CXnPluginData >& views( - iViewManager.ActiveAppData().PluginData() ); - - TInt viewAmount( iViewManager.ViewAmount() ); - - const TInt KMaxViewAmount( 6 ); + TBool canBeAdded( EFalse ); + CXnRootData& appData( iViewManager.ActiveAppData() ); + if ( appData.PluginData().Count() < appData.MaxPages() ) + { + canBeAdded = ETrue; + } for ( TInt i = 0; i < list.Count(); i++ ) { - CHsContentInfo* info( list[i] ); - - info->SetCanBeAdded( EFalse ); - info->SetCanBeRemoved( EFalse ); - - for ( TInt j = 0 ; j < views.Count(); j++ ) - { - CXnPluginData* view( views[j] ); - - if ( view->PluginUid().CompareF( info->Uid() ) == 0 ) - { - // To enable view remove - info->SetPluginIdL( view->PluginId() ); - // Last view cannot be removed - if ( views.Count() > 1 ) - { - info->SetCanBeRemoved( ETrue ); - } - } - } - - if ( viewAmount < KMaxViewAmount ) - { - info->SetCanBeAdded( ETrue ); - } + CHsContentInfo* info( list[i] ); + info->SetCanBeAdded( canBeAdded ); } } @@ -634,11 +588,18 @@ return iRepository->Get( KAICCPluginUIDKey, aUid ); } +// --------------------------------------------------------------------------- // CXnEditor::AddWidgetL // --------------------------------------------------------------------------- // void CXnEditor::AddWidgetL() { + if ( !CXnOomSysHandler::HeapAvailable( VIEW_MIN_MEM ) ) + { + OomSysHandler().HandlePotentialOomL(); + return; + } + TBuf8 oPaqDataStr; MHsContentControlUi* ui( NULL ); @@ -671,13 +632,15 @@ CleanupStack::PushL( info ); RPointerArray< CHsContentInfo >& widgets( info->Array() ); - - // get installed widgets from HSPS (type: "widget") - HSPSPluginsL( widgets, KKeyWidget ); - // get installed widgets from HSPS - TemplatedWidgetsL( widgets ); - FilterWidgetListL( *info, ETrue ); + // get installed widgets and template configurations from HSPS + HspsWidgetPluginsL( widgets ); + + // get installed widgets from HSPS (type: "template") + CpsWidgetPluginsL( widgets ); + + // check whether the plugins can be added or removed + FilterPluginsL( *info, ETrue ); CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 8 ); CleanupStack::PushL( array ); @@ -903,106 +866,59 @@ } // --------------------------------------------------------------------------- -// CXnEditor::TemplatedWidgetsL +// CXnEditor::CpsWidgetPluginsL // --------------------------------------------------------------------------- // -void CXnEditor::TemplatedWidgetsL( RPointerArray< CHsContentInfo >& aWidgets ) +void CXnEditor::CpsWidgetPluginsL( RPointerArray< CHsContentInfo >& aWidgets ) { - RPointerArray< CHsContentInfo > widgetTemplates; - CleanupStack::PushL( TCleanupItem( DeleteWidgetInfo, &widgetTemplates ) ); - - // Gets all the installed templates from CPS - HSPSPluginsL( widgetTemplates, KKeyTemplate ); - - delete iPublisherMap; - iPublisherMap = NULL; - - iPublisherMap = iCpsWrapper->GetTemplatedPublishersL(); - - RPointerArray< CPublisherInfo >& publisherInfo( - iPublisherMap->PublisherInfo() ); - + // Get publishers from CPS + + if( !iPublisherMap ) + { + iPublisherMap = iCpsWrapper->GetTemplatedPublishersL(); + } + + RPointerArray< CPublisherInfo >& publisherInfo( iPublisherMap->PublisherInfo() ); + + // Find templates for the published data for ( TInt i = 0; i < publisherInfo.Count(); i++ ) { CPublisherInfo* info( publisherInfo[i] ); - for ( TInt j = 0; j < widgetTemplates.Count(); j++ ) - { - const TDesC& name( widgetTemplates[j]->Name() ); - - if ( name == info->TemplateType() ) - { - CHsContentInfo* contentInfo = CHsContentInfo::NewLC(); - - contentInfo->SetNameL( info->WidgetName() ); - contentInfo->SetPublisherIdL( info->PublisherId() ); - contentInfo->SetMaxWidgets( info->MaxWidgets() ); - contentInfo->SetUidL( widgetTemplates[j]->Uid() ); - contentInfo->SetTypeL( widgetTemplates[j]->Type() ); - contentInfo->SetDescriptionL( info->Description() ); - contentInfo->SetIconPathL( info->LogoIcon() ); - - contentInfo->SetIsWrt( - ( info->ContentType() == KWRTTemplate() ) ); - - aWidgets.AppendL( contentInfo ); - CleanupStack::Pop( contentInfo ); - - break; + for ( TInt j = 0; j < iPluginsCache.Count(); j++ ) + { + if( iPluginsCache[j]->Name().Length() > 0 ) + { + // 8 to 16bit conv + HBufC* nameBuf = HBufC::NewLC( iPluginsCache[j]->Name().Length() ); + nameBuf->Des().Copy( iPluginsCache[j]->Name() ); + TBool matchingNames = ( nameBuf->Des() == info->TemplateType() ); + CleanupStack::PopAndDestroy(); + if ( matchingNames ) + { + + // Add published widget + CHsContentInfo* contentInfo = CHsContentInfo::NewLC(); + + contentInfo->SetNameL( info->WidgetName() ); + contentInfo->SetPublisherIdL( info->PublisherId() ); + contentInfo->SetMaxWidgets( info->MaxWidgets() ); + contentInfo->SetUidL( iPluginsCache[j]->Uid() ); + contentInfo->SetTypeL( iPluginsCache[j]->Type() ); + contentInfo->SetDescriptionL( info->Description() ); + contentInfo->SetIconPathL( info->LogoIcon() ); + contentInfo->SetIsWrt( info->ContentType() == KWRTTemplate() ); + + aWidgets.AppendL( contentInfo ); + + CleanupStack::Pop( contentInfo ); + break; + } } } - } - - CleanupStack::PopAndDestroy(); // cleanupitem + } } -// --------------------------------------------------------------------------- -// CXnEditor::HSPSPluginsL -// --------------------------------------------------------------------------- -// -void CXnEditor::HSPSPluginsL( RPointerArray< CHsContentInfo >& aWidgets, - const TDesC8& aType ) - { - RPointerArray< hspswrapper::CPluginInfo > plugins; - CleanupStack::PushL( TCleanupItem( DeletePluginInfos, &plugins ) ); - - if ( aType == KApplication ) - { - iHspsWrapper->GetAppConfigurationsL( plugins ); - } - else - { - iHspsWrapper->GetPluginsL( plugins, KPluginInterface, aType ); - } - - for ( TInt i = 0; i < plugins.Count(); i++ ) - { - if ( plugins[i]->Uid().CompareF( KEmptyWidgetUid ) == 0 ) - { - // Skip empty - continue; - } - - CHsContentInfo* contentInfo = CHsContentInfo::NewLC(); - - contentInfo->SetNameL( plugins[i]->Name() ); - contentInfo->SetUidL( plugins[i]->Uid() ); - contentInfo->SetTypeL( aType ); - - if ( aType == KKeyWidget || aType == KKeyTemplate ) - { - contentInfo->SetMaxWidgets( plugins[i]->MultiInstance() ); - } - - contentInfo->SetDescriptionL( plugins[i]->Description() ); - contentInfo->SetIconPathL( plugins[i]->LogoIcon() ); - - aWidgets.AppendL( contentInfo ); - CleanupStack::Pop( contentInfo ); - } - - CleanupStack::PopAndDestroy( &plugins ); - } // --------------------------------------------------------------------------- // CXnEditor::ToggleWidgetsVisibiltyL @@ -1082,10 +998,14 @@ // void CXnEditor::SetTargetPlugin( CXnNode* aNode ) { - iTargetPlugin = aNode; + TBool editState( iViewManager.UiEngine().EditMode()->EditState() ); + + if ( editState ) + { + iTargetPlugin = aNode; + } } -// --------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // CXnEditor::NotifyViewActivatedL // ----------------------------------------------------------------------------- @@ -1170,9 +1090,7 @@ HBufC8* publisherId = CnvUtfConverter::ConvertFromUnicodeToUtf8L( info->PublisherId() ); CleanupStack::PushL( publisherId ); - - aPluginData.SetPublisherNameL( info->PublisherId() ); - + CItemMap* itemMap( 0 ); CPropertyMap* property( 0 ); CPropertyMap* propertyIn( 0 ); @@ -1410,6 +1328,7 @@ // void CXnEditor::NotifyWidgetUnregisteredL( const TDesC& aPublisher ) { + ResetCache(); RemoveUnRegisteredWidgetL( aPublisher ); WidgetListChanged(); } @@ -1420,6 +1339,7 @@ // void CXnEditor::NotifyWidgetRegisteredL() { + ResetCache(); WidgetListChanged(); } @@ -1483,6 +1403,8 @@ { if ( aEvent == KEventPluginUnInstalled ) { + ResetCache(); + CHsContentInfo* info = CHsContentInfo::NewLC(); info->SetNameL( aPluginName ); @@ -1500,10 +1422,14 @@ } else if ( aEvent == KEventPluginInstalled ) { + ResetCache(); + WidgetListChanged(); } else if ( aEvent == KEventPluginUpdated ) { + ResetCache(); + // If the plugin is in use then reload the widget if ( aPluginId.Length() > 0 ) { @@ -1578,19 +1504,137 @@ } // ----------------------------------------------------------------------------- +// CXnEditor::AppendPluginsL +// ----------------------------------------------------------------------------- +// +void CXnEditor::AppendPluginsL( + RPointerArray< hspswrapper::CPluginInfo > aPlugins, + RPointerArray< CHsContentInfo >& aWidgets ) + { + // Append plugins to the content info array + for ( TInt i = 0; i < aPlugins.Count(); i++ ) + { + + // Block the empty and template plugins from the list + if ( aPlugins[i]->Uid().CompareF( KEmptyWidgetUid ) == 0 + || aPlugins[i]->Type() == KKeyTemplate ) + { + continue; + } + + CHsContentInfo* contentInfo = CHsContentInfo::NewLC(); + contentInfo->SetNameL( aPlugins[i]->Name() ); + contentInfo->SetUidL( aPlugins[i]->Uid() ); + contentInfo->SetTypeL( aPlugins[i]->Type() ); + if ( aPlugins[i]->Type() == KKeyWidget + || aPlugins[i]->Type() == KKeyTemplate ) + { + contentInfo->SetMaxWidgets( aPlugins[i]->MultiInstance() ); + } + contentInfo->SetDescriptionL( aPlugins[i]->Description() ); + contentInfo->SetIconPathL( aPlugins[i]->LogoIcon() ); + + aWidgets.AppendL( contentInfo ); + CleanupStack::Pop( contentInfo ); + } + } + +// ----------------------------------------------------------------------------- +// CXnEditor::ResetCache +// ----------------------------------------------------------------------------- +// +void CXnEditor::ResetCache() + { + // Force loading of widget/template plugin configurations + iPluginsCache.ResetAndDestroy(); + + // Forece reloading of CPS publishers + delete iPublisherMap; + iPublisherMap = NULL; + } + +// ----------------------------------------------------------------------------- +// CXnEditor::HspsApplicationPluginsL +// ----------------------------------------------------------------------------- +// +void CXnEditor::HspsApplicationPluginsL( RPointerArray< CHsContentInfo >& aWidgets ) + { + RPointerArray< hspswrapper::CPluginInfo > plugins; + CleanupStack::PushL( TCleanupItem( DeletePluginInfos, &plugins ) ); + + iHspsWrapper->GetAppConfigurationsL( plugins ); + + // Append plugins to the content info array + AppendPluginsL( plugins, aWidgets ); + + CleanupStack::PopAndDestroy( &plugins ); + } + +// ----------------------------------------------------------------------------- +// CXnEditor::HspsViewPluginsL +// ----------------------------------------------------------------------------- +// +void CXnEditor::HspsViewPluginsL( RPointerArray< CHsContentInfo >& aWidgets ) + { + RPointerArray< hspswrapper::CPluginInfo > plugins; + CleanupStack::PushL( TCleanupItem( DeletePluginInfos, &plugins ) ); + + iHspsWrapper->GetPluginsL( plugins, KPluginInterface, KView ); + + // Append plugins to the content info array + AppendPluginsL( plugins, aWidgets ); + + CleanupStack::PopAndDestroy( &plugins ); + } + +// ----------------------------------------------------------------------------- +// CXnEditor::HspsWidgetPluginsL +// ----------------------------------------------------------------------------- +// +void CXnEditor::HspsWidgetPluginsL( RPointerArray< CHsContentInfo >& aWidgets ) + { + __ASSERT_DEBUG( aWidgets.Count() == 0, User::Leave( KErrGeneral ) ); + + // If widget/template plugins haven't been fetched yet + if( iPluginsCache.Count() == 0 ) + { + // Fetch the plugins into the runtime cache + TRAPD( err, DoHspsWidgetPluginsL() ); + if( err ) + { + ResetCache(); + User::LeaveIfError( err ); + } + } + + // Append plugins to the content info array + AppendPluginsL( iPluginsCache, aWidgets ); + } + +// ----------------------------------------------------------------------------- +// CXnEditor::DoHspsWidgetPluginsL +// ----------------------------------------------------------------------------- +// +void CXnEditor::DoHspsWidgetPluginsL() + { + iHspsWrapper->GetPluginsL( iPluginsCache, KPluginInterface, KKeyWidget ); + iHspsWrapper->GetPluginsL( iPluginsCache, KPluginInterface, KKeyTemplate ); + } + +// ----------------------------------------------------------------------------- // from MHsContentController // ----------------------------------------------------------------------------- // TInt CXnEditor::WidgetListL( CHsContentInfoArray& aArray ) { - RPointerArray< CHsContentInfo >& array( aArray.Array() ); + // append the list with native widget and template plugins from HSPS + HspsWidgetPluginsL( aArray.Array() ); + + // append the list with published template plugins from CPS + CpsWidgetPluginsL( aArray.Array() ); - // get installed widgets from HSPS (type: "widget") - HSPSPluginsL( array, KKeyWidget ); - // get installed widgets from HSPS - TemplatedWidgetsL( array ); - - FilterWidgetListL( aArray, ETrue ); + // check whether the plugins can be added or removed + FilterPluginsL( aArray, ETrue ); return KErrNone; } @@ -1632,10 +1676,14 @@ { // Get installed widget content infos RPointerArray< CHsContentInfo > array; - CleanupClosePushL( array ); - HSPSPluginsL( array, KKeyWidget ); - TemplatedWidgetsL( array ); - + CleanupStack::PushL( TCleanupItem( DeleteContentInfo, &array ) ); + + // get installed widgets and template configurations from HSPS + HspsWidgetPluginsL( array ); + + // get published widgets + CpsWidgetPluginsL( array ); + // Create content info for each found widget for ( TInt i = 0; i < widgets.Count(); i++ ) { @@ -1662,8 +1710,9 @@ { RPointerArray< CHsContentInfo >& array( aArray.Array() ); - // get installed views from HSPS - HSPSPluginsL( array, KView ); + + // get installed view configurations from HSPS + HspsViewPluginsL( array ); FilterViewListL( aArray ); @@ -1674,11 +1723,62 @@ // from MHsContentController // ----------------------------------------------------------------------------- // +TInt CXnEditor::ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ) + { + TInt err( KErrNone ); + + if ( aInfo.Type() == KApplication ) + { + if ( aInfo.Uid().CompareF( iViewManager.ActiveAppData().PluginUid() ) == 0 ) + { + // Get list of views in active application configuration + CXnRootData& appData( iViewManager.ActiveAppData() ); + RPointerArray< CXnPluginData >& views( appData.PluginData() ); + + // Get installed view content infos + RPointerArray< CHsContentInfo > array; + CleanupStack::PushL( TCleanupItem( DeleteContentInfo, &array ) ); + HspsViewPluginsL( array ); + + // Create content info for each found view + for ( TInt i = 0; i < views.Count(); i++ ) + { + CHsContentInfo* info = CreateContentInfoLC( *views[i], array ); + if ( info ) + { + CXnViewData* view = static_cast < CXnViewData* >( views[ i ] ); + info->SetIsFull( IsViewFull( *view ) ); + aArray.Array().AppendL( info ); + CleanupStack::Pop( info ); + } + } + CleanupStack::PopAndDestroy(); // array + } + else + { + // Invalid application configuration + err = KErrArgument; + } + } + else + { + // Invalid argument + err = KErrArgument; + } + + return err; + } + +// ----------------------------------------------------------------------------- +// from MHsContentController +// ----------------------------------------------------------------------------- +// TInt CXnEditor::AppListL( CHsContentInfoArray& aArray ) { RPointerArray< CHsContentInfo >& array( aArray.Array() ); - HSPSPluginsL( array, KApplication ); + // get installed application configurations from HSPS + HspsApplicationPluginsL( array ); return KErrNone; } @@ -1845,44 +1945,28 @@ { TInt err( KErrNone ); + + CXnViewData& viewData( iViewManager.ActiveViewData() ); - // Get active application configuration - CHspsConfiguration* app( iHspsWrapper->GetAppConfigurationL() ); - CleanupStack::PushL( app ); - - // Get list of views included in active application configuration - RPointerArray< CPluginMap >& plugins( app->PluginMaps() ); - CPluginMap* plugin( NULL ); - - // Find active view - for ( TInt i = 0; i < plugins.Count() && !plugin; i++ ) + CHspsConfiguration* view( iHspsWrapper->GetPluginConfigurationL( viewData.PluginId() ) ); + CleanupStack::PushL( view ); + if ( view ) { - if ( plugins[ i ]->ActivationState() ) - { - plugin = plugins[ i ]; - } - } - - if ( plugin ) - { - CHspsConfiguration* view( iHspsWrapper->GetPluginConfigurationL( plugin->PluginId() ) ); - CleanupStack::PushL( view ); - aInfo.SetNameL( view->PluginInfo().Name() ); - aInfo.SetPluginIdL( plugin->PluginId() ); + aInfo.SetPluginIdL( viewData.PluginId() ); aInfo.SetUidL( view->PluginInfo().Uid() ); aInfo.SetTypeL( view->PluginInfo().Type() ); aInfo.SetDescriptionL( view->PluginInfo().Description() ); aInfo.SetIconPathL( view->PluginInfo().LogoIcon() ); - - CleanupStack::PopAndDestroy( view ); + aInfo.SetIsFull( IsViewFull( viewData ) ); } else { err = KErrNotFound; } + + CleanupStack::PopAndDestroy( view ); - CleanupStack::PopAndDestroy( app ); return err; } @@ -1892,7 +1976,7 @@ // TInt CXnEditor::ActiveAppL( CHsContentInfo& aInfo ) { - + TInt err( KErrNone ); CHspsConfiguration* app = iHspsWrapper->GetAppConfigurationL(); CleanupStack::PushL( app ); @@ -1904,6 +1988,16 @@ aInfo.SetTypeL( app->PluginInfo().Type() ); aInfo.SetDescriptionL( app->PluginInfo().Description() ); aInfo.SetIconPathL( app->PluginInfo().LogoIcon() ); + + CXnRootData& appData( iViewManager.ActiveAppData() ); + if ( appData.PluginData().Count() < appData.MaxPages() ) + { + aInfo.SetIsFull( EFalse ); + } + else + { + aInfo.SetIsFull( ETrue ); + } } else { @@ -1934,10 +2028,47 @@ contentInfo = info->CloneL(); CleanupStack::PushL( contentInfo ); contentInfo->SetPluginIdL( aPlugin.PluginId() ); + contentInfo->SetCanBeRemoved( aPlugin.Removable() ); } } } return contentInfo; } +// ----------------------------------------------------------------------------- +// CXnEditor::IsViewFull +// ----------------------------------------------------------------------------- +// +TBool CXnEditor::IsViewFull( CXnViewData& aViewData ) + { + TBool isFull( ETrue ); + + RPointerArray< CXnPluginData >& plugins( + aViewData.PluginData() ); + + for ( TInt i = 0; i < plugins.Count(); i++ ) + { + CXnPluginData* plugin = plugins[ i ]; + + if ( !plugin->Occupied() ) + { + isFull = EFalse; + break; + } + } + + return isFull; + } + +// ----------------------------------------------------------------------------- +// CXnBackgroundManager::OOMSysHandler +// ----------------------------------------------------------------------------- +// +CXnOomSysHandler& CXnEditor::OomSysHandler() const + { + __ASSERT_DEBUG( iOomSysHandler , User::Panic( _L("xneditor"), 0 ) ); + + return *iOomSysHandler; + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnextrenderingpluginwrapper.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnextrenderingpluginwrapper.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnextrenderingpluginwrapper.cpp Wed May 12 13:12:59 2010 +0300 @@ -226,6 +226,10 @@ CXnNode* node = iNode->Node().UiEngine()->FindNodeByIdL( aDestination ); CXnAppUiAdapter* appui = static_cast(iAvkonAppUi); + if ( !appui || !node ) + { + User::Leave( KErrNotFound ); + } appui->HandleEventL( aEvent, node->AppIfL() ); } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xngesture.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xngesture.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,776 +0,0 @@ -/* -* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture class -* -*/ - -#include - -#include "xngesture.h" -#include "xngesturedefs.h" - -using namespace XnGestureHelper; - -// ======== LOCAL FUNCTIONS =================================================== - -/** - * Point array for which only x axis is relevant - */ -class TXAxisPointArray : public TXnPointArray - { -public: - TXAxisPointArray( const RArray< TXnPointEntry >& aPoints ) - : TXnPointArray( aPoints ) - { - } - - // from TXnPointArray - TPoint operator[]( TInt aIndex ) const - { - return TPoint( Raw( aIndex ).iX, 0 ); - } - }; - -/** - * Point array for which only y axis is relevant - */ -class TYAxisPointArray : public TXnPointArray - { -public: - TYAxisPointArray( const RArray< TXnPointEntry >& aPoints ) - : TXnPointArray( aPoints ) - { - } - - // from TXnPointArray - TPoint operator[]( TInt aIndex ) const - { - return TPoint( 0, Raw( aIndex ).iY ); - } - }; - -/** @return the current time */ -TTime CurrentTime() - { - TTime time; - time.UniversalTime(); - return time; - } - -// ---------------------------------------------------------------------------- -// destructor -// ---------------------------------------------------------------------------- -// -CXnGesture::~CXnGesture() - { - iPoints.Close(); - } - -// ---------------------------------------------------------------------------- -// Reset -// ---------------------------------------------------------------------------- -// -void CXnGesture::Reset() - { - // store previous gesture data before resetting the state - if ( iPoints.Count() > 0 ) - { - iPreviousGesture = TGestureRecord( Type(), iCompletionTime, - iPoints[iPoints.Count() - 1].iPos ); - } - else - { - iPreviousGesture = TGestureRecord(); - } - - iPoints.Reset(); - iHoldingState = ENotHolding; - iState = ENotComplete; - iHoldingPointIndex = 0; - } - -// ---------------------------------------------------------------------------- -// Reset -// ---------------------------------------------------------------------------- -// -TBool CXnGesture::IsEmpty() const - { - return iPoints.Count() == 0; - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// ---------------------------------------------------------------------------- -// -TInt CXnGesture::AddPoint( const TPoint& aPoint ) - { - if ( !IsLatestPoint( aPoint ) ) - { - return iPoints.Append( TXnPointEntry( aPoint, CurrentTime() ) ); - } - return KErrNone; - } - -/** - * @return ETrue if the point is within a specified distance of the other point - */ -inline TBool IsNear( const TPoint& aPointUnderTest, const TPoint& aPoint, - TInt aMargin ) - { - TRect rect( - aPoint.iX - aMargin, aPoint.iY - aMargin, - aPoint.iX + aMargin, aPoint.iY + aMargin ); - return rect.Contains( aPointUnderTest ); - } - -// ---------------------------------------------------------------------------- -// IsNearHoldingPoint -// ---------------------------------------------------------------------------- -// -TBool CXnGesture::IsNearHoldingPoint( const TPoint& aPoint ) const - { - return IsNear( aPoint, iPoints[iHoldingPointIndex].iPos, - KSamePointTolerance ); - } - -// ---------------------------------------------------------------------------- -// IsLatestPoint -// ---------------------------------------------------------------------------- -// -TBool CXnGesture::IsLatestPoint( const TPoint& aPoint ) const - { - if ( iPoints.Count() > 0 ) - { - return aPoint == CurrentPos(); - } - return EFalse; - } - -// ---------------------------------------------------------------------------- -// StartHolding -// ---------------------------------------------------------------------------- -// -void CXnGesture::StartHolding() - { - iHoldingState = EHoldStarting; - - // remove all points that were introduced after holding started - for ( TInt i = iPoints.Count() - 1; i > iHoldingPointIndex; i-- ) - { - iPoints.Remove( i ); - } - } - -// ---------------------------------------------------------------------------- -// SetHoldingPoint -// ---------------------------------------------------------------------------- -// -void CXnGesture::SetHoldingPoint() - { - iHoldingPointIndex = iPoints.Count() - 1; - } - -// ---------------------------------------------------------------------------- -// ContinueHolding -// ---------------------------------------------------------------------------- -// -void CXnGesture::ContinueHolding() - { - iHoldingState = EHolding; - } - -// ---------------------------------------------------------------------------- -// SetReleased -// ---------------------------------------------------------------------------- -// -void CXnGesture::SetReleased() - { - // IsMovementStopped expects SetComplete to be called before SetRelea - __ASSERT_DEBUG( EComplete == iState, Panic( EGesturePanicIllegalLogic ) ); - iState = EReleased; - } - -/** - * @return elapsed time between aStartTime and aEndTime - */ -inline TTimeIntervalMicroSeconds32 Elapsed( - const TTime& aStartTime, - const TTime& aEndTime ) - { - return aEndTime.MicroSecondsFrom( aStartTime ).Int64(); - } - -// ---------------------------------------------------------------------------- -// SetComplete -// ---------------------------------------------------------------------------- -// -void CXnGesture::SetComplete() - { - __ASSERT_DEBUG( iPoints.Count() > 0, Panic( EGesturePanicIllegalLogic ) ); - iState = EComplete; - iCompletionTime = CurrentTime(); - } - -// ---------------------------------------------------------------------------- -// SetComplete -// ---------------------------------------------------------------------------- -// -void CXnGesture::SetCancelled() - { - iState = ECancelled; - } - -// ---------------------------------------------------------------------------- -// IsTap -// ---------------------------------------------------------------------------- -// -TBool CXnGesture::IsTap() const - { - return CodeFromPoints( EAxisBoth ) == EGestureTap; - } - -/** - * Translates a non-holding code into a holding code - * @param aCode original gesture code - * @return a gesture code with hold flag applied - */ -inline TXnGestureCode Hold( TXnGestureCode aCode ) - { - if ( aCode != EGestureStart && - aCode != EGestureDrag && - aCode != EGestureReleased && - aCode != EGestureUnknown ) - { - return static_cast< TXnGestureCode >( aCode | EFlagHold ); - } - return aCode; - } - -// ---------------------------------------------------------------------------- -// Code -// ---------------------------------------------------------------------------- -// -TXnGestureCode CXnGesture::Code( TAxis aRelevantAxis ) const - { - switch ( iState ) - { - case ENotComplete: - // "start" event if only first point received - // need to check that not holding, in case user pressed stylus - // down, and activated holding without moving the stylus - if ( iPoints.Count() == 1 && !IsHolding() ) - { - return EGestureStart; - } - // "drag" event if holding not started or holding started earlier - else if ( iHoldingState != EHoldStarting ) - { - return EGestureDrag; - } - // holding was just started - else - { - return Hold( CodeFromPoints( aRelevantAxis ) ); - } - - case EComplete: - { - TXnGestureCode code = CodeFromPoints( aRelevantAxis ); - -#ifdef _GESTURE_DOUBLE_TAP_SUPPORT - if ( EGestureTap == code && IsTapDoubleTap() ) - { - code = EGestureDoubleTap; - } -#endif // _GESTURE_DOUBLE_TAP_SUPPORT - - return code; - } - - case EReleased: - return EGestureReleased; - - case ECancelled: // fallthrough - default: - return EGestureUnknown; - } - } - -// ---------------------------------------------------------------------------- -// IsHolding -// ---------------------------------------------------------------------------- -// -TBool CXnGesture::IsHolding() const - { - return iHoldingState >= EHoldStarting; - } - -// ---------------------------------------------------------------------------- -// StartPos -// ---------------------------------------------------------------------------- -// -TPoint CXnGesture::StartPos() const - { - // at least one point will be in the array during callback (pointer down pos) - return iPoints[0].iPos; - } - -// ---------------------------------------------------------------------------- -// CurrentPos -// ---------------------------------------------------------------------------- -// -TPoint CXnGesture::CurrentPos() const - { - // at least on point will be in the array during callback (pointer down pos) - return iPoints[iPoints.Count() - 1].iPos; - } - -// ---------------------------------------------------------------------------- -// IsMovementStopped -// ---------------------------------------------------------------------------- -// -inline TBool CXnGesture::IsMovementStopped() const - { - // iCompletionTime is only only valid if client has called SetComplete - if ( iState >= EComplete ) - { - return Elapsed( NthLastEntry( 1 ).iTime, iCompletionTime ) - .Int() > KSpeedStopTime; - } - return EFalse; - } - -namespace - { - const TInt KFloatingPointAccuracy = 0.000001; - - /** @return percentage (0.0-1.0) how far aPos is from aEdge1 towards aEdge2 */ - inline TReal32 Proportion( TReal32 aPos, TReal32 aEdge1, TReal32 aEdge2 ) - { - if ( Abs( aEdge2 - aEdge1 ) > KFloatingPointAccuracy ) - { - return ( aPos - aEdge1 ) / ( aEdge2 - aEdge1 ); - } - return 0; // avoid division by zero - } - - /** Edges (pixels) at which speed should be -100% or 100% */ - NONSHARABLE_STRUCT( TEdges ) - { - TReal32 iMin; - TReal32 iMax; - }; - - /** - * scale which allows different (coordinate -> percentage) mapping - * between -100% to 0% and 0 and 100% - */ - NONSHARABLE_STRUCT( TScale ) - { - TScale( TInt aZero, const TEdges& aEdges ) - : iMin( aEdges.iMin ), iZero( aZero ), iMax( aEdges.iMax ) - { - } - - /** @return aPos as a percentage between -100% and 100% in aScale */ - TReal32 Percent( TReal32 aPos ) const; - - /// coordinate where speed is -100% - TReal32 iMin; - /// coordinate where speed is 0% - TReal32 iZero; - /// coordinate where speed is 100% - TReal32 iMax; - }; - - /** @convert aPos into a percentage between -100% and 100% in aScale */ - TReal32 TScale::Percent( TReal32 aPos ) const - { - TReal32 percent; - if ( aPos < iZero ) - { - // return negative percentages on the lower side of zero point - percent = -1 * Proportion( aPos, iZero, iMin ); - } - else - { - percent = Proportion( aPos, iZero, iMax ); - } - // constrain between -100% and 100% - return Min( Max( percent, -1.0F ), 1.0F ); - } - - /** Scale in x and y dimensions */ - NONSHARABLE_STRUCT( TScale2D ) - { - TRealPoint Percent( const TPoint& aPos ) const - { - return TRealPoint( - iX.Percent( aPos.iX ), - iY.Percent( aPos.iY ) ); - } - - TScale iX; - TScale iY; - }; - - enum TDirection { ESmaller, ELarger }; - - /** @return the direction of pos compared to the previous pos */ - inline TDirection Direction( TInt aPos, TInt aPreviousPos ) - { - return aPos < aPreviousPos ? ESmaller : ELarger; - } - - /** Direction in x and y dimensions */ - NONSHARABLE_STRUCT( TDirection2D ) - { - TDirection iX; - TDirection iY; - }; - - /** Return the direction (up/down) of signal at aIndex */ - inline TDirection2D Direction( - TInt aIndex, - const RArray< TXnPointEntry >& aPoints ) - { - const TPoint& pos = aPoints[aIndex].iPos; - const TPoint& prevPos = aPoints[aIndex - 1].iPos; - TDirection2D dir = { - Direction( pos.iX, prevPos.iX ), - Direction( pos.iY, prevPos.iY ) }; - return dir; - } - - /** - * @return a position in the aLow and aHigh, so that it aProportion of - * of length is above the pos - */ - TReal32 ProportionalLength( TReal32 aLow, TReal32 aHigh, TReal32 aProportion ) - { - return ( aHigh - aLow ) * aProportion / ( 1 + aProportion ); - } - - /** - * @return aVariableEdge scaled to new position, when the other edge changes - * from aOldEdge to aNewEdge, so that aOrigin maintains the *same - * relative position* between aVariableEdge and the other edge - */ - inline TReal32 ScaledEdge( - TReal32 aOrigin, - TReal32 aVariableEdge, - TReal32 aOldEdge, - TReal aNewEdge ) - { - TReal32 proportion = Proportion( aOrigin, aVariableEdge, aOldEdge ); - return ( proportion * aNewEdge - aOrigin ) / ( proportion - 1 ); - } - - TScale Rescale( - TReal32 aPos, - TDirection aDir, - TDirection aPrevDir, - const TScale& aPrevScale, - const TEdges& aEdges ) - { - TScale scale( aPrevScale ); - if ( aPrevDir != aDir ) - { - // the code duplication is accepted here, since it is difficult - // to factor out while maintaining the understandability of this - // anyway complex algorithm - if ( aDir == ESmaller ) - { - scale.iMin = aEdges.iMin; - if ( aPrevScale.iZero < aPos ) - { - TReal32 proportionAboveZero = Proportion( - aPos, aPrevScale.iZero, aPrevScale.iMax ); - scale.iZero = aPos - ProportionalLength( - aEdges.iMin, aPos, proportionAboveZero ); - } - else - { - // adjust zero pos so that proportion between aPos, Min, - // and Zero pos stay the same (Min will move to 0, - // aPos stays the same) - scale.iZero = ScaledEdge( aPos, aPrevScale.iZero, - aPrevScale.iMin, aEdges.iMin ); - } - - // adjust the upper edge to take into account the movement of - // zero pos - scale.iMax = ScaledEdge( aPos, aPrevScale.iMax, - aPrevScale.iZero, scale.iZero ); - } - else // ELarger - { - scale.iMax = aEdges.iMax; - if ( aPos < aPrevScale.iZero ) - { - TReal32 proportionBelowZero = Proportion( - aPos, aPrevScale.iZero, aPrevScale.iMin ); - scale.iZero = aPos + ProportionalLength( - aPos, aEdges.iMax, proportionBelowZero ); - } - else - { - // adjust zero pos so that proportion between aPos, Max, and - // Zero pos stay the same (Max will move edge, aPos stays - // the same) - scale.iZero = ScaledEdge( aPos, aPrevScale.iZero, - aPrevScale.iMax, aEdges.iMax ); - } - - // adjust the lower edge to take into account the movement of - // zero pos - scale.iMin = ScaledEdge( aPos, aPrevScale.iMin, - aPrevScale.iZero, scale.iZero ); - } - } - return scale; - } - - /** Edges in x and y dimensions */ - NONSHARABLE_STRUCT( TEdges2D ) - { - TEdges iX; - TEdges iY; - }; - - /** - * @param aEdges edges of the area in which gesture points are accepted - * @return the scale of latest point in the list of points - */ - TScale2D Scale( const RArray< TXnPointEntry >& aPoints, const TEdges2D& aEdges ) - { - TScale2D scale = { TScale( aPoints[0].iPos.iX, aEdges.iX ), - TScale( aPoints[0].iPos.iY, aEdges.iY ) }; - TInt count = aPoints.Count(); - if ( count > 1 ) - { - // iterate the whole point list to arrive to the current scale - TDirection2D dir( Direction( 1, aPoints ) ); - for ( TInt i = 1; i < count; i++ ) - { - // get direction at i - TDirection2D newDir( Direction( i, aPoints ) ); - // get new scale at i - scale.iX = Rescale( - aPoints[i - 1].iPos.iX, - newDir.iX, - dir.iX, - scale.iX, - aEdges.iX ); - scale.iY = Rescale( - aPoints[i - 1].iPos.iY, - newDir.iY, - dir.iY, - scale.iY, - aEdges.iY ); - dir = newDir; - } - } - return scale; - } - } // unnamed namespace - -TRealPoint CXnGesture::SpeedPercent( const TRect& aEdges ) const - { - // x and y coordinates are easier to handle separately, extract from TRect: - // ((iMinX, iMinY), (iMaxX, iMaxY)) -> ((iMinX, iMaxX), (iMinY, iMaxY)) - TEdges2D edges = { - { aEdges.iTl.iX, aEdges.iBr.iX }, - { aEdges.iTl.iY, aEdges.iBr.iY } }; - // work out the current scale (coordinate -> percentage mapping) from - // the history of points (i.e., points of current gesture). Then - // calculate the percentage of the current position. - return Scale( iPoints, edges ).Percent( CurrentPos() ); - } - -// ---------------------------------------------------------------------------- -// Speed -// ---------------------------------------------------------------------------- -// -TRealPoint CXnGesture::Speed() const - { - const TReal32 KMicroSecondsInSecond = 1000000; - - // Speed is only evaluated at the end of the swipe - // if user stops at the end of the swipe before lifting stylus, - // speed is zero. If time is zero, return 0 speed (infinite does - // not make sense either). Will need to consider also earlier points - // and their times or start time, if this zero-speed behavior is a problem - TRealPoint speed; - TReal32 time = static_cast< TReal32 >( TimeFromPreviousPoint().Int() ) - / KMicroSecondsInSecond; - if ( !IsMovementStopped() && time > 0 ) - { - TPoint distance = CurrentPos() - PreviousPos(); - speed.iX = static_cast< TReal32 >( distance.iX ) / time; - speed.iY = static_cast< TReal32 >( distance.iY ) / time; - } - return speed; - } - -// ---------------------------------------------------------------------------- -// Distance -// ---------------------------------------------------------------------------- -// -TPoint CXnGesture::Distance() const - { - return CurrentPos() - StartPos(); - } - -// ---------------------------------------------------------------------------- -// TimeFromPreviousPoint -// ---------------------------------------------------------------------------- -// -inline TTimeIntervalMicroSeconds32 CXnGesture::TimeFromPreviousPoint() const - { - const TInt KLatestEntryOffset = 1; - return Elapsed( PreviousEntry().iTime, NthLastEntry( KLatestEntryOffset ).iTime ); - } - -// ---------------------------------------------------------------------------- -// CodeFromPoints -// ---------------------------------------------------------------------------- -// -TXnGestureCode CXnGesture::CodeFromPoints( TAxis aRelevantAxis ) const - { - // select the correct filter based on aRelevantAxis - // these filter_ objects are array decorators that will eliminate either - // x, y or neither coordinate of each point - TXAxisPointArray filterY( iPoints ); - TYAxisPointArray filterX( iPoints ); - TXnPointArray filterNone( iPoints ); - TXnPointArray& filter = - aRelevantAxis == EAxisHorizontal ? static_cast< TXnPointArray& >( filterY ) : - aRelevantAxis == EAxisVertical ? static_cast< TXnPointArray& >( filterX ) : - /* otherwise EAxisBoth */ filterNone; - - // currently the gesture recogniser does not have any state, so it is fast - // to instantiate. The call is not static however, to allow the recogniser - // to be replaced by a more complicated implementation that has state. - // then it may make sense to make the recogniser a member variable. - return TXnGestureRecogniser().GestureCode( filter ); - } - -// ---------------------------------------------------------------------------- -// CodeFromPoints -// ---------------------------------------------------------------------------- -// -TXnGestureCode CXnGesture::LastDirection( TAxis aRelevantAxis ) const - { - // select the correct filter based on aRelevantAxis - // these filter_ objects are array decorators that will eliminate either - // x, y or neither coordinate of each point - TXAxisPointArray filterY( iPoints ); - TYAxisPointArray filterX( iPoints ); - TXnPointArray filterNone( iPoints ); - TXnPointArray& filter = - aRelevantAxis == EAxisHorizontal ? static_cast< TXnPointArray& >( filterY ) : - aRelevantAxis == EAxisVertical ? static_cast< TXnPointArray& >( filterX ) : - /* otherwise EAxisBoth */ filterNone; - - // currently the gesture recogniser does not have any state, so it is fast - // to instantiate. The call is not static however, to allow the recogniser - // to be replaced by a more complicated implementation that has state. - // then it may make sense to make the recogniser a member variable. - return TXnGestureRecogniser().LastDirection( filter ); - } - -// ---------------------------------------------------------------------------- -// return nth point from the end of the points array -// ---------------------------------------------------------------------------- -// -inline const TXnPointEntry& CXnGesture::NthLastEntry( TInt aOffset ) const - { - return iPoints[Max( iPoints.Count() - aOffset, 0 )]; - } - -// ---------------------------------------------------------------------------- -// PreviousEntry -// ---------------------------------------------------------------------------- -// -inline const TXnPointEntry& CXnGesture::PreviousEntry() const - { - return NthLastEntry( KPreviousPointOffset ); - } - -// ---------------------------------------------------------------------------- -// PreviousPos -// ---------------------------------------------------------------------------- -// -inline TPoint CXnGesture::PreviousPos() const - { - return NthLastEntry( KPreviousPointOffset - 1 ).iPos; - } - -// ---------------------------------------------------------------------------- -// SetComplete -// ---------------------------------------------------------------------------- -// -TBool CXnGesture::IsTapDoubleTap() const - { - return iPreviousGesture.iType == TGestureRecord::ETypeTap && - Elapsed( iPreviousGesture.iCompletionTime, iCompletionTime ).Int() <= - KMaxDoubleTapDuration && - IsNear( iPreviousGesture.iPos, iPoints[iPoints.Count() - 1].iPos, - KSamePointTolerance ); - } - -// ---------------------------------------------------------------------------- -// Type -// ---------------------------------------------------------------------------- -// -CXnGesture::TGestureRecord::TType CXnGesture::Type() const - { - if ( CodeFromPoints( EAxisBoth ) == EGestureTap && !IsHolding() ) - { - if ( IsTapDoubleTap() ) - { - return CXnGesture::TGestureRecord::ETypeDoubleTap; - } - else - { - return CXnGesture::TGestureRecord::ETypeTap; - } - } - else - { - return CXnGesture::TGestureRecord::ETypeOther; - } - } - -// ---------------------------------------------------------------------------- -// TGestureRecord constructor -// ---------------------------------------------------------------------------- -// -CXnGesture::TGestureRecord::TGestureRecord() - { - iType = ETypeOther; - } - -// ---------------------------------------------------------------------------- -// TGestureRecord constructor -// ---------------------------------------------------------------------------- -// -CXnGesture::TGestureRecord::TGestureRecord( - CXnGesture::TGestureRecord::TType aType, - TTime aCompletionTime, - TPoint aPos ) - : iType( aType ), iCompletionTime( aCompletionTime ), iPos( aPos ) - { - } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xngesturehelper.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xngesturehelper.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,403 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture helper implementation -* -*/ - -// System includes -#include -#include - -// User includes -#include "xngesturehelper.h" -#include "xngesture.h" -#include "xngesturedefs.h" -#include "xnnode.h" - -using namespace XnGestureHelper; - -namespace XnGestureHelper - { - NONSHARABLE_CLASS( CHoldingTimer ) : public CTimer - { - public: - /** Two-phase constructor */ - static CHoldingTimer* NewL( CXnGestureHelper& aHelper ) - { - CHoldingTimer* self = new ( ELeave ) CHoldingTimer( aHelper ); - CleanupStack::PushL( self ); - self->ConstructL(); - // "hold event" sending is enabled by default - self->iIsEnabled = ETrue; - CActiveScheduler::Add( self ); - CleanupStack::Pop( self ); - return self; - } - - /** Destructor */ - ~CHoldingTimer() - { - Cancel(); - } - - /** Set whether sending holding events is currently enabled */ - void SetEnabled( TBool aEnabled ) - { - iIsEnabled = aEnabled; - // cancel in case hold timer is already running - Cancel(); - } - - /** @return whether sending holding events is currently enabled */ - TBool IsEnabled() const - { - return iIsEnabled; - } - - /** Start the timer. Calls CXnGestureHelper::StartHoldingL upon - * completion */ - void Start() - { - // if sending hold events is disabled, do not ever start the hold - // timer, and hence hold events will never be triggered - if ( iIsEnabled ) - { - Cancel(); - After( KHoldDuration ); - } - } - - private: - /** Constructor */ - CHoldingTimer( CXnGestureHelper& aHelper ) - : // give higher priority to new pointer events with - 1 - CTimer( EPriorityUserInput - 1 ), - iHelper( aHelper ) - { - } - - void RunL() // From CActive - { - iHelper.StartHoldingL(); - } - - private: - /// helper object that will be called back when timer is triggered - CXnGestureHelper& iHelper; - /// whether sending holding events is currently enabled - TBool iIsEnabled; - }; - } // namespace GestureHelper - -/** -* @return position from event. Use this instead of using aEvent direction to -* avoid accidentally using TPointerEvent::iPosition -*/ -inline TPoint Position( const TPointerEvent& aEvent ) - { - // use parent position, since the capturer is using full screen area, - // and because the (Alfred) drag events are not local to visual even when - // coming from the client - return aEvent.iParentPosition; - } - -// ---------------------------------------------------------------------------- -// Two-phase constructor -// ---------------------------------------------------------------------------- -// -CXnGestureHelper* CXnGestureHelper::NewL( CXnNode& aNode ) - { - CXnGestureHelper* self = new ( ELeave ) CXnGestureHelper( aNode ); - CleanupStack::PushL( self ); - self->iHoldingTimer = CHoldingTimer::NewL( *self ); - self->iGesture = new ( ELeave ) CXnGesture(); - CleanupStack::Pop( self ); - return self; - } - -// ---------------------------------------------------------------------------- -// Constructor -// ---------------------------------------------------------------------------- -// -CXnGestureHelper::CXnGestureHelper( CXnNode& aNode ) - : iOwner( aNode ) - { - } - -// ---------------------------------------------------------------------------- -// Destructor -// ---------------------------------------------------------------------------- -// -CXnGestureHelper::~CXnGestureHelper() - { - delete iHoldingTimer; - delete iGesture; - } - -// ---------------------------------------------------------------------------- -// SetHoldingEnabled -// ---------------------------------------------------------------------------- -// -void CXnGestureHelper::SetHoldingEnabled( TBool aEnabled ) - { - iHoldingTimer->SetEnabled( aEnabled ); - } - -// ---------------------------------------------------------------------------- -// IsHoldingEnabled -// ---------------------------------------------------------------------------- -// -TBool CXnGestureHelper::IsHoldingEnabled() const - { - return iHoldingTimer->IsEnabled(); - } - -// ---------------------------------------------------------------------------- -// Reset state -// ---------------------------------------------------------------------------- -// -void CXnGestureHelper::Reset() - { - iHoldingTimer->Cancel(); - iGesture->Reset(); - } - -/** -* Helper function that calls Reset on the pointer to CXnGestureHelper -*/ -static void ResetHelper( TAny* aHelper ) - { - static_cast< CXnGestureHelper* >( aHelper )->Reset(); - } - -// ---------------------------------------------------------------------------- -// Sets gesture destination -// ---------------------------------------------------------------------------- -// -void CXnGestureHelper::SetDestination( CXnNode* aDestination ) - { - iDestination = aDestination; - } - -// ---------------------------------------------------------------------------- -// Gets gesture destination -// ---------------------------------------------------------------------------- -// -CXnNode* CXnGestureHelper::Destination() const - { - return iDestination; - } - -// ---------------------------------------------------------------------------- -// Gets gesture owner -// ---------------------------------------------------------------------------- -// -CXnNode* CXnGestureHelper::Owner() const - { - return &iOwner; - } - -// ---------------------------------------------------------------------------- -// Handle a pointer event -// ---------------------------------------------------------------------------- -// -TXnGestureCode CXnGestureHelper::HandlePointerEventL( - const TPointerEvent& aEvent ) - { - TXnGestureCode ret( EGestureUnknown ); - - switch ( aEvent.iType ) - { - case TPointerEvent::EButton1Down: - // If no up event was received during previous gesture, cancel - // previous event and reset state - if ( !IsIdle() ) - { - iGesture->SetCancelled(); - // ambiguous what is the right thing when "cancel" event leaves - // and "start" does not. Leaving for cancel *after* "start" could - // be unexpected to client, as client would have handled start - // event successfully. Assume that leaving upon cancellation - // can be ignored. - Reset(); - } - // adding the first point implicitly makes the state "not idle" - AddPointL( aEvent ); - // If AddPointL leaves, IsIdle will return EFalse for other events - // types, hence further pointer events will be ignored. - // Therefore, holding will NOT be started if AddPointL leaves, - // since the callback would trigger a gesture callback, and that - // would access an empty points array. - iHoldingTimer->Start(); - iDirection = EGestureUnknown; - break; - - case TPointerEvent::EDrag: - // ignore the event in case not in "recording" state. this may - // happen if holding was triggered, or client sends up event after - // down event was received in a different *client* state, and - // client did not forward the down event to here. - // Also, while stylus down, the same event is received repeatedly - // even if stylus does not move. Filter out by checking if point - // is the same as the latest point - if ( iDirection != EGestureCanceled ) - { - if ( iDirection == EGestureUnknown ) - { - // check current direction - iDirection = iGesture->CodeFromPoints( CXnGesture::EAxisBoth ); - } - else - { - // check if direction has changed - if ( iDirection != iGesture->LastDirection( CXnGesture::EAxisBoth ) ) - { - // cancel swipe - iDirection = EGestureCanceled; - } - } - - if ( !IsIdle() && !iGesture->IsLatestPoint( Position( aEvent ) ) ) - { - AddPointL( aEvent ); - if ( !( iGesture->IsHolding() || - iGesture->IsNearHoldingPoint( Position( aEvent ) ) ) ) - { - // restart hold timer, since pointer has moved - iHoldingTimer->Start(); - // Remember the point in which holding was started - iGesture->SetHoldingPoint(); - } - } - } - break; - - case TPointerEvent::EButton1Up: - // ignore up event if no down event received - if ( !IsIdle() ) - { - // reset in case the down event is not received for a reason - // in client, and instead drag or up events are received. - // reset via cleanup stack to ensure Reset is run even if - // observer leaves - CleanupStack::PushL( TCleanupItem( &ResetHelper, this ) ); - iGesture->SetComplete(); - if ( iDirection != EGestureCanceled ) - { - // if adding of the point fails, notify client with a - // cancelled event. It would be wrong to send another - // gesture code when the up point is not known - if ( AddPoint( aEvent ) != KErrNone ) - { - iGesture->SetCancelled(); - } - else - { - // send gesture code if holding has not been started - if ( !iGesture->IsHolding() ) - { - // if client leaves, the state is automatically reset. - // In this case the client will not get the released event - ret = iDirection; - } - // send an event that stylus was lifted - iGesture->SetReleased(); - } - } - // reset state - CleanupStack::PopAndDestroy( this ); - } - break; - - default: - break; - } - - return ret; - } - -// ---------------------------------------------------------------------------- -// Is the helper idle? -// inline ok in cpp file for a private member function -// ---------------------------------------------------------------------------- -// -inline TBool CXnGestureHelper::IsIdle() const - { - return iGesture->IsEmpty(); - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// inline ok in cpp file for a private member function -// ---------------------------------------------------------------------------- -// -inline void CXnGestureHelper::AddPointL( const TPointerEvent& aEvent ) - { - User::LeaveIfError( AddPoint( aEvent ) ); - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// inline ok in cpp file for a private member function -// ---------------------------------------------------------------------------- -// -inline TInt CXnGestureHelper::AddPoint( const TPointerEvent& aEvent ) - { - return iGesture->AddPoint( Position ( aEvent ) ); - } - -/** -* Helper function that calls ContinueHolding on the pointer to TGesture -*/ -static void ContinueHolding( TAny* aGesture ) - { - static_cast< CXnGesture* >( aGesture )->ContinueHolding(); - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// ---------------------------------------------------------------------------- -// -void CXnGestureHelper::StartHoldingL() - { - // hold & tap event is specifically filtered out. Use case: in list fast - // scrolling activation (e.g. enhanced coverflow), tap & hold should not - // start fast scroll. In addition, after long tap on start position, - // drag and drag & hold swiping should emit normal swipe and swipe&hold - // events. Therefore, tap & hold is not supported. - if ( !iGesture->IsTap() ) - { - // holding has just started, and gesture code should be provided to client. - // set gesture state so that it produces a gesture code (other than drag) - iGesture->StartHolding(); - - // create an item in the cleanup stack that will set the gesture state - // to holding-was-started-earlier state. NotifyL may leave, but the - // holding-was-started-earlier state must still be successfully set, - // otherwise, the holding gesture code will be sent twice - CleanupStack::PushL( TCleanupItem( &ContinueHolding, iGesture ) ); - - // set holding state to "post holding" - CleanupStack::PopAndDestroy( iGesture ); - } - } - -// ---------------------------------------------------------------------------- -// Check if swipe is valid -// ---------------------------------------------------------------------------- -// -TXnGestureCode CXnGestureHelper::ValidSwipe() const - { - return iGesture->Code( CXnGesture::EAxisBoth ); - } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xngesturerecogniser.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xngesturerecogniser.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,223 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Gesture helper implementation -* -*/ - -#include - -#include "xngesturerecogniser.h" -#include "xngesturedefs.h" -#include "xnpointarray.h" - -using namespace XnGestureHelper; - -const TInt minPointCount = 5; - -/** - * Vector class (math) - */ -NONSHARABLE_CLASS( TVector ) - { -public: - /** - * Constructor - * @param aFrom starting point of the vector - * @param aTo ending point of the vector - */ - TVector( const TPoint& aFrom, const TPoint& aTo ) - : iX( aTo.iX - aFrom.iX ), - iY( aTo.iY - aFrom.iY ) - { - } - - /** @return angle of the vector */ - TReal Angle() const - { - TReal angle = 0; - TReal length = Length(); - if ( length != 0 ) - { - Math::ACos( angle, iX / Length() ); - if ( iY < 0 ) - { - angle = 2 * KPi - angle; - } - } - return Degrees( angle ); - } - - /** @return length of the vector */ - TReal Length() const - { - TReal length = 0; - Math::Sqrt( length, iX * iX + iY * iY ); - return length; - } - -private: - /** @return radians in degrees */ - inline TReal Degrees( TReal aRadians ) const - { - return aRadians * 180 / KPi; - } - -public: - /// x coordinate that represent the vector - TReal iX; - /// y coordinate that represent the vector - TReal iY; - }; - -/** - * @return ETrue if points for a tap event - */ -inline TBool IsTap( const TXnPointArray& aPoints ) - { - // with tap, the pointer is not allowed to leave the tap area and come back - // therefore, gesture length is not an acceptable test for tap, as it tests - // only the last point. therefore, check if *any* point is outside tap area. - TInt i = aPoints.Count(); // latest point if most likely to be outside tap area - while ( --i >= 0 ) - { - // use the raw point (from which no axis has been filtered out) - // because tap should consider both axes even when Code() ignores one axis - if ( KSamePointTolerance < Abs( aPoints.Raw( i ).iX - aPoints.Raw( 0 ).iX ) || - KSamePointTolerance < Abs( aPoints.Raw( i ).iY - aPoints.Raw( 0 ).iY ) ) - { - return EFalse; - } - } - return ETrue; - } - -/** - * @return Length of the gesture in points - */ -inline TReal GestureLength( const TXnPointArray& aPoints ) - { - return TVector( aPoints[0], aPoints[aPoints.Count() - 1] ).Length(); - } - -/** - * @return ETrue if aAngleUnderTest is almost aAngle - * Closeness of the angles is controlled by KAngleTolerance - */ -static TBool IsNear( TReal aAngleUnderTest, TReal aAngle ) - { - return aAngle - KAngleTolerance <= aAngleUnderTest && - aAngleUnderTest <= aAngle + KAngleTolerance; - } - -/** - * @return the angle as a direction flags of TGesture - */ -inline TXnGestureCode Direction( TReal aAngle ) - { - TXnGestureCode direction = EGestureUnknown; - - if ( IsNear( aAngle, 90.0 ) ) - { - direction = EGestureSwipeDown; - } - else if ( IsNear( aAngle, 180.0 ) ) - { - direction = EGestureSwipeLeft; - } - else if ( IsNear( aAngle, 270.0 ) ) - { - direction = EGestureSwipeUp; - } - else if ( 360.0 - KAngleTolerance <= aAngle || aAngle <= KAngleTolerance ) - { - direction = EGestureSwipeRight; - } - else // for lint warning - { - // unknown angle - } - - return direction; - } - -/** @return direction between points */ -inline TXnGestureCode Direction( const TPoint& aFromPoint, const TPoint& aToPoint ) - { - return Direction( TVector( aFromPoint, aToPoint ).Angle() ); - } - -/** @return overall direction between points */ -static TXnGestureCode GeneralDirection( const TXnPointArray& aPoints ) - { - return Direction( aPoints[0], aPoints[aPoints.Count() - 1]); - } - -/** -* @return the last received point that is different that the latest point, -* or first point if no point is different than latest -*/ -inline TPoint PreviousPoint( const TXnPointArray& aPoints ) - { - TPoint latestPoint = aPoints[aPoints.Count() - 1]; - TInt i = aPoints.Count() - 1; - while ( --i >= 0 ) - { - if ( latestPoint != aPoints[i] ) - { - return aPoints[i]; - } - } - return aPoints[0]; - } - -/** @return direction between last two points */ -TXnGestureCode TXnGestureRecogniser::LastDirection( const TXnPointArray& aPoints ) const - { - if ( aPoints.Count() > minPointCount ) - { - // return direction between latest and previous points. - // pick the previous point that is different than the last point - // because while using an x or y filter array, more than one - // sequential points may look like the same point because - // the differing coordinate coordinate is filtered out. For example, - // if dragging left and slightly up, many y coordinates will have the - // same value, while only x differs. - return Direction( aPoints[ aPoints.Count() - minPointCount ], - aPoints[ aPoints.Count() - 1 ] ); - } - return GeneralDirection( aPoints ); - } - -// ---------------------------------------------------------------------------- -// Return gesture code of a gesture formed by a sequence of points -// ---------------------------------------------------------------------------- -// -TXnGestureCode TXnGestureRecogniser::GestureCode( const TXnPointArray& aPoints ) const - { - __ASSERT_DEBUG( aPoints.Count() > 0, Panic( EGesturePanicIllegalLogic ) ); - - if (aPoints.Count() <= 0) - { - return EGestureUnknown; - } - - if ( GestureLength( aPoints ) >= KMinSwipeLength ) - { - return GeneralDirection( aPoints ); - } - - // the pointer was moved but was either not moved far enough, or was - // brought back to close to the starting point - return EGestureUnknown; - } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnhittest.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnhittest.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Data class to hold widget info -* -*/ - -// INCLUDES -#include - -#include "xncontroladapter.h" -#include "xnhittest.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CXnHitTest::NewL() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CXnHitTest* CXnHitTest::NewL() - { - CXnHitTest* self = CXnHitTest::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::NewLC() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CXnHitTest* CXnHitTest::NewLC() - { - CXnHitTest* self = new ( ELeave ) CXnHitTest; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::CXnHitTest() -// C++ default constructor -// ----------------------------------------------------------------------------- -// -CXnHitTest::CXnHitTest() - { - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::~CXnHitTest() -// C++ default destructor. -// ----------------------------------------------------------------------------- -// -CXnHitTest::~CXnHitTest() - { - CCoeEnv::Static()->RemoveMessageMonitorObserver( *this ); - iHitRegion.Reset(); - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::ConstructL() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -void CXnHitTest::ConstructL() - { - CCoeEnv::Static()->AddMessageMonitorObserverL( *this ); - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::MonitorWsMessage() -// ----------------------------------------------------------------------------- -// -void CXnHitTest::MonitorWsMessage( const TWsEvent& aEvent ) - { - TInt type( aEvent.Type() ); - - if ( type == EEventPointer ) - { - iPointerEvent = *aEvent.Pointer(); - } - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::AddControl() -// ----------------------------------------------------------------------------- -// -void CXnHitTest::AddControl( CXnControlAdapter* aControl ) - { - if ( iHitRegion.Find( aControl ) == KErrNotFound ) - { - iHitRegion.Append( aControl ); - } - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::RemoveControl() -// ----------------------------------------------------------------------------- -// -void CXnHitTest::RemoveControl( CXnControlAdapter* aControl ) - { - TInt index( iHitRegion.Find( aControl ) ); - - if ( index != KErrNotFound ) - { - iHitRegion.Remove( index ); - } - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::SetFlags() -// ----------------------------------------------------------------------------- -// -void CXnHitTest::SetFlags( const TInt aFlags ) - { - iFlags |= aFlags; - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::ClearFlags() -// ----------------------------------------------------------------------------- -// -void CXnHitTest::ClearFlags( const TInt aFlags ) - { - iFlags &= ~aFlags; - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::Flags() -// ----------------------------------------------------------------------------- -// -TInt CXnHitTest::Flags() const - { - return iFlags; - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::Flush() -// ----------------------------------------------------------------------------- -// -void CXnHitTest::Flush() - { - iFlags = 0; - - iHitRegion.Reset(); - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::HitRegionCount() -// ----------------------------------------------------------------------------- -// -TInt CXnHitTest::HitRegionCount() const - { - return iHitRegion.Count(); - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::HitRegion() -// ----------------------------------------------------------------------------- -// -CXnControlAdapter* CXnHitTest::HitRegion() const - { - TInt count( HitRegionCount() ); - - if ( count > 0 ) - { - return iHitRegion[count - 1]; - } - - return NULL; - } - -// ----------------------------------------------------------------------------- -// CXnHitTest::PointerEvent() -// ----------------------------------------------------------------------------- -// -const TPointerEvent& CXnHitTest::PointerEvent() const - { - return iPointerEvent; - } - -// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnkeyeventdispatcher.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnkeyeventdispatcher.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnkeyeventdispatcher.cpp Wed May 12 13:12:59 2010 +0300 @@ -192,6 +192,9 @@ CCoeControl* destination = reinterpret_cast< CCoeControl* >( handle ); TPointerEvent& event( *aEvent.Pointer() ); + + // Store event + iPointerEvent = *aEvent.Pointer(); if ( iCbaContainer ) { @@ -225,6 +228,16 @@ } // ----------------------------------------------------------------------------- +// CXnKeyEventDispatcher::PointerEvent() +// +// ----------------------------------------------------------------------------- +// +const TPointerEvent& CXnKeyEventDispatcher::PointerEvent() const + { + return iPointerEvent; + } + +// ----------------------------------------------------------------------------- // CXnKeyEventDispatcher::OfferKeyEventL // Handles key events. // ----------------------------------------------------------------------------- @@ -234,9 +247,7 @@ TEventCode aType ) { TKeyResponse resp( EKeyWasNotConsumed ); - - iEventCode = aType; - + CXnNode* node( NULL ); TBool keyYesNoApps( EFalse ); @@ -249,7 +260,7 @@ // When menu is focused or LSK/RSK is pressed, // then forward events to menuadapter. // Note that MSK is handled directly in the base class as it used only - // for activating + // for activation node = iMenuNode; } else if ( aKeyEvent.iScanCode == EStdKeyApplication0 || @@ -259,8 +270,9 @@ keyYesNoApps = ETrue; iFocusChanged = EFalse; + // AppsKey, YesKey, NoKey events must be always handled, and if we don't - // have a focused node, then let the view node do the job + // have a focused node, then let the view handle the event node = ( !iNode ) ? iUiEngine.ActiveView() : iNode; } else @@ -309,6 +321,10 @@ if ( editmode->OfferKeyEventL( aKeyEvent, aType ) == EKeyWasConsumed ) { + iFocusChanged = EFalse; + iKeyEventNode = NULL; + iEventCode = EEventNull; + return EKeyWasConsumed; } @@ -324,8 +340,7 @@ if ( iFocusChanged && ( aType == EEventKeyUp ) ) { - // Pass keyup event to - // previously focused node + // Pass keyup event to the previously focused node node = iKeyEventNode; } } @@ -336,7 +351,9 @@ { // We are waiting for down event return resp; - } + } + + iEventCode = aType; } if ( !node ) diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp Wed May 12 13:12:59 2010 +0300 @@ -43,7 +43,6 @@ #include "xneditmode.h" #include "xneditor.h" #include "xntext.h" -#include "xnhittest.h" #include "xnscrollablecontroladapter.h" #include "xnviewdata.h" #include "xnrootdata.h" @@ -266,8 +265,6 @@ CXnDomNode& aEventNode, CXnDomNode& aTriggerNode, CXnNode& aEventData ); static void RunFullScreenEffectL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); -static void RunActivateViewL( - CXnNodeImpl* aThis, CXnUiEngine& aEngine, CXnDomNode& aEventNode ); static void RunActivateNextViewL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); static void RunActivatePreviousViewL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); static void RunAddViewL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); @@ -895,7 +892,7 @@ TInt level( XnDirtyLevel::ENone ); EnableStatePropertyL( - aNode, aPseudoClass, CXnNode::WidthL, + aNode, aPseudoClass, &CXnNode::WidthL, aLayoutPropertyCache->iWidth, aLayoutPropertyCache->iWidths, level ); @@ -2773,39 +2770,6 @@ } // ----------------------------------------------------------------------------- -// RunActivateViewL -// ----------------------------------------------------------------------------- -// -static void RunActivateViewL( - CXnNodeImpl* aThis, - CXnUiEngine& aEngine, - CXnDomNode& aEventNode ) - { - CXnDomList& children( aEventNode.ChildNodes() ); - - TInt count( children.Length() ); - - for ( TInt i = 0; i < count; ++i ) - { - CXnDomNode* node = static_cast< CXnDomNode* >( children.Item( i ) ); - - const TDesC8& type( node->Name() ); - - if ( type == XnPropertyNames::action::KProperty ) - { - const TDesC8& id( node->AttributeValue( XnPropertyNames::action::KValue ) ); - - CXnNode* viewNode( aEngine.FindNodeByIdL( id, aThis->Namespace() ) ); - - if ( viewNode ) - { - aEngine.ActivateViewL( *viewNode ); - } - } - } - } - -// ----------------------------------------------------------------------------- // RunActivateNextViewL // ----------------------------------------------------------------------------- // @@ -3560,7 +3524,8 @@ if ( menuIf ) { - menuIf->TryDisplayingMenuBarL( *menuId ); + aEngine.Editor()->SetTargetPlugin( aEngine.FocusedNode() ); + menuIf->TryDisplayingMenuBarL( *menuId, EFalse ); } CleanupStack::PopAndDestroy( menuId ); @@ -3947,10 +3912,6 @@ { RunRemoveViewL( aEngine, aEventNode ); } - else if ( nameString == XnPropertyNames::action::event::KActivateView ) - { - RunActivateViewL( aThis, aEngine, aEventNode ); - } else if ( nameString == XnPropertyNames::action::event::KActivate ) { RunActivateL( aThis, aEngine, aEventNode ); @@ -7125,19 +7086,9 @@ XnComponentInterface::MakeInterfaceL( popup, tooltipNode ); - if ( popup ) + if ( popup && aSource != XnEventSource::EStylus ) { - if ( aSource == XnEventSource::EStylus ) - { - const TTimeIntervalMicroSeconds32 delay( 1000 * 100 ); - const TTimeIntervalMicroSeconds32 display( 1000 * 1000 * 6 ); - - popup->ShowPopupL( aRect, delay, display ); - } - else - { - popup->ShowPopupL( aRect ); - } + popup->ShowPopupL( aRect ); } } } @@ -9080,15 +9031,34 @@ } if ( source != -1 && target != -1 ) { + TBool swap = EFalse; + CXnPluginData* data( aTarget->UiEngine()->ViewManager()-> + ActiveViewData().Plugin( aTarget ) ); + if ( data && !data->Occupied() ) + { + // target is empty widget, swap widget places + swap = ETrue; + } + if ( target < source ) { iChildren.InsertL( aSource, target ); iChildren.Remove( source + 1 ); + if ( swap ) + { + iChildren.Remove( target + 1 ); + iChildren.InsertL( aTarget, source ); + } } else if ( source < target ) { iChildren.Remove( source ); iChildren.InsertL( aSource, target ); + if ( swap ) + { + iChildren.Insert( aTarget, source ); + iChildren.Remove( target ); + } } // put the locked nodes to the original places diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnpointarray.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnpointarray.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: Array of points -* -*/ - -#include "xnpointarray.h" - -using namespace XnGestureHelper; - -// ---------------------------------------------------------------------------- -// TXnPointArray constructor -// ---------------------------------------------------------------------------- -// -TXnPointArray::TXnPointArray( const RArray< TXnPointEntry >& aPoints ) - : iPoints( aPoints ) - { - } - -// ---------------------------------------------------------------------------- -// TXnPointArray length -// ---------------------------------------------------------------------------- -// -TInt TXnPointArray::Count() const - { - return iPoints.Count(); - } - -// ---------------------------------------------------------------------------- -// point at index, no filtering -// ---------------------------------------------------------------------------- -// -TPoint TXnPointArray::operator[]( TInt aIndex ) const - { - return iPoints[aIndex].iPos; - } - -// ---------------------------------------------------------------------------- -// Unfiltered point at index -// ---------------------------------------------------------------------------- -// -const TPoint& TXnPointArray::Raw( TInt aIndex ) const - { - return iPoints[aIndex].iPos; - } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnpopupcontroladapter.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnpopupcontroladapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnpopupcontroladapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -24,6 +24,8 @@ // User includes #include "xnappuiadapter.h" +#include "xnviewadapter.h" +#include "xnkeyeventdispatcher.h" #include "xnviewmanager.h" #include "xnviewdata.h" #include "xnplugindata.h" @@ -35,7 +37,6 @@ #include "xntype.h" #include "xnuiengine.h" #include "xneditor.h" -#include "xnhittest.h" #include "xnfocuscontrol.h" #include "xnpopupcontroladapter.h" @@ -165,6 +166,8 @@ } } + iUiEngine->Editor()->SetTargetPlugin( NULL ); + iMenuItems.Reset(); iCommandId = 0; @@ -197,13 +200,18 @@ void CXnPopupControlAdapter::TryDisplayingStylusPopupL( CXnNode& aPlugin ) { HideMenuL(); + CXnViewManager* manager( iUiEngine->ViewManager() ); CXnPluginData* plugin( manager->ActiveViewData().Plugin( &aPlugin ) ); + if ( !plugin ) { return; } - TPointerEvent event( iUiEngine->HitTest().PointerEvent() ); + + CXnViewAdapter& adapter( iUiEngine->AppUiAdapter().ViewAdapter() ); + + const TPointerEvent& event( adapter.EventDispatcher()->PointerEvent() ); delete iStylusPopupMenu; iStylusPopupMenu = NULL; diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnpropertysubscriber.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnpropertysubscriber.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnpropertysubscriber.cpp Wed May 12 13:12:59 2010 +0300 @@ -85,7 +85,7 @@ // void CXnPropertySubscriber::DoCancel() { - iProperty.Close(); + iProperty.Cancel(); } // ----------------------------------------------------------------------------- @@ -103,3 +103,14 @@ iPropertyChangeObserver.PropertyChangedL( iKey, intValue ); } } + +// --------------------------------------------------------- +// --------------------------------------------------------- +// +TInt CXnPropertySubscriber::RunError(TInt /*aError*/) + { + return KErrNone; + } + +// End of file + diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnspbgcleaner.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnspbgcleaner.cpp Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: +* statuspane's background cleaner implementation +* +*/ + +// System includes +#include +#include +#include + +// User includes +#include "xnspbgcleaner.h" + +// CONSTANTS + +// ============================ LOCAL FUNCTIONS ================================ + +// ============================ MEMBER FUNCTIONS =============================== + +// --------------------------------------------------------- +// CXnSpBgCleaner::NewL +// --------------------------------------------------------- +// +CXnSpBgCleaner* CXnSpBgCleaner::NewL() + { + CXnSpBgCleaner* self = CXnSpBgCleaner::NewLC(); + CleanupStack::Pop(); // self; + return self; + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::NewLC +// --------------------------------------------------------- +// +CXnSpBgCleaner* CXnSpBgCleaner::NewLC() + { + CXnSpBgCleaner* self = new ( ELeave ) CXnSpBgCleaner(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::CXnSpBgCleaner +// --------------------------------------------------------- +// +CXnSpBgCleaner::CXnSpBgCleaner() + { + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::ConstructL +// --------------------------------------------------------- +// +void CXnSpBgCleaner::ConstructL() + { + CreateWindowL(); + + TRect statusPaneRect; + AknLayoutUtils::LayoutMetricsRect( + AknLayoutUtils::EStatusPane, statusPaneRect ); + + SetRect( statusPaneRect ); + SetNonFocusing(); + + Window().SetOrdinalPosition( -1 ); + Window().SetBackgroundColor( TRgb::Color16MA(0) ); + Window().SetVisible( ETrue ); + + ActivateL(); + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::~CXnSpBgCleaner +// --------------------------------------------------------- +// +CXnSpBgCleaner::~CXnSpBgCleaner() + { + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::SizeChanged +// --------------------------------------------------------- +// +void CXnSpBgCleaner::SizeChanged() + { + CCoeControl::SizeChanged(); + DrawDeferred(); + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::Draw +// --------------------------------------------------------- +// +void CXnSpBgCleaner::Draw( const TRect& /*aRect*/ ) const + { + CWindowGc& gc = SystemGc(); + TRgb color( TRgb::Color16MA(0) ); + gc.SetPenColor( color ); + gc.SetBrushColor( color ); + gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); + gc.SetPenStyle(CGraphicsContext::ESolidPen ); + gc.SetBrushStyle(CGraphicsContext::ESolidBrush ); + gc.Clear(); + } + +// --------------------------------------------------------- +// CXnSpBgCleaner::HandleResourceChange +// --------------------------------------------------------- +// +void CXnSpBgCleaner::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + + if ( KEikDynamicLayoutVariantSwitch == aType ) + { + TRect statusPaneRect; + AknLayoutUtils::LayoutMetricsRect( + AknLayoutUtils::EStatusPane, statusPaneRect ); + SetRect( statusPaneRect ); + } + } + +// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnuiengine.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnuiengine.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnuiengine.cpp Wed May 12 13:12:59 2010 +0300 @@ -264,15 +264,6 @@ } // ----------------------------------------------------------------------------- -// CXnUiEngine::ActivateViewL -// Activate a view -// ----------------------------------------------------------------------------- -// -void CXnUiEngine::ActivateViewL( CXnNode& /*aViewNode*/ ) - { - } - -// ----------------------------------------------------------------------------- // CXnUiEngine::ViewManager // ----------------------------------------------------------------------------- // @@ -498,15 +489,6 @@ } // ----------------------------------------------------------------------------- -// CXnUiEngine::HitTest -// ----------------------------------------------------------------------------- -// -CXnHitTest& CXnUiEngine::HitTest() const - { - return iUiEngineImpl->HitTest(); - } - -// ----------------------------------------------------------------------------- // CXnUiEngine::GetThemeResource // ----------------------------------------------------------------------------- // diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnuiengine.rss --- a/idlehomescreen/xmluirendering/uiengine/src/xnuiengine.rss Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnuiengine.rss Wed May 12 13:12:59 2010 +0300 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -103,6 +104,11 @@ buf = qtn_hs_delete_current_page; } +RESOURCE TBUF r_hs_error_content_removed + { + buf = qtn_hs_error_content_removed; + } + RESOURCE DIALOG r_yes_no_hs_remove_view { flags = EGeneralQueryFlags; @@ -151,10 +157,52 @@ }; softkeys = R_AVKON_SOFTKEYS_SELECT_BACK; } + +RESOURCE DIALOG r_hs_content_removed_view + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationQueryLayout; + label = r_hs_error_content_removed; + bmpfile = AVKON_ICON_FILE; + bmpid = EMbmAvkonQgn_note_error; + bmpmask = EMbmAvkonQgn_note_error_mask; + }; + } + }; + } RESOURCE TBUF r_qtn_hs_operation_failed_no_disk { buf = qtn_hs_operation_failed_no_disk; } +RESOURCE DIALOG r_backup_restore_wait_dialog + { + flags = EAknWaitNoteFlags; + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = EGeneralNote; + control= AVKON_NOTE + { + layout = EWaitLayout; + singular_label = qtn_hs_backup_use_prevented; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnuiengineappif.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnuiengineappif.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnuiengineappif.cpp Wed May 12 13:12:59 2010 +0300 @@ -197,16 +197,6 @@ } // ----------------------------------------------------------------------------- -// TXnUiEngineAppIf::ActivateViewL -// Activate a view -// ----------------------------------------------------------------------------- -// -EXPORT_C void TXnUiEngineAppIf::ActivateViewL( CXnNodeAppIf& aViewNode ) - { - iUiEngine->ActivateViewL( aViewNode.Node() ); - } - -// ----------------------------------------------------------------------------- // TXnUiEngineAppIf::ActiveView // Return the active view // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp Wed May 12 13:12:59 2010 +0300 @@ -22,6 +22,7 @@ #include #include #include +#include // User includes #include "xnuiengine.h" @@ -35,7 +36,6 @@ #include "xnpopupcontroladapter.h" #include "xnviewcontroladapter.h" #include "xnviewdata.h" -#include "xnrootdata.h" #include "xnnodebreadthfirstiterator.h" #include "xntype.h" #include "xnnodepluginif.h" @@ -51,13 +51,13 @@ #include "xndomdocument.h" #include "xndomnode.h" #include "xneditmode.h" -#include "xnhittest.h" #include "xnnode.h" #include "xnpanic.h" #include "xneffectmanager.h" #include "xneditor.h" #include "xnbackgroundmanager.h" #include "xntexteditor.h" +#include "xnrootdata.h" #ifdef _XN_PERFORMANCE_TEST_ #include "xntimemon.h" @@ -8066,9 +8066,7 @@ void CXnUiEngineImpl::ConstructL() { iEditMode = CXnEditMode::NewL( *iUiEngine ); - - iHitTest = CXnHitTest::NewL(); - + iCurrentGraphicsDevice = CCoeEnv::Static()->ScreenDevice(); // Update the units here, even the refence client rect is only a quess. @@ -8103,10 +8101,14 @@ iViewManager.RemoveObserver( *this ); delete iEditMode; - delete iHitTest; iFocusCandidateList.Reset(); - iRedrawRegions.ResetAndDestroy(); + + if ( iRedrawRegions.Count() ) + { + iRedrawRegions.ResetAndDestroy(); + } + iDirtyList.Reset(); } @@ -8285,7 +8287,15 @@ { AddToRedrawListL( node, rect ); - adapter->SetRect( rect ); + // popup calculates its position based on _s60-position-hint property + if( node->Type()->Type() == KPopUpNodeName ) + { + adapter->DoHandlePropertyChangeL(); + } + else + { + adapter->SetRect( rect ); + } CXnProperty* prop = node->GetPropertyL( XnPropertyNames::common::KSizeAware ); if ( prop && prop->StringValue() == @@ -8327,6 +8337,8 @@ TraceTreeL(iCurrentView ); #endif + __PRINTS("*** CXnUiEngineImpl::RenderUIL ***"); + for( TInt i=0; iiControl; @@ -8337,7 +8349,9 @@ // Mark tree rendered iCurrentView->SetRenderedL(); // Error occured during dirty set, redraw whole window - control->DrawNow(); + control->DrawNow(); + + __PRINTS("* CXnUiEngineImpl::RenderUIL - redraw region error -> full redraw ***"); } else { @@ -8352,7 +8366,10 @@ // Make bounding rect over the dirty areas TRect boundingRect( redrawRegion.BoundingRect() ); - control->DrawNow( boundingRect ); + __PRINT( __DBG_FORMAT( "* CXnUiEngineImpl::RenderUIL - redrawing bounding rect iTl.iX: %d, iTl.iY: %d, iBr.iX: %d, iBr.iY: %d" ), + boundingRect.iTl.iX, boundingRect.iTl.iY, boundingRect.iBr.iX, boundingRect.iBr.iY ); + + control->DrawNow( boundingRect ); } else { @@ -8360,12 +8377,20 @@ { // Draw every dirty area separately TRect redrawRect( redrawRegion[i] ); - + + __PRINT( __DBG_FORMAT( "* CXnUiEngineImpl::RenderUIL - redrawing rect iTl.iX: %d, iTl.iY: %d, iBr.iX: %d, iBr.iY: %d" ), + redrawRect.iTl.iX, redrawRect.iTl.iY, redrawRect.iBr.iX, redrawRect.iBr.iY ); + control->DrawNow( redrawRect ); } } } + else + { + __PRINTS("* CXnUiEngineImpl::RenderUIL - nothing to redraw ***"); + } } + redrawRegion.Clear(); } @@ -8374,6 +8399,8 @@ iLayoutControl &= ~XnLayoutControl::ERenderUI; iAppUiAdapter.EffectManager()->UiRendered(); + + __PRINTS("*** CXnUiEngineImpl::RenderUIL - done ***"); } // ----------------------------------------------------------------------------- @@ -8525,7 +8552,7 @@ return array; } - + // ----------------------------------------------------------------------------- // CXnUiEngineImpl::FindContentSourceNodesL() // ----------------------------------------------------------------------------- @@ -8584,7 +8611,7 @@ return array; } - + // ----------------------------------------------------------------------------- // CXnUiEngineImpl::Resources() // ----------------------------------------------------------------------------- @@ -9070,6 +9097,9 @@ return; } + // remove focus + iAppUiAdapter.HideFocus(); + // Update client rect SetClientRectL( iAppUiAdapter.ClientRect(), EFalse ); @@ -9087,7 +9117,13 @@ RootNode()->SetDirtyL(); ReportScreenDeviceChangeL(); + + iViewManager.OrientationChanged(); + if ( !iControlAdapterList ) + { + iControlAdapterList = &iViewManager.Controls(); + } for ( TInt i = 0; i < iControlAdapterList->Count(); i++ ) { CXnControlAdapter* adapter( ( *iControlAdapterList )[i] ); @@ -9402,6 +9438,10 @@ { // Force relayout and redraw from current view iDirtyList.Reset(); + if ( !iCurrentView ) + { + iCurrentView = iViewManager.ViewNode(); + } iDirtyList.AppendL( iCurrentView ); TXnDirtyRegion* dirtyRegion = FindDirtyRegionL( *iCurrentView ); if( dirtyRegion ) @@ -9516,7 +9556,7 @@ UpdateInternalUnits( iHorizontalUnitInPixels, iVerticalUnitInPixels, iClientRect ); - + if ( aDrawNow ) { RootNode()->SetDirtyL(); @@ -9635,15 +9675,6 @@ } // ----------------------------------------------------------------------------- -// CXnUiEngineImpl::HitTest -// ----------------------------------------------------------------------------- -// -CXnHitTest& CXnUiEngineImpl::HitTest() const - { - return *iHitTest; - } - -// ----------------------------------------------------------------------------- // CXnUiEngineImpl::GetThemeResource // ----------------------------------------------------------------------------- // @@ -9848,11 +9879,15 @@ // ----------------------------------------------------------------------------- void CXnUiEngineImpl::HandlePartialTouchInputL( CXnNode& aNode, TBool aEnable ) { + CXnNode* editorplugin = FindPlugin( aNode ); + if ( !editorplugin ) + { + User::Leave( KErrNotFound ); + } + DisableRenderUiLC(); - CXnNode* editorplugin = FindPlugin( aNode ); - - if ( aEnable ) - + + if ( aEnable ) { iSplitScreenState.iPartialScreenOpen = ETrue; iSplitScreenState.iPartialScreenEditorNode = &aNode; @@ -9860,8 +9895,27 @@ // make sure that we always get up event CXnViewControlAdapter* control = static_cast< CXnViewControlAdapter* >( iViewManager.ActiveViewData().ViewNode()->Control() ); - - control->ResetGrabbing(); + + control->ResetGrabbing(); + + // Block progression must be bottom-to-top when partial screen is open + // Previous value needs to be stored first + CXnProperty* prop( + editorplugin->Parent()->GetPropertyL( + XnPropertyNames::style::common::KBlockProgression ) ); + if ( prop ) + { + iSplitScreenState.iPartialScreenBlock = &prop->StringValue(); + } + else + { + iSplitScreenState.iPartialScreenBlock = + &XnPropertyNames::style::common::block_progression::KTB(); + } + + SetPartialScreenBlockProgressionL( + editorplugin->Parent(), + XnPropertyNames::style::common::block_progression::KBT ); // Hide all plugins except the one that contains given editor node RPointerArray< CXnNode >& plugins( *Plugins() ); @@ -9873,13 +9927,6 @@ SetNodeVisibleL(pluginNode, EFalse); } } - - // Block progression must be bottom-to-top when partial screen is open - // Previous value needs to be stored first - StorePartialScreenBlockProgressionL(); - - SetPartialScreenBlockProgressionL( - XnPropertyNames::style::common::block_progression::KBT ); // Hide statuspane iAppUiAdapter.StatusPane()->MakeVisible( EFalse ); @@ -9888,30 +9935,23 @@ else { // Show plugin nodes again - RPointerArray< CXnNode >& plugins( *Plugins() ); + RPointerArray< CXnNode >& plugins( *Plugins() ); for( TInt i=0; iDes()); - delete iSplitScreenState.iPartialScreenBlock; - iSplitScreenState.iPartialScreenBlock = NULL; - } + + SetPartialScreenBlockProgressionL( + editorplugin->Parent(), + *iSplitScreenState.iPartialScreenBlock ); + iSplitScreenState.iPartialScreenBlock = NULL; iSplitScreenState.iPartialScreenEditorNode = NULL; iSplitScreenState.iPartialScreenOpen = EFalse; @@ -10062,52 +10102,23 @@ // ----------------------------------------------------------------------------- // SetPartialScreenBlockProgressionL // ----------------------------------------------------------------------------- -void CXnUiEngineImpl::SetPartialScreenBlockProgressionL( const TDesC8& aBlockProgression ) - { - CXnNode* plugin = FindPlugin( *iSplitScreenState.iPartialScreenEditorNode ); - CXnNode* parent( NULL ); - if( plugin ) - { - parent = plugin->Parent(); - } - - CXnDomStringPool* sp( iUiEngine->ODT()->DomDocument().StringPool()); - if(parent) - { +void CXnUiEngineImpl::SetPartialScreenBlockProgressionL( + CXnNode* aParent, const TDesC8& aBlockProgression ) + { + CXnDomStringPool* sp( iUiEngine->ODT()->DomDocument().StringPool()); + if( aParent && sp ) + { CXnProperty* block_progression = CXnProperty::NewL( - XnPropertyNames::style::common::KBlockProgression, - aBlockProgression, - CXnDomPropertyValue::EString, *sp ); - - CleanupStack::PushL( block_progression ); - parent->SetPropertyL(block_progression); - CleanupStack::Pop( block_progression ); - } - } - -// ----------------------------------------------------------------------------- -// SetPartialScreenBlockProgressionL -// ----------------------------------------------------------------------------- -void CXnUiEngineImpl::StorePartialScreenBlockProgressionL() - { - CXnNode* parent = iSplitScreenState.iPartialScreenEditorNode->Parent(); - - if(parent) - { - CXnProperty* blocProgressionProperty( - parent->GetPropertyL( XnPropertyNames::style::common::KBlockProgression ) ); - - HBufC* blocProgressionValue (blocProgressionProperty->StringValueL()); - CleanupStack::PushL( blocProgressionValue ); - if(iSplitScreenState.iPartialScreenBlock) - { - delete iSplitScreenState.iPartialScreenBlock; - iSplitScreenState.iPartialScreenBlock = NULL; - } - iSplitScreenState.iPartialScreenBlock = - CnvUtfConverter::ConvertFromUnicodeToUtf8L(blocProgressionValue->Des() ); - CleanupStack::PopAndDestroy( blocProgressionValue ); - } + XnPropertyNames::style::common::KBlockProgression, + aBlockProgression, + CXnDomPropertyValue::EString, *sp ); + if ( block_progression ) + { + CleanupStack::PushL( block_progression ); + aParent->SetPropertyL(block_progression); + CleanupStack::Pop( block_progression ); + } + } } // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnuienginepluginif.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnuienginepluginif.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnuienginepluginif.cpp Wed May 12 13:12:59 2010 +0300 @@ -28,7 +28,6 @@ #include "xneditor.h" #include "xnviewdata.h" #include "xndomnode.h" -#include "xnhittest.h" #include "xnpanic.h" // ============================ MEMBER FUNCTIONS =============================== @@ -182,15 +181,6 @@ } // ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::RestorePreviousFocusedNode -// Forwards the call to the ui engine implementation -// ----------------------------------------------------------------------------- -// -EXPORT_C void TXnUiEnginePluginIf::RestorePreviousFocusedNode() - { - } - -// ----------------------------------------------------------------------------- // TXnUiEnginePluginIf::StringPool // Forwards the call to the ui engine implementation // ----------------------------------------------------------------------------- @@ -245,16 +235,6 @@ } // ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::ActivateViewL -// Activate a view -// ----------------------------------------------------------------------------- -// -EXPORT_C void TXnUiEnginePluginIf::ActivateViewL( CXnNodePluginIf& aViewNode ) - { - iUiEngine->ActivateViewL( aViewNode.Node() ); - } - -// ----------------------------------------------------------------------------- // TXnUiEnginePluginIf::ScreenDeviceSize // Get the size of the current screen device // ----------------------------------------------------------------------------- @@ -330,35 +310,8 @@ } // ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::HitRegion -// ----------------------------------------------------------------------------- -// -EXPORT_C CXnControlAdapter* TXnUiEnginePluginIf::HitRegion() const - { - return iUiEngine->HitTest().HitRegion(); - } - -// ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::DeactivateFocusedNodeL -// Deactivates focused node -// ----------------------------------------------------------------------------- +// TXnUiEnginePluginIf::PluginNodeL // -EXPORT_C void TXnUiEnginePluginIf::DeactivateFocusedNodeL() - { - } - -// ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::ShowFocus -// Queries wheter focus is visible -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool TXnUiEnginePluginIf::ShowFocus() - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::PluginNodeL // ----------------------------------------------------------------------------- // EXPORT_C CXnNodePluginIf& TXnUiEnginePluginIf::PluginNodeL( @@ -393,44 +346,6 @@ } // ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::SetFocusVisibleL -// Sets focus visibility of active view -// ----------------------------------------------------------------------------- -// -EXPORT_C void TXnUiEnginePluginIf::SetFocusVisibleL( TBool /*aVisible*/ ) - { - } - -// ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::FocusVisible -// Gets focus visibility of active view -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool TXnUiEnginePluginIf::FocusVisible() - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::EnableSwipeL -// Sets swipe enabled or disabled -// ----------------------------------------------------------------------------- -// -EXPORT_C void TXnUiEnginePluginIf::EnableSwipeL( TBool /*aEnable*/ ) - { - } - -// ----------------------------------------------------------------------------- -// TXnUiEnginePluginIf::SwipeEnabledL -// queries whether swipe is enabled or not -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool TXnUiEnginePluginIf::SwipeEnabledL() - { - return EFalse; - } - -// ----------------------------------------------------------------------------- // TXnUiEnginePluginIf::DisableRenderUiLC // // ----------------------------------------------------------------------------- @@ -461,6 +376,5 @@ return iUiEngine->IsTextEditorActive(); } - // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnviewadapter.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnviewadapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewadapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -56,8 +56,7 @@ // Data types enum { - EIsActivated, - EIsFirstActivation, + EIsActivated, EIsInCall, EIsLightsOn, EIsForeground, @@ -240,9 +239,7 @@ BaseConstructL(); iTimer = CPeriodic::NewL( CActive::EPriorityIdle ); - - iFlags.Set( EIsFirstActivation ); - + // Base class CAknViewAppUi takes ownership of iViewAdapter iAppUiAdapter.AddViewL( this ); iAppUiAdapter.SetDefaultViewL( *this ); @@ -370,6 +367,8 @@ iFlags.Set( EIsActivated ); + // State must be cleared before adding to stack + iEventDispatcher->ClearStateL(); iAppUiAdapter.AddToStackL( *this, iEventDispatcher ); // enable statuspane transparancy @@ -411,38 +410,21 @@ sp->DrawNow(); } - if ( iFlags.IsSet( EIsFirstActivation ) ) - { - // Set the active container - ActivateContainerL( iAppUiAdapter.ViewManager().ActiveViewData() ); - - __TICK( "CXnViewAdapter::DoActivateL - Calling UiActivated" ); - __TIME_MARK( time2 ); + // Set the active container + if ( aCustomMessage == KActivateDefaultView ) + { + __PRINTS( "*** CXnViewAdapter::DoActivateL - activating default container" ); - iFlags.Clear( EIsFirstActivation ); - - iAppUiAdapter.UiActivated(); - - __TIME_ENDMARK( "CXnViewAdapter::DoActivateL - Calling UiActivated", time ); + ActivateDefaultContainerL(); + + iTimer->Cancel(); + iTimer->Start( 1000, 1000, TCallBack( TimerCallback, this ) ); } else { - // Set the active container - if ( aCustomMessage == KActivateDefaultView ) - { - __PRINTS( "*** CXnViewAdapter::DoActivateL - activating default container" ); - - ActivateDefaultContainerL(); - - iTimer->Cancel(); - iTimer->Start( 1000, 1000, TCallBack( TimerCallback, this ) ); - } - else - { - __PRINTS( "*** CXnViewAdapter::DoActivateL - activating container" ); - - ActivateContainerL( viewData ); - } + __PRINTS( "*** CXnViewAdapter::DoActivateL - activating container" ); + + ActivateContainerL( viewData ); } __TIME_ENDMARK( "CXnViewAdapter::DoActivateL, done", time ); @@ -504,23 +486,20 @@ // ----------------------------------------------------------------------------- // void CXnViewAdapter::ActivateContainerL( CXnViewData& aContainer, - TBool aEnterEditState ) - { - if ( !iAppUiAdapter.ViewManager().UiStartupPhaseAllDone() ) + TBool aEnterEditState, TBool aForceActivation ) + { + // Returns if the container remains the same and activation is not forced + // Otherwise the old container is deactivated and the new is activated + if ( iFlags.IsSet( EIsDestructionRunning ) || + ( ( !aForceActivation ) && ( iContainer == &aContainer ) ) ) { return; - } - - if ( iContainer == &aContainer || iFlags.IsSet( EIsDestructionRunning ) ) - { - return; } + // Find previous container and then deactivate it const CXnViewData* previous( iContainer ); - - // Deactivate previous DeactivateContainerL(); - + if ( iFlags.IsClear( EIsActivated ) ) { // Some other view than this in this appui is currently active, @@ -594,17 +573,15 @@ return; } - // Deactivate container even though it hasn't changed to close all popups - // and other windows - DeactivateContainerL(); - // first view is default CXnViewData* viewData = static_cast( views[0] ); if ( viewData ) { EnterEditStateL( *viewData, aEnterEditState ); - ActivateContainerL( *viewData, aEnterEditState ); + // Deactivate container even though it hasn't changed to close all + // popups and other windows + ActivateContainerL( *viewData, aEnterEditState, ETrue ); } } diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnviewcontroladapter.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnviewcontroladapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewcontroladapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -59,9 +59,9 @@ // void CXnViewControlAdapter::ConstructL( CXnNodePluginIf& aNode ) { + CreateWindowL(); + CXnControlAdapter::ConstructL( aNode ); - - CreateWindowL(); if( Window().SetTransparencyAlphaChannel() == KErrNone ) { diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp Wed May 12 13:12:59 2010 +0300 @@ -34,7 +34,7 @@ #include "debug.h" // Constants -const TInt KLoadDelay( 100000 ); +const TInt KLoadDelay( 10000 ); const TInt KInterval( 10000 ); // ============================ LOCAL FUNCTIONS ================================ @@ -489,6 +489,8 @@ CXnViewData* self = static_cast< CXnViewData* >( aAny ); + CXnAppUiAdapter* appui = static_cast< CXnAppUiAdapter* >( iAvkonAppUi ); + RPointerArray< CXnPluginData >& plugins( self->PluginData() ); for ( TInt i = self->iLoadIndex; i < plugins.Count(); i++ ) @@ -521,11 +523,9 @@ if( ret != KErrNone ) { - self->iManager.UnloadWidgetFromPluginL( *plugin, ETrue ); - + self->iManager.UnloadWidgetFromPluginL( *plugin, ETrue ); self->iShowContentRemoved = ETrue; - } - + } } else { @@ -542,14 +542,17 @@ { CXnNodeAppIf& plugin( self->iContentSourceNodes[i]->AppIfL() ); - self->iManager.AppUiAdapter().LoadPublisher( plugin, reason ); + appui->LoadPublisher( plugin, reason ); } if ( self->iShowContentRemoved ) { self->ShowContentRemovedError(); self->iShowContentRemoved = EFalse; - } + } + + // Fire UI ready blindly here, it will be handled in AiFw if needed + appui->HandleUiReadyEventL(); } __PRINTS( "*** CXnViewData::DoLoadPublishersL - done" ); diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp Wed May 12 13:12:59 2010 +0300 @@ -27,6 +27,7 @@ #include #include #include +#include // User includes #include "xnapplication.h" @@ -63,7 +64,8 @@ const TInt KPSCategoryUid( 0x200286E3 ); const TInt KPSCrashCountKey( 1 ); const TInt KStabilityInterval( 60000000 ); // 1 minute -const TInt KCrashRestoreThreshold( 3 ); +const TInt KCrashRestoreDefaultThreshold( 3 ); +const TInt KCrashRestoreAllTreshold( 4 ); // ============================ LOCAL FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -276,9 +278,7 @@ // ----------------------------------------------------------------------------- // CXnViewManager::~CXnViewManager() - { - delete iUiStartupPhase; - + { delete iStabilityTimer; iObservers.Reset(); @@ -303,33 +303,6 @@ } // ----------------------------------------------------------------------------- -// CXnViewManager::PropertyChangedL() -// -// ----------------------------------------------------------------------------- -// -void CXnViewManager::PropertyChangedL( const TUint32 aKey, const TInt aValue ) - { - if ( aKey == KPSStartupUiPhase && aValue == EStartupUiPhaseAllDone ) - { - iUiStartupPhaseAllDone = ETrue; - - iAppUiAdapter.ViewAdapter().ActivateContainerL( ActiveViewData() ); - } - - iUiStartupPhaseAllDone = ETrue; - } - -// ----------------------------------------------------------------------------- -// CXnViewManager::UiStartupPhaseAllDone() -// -// ----------------------------------------------------------------------------- -// -TBool CXnViewManager::UiStartupPhaseAllDone() const - { - return iUiStartupPhaseAllDone; - } - -// ----------------------------------------------------------------------------- // CXnViewManager::ConstructL() // 2nd phase constructor // ----------------------------------------------------------------------------- @@ -353,28 +326,9 @@ iComposer = CXnComposer::NewL( *iHspsWrapper ); - // Robustness checks. - TInt crashCount = 0; - RProperty::Get( TUid::Uid( KPSCategoryUid ), - KPSCrashCountKey, - crashCount ); - - if( crashCount >= KCrashRestoreThreshold ) - { - iHspsWrapper->RestoreRootL(); - ResetCrashCount(); - ShowErrorNoteL( R_QTN_HS_ERROR_WIDGETS_REMOVED ); - } - else if( crashCount > 0 ) - { - // Start stability timer to ensure that - // if system is stabile at least KStabilityInterval - // then crash count is reset to 0. - iStabilityTimer = CPeriodic::NewL( CActive::EPriorityStandard ); - iStabilityTimer->Start( KStabilityInterval, - KStabilityInterval, - TCallBack( SystemStabileTimerCallback, this ) ); - } + iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); + + DoRobustnessCheckL(); } // ----------------------------------------------------------------------------- @@ -394,14 +348,8 @@ CleanupStack::PopAndDestroy(); // DisableRenderUiLC(); - // Determine UI startup phase - delete iUiStartupPhase; - iUiStartupPhase = NULL; - - iUiStartupPhaseAllDone = EFalse; - - iUiStartupPhase = CXnPropertySubscriber::NewL( - KPSUidStartup, KPSStartupUiPhase, *this ); + // Activate initial view already here to get publishers loaded + ActiveViewData().SetActive( ETrue ); } // ----------------------------------------------------------------------------- @@ -921,7 +869,6 @@ if ( next.Load() == KErrNoMemory ) { next.ShowOutOfMemError(); - return; } } @@ -940,21 +887,42 @@ TInt ret( GfxTransEffect::BeginGroup() ); - CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); + CFbsBitmap* currentBg( ActiveViewData().WallpaperImage() ); + CFbsBitmap* nextBg( next.WallpaperImage() ); - GfxTransEffect::Begin( bg, KGfxControlActionAppear ); - - GfxTransEffect::SetDemarcation( bg, bg->Position() ); - GfxTransEffect::End( bg ); + if ( currentBg || nextBg ) + { + CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); + + if ( !currentBg && nextBg ) + { + GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear ); + } + else + { + GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear ); + } + + GfxTransEffect::SetDemarcation( bg, bg->Position() ); + GfxTransEffect::End( bg ); + } - GfxTransEffect::Begin( thisView, KGfxControlActionDisappear ); + if ( iIsLandscapeOrientation ) + { + GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc ); + GfxTransEffect::Begin( nextView, KGfxControlActionAppearLsc ); + } + else + { + GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt ); + GfxTransEffect::Begin( nextView, KGfxControlActionAppearPrt ); + } - iAppUiAdapter.ViewAdapter().ActivateContainerL( next ); + TRAP_IGNORE( iAppUiAdapter.ViewAdapter().ActivateContainerL( next ) ); GfxTransEffect::SetDemarcation( thisView, thisView->Position() ); GfxTransEffect::End( thisView ); - - GfxTransEffect::Begin( nextView, KGfxControlActionAppear ); + GfxTransEffect::SetDemarcation( nextView, nextView->Position() ); GfxTransEffect::End( nextView ); @@ -979,7 +947,6 @@ if ( prev.Load() == KErrNoMemory ) { prev.ShowOutOfMemError(); - return; } } @@ -997,23 +964,43 @@ GfxTransEffect::Register( prevView, KGfxContextActivatePrevView ); TInt ret( GfxTransEffect::BeginGroup() ); - - CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); + + CFbsBitmap* currentBg( ActiveViewData().WallpaperImage() ); + CFbsBitmap* prevBg( prev.WallpaperImage() ); - GfxTransEffect::Begin( bg, KGfxControlActionAppear ); - - GfxTransEffect::SetDemarcation( bg, bg->Position() ); - GfxTransEffect::End( bg ); + if ( currentBg || prevBg ) + { + CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); + + if ( !currentBg && prevBg ) + { + GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear ); + } + else + { + GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear ); + } + + GfxTransEffect::SetDemarcation( bg, bg->Position() ); + GfxTransEffect::End( bg ); + } - GfxTransEffect::Begin( thisView, KGfxControlActionDisappear ); + if ( iIsLandscapeOrientation ) + { + GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc ); + GfxTransEffect::Begin( prevView, KGfxControlActionAppearLsc ); + } + else + { + GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt ); + GfxTransEffect::Begin( prevView, KGfxControlActionAppearPrt ); + } - iAppUiAdapter.ViewAdapter().ActivateContainerL( prev ); + TRAP_IGNORE( iAppUiAdapter.ViewAdapter().ActivateContainerL( prev ) ); GfxTransEffect::SetDemarcation( thisView, thisView->Position() ); GfxTransEffect::End( thisView ); - - GfxTransEffect::Begin( prevView, KGfxControlActionAppear ); - + GfxTransEffect::SetDemarcation( prevView, prevView->Position() ); GfxTransEffect::End( prevView ); @@ -1234,7 +1221,11 @@ retval = iHspsWrapper->RemovePluginL( view->PluginId() ); // Notify observers of view list change - NotifyViewRemovalL( *view ); + TRAPD( err, NotifyViewRemovalL( *view ) ); + if ( err != KErrNone ) + { + // ignored + } iRootData->DestroyViewData( view ); @@ -1307,7 +1298,11 @@ iHspsWrapper->RemovePluginL( view->PluginId() ); // Notify observers of view list change - NotifyViewRemovalL( *view ); + TRAPD( err, NotifyViewRemovalL( *view ) ); + if ( err != KErrNone ) + { + // ignored + } iRootData->DestroyViewData( view ); @@ -1773,17 +1768,58 @@ // ----------------------------------------------------------------------------- // CXnViewManager::ShowErrorNoteL // ----------------------------------------------------------------------------- -void CXnViewManager::ShowErrorNoteL( const TInt aResourceId ) +void CXnViewManager::ShowErrorNoteL() { - HBufC* msg( StringLoader::LoadLC( aResourceId ) ); - - CAknErrorNote* note = new ( ELeave ) CAknErrorNote; - CleanupStack::PushL( note ); + CAknQueryDialog* query = CAknQueryDialog::NewL(); + query->PrepareLC( R_HS_CONTENT_REMOVED_VIEW ); + + HBufC* queryText( StringLoader::LoadLC( R_HS_ERROR_CONTENT_REMOVED ) ); + query->SetPromptL( queryText->Des() ); + CleanupStack::PopAndDestroy( queryText ); + + query->RunLD(); + } + +// ----------------------------------------------------------------------------- +// CXnViewManager::DoRobustnessCheckL +// ----------------------------------------------------------------------------- +void CXnViewManager::DoRobustnessCheckL() + { + TInt crashCount = 0; + RProperty::Get( TUid::Uid( KPSCategoryUid ), + KPSCrashCountKey, + crashCount ); - note->ExecuteLD( *msg ); + if( crashCount == KCrashRestoreDefaultThreshold ) + { + TInt err = iHspsWrapper->RestoreDefaultConfL(); + ShowErrorNoteL(); + } + else if( crashCount >= KCrashRestoreAllTreshold ) + { + TInt err = iHspsWrapper->RestoreRootL(); + ResetCrashCount(); + return; + } - CleanupStack::Pop( note ); - CleanupStack::PopAndDestroy( msg ); + if( crashCount > 0 ) + { + // Start stability timer to ensure that + // if system is stabile at least KStabilityInterval + // then crash count is reset to 0. + iStabilityTimer = CPeriodic::NewL( CActive::EPriorityStandard ); + iStabilityTimer->Start( KStabilityInterval, + KStabilityInterval, + TCallBack( SystemStabileTimerCallback, this ) ); + } + } + +// ----------------------------------------------------------------------------- +// CXnViewManager::OrientationChanged +// ----------------------------------------------------------------------------- +void CXnViewManager::OrientationChanged() + { + iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); } // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnwaitdialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnwaitdialog.cpp Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: +* implementation of wait dialog that doesn't consume key events. +* +*/ + +// System includes + +// User includes +#include "xnwaitdialog.h" + +// CONSTANTS + +// ============================ LOCAL FUNCTIONS ================================ + +// ============================ MEMBER FUNCTIONS =============================== + +// --------------------------------------------------------------------------- +// CXnWaitDialog::CXnWaitDialog +// --------------------------------------------------------------------------- +// +CXnWaitDialog::CXnWaitDialog( CEikDialog** aSelfPtr, + TBool aVisibilityDelayOff ) + : CAknWaitDialog( aSelfPtr, aVisibilityDelayOff ) + { + } + +// --------------------------------------------------------------------------- +// CXnWaitDialog::~CXnWaitDialog +// --------------------------------------------------------------------------- +// +CXnWaitDialog::~CXnWaitDialog() + { + } + +// --------------------------------------------------------------------------- +// CXnWaitDialog::OfferKeyEventL +// --------------------------------------------------------------------------- +// +TKeyResponse CXnWaitDialog::OfferKeyEventL( + const TKeyEvent& /*aKeyEvent*/, + TEventCode /*aType*/ ) + { + return EKeyWasConsumed; // consume all keys while open + } + +// End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.cpp Wed May 12 13:12:59 2010 +0300 @@ -17,6 +17,7 @@ // System includes #include +#include #include #include #include @@ -25,6 +26,7 @@ #include #include #include +#include #include // User includes @@ -37,6 +39,7 @@ #include "xnbackgroundmanager.h" #include "xneffectmanager.h" #include "xnviewmanager.h" +#include "xnspbgcleaner.h" // Constants _LIT( KResourceDrive, "z:" ); @@ -45,6 +48,8 @@ _LIT8( KMulti, "multi" ); const TInt KFileArrayGranularity( 6 ); +const TInt KShortDelay = 1000; +const TInt KLongDelay = 1000 * 1000; // ============================ MEMBER FUNCTIONS =============================== @@ -77,6 +82,7 @@ BaseConstructL( R_WALLPAPER_VIEW ); iTimer = CPeriodic::NewL( CActive::EPriorityIdle ); + iViewState = EIdle; } // ----------------------------------------------------------------------------- @@ -97,10 +103,16 @@ // ----------------------------------------------------------------------------- // CXnWallpaperView::~CXnWallpaperView() - { + { + if ( iWaitDialog ) + { + TRAP_IGNORE( iWaitDialog->ProcessFinishedL(); ); + } + CCoeEnv::Static()->DeleteResourceFile( iResourceOffset ); - delete iContainer; + delete iContainer; + delete iXnSpBgCleaner; delete iTimer; } @@ -123,15 +135,22 @@ // switch layout CEikStatusPane* sp( iAppUi.StatusPane() ); + // setup status pane layout sp->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); + // apply changes sp->ApplyCurrentSettingsL(); - // disable transparancy - if ( sp->IsTransparent() ) + sp->EnableTransparent( EFalse ); + + // create background cleaner for sp + if ( !iXnSpBgCleaner ) { - sp->EnableTransparent( EFalse ); + iXnSpBgCleaner = CXnSpBgCleaner::NewL(); + AppUi()->AddToStackL( *this, iXnSpBgCleaner ); } - + + // update sp + iXnSpBgCleaner->DrawNow(); sp->DrawNow(); // update cba @@ -152,20 +171,17 @@ iContainer->DrawNow(); } - iData.iAppUid = aPrevViewId.iAppUid; - iData.iViewUid = aPrevViewId.iViewUid; - iData.iMultiple = EFalse; - - if ( aCustomMessage == KMulti ) - { - iData.iMultiple = ETrue; - } + iPreviousViewUid = aPrevViewId; + iMultiple = ( (aCustomMessage == KMulti) ? ETrue : EFalse ); + + iAppUi.EffectManager()->UiRendered(); + + iWaitDialog = NULL; + iViewState = EImageSelection; // Run image selection dialog asynchronously iTimer->Cancel(); - iTimer->Start( 0, 1000, TCallBack( TimerCallbackL, this ) ); - - iAppUi.EffectManager()->UiRendered(); + iTimer->Start( KShortDelay, KLongDelay, TCallBack( TimerCallback, this ) ); } // ----------------------------------------------------------------------------- @@ -174,6 +190,13 @@ // void CXnWallpaperView::DoDeactivate() { + iTimer->Cancel(); // cancel timer + + if ( iWaitDialog ) + { + TRAP_IGNORE( iWaitDialog->ProcessFinishedL(); ); + } + if ( iContainer ) { iAppUi.RemoveFromStack( iContainer ); @@ -181,6 +204,14 @@ iContainer = NULL; } + if ( iXnSpBgCleaner ) + { + AppUi()->RemoveFromStack( iXnSpBgCleaner ); + delete iXnSpBgCleaner; + iXnSpBgCleaner = NULL; + } + + iViewState = EIdle; iAppUi.EffectManager()->UiRendered(); } @@ -188,54 +219,122 @@ // CXnWallpaperView::TimerCallback // ----------------------------------------------------------------------------- // -TInt CXnWallpaperView::TimerCallbackL( TAny *aPtr ) +TInt CXnWallpaperView::TimerCallback( TAny *aPtr ) { CXnWallpaperView* self = reinterpret_cast< CXnWallpaperView* >( aPtr ); - self->iTimer->Cancel(); - - CDesCArrayFlat* files = - new (ELeave) CDesCArrayFlat( KFileArrayGranularity ); - CleanupStack::PushL( files ); - - TInt err( KErrNone ); - TBool selected( EFalse ); - - TXnWallpaperViewData& data( self->iData ); - - CXnBackgroundManager& bg( self->iAppUi.ViewAdapter().BgManager() ); - - TRAPD( fetch, selected = MGFetch::RunL( *files, EImageFile, data.iMultiple ) ); - - if ( fetch == KErrNone && selected && files->MdcaCount() > 0 ) + TRAPD( err, self->DoHandleCallBackL(); ); + if ( KErrNone != err ) { - // set wallpaper - if( files->MdcaCount() == 1 ) - { - err = bg.AddWallpaperL( files->MdcaPoint( 0 ) ); - } + // activate default view in case of any error + TVwsViewId defaultView; + if ( self->iAppUi.GetDefaultViewId( defaultView ) != KErrNone ) + { + // use default if we got wrong viewid as previous view + defaultView.iAppUid = self->iAppUi.Application()->AppDllUid(); + defaultView.iViewUid = TUid::Uid( 1 ); + } + // try activating default view + TRAP_IGNORE( self->iAppUi.ActivateViewL( defaultView ); ); } - - CleanupStack::PopAndDestroy( files ); - - if ( err == KErrCACorruptContent ) - { - //load message text - HBufC* msg = StringLoader::LoadLC( R_QTN_HS_CORRUPTED_IMAGE_NOTE ); - //ensure that dialog will not disappear immediatelly - by const. param - CAknErrorNote* dialog = new (ELeave) CAknErrorNote( true ); - CleanupStack::PushL( dialog ); - //show dialog to user and destroy it - dialog->ExecuteLD( *msg ); - CleanupStack::Pop( dialog ); - CleanupStack::PopAndDestroy( msg ); - } - - self->iAppUi.EffectManager()->BeginFullscreenEffectL( - KGfxContextCloseWallpaperView, self->iAppUi.ViewManager().ActiveViewData() ); - - self->iAppUi.ActivateViewL( TVwsViewId( data.iAppUid, data.iViewUid ) ); - return KErrNone; } +// ----------------------------------------------------------------------------- +// CXnWallpaperView::DoHandleCallBackL +// ----------------------------------------------------------------------------- +// +void CXnWallpaperView::DoHandleCallBackL() + { + iTimer->Cancel(); + + if ( iViewState == EImageSelection ) + { + CDesCArrayFlat* files = + new (ELeave) CDesCArrayFlat( KFileArrayGranularity ); + CleanupStack::PushL( files ); + + TInt err( KErrNone ); + TBool selected( EFalse ); + + CXnBackgroundManager& bg( iAppUi.ViewAdapter().BgManager() ); + + selected = MGFetch::RunL( *files, EImageFile, iMultiple ); + + if ( selected && files->MdcaCount() > 0 ) + { + // set wallpaper + if( files->MdcaCount() == 1 ) + { + TFileName fileName( files->MdcaPoint( 0 ) ); + RFs& fs = CEikonEnv::Static()->FsSession(); + if ( BaflUtils::FileExists( fs, fileName ) ) + { + // if wallpaper adding will take more than 1,5 sec waitdlg will appear + iWaitDialog = new( ELeave ) CAknWaitDialog( + reinterpret_cast( &iWaitDialog ), EFalse ); + iWaitDialog->ExecuteLD( R_CHANGE_WALLPAPER_WAIT_DIALOG ); + + // add wallpaper + err = bg.AddWallpaperL( fileName ); + + // notify waitdlg we're done. + iWaitDialog->ProcessFinishedL(); + // ProcessFinishedL() will NULL iWaitDialog + } + } + } + + CleanupStack::PopAndDestroy( files ); + + if( err == KErrTooBig || err == KErrNoMemory ) + { + ShowErrorDialogL( R_QTN_HS_TOO_BIG_IMAGE_NOTE ); + } + else if( err == KErrCancel || err == KErrCouldNotConnect ) + { + // Ignore these. + } + else if( err != KErrNone ) + { + ShowErrorDialogL( R_QTN_HS_CORRUPTED_IMAGE_NOTE ); + } + + // restart timer to deactivate view. View activation fails if + // any dialog was shown just before calling iAppUi.ActivateViewL + // specially when theme effects are on. + iViewState = EViewDeactivation; + iTimer->Start( KLongDelay, KLongDelay, TCallBack( TimerCallback, this ) ); + } + else if ( iViewState == EViewDeactivation ) + { + iAppUi.EffectManager()->BeginFullscreenEffectL( + KGfxContextCloseWallpaperView, + iAppUi.ViewManager().ActiveViewData() ); + iAppUi.ActivateViewL( iPreviousViewUid ); + } + else + { + iViewState = EIdle; + User::Leave( KErrUnknown ); + } + } + +// ----------------------------------------------------------------------------- +// CXnWallpaperView::ShowErrorDialogL +// ----------------------------------------------------------------------------- +// +void CXnWallpaperView::ShowErrorDialogL( const TInt aResourceId ) + { + //load message text + HBufC* msg = StringLoader::LoadLC( aResourceId ); + //ensure that dialog will not disappear immediatelly - by const. param + CAknErrorNote* dialog = new (ELeave) CAknErrorNote( true ); + CleanupStack::PushL( dialog ); + //show dialog to user and destroy it + dialog->ExecuteLD( *msg ); + CleanupStack::Pop( dialog ); + CleanupStack::PopAndDestroy( msg ); + } + + // End of File diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.rss --- a/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.rss Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.rss Wed May 12 13:12:59 2010 +0300 @@ -54,4 +54,39 @@ buf = qtn_hs_corrupted_image_note; } +// ---------------------------------------------------- +// r_qtn_hs_too_big_image_note +// +// ---------------------------------------------------- +// +RESOURCE TBUF r_qtn_hs_too_big_image_note + { + buf = qtn_hs_too_big_image_note; + } + +// ---------------------------------------------------- +// r_change_wallpaper_wait_dialog +// +// ---------------------------------------------------- +// +RESOURCE DIALOG r_change_wallpaper_wait_dialog + { + flags = EAknWaitNoteFlags; + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = EGeneralNote; + control= AVKON_NOTE + { + layout = EWaitLayout; + singular_label = qtn_gen_note_processing; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnwidgetextensionadapter.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnwidgetextensionadapter.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnwidgetextensionadapter.cpp Wed May 12 13:12:59 2010 +0300 @@ -19,16 +19,16 @@ #include #include #include +#include +#include +#include // User includes #include "xnwidgetextensionadapter.h" #include "xncontroladapter.h" - #include "xncomponentnodeimpl.h" #include "xncomponent.h" - #include "xnuiengine.h" -#include "xnhittest.h" #include "xnnode.h" #include "xnnodepluginif.h" @@ -46,9 +46,6 @@ #include "xnviewdata.h" #include "xnplugindata.h" -#include -#include - // Constants _LIT8( KPopup, "popup" ); _LIT8( KPositionHint, "_s60-position-hint" ); @@ -91,6 +88,20 @@ } GfxTransEffect::Deregister( this ); } +// ----------------------------------------------------------------------------- +// CXnWidgetExtensionAdapter::HandleScreenDeviceChangedL +// +// ----------------------------------------------------------------------------- +// +void CXnWidgetExtensionAdapter::HandleScreenDeviceChangedL() + { + if( IsVisible() ) + { + CCoeControl::MakeVisible( EFalse ); + } + CXnControlAdapter::HandleScreenDeviceChangedL(); + + } // ----------------------------------------------------------------------------- // CXnWidgetExtensionAdapter::CXnWidgetExtensionAdapter @@ -201,60 +212,9 @@ if ( aVisible && iPopup ) { - // read position-hint property and set-up its variable - CXnProperty* positionHintProp = NULL; - TRAP_IGNORE( positionHintProp = iNode.Node().GetPropertyL( KPositionHint ) ); - - if ( positionHintProp ) - { - const TDesC8& displayHintVal = positionHintProp->StringValue(); - - if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KAboveLeft ) - { - iPositionHint = EAboveLeft; - } - else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KAboveRight ) - { - iPositionHint = EAboveRight; - } - else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KBelowLeft ) - { - iPositionHint = EBelowLeft; - } - else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KBelowRight ) - { - iPositionHint = EBelowRight; - } - else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KRight ) - { - iPositionHint = ERight; - } - else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KLeft ) - { - iPositionHint = ELeft; - } - else - { - // if the value if of unknown type, use default one - if ( AknLayoutUtils::LayoutMirrored() ) - { - iPositionHint = EAboveRight; - } - else - { - iPositionHint = EAboveLeft; - } - } - - if ( iPositionHint != ENone ) - { - // the popup is going visible and position-hind is available - // calculate its position - CalculatePosition(); - } - } + ChangePopupPosition(); } - + TBool effectStarted = EFalse; if ( iAppUiAdapter->IsForeground() ) { @@ -359,10 +319,88 @@ // void CXnWidgetExtensionAdapter::Draw( const TRect& aRect ) const { + SystemGc().Clear( aRect ); CXnControlAdapter::Draw( aRect ); } // ----------------------------------------------------------------------------- +// CXnWidgetExtensionAdapter::DoHandlePropertyChangeL +// +// ----------------------------------------------------------------------------- +// +void CXnWidgetExtensionAdapter::DoHandlePropertyChangeL( CXnProperty* /*aProperty*/ ) + { + if( iNode.Node().IsLaidOut() && IsVisible() ) + { + ChangePopupPosition(); + } + } + +// ----------------------------------------------------------------------------- +// CXnWidgetExtensionAdapter::ChangePopupPosition +// +// ----------------------------------------------------------------------------- +// +void CXnWidgetExtensionAdapter::ChangePopupPosition() + { + if ( iPopup ) + { + // read position-hint property and set-up its variable + CXnProperty* positionHintProp = NULL; + TRAP_IGNORE( positionHintProp = iNode.Node().GetPropertyL( KPositionHint ) ); + + if ( positionHintProp ) + { + const TDesC8& displayHintVal = positionHintProp->StringValue(); + + if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KAboveLeft ) + { + iPositionHint = EAboveLeft; + } + else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KAboveRight ) + { + iPositionHint = EAboveRight; + } + else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KBelowLeft ) + { + iPositionHint = EBelowLeft; + } + else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KBelowRight ) + { + iPositionHint = EBelowRight; + } + else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KRight ) + { + iPositionHint = ERight; + } + else if ( displayHintVal == XnPropertyNames::tooltip::positionhint::KLeft ) + { + iPositionHint = ELeft; + } + else + { + // if the value if of unknown type, use default one + if ( AknLayoutUtils::LayoutMirrored() ) + { + iPositionHint = EAboveRight; + } + else + { + iPositionHint = EAboveLeft; + } + } + + if ( iPositionHint != ENone ) + { + // the popup is going visible and position-hind is available + // calculate its position + CalculatePosition(); + } + } + } + } + +// ----------------------------------------------------------------------------- // CalculatePosition // This is used only for popup element with position hint // ----------------------------------------------------------------------------- @@ -371,8 +409,8 @@ // widget's rectangle TRect controlRect; - // get popup's window size - TRect popupRect = this->Rect(); + // get popup's size. + TSize popupSize = iNode.BorderRect().Size(); TRect clientRect = static_cast( *iAppUiAdapter ).ClientRect(); @@ -420,16 +458,16 @@ // if this position does not fit the screen, // and if below left is more suitable, use it - if ( spaceAbove < popupRect.Height() && spaceBelow > spaceAbove ) + if ( spaceAbove < popupSize.iHeight && spaceBelow > spaceAbove ) { rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iBr.iY ), - TPoint( controlRect.iTl.iX + popupRect.Width(), controlRect.iBr.iY + popupRect.Height() ) ); + TPoint( controlRect.iTl.iX + popupSize.iWidth, controlRect.iBr.iY + popupSize.iHeight ) ); } else { // use the above-left position - rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iTl.iY - popupRect.Height() ), - TPoint( controlRect.iTl.iX + popupRect.Width(), controlRect.iTl.iY ) ); + rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iTl.iY - popupSize.iHeight ), + TPoint( controlRect.iTl.iX + popupSize.iWidth, controlRect.iTl.iY ) ); } break; @@ -438,15 +476,15 @@ // if this position does not fit the screen, // and if below right is more suitable, use it - if ( spaceAbove < popupRect.Height() && spaceBelow > spaceAbove ) + if ( spaceAbove < popupSize.iHeight && spaceBelow > spaceAbove ) { - rect = TRect( TPoint( controlRect.iBr.iX - popupRect.Width(), controlRect.iBr.iY ), - TPoint( controlRect.iBr.iX, controlRect.iBr.iY + popupRect.Height() ) ); + rect = TRect( TPoint( controlRect.iBr.iX - popupSize.iWidth, controlRect.iBr.iY ), + TPoint( controlRect.iBr.iX, controlRect.iBr.iY + popupSize.iHeight ) ); } else { // use the above-right position - rect = TRect( TPoint( controlRect.iBr.iX - popupRect.Width(), controlRect.iTl.iY - popupRect.Height() ), + rect = TRect( TPoint( controlRect.iBr.iX - popupSize.iWidth, controlRect.iTl.iY - popupSize.iHeight ), TPoint( controlRect.iBr.iX, controlRect.iTl.iY ) ); } break; @@ -455,16 +493,16 @@ // if this position does not fit the screen, // and if above left is more suitable, use it - if ( spaceBelow < popupRect.Height() && spaceBelow < spaceAbove ) + if ( spaceBelow < popupSize.iHeight && spaceBelow < spaceAbove ) { - rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iTl.iY - popupRect.Height() ), - TPoint( controlRect.iTl.iX + popupRect.Width(), controlRect.iTl.iY ) ); + rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iTl.iY - popupSize.iHeight ), + TPoint( controlRect.iTl.iX + popupSize.iWidth, controlRect.iTl.iY ) ); } else { // use the below-left position rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iBr.iY ), - TPoint( controlRect.iTl.iX + popupRect.Width(), controlRect.iBr.iY + popupRect.Height() ) ); + TPoint( controlRect.iTl.iX + popupSize.iWidth, controlRect.iBr.iY + popupSize.iHeight ) ); } break; @@ -472,16 +510,16 @@ // if this position does not fit the screen, // and if above right is more suitable, use it - if ( spaceBelow < popupRect.Height() && spaceBelow < spaceAbove ) + if ( spaceBelow < popupSize.iHeight && spaceBelow < spaceAbove ) { - rect = TRect( TPoint( controlRect.iBr.iX - popupRect.Width(), controlRect.iTl.iY - popupRect.Height() ), + rect = TRect( TPoint( controlRect.iBr.iX - popupSize.iWidth, controlRect.iTl.iY - popupSize.iHeight ), TPoint( controlRect.iBr.iX, controlRect.iTl.iY ) ); } else { // use the below-right position - rect = TRect( TPoint( controlRect.iBr.iX - popupRect.Width(), controlRect.iBr.iY ), - TPoint( controlRect.iBr.iX, controlRect.iBr.iY + popupRect.Height() ) ); + rect = TRect( TPoint( controlRect.iBr.iX - popupSize.iWidth, controlRect.iBr.iY ), + TPoint( controlRect.iBr.iX, controlRect.iBr.iY + popupSize.iHeight ) ); } break; @@ -489,33 +527,33 @@ // if this position does not fit the screen, // and if left or above-left is more suitable, use it - if ( spaceRight < popupRect.Width() ) + if ( spaceRight < popupSize.iWidth ) { // use the left position if the space is big enough - if ( spaceLeft >= popupRect.Width() ) + if ( spaceLeft >= popupSize.iWidth ) { // use left position - rect = TRect( TPoint( controlRect.iTl.iX - popupRect.Width(), controlRect.iTl.iY ), - TPoint( controlRect.iTl.iX, controlRect.iTl.iY + popupRect.Height() ) ); + rect = TRect( TPoint( controlRect.iTl.iX - popupSize.iWidth, controlRect.iTl.iY ), + TPoint( controlRect.iTl.iX, controlRect.iTl.iY + popupSize.iHeight ) ); } - else if ( spaceAbove >= popupRect.Height() ) + else if ( spaceAbove >= popupSize.iHeight ) { // use the above-right position - rect = TRect( TPoint( controlRect.iBr.iX - popupRect.Width(), controlRect.iTl.iY - popupRect.Height() ), + rect = TRect( TPoint( controlRect.iBr.iX - popupSize.iWidth, controlRect.iTl.iY - popupSize.iHeight ), TPoint( controlRect.iBr.iX, controlRect.iTl.iY ) ); } else { // use the below-right position - rect = TRect( TPoint( controlRect.iBr.iX - popupRect.Width(), controlRect.iBr.iY ), - TPoint( controlRect.iBr.iX, controlRect.iBr.iY + popupRect.Height() ) ); + rect = TRect( TPoint( controlRect.iBr.iX - popupSize.iWidth, controlRect.iBr.iY ), + TPoint( controlRect.iBr.iX, controlRect.iBr.iY + popupSize.iHeight ) ); } } else { // use the right position rect = TRect( TPoint( controlRect.iBr.iX, controlRect.iTl.iY ), - TPoint( controlRect.iBr.iX + popupRect.Width(), controlRect.iTl.iY + popupRect.Height() ) ); + TPoint( controlRect.iBr.iX + popupSize.iWidth, controlRect.iTl.iY + popupSize.iHeight ) ); } break; @@ -524,32 +562,32 @@ // if this position does not fit the screen, // and if right is more suitable, use it - if ( spaceLeft < popupRect.Width() ) + if ( spaceLeft < popupSize.iWidth ) { // use the right position, if it the space is big enough - if ( spaceRight >= popupRect.Width() ) + if ( spaceRight >= popupSize.iWidth ) { rect = TRect( TPoint( controlRect.iBr.iX, controlRect.iTl.iY ), - TPoint( controlRect.iBr.iX + popupRect.Width(), controlRect.iTl.iY + popupRect.Height() ) ); + TPoint( controlRect.iBr.iX + popupSize.iWidth, controlRect.iTl.iY + popupSize.iHeight ) ); } - else if ( spaceAbove >= popupRect.Height() ) + else if ( spaceAbove >= popupSize.iHeight ) { // use the above-left position - rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iTl.iY - popupRect.Height() ), - TPoint( controlRect.iTl.iX + popupRect.Width(), controlRect.iTl.iY ) ); + rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iTl.iY - popupSize.iHeight ), + TPoint( controlRect.iTl.iX + popupSize.iWidth, controlRect.iTl.iY ) ); } else { // use the below-left position rect = TRect( TPoint( controlRect.iTl.iX, controlRect.iBr.iY ), - TPoint( controlRect.iTl.iX + popupRect.Width(), controlRect.iBr.iY + popupRect.Height() ) ); + TPoint( controlRect.iTl.iX + popupSize.iWidth, controlRect.iBr.iY + popupSize.iHeight ) ); } } else { // use the left position - rect = TRect( TPoint( controlRect.iTl.iX - popupRect.Width(), controlRect.iTl.iY ), - TPoint( controlRect.iTl.iX, controlRect.iTl.iY + popupRect.Height() ) ); + rect = TRect( TPoint( controlRect.iTl.iX - popupSize.iWidth, controlRect.iTl.iY ), + TPoint( controlRect.iTl.iX, controlRect.iTl.iY + popupSize.iHeight ) ); } break; default: @@ -671,6 +709,11 @@ DrawableWindow()->FadeBehind( ETrue ); } } + + else if( iPopup && aType == KAknSplitInputDisabled ) + { + HidePopupL(); + } } // End of File diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/matrixmenu/group/matrixmenu.mmp --- a/menufw/menufwui/matrixmenu/group/matrixmenu.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/matrixmenu/group/matrixmenu.mmp Wed May 12 13:12:59 2010 +0300 @@ -21,6 +21,8 @@ #include #include "../inc/mmguiuid.hrh" +epocheapsize 1800000 4500000 + TARGET matrixmenu.exe TARGETTYPE exe UID 0x100039CE _MATRIX_UID3 @@ -86,7 +88,6 @@ LIBRARY aknskins.lib LIBRARY aknskinsrv.lib LIBRARY aknswallpaperutils.lib -LIBRARY MemMan.lib #ifdef _MATRIX_MENU_TRACE_PERFORMANCE LIBRARY flogger.lib diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/matrixmenu/inc/mmappui.h --- a/menufw/menufwui/matrixmenu/inc/mmappui.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/matrixmenu/inc/mmappui.h Wed May 12 13:12:59 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: Application UI class -* Version : %version: MM_83.1.2.1.23.1.20 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_83.1.2.1.23.1.21 % << Don't touch! Updated by Synergy at check-out. * */ @@ -71,35 +71,35 @@ */ NONSHARABLE_CLASS(CMmAppUi) : public CAknAppUi, public MHnControllerInterface, - public MAknToolbarObserver, + public MAknToolbarObserver, public MMmWidgetObserver, public MMmActionRequest, public MAknsSkinChangeObserver - { + { public: - /** - * 2nd phase constructor. - * - * @since S60 v5.0 - */ - void ConstructL(); + /** + * 2nd phase constructor. + * + * @since S60 v5.0 + */ + void ConstructL(); - /** - * C++ default constructor. This needs to be public due to - * the way the framework constructs the AppUi. - * - * @since S60 v5.0 - */ - CMmAppUi(); + /** + * C++ default constructor. This needs to be public due to + * the way the framework constructs the AppUi. + * + * @since S60 v5.0 + */ + CMmAppUi(); - /** - * Virtual Destructor. - * - * @since S60 v5.0 - */ - ~CMmAppUi(); + /** + * Virtual Destructor. + * + * @since S60 v5.0 + */ + ~CMmAppUi(); // from base class CEikAppUi @@ -124,9 +124,9 @@ * @param aDocumentName Not used by this app. * @param aTail Command line tail. */ - TBool ProcessCommandParametersL( TApaCommand aCommand, - TFileName& aDocumentName, - const TDesC8& aTail ); + TBool ProcessCommandParametersL( TApaCommand aCommand, + TFileName& aDocumentName, + const TDesC8& aTail ); /** * From CAknAppUi. @@ -138,7 +138,7 @@ */ void ProcessCommandL(TInt aCommand); - /** + /** * From CEikAppUi. * Takes care of Command Line tail handling. * @@ -146,9 +146,9 @@ * @param aUid UID of the message. * @param aParams Message params. */ - void ProcessMessageL( TUid aUid, const TDesC8& aParams ); + void ProcessMessageL( TUid aUid, const TDesC8& aParams ); - /** + /** * From MCoeMessageObserver. * Handles window server messages. * @@ -163,7 +163,7 @@ TUid aMessageUid, const TDesC8& aMessageParameters ); - /** + /** * From MEikMenuObserver (CEikAppUi). * Handles dynamic menu pane initialization. * @@ -339,6 +339,17 @@ void SkinPackageChanged( const TAknsSkinStatusPackageChangeReason aReason ); + /** + * From MMmDragAndDropObserver. + * Method is invoked on the observer, when the move item event is needed. + * + * @since S60 v5.0 + * @param aRecipientId Index of item on which the move event invokes. + * @param aEventParameters Event parameters. + */ + void HandleTriggerMoveItemL( const TInt aRecipientId, + CLiwGenericParamList* aEventParameters ); + private: /** @@ -379,29 +390,29 @@ }; /** - * Indicates if edit mode is on. - * - * @since S60 v5.0 - * @return Returns edit mode status. - */ + * Indicates if edit mode is on. + * + * @since S60 v5.0 + * @return Returns edit mode status. + */ TBool IsEditMode(); /** - * Adjusts highlight when entering or leaving edit mode. - * - * @since S60 v5.0 - * @param aOriginalHighlight Highlight that would normally be set - * @return A modified value of highlight - */ + * Adjusts highlight when entering or leaving edit mode. + * + * @since S60 v5.0 + * @param aOriginalHighlight Highlight that would normally be set + * @return A modified value of highlight + */ TInt AdjustEditModeHighlightL( TInt aOriginalHighlight ); /** - * Manages the container lookup. - * - * @since S60 v5.0 - * @return Pointer to the container to be loaded, of NULL - * if a new container should be created. - */ + * Manages the container lookup. + * + * @since S60 v5.0 + * @return Pointer to the container to be loaded, of NULL + * if a new container should be created. + */ CMmWidgetContainer* GetAppropriateContainerToLoadL(); /** @@ -426,16 +437,16 @@ // from base class CEikAppUi - /** - * From CEikAppUi. - * Takes care of command handling. - * - * @since S60 v5.0 - * @param aCommand Command to be handled. - */ - void HandleCommandL( TInt aCommand ); + /** + * From CEikAppUi. + * Takes care of command handling. + * + * @since S60 v5.0 + * @param aCommand Command to be handled. + */ + void HandleCommandL( TInt aCommand ); - /** + /** * From CEikAppUi. * Handles Window Server events. * @@ -445,18 +456,18 @@ */ void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ); - /** + /** * Indicates if root (main) view is displayed. * * @since S60 v5.0 * @return ETrue if root displayed, EFalse otherwise. */ - TBool IsRootdisplayedL(); + TBool IsRootdisplayedL(); - /** - * Handles pen down events for an item. - * - * @since S60 v5.0 + /** + * Handles pen down events for an item. + * + * @since S60 v5.0 * @param aIndex Item index. */ void HandleHighlightItemPenDownL( TInt aIndex ); @@ -513,12 +524,12 @@ */ void InsertL(); - /** + /** * Handles the "Back" softkey event. * * @since S60 v5.0 */ - void HandleBackCommandL(); + void HandleBackCommandL(); /** * Refreshes toolbar. @@ -732,7 +743,7 @@ * @since S60 v5.0 */ void StartLayoutSwitchFullScreen( TInt aKastorEffect - = AknTransEffect::ELayoutSwitchStart); + = AknTransEffect::ELayoutSwitchStart); /** * Ends fullscreen @@ -932,7 +943,7 @@ */ CMMExtensionManager* iMmExtManager; - /** + /** * Screen state. */ TBool iScreenOn; @@ -1000,6 +1011,11 @@ */ TBool iHasFocus; + /** + * ETrue if Matrix is hidden from TS which is used on startup. + */ + TBool isHiddenFromFS; + /** * Own. * Popup menu displayed after long tap. diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/matrixmenu/loc/matrix_menu.loc --- a/menufw/menufwui/matrixmenu/loc/matrix_menu.loc Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/matrixmenu/loc/matrix_menu.loc Wed May 12 13:12:59 2010 +0300 @@ -29,13 +29,13 @@ //d: Displayed in Status Pane. //l: title_pane_t2/opt9 //r: 1.0 -#define qtn_org_root_editing_title "Organizing Menu" +#define qtn_org_root_editing_title "Editing Menu" //d: Title of a folder in Edit Mode. //d: Displayed in Status Pane. %U is the name of the opened folder. //l: title_pane_t2/opt9 //r: 1.0 -#define qtn_org_folder_editing_title "Organizing %U" +#define qtn_org_folder_editing_title "Editing %U" //d: Label of the menu item. //d: Opens selected item. diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/matrixmenu/src/mmappui.cpp --- a/menufw/menufwui/matrixmenu/src/mmappui.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/matrixmenu/src/mmappui.cpp Wed May 12 13:12:59 2010 +0300 @@ -12,8 +12,8 @@ * Contributors: * * Description: Application UI class -* Version : %version: MM_176.1.28.1.65 % << Don't touch! Updated by Synergy at check-out. -* Version : %version: MM_176.1.28.1.65 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_176.1.28.1.69 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_176.1.28.1.69 % << Don't touch! Updated by Synergy at check-out. * */ @@ -93,10 +93,12 @@ iEikonEnv->SetSystem( ETrue ); TInt appUiFlags = AknLayoutUtils::PenEnabled() ? - EAknEnableSkin | EAknSingleClickCompatible : + EAknEnableSkin | EAknSingleClickCompatible : EAknEnableSkin | EAknEnableMSK; BaseConstructL( appUiFlags ); - + //hide Menu from TS at startup + HideApplicationFromFSW( ETrue ); + isHiddenFromFS = ETrue; FeatureManager::InitializeLibL(); iIsKastorEffectStarted = EFalse; StartLayoutSwitchFullScreen( AknTransEffect::EApplicationStart ); @@ -211,11 +213,17 @@ iIsKastorEffectStarted = ETrue; TInt lastItemIndex = iCurrentContainer->NumberOfItems() - 1; - if ( lastItemIndex >= 0 && iCurrentContainer->ItemIsFullyVisible( lastItemIndex ) && - !iCurrentContainer->IsHighlightVisible() ) - { - iCurrentContainer->SetManualHighlightL( lastItemIndex, EFalse ); - } + if ( lastItemIndex >= 0 && iCurrentContainer->ItemIsFullyVisible( lastItemIndex ) + && !iCurrentContainer->IsHighlightVisible() ) + { + iCurrentContainer->SetManualHighlightL( lastItemIndex, EFalse ); + } +/* else if( !iCurrentContainer->IsHighlightVisible() + && iCurrentContainer->Widget()->TopItemIndex() > -1) + { + iCurrentContainer->SetManualHighlightL( + iCurrentContainer->Widget()->TopItemIndex(), EFalse ); + } */ iCurrentContainer->SetRect( ClientRect() ); iDummyContainer->SetRect( ClientRect() ); @@ -299,9 +307,9 @@ } if ( iCurrentContainer ) - { - iCurrentContainer->EndLongTapL(); - } + { + iCurrentContainer->EndLongTapL(); + } } // --------------------------------------------------------------------------- @@ -320,18 +328,18 @@ if( !aParams.Compare( KNullDesC8 ) ) { if ( !iAppkeyHandler->IsActive() ) - { + { //make dummy container visible when returning //to menu by AppKey - iDummyContainer->MakeVisible( ETrue ); + iDummyContainer->MakeVisible( ETrue ); RefreshUiPanesL( ETrue ); iCurrentContainer->MakeVisible( EFalse ); iDummyContainer->DrawNow(); CleanupForExitL( EExitKeyApplication ); - User::LeaveIfError( iCoeEnv->WsSession().SetWindowGroupOrdinalPosition( - CEikonEnv::Static()->RootWin().Identifier(), 0 ) ); - iAppkeyHandler->StartL(); - } + User::LeaveIfError( iCoeEnv->WsSession().SetWindowGroupOrdinalPosition( + CEikonEnv::Static()->RootWin().Identifier(), 0 ) ); + iAppkeyHandler->StartL(); + } } // first refresh model, show afterwords @@ -625,61 +633,61 @@ // --------------------------------------------------------------------------- // TInt CMmAppUi::GetKastorEffectL( CHnItemModel* aItemModel ) - { - TInt effect( AknTransEffect::ENone ); + { + TInt effect( AknTransEffect::ENone ); if ((IsEditMode() || iEditModeStatus == ETransitionFromEditMode) && !AknLayoutUtils::PenEnabled()) { return effect; } - switch( aItemModel->GetItemType() ) - { - case EItemTypeApplication: - { - if( !IsEditMode() && !aItemModel->IsDrmExpired() ) - { - if( aItemModel->IsRunning() ) - { - effect = AknTransEffect::EApplicationStartSwitchRect; - } - else - { - effect = AknTransEffect::EApplicationStartRect; - } - } - break; - } - case EItemTypeSuite: - { - if( !IsEditMode() ) - { - effect = EMenuOpenFolderEffect; - iIsKastorEffectStarted = ETrue; - } - break; - } - case EItemTypeParentFolder: - { + switch( aItemModel->GetItemType() ) + { + case EItemTypeApplication: + { + if( !IsEditMode() && !aItemModel->IsDrmExpired() ) + { + if( aItemModel->IsRunning() ) + { + effect = AknTransEffect::EApplicationStartSwitchRect; + } + else + { + effect = AknTransEffect::EApplicationStartRect; + } + } + break; + } + case EItemTypeSuite: + { + if( !IsEditMode() ) + { + effect = EMenuOpenFolderEffect; + iIsKastorEffectStarted = ETrue; + } + break; + } + case EItemTypeParentFolder: + { effect = EMenuCloseFolderEffect; iIsKastorEffectStarted = ETrue; - break; - } - case EItemTypeFolder: - { - if (!(IsEditMode() && aItemModel->IsDeleteLocked())) + break; + } + case EItemTypeFolder: + { + if (!(IsEditMode() && aItemModel->IsDeleteLocked())) { effect = EMenuOpenFolderEffect; iIsKastorEffectStarted = ETrue; } - break; - } - case EItemTypeUnknown: - default: - { - effect = AknTransEffect::ENone; - break; - } - } + break; + } + case EItemTypeUnknown: + default: + { + effect = AknTransEffect::ENone; + break; + } + } return effect; } @@ -959,7 +967,7 @@ IsEditMode() && !Layout_Meta_Data::IsPenEnabled() ) { DEBUG(("_Mm_:CMmAppUi::HandleKeyPressedL - enter in edit mode")); - HandleCommandL( EAknSoftkeyOk ); + HandleCommandL( EAknSoftkeyOk ); resp = EKeyWasConsumed; } @@ -1068,29 +1076,29 @@ void CMmAppUi::HandleDragStopL( TInt aModelItemIndex ) { MMPERF(("CMmAppUi::HandleDragStopL - START")); - if ( IsEditMode() ) + if( IsEditMode() ) { TInt itemId = iCurrentSuiteModel->IdByIndex( aModelItemIndex ); TMcsItemType typeCurr = iCurrentSuiteModel->GetItemType( aModelItemIndex ); TBool isOverFolder = ( AknLayoutUtils::PenEnabled() && ( typeCurr == EItemTypeParentFolder || typeCurr == EItemTypeFolder ) ); - TBool isDeleteLocked = (itemId != KErrNotFound) ? - iCurrentSuiteModel->GetItemModel( itemId )->IsDeleteLocked(): - EFalse; + TBool isDeleteLocked = (itemId != KErrNotFound) + ? iCurrentSuiteModel->GetItemModel( itemId )->IsDeleteLocked() + : EFalse; - TBuf8< KMaxLength > beforeCustomId; + TBuf8 beforeCustomId; beforeCustomId.Num( KErrNotFound ); - if ( aModelItemIndex + 1 < iCurrentContainer->NumberOfItems() ) + if( aModelItemIndex + 1 < iCurrentContainer->NumberOfItems() ) { beforeCustomId.Num( iCurrentSuiteModel->GetItemModel( iCurrentSuiteModel->IdByIndex( aModelItemIndex + 1 ) )->CustomId() ); } - TBuf8< KMaxLength > draggedCustomId; + TBuf8 draggedCustomId; draggedCustomId.Num( KErrNotFound ); CHnItemModel* draggedModel = iCurrentSuiteModel->GetItemModel( iIdDragged ); - if (draggedModel) + if( draggedModel ) { draggedCustomId.Num( iCurrentSuiteModel->GetItemModel( iIdDragged )->CustomId() ); } @@ -1114,11 +1122,13 @@ tempKeys->ToGenericParamListL( *eventParameters ); CleanupStack::PopAndDestroy( tempKeys ); - if ( iIdDragged != itemId - && isOverFolder && !isDeleteLocked) + TBool allowMoveInto = iCurrentContainer->AllowMove(); + + if( iIdDragged != itemId && isOverFolder && !isDeleteLocked + && allowMoveInto ) { iCurrentSuiteModel->RemoveItemL( iIdDragged ); - if ( iItemDragged < aModelItemIndex ) + if( iItemDragged < aModelItemIndex ) { // indices of all items after iItemDragged have been // decreased when the dragged item got removed from the @@ -1134,30 +1144,30 @@ iHNInterface->TriggerHnEventL( KKeyIdMoveInto, itemId, eventParameters ); iMakeHightlightedItemFullyVisible = ETrue; } - else if ( iIdDragged == itemId ) + else if( iIdDragged == itemId ) { iCurrentContainer->CancelDragL( ETrue ); - TBool result = iHNInterface->TriggerHnEventL( KKeyIdMove, itemId, eventParameters ); + iCurrentContainer->SetTriggerMoveItemL( itemId, eventParameters ); // fix for: edit->move, then LSK->Up->LSK->LSK FAST... (short options show up) - if ( result != KErrNone && !AknLayoutUtils::PenEnabled() ) - { - CLiwGenericParamList* paramList = CLiwGenericParamList::NewLC(); - TLiwGenericParam command(KHnRequest, TLiwVariant( KEvaluateMdModel)); - paramList->AppendL(command); - HandleRequestL(*paramList); - CleanupStack::PopAndDestroy(paramList); - } + if( !AknLayoutUtils::PenEnabled() ) + { + CLiwGenericParamList* paramList = CLiwGenericParamList::NewLC(); + TLiwGenericParam command(KHnRequest, TLiwVariant( KEvaluateMdModel)); + paramList->AppendL( command ); + HandleRequestL( *paramList ); + CleanupStack::PopAndDestroy( paramList ); + } } else { iCurrentContainer->CancelDragL( ETrue ); - if (!AknLayoutUtils::PenEnabled()) + if( !AknLayoutUtils::PenEnabled() ) { CLiwGenericParamList* paramList = CLiwGenericParamList::NewLC(); TLiwGenericParam command(KHnRequest, TLiwVariant( KEvaluateMdModel)); - paramList->AppendL(command); - HandleRequestL(*paramList); - CleanupStack::PopAndDestroy(paramList); + paramList->AppendL( command ); + HandleRequestL( *paramList ); + CleanupStack::PopAndDestroy( paramList ); } } @@ -1211,9 +1221,9 @@ HandleHighlightItemSingleClickedL( iCurrentContainer->Widget()->CurrentItemIndex() ); } else if ( aEventType == MEikListBoxObserver::EEventPanningStarted ) - { - iKeyClickLocked = ETrue; - } + { + iKeyClickLocked = ETrue; + } DEBUG(("_Mm_:CMmAppUi::HandleListBoxEventL OUT")); } @@ -1223,13 +1233,13 @@ // --------------------------------------------------------------------------- // void CMmAppUi::HandleLongTapEventL( const TPoint& aPenEventLocation ) - { + { TBool popupMenuDisplayed(EFalse); - if (iPopupMenu) - { - delete iPopupMenu; - iPopupMenu = NULL; - } + if (iPopupMenu) + { + delete iPopupMenu; + iPopupMenu = NULL; + } iPopupMenu = CAknStylusPopUpMenu::NewL(this,aPenEventLocation); if ( AknLayoutUtils::LayoutMirrored() ) @@ -1244,71 +1254,71 @@ } if( iCurrentSuiteModel == iHNInterface->GetLastSuiteModelL() - && iCurrentContainer->IsHighlightVisible() - && iCurrentContainer->GetSuiteModelL()->GetItemModelsCount() > 1 ) - { - MMPERF(("CMmAppUi::DynInitMenuPaneL - START")); - //fill the main menu structure, look for cascade menus - //reset the helper hash map - iCascadeMenuMap.Close(); + && iCurrentContainer->IsHighlightVisible() + && iCurrentContainer->GetSuiteModelL()->GetItemModelsCount() > 1 ) + { + MMPERF(("CMmAppUi::DynInitMenuPaneL - START")); + //fill the main menu structure, look for cascade menus + //reset the helper hash map + iCascadeMenuMap.Close(); - MHnMenuItemModelIterator* menuIterator = - iCurrentSuiteModel->GetMenuStructureL( - iCurrentSuiteModel->IdByIndex( - iCurrentContainer->GetHighlight() ) ); + MHnMenuItemModelIterator* menuIterator = + iCurrentSuiteModel->GetMenuStructureL( + iCurrentSuiteModel->IdByIndex( + iCurrentContainer->GetHighlight() ) ); - // check if there is a menu structure available - // for the specified item - if ( menuIterator ) - { - //create item sorting helper objects - RArray positionArray; - CleanupClosePushL( positionArray ); - RHashMap menuItemMap; - CleanupClosePushL( menuItemMap ); + // check if there is a menu structure available + // for the specified item + if ( menuIterator ) + { + //create item sorting helper objects + RArray positionArray; + CleanupClosePushL( positionArray ); + RHashMap menuItemMap; + CleanupClosePushL( menuItemMap ); while ( menuIterator->HasNextSpecific() ) { CHnMenuItemModel* childItem = menuIterator->GetNextSpecific(); - CEikMenuPaneItem::SData childData; - childData.iCommandId = childItem->Command(); - childData.iText = childItem->NameL(). - Left( CEikMenuPaneItem::SData::ENominalTextLength ); - childData.iFlags = 0; - childData.iCascadeId = 0; + CEikMenuPaneItem::SData childData; + childData.iCommandId = childItem->Command(); + childData.iText = childItem->NameL(). + Left( CEikMenuPaneItem::SData::ENominalTextLength ); + childData.iFlags = 0; + childData.iCascadeId = 0; - positionArray.AppendL( childItem->Position() ); - menuItemMap.InsertL( childItem->Position(), childData ); + positionArray.AppendL( childItem->Position() ); + menuItemMap.InsertL( childItem->Position(), childData ); } - positionArray.Sort(); + positionArray.Sort(); - //add items in correct order - for ( TInt i = 0; i < positionArray.Count(); ++i ) - { - iPopupMenu-> - AddMenuItemL( - menuItemMap.FindL( positionArray[i] ).iText, - menuItemMap.FindL( positionArray[i] ).iCommandId ); - } + //add items in correct order + for ( TInt i = 0; i < positionArray.Count(); ++i ) + { + iPopupMenu-> + AddMenuItemL( + menuItemMap.FindL( positionArray[i] ).iText, + menuItemMap.FindL( positionArray[i] ).iCommandId ); + } - if (positionArray.Count()>0) - { - iPopupMenu->ShowMenu(); - popupMenuDisplayed = ETrue; - } - CleanupStack::PopAndDestroy( &menuItemMap ); - CleanupStack::PopAndDestroy( &positionArray ); - } - MMPERF(("CMmAppUi::DynInitMenuPaneL - STOP")); - } + if (positionArray.Count()>0) + { + iPopupMenu->ShowMenu(); + popupMenuDisplayed = ETrue; + } + CleanupStack::PopAndDestroy( &menuItemMap ); + CleanupStack::PopAndDestroy( &positionArray ); + } + MMPERF(("CMmAppUi::DynInitMenuPaneL - STOP")); + } - if ( !popupMenuDisplayed && iCurrentContainer ) - { - iCurrentContainer->EndLongTapL( ETrue ); - HandleHighlightItemSingleClickedL( - iCurrentContainer->Widget()->CurrentItemIndex() ); - } + if ( !popupMenuDisplayed && iCurrentContainer ) + { + iCurrentContainer->EndLongTapL( ETrue ); + HandleHighlightItemSingleClickedL( + iCurrentContainer->Widget()->CurrentItemIndex() ); + } } // --------------------------------------------------------------------------- @@ -1318,7 +1328,7 @@ void CMmAppUi::HandleHighlightItemDoubleClickedL( TInt aIndex ) { if ( iKeyClickLocked ) - return; + return; if ( iCurrentSuiteModel->WidgetType() == EListWidget && iCurrentContainer->GetPreviousHighlight() == aIndex ) @@ -1437,9 +1447,9 @@ RefreshCbaL(); iGarbage.ResetAndDestroy(); ResetContainerMap(); - iCurrentSuiteModel = NULL; - iCurrentContainer = NULL; - } + iCurrentSuiteModel = NULL; + iCurrentContainer = NULL; + } TRAPD( err, iHNInterface->LoadSuitesFromUriL( aMessage ) ); @@ -1474,23 +1484,23 @@ { TInt itemId( KErrNotFound ); TBool suiteModelHasItems = iCurrentContainer->GetSuiteModelL()->GetItemModelsCount() > 1; - TBool highlightVisible = iCurrentContainer->IsHighlightVisible(); - if ( !highlightVisible && suiteModelHasItems ) - { + TBool highlightVisible = iCurrentContainer->IsHighlightVisible(); + if ( !highlightVisible && suiteModelHasItems ) + { // if there is no highlight, but there are items, show menuitems for logically // current suite highlight fetched from suite model. - TInt suiteHighlight = iCurrentSuiteModel->GetSuiteHighlight(); - ASSERT( suiteHighlight != KErrNotFound ); - itemId = iCurrentSuiteModel->IdByIndex( suiteHighlight ); - ignoreItemSpecific = ETrue; - } - else - { - TBool idByContainer = highlightVisible && suiteModelHasItems; - itemId = idByContainer ? - iCurrentSuiteModel->IdByIndex( iCurrentContainer->GetHighlight() ) : - iCurrentSuiteModel->IdByIndex( KErrNotFound ); - } + TInt suiteHighlight = iCurrentSuiteModel->GetSuiteHighlight(); + ASSERT( suiteHighlight != KErrNotFound ); + itemId = iCurrentSuiteModel->IdByIndex( suiteHighlight ); + ignoreItemSpecific = ETrue; + } + else + { + TBool idByContainer = highlightVisible && suiteModelHasItems; + itemId = idByContainer ? + iCurrentSuiteModel->IdByIndex( iCurrentContainer->GetHighlight() ) : + iCurrentSuiteModel->IdByIndex( KErrNotFound ); + } menuIterator = iCurrentSuiteModel->GetMenuStructureL( itemId ); } @@ -1522,42 +1532,42 @@ { CHnMenuItemModel* menuItem = menuIterator->GetNext(); if ( (menuItem->MenuItemType() == CHnMenuItemModel::EItemApplication) || !ignoreItemSpecific ) - { - CEikMenuPaneItem::SData menuData; - menuData.iCommandId = menuItem->Command(); - menuData.iText = menuItem->NameL(). - Left( CEikMenuPaneItem::SData::ENominalTextLength ); - menuData.iFlags = 0; + { + CEikMenuPaneItem::SData menuData; + menuData.iCommandId = menuItem->Command(); + menuData.iText = menuItem->NameL(). + Left( CEikMenuPaneItem::SData::ENominalTextLength ); + menuData.iFlags = 0; - //check for children - MHnMenuItemModelIterator* childIterator = - menuItem->GetMenuStructure(); - if ( childIterator->HasNext() ) - { - //this is a cascade item - //one menu item can contain only one cascade menu - //check if there are available cascade menu containers - TInt freeResource = GetNextCascadeMenuResourceId(); - if ( freeResource != KErrNotFound ) - { - //error checking - if( !iCascadeMenuMap.Insert( freeResource, - childIterator ) ) - { - //add item only if there is an - //available resource - menuData.iCascadeId = freeResource; - } - } - } - else - { - //normal entry - menuData.iCascadeId = 0; - } - positionArray.AppendL( menuItem->Position() ); - menuItemMap.InsertL( menuItem->Position(), menuData ); - } + //check for children + MHnMenuItemModelIterator* childIterator = + menuItem->GetMenuStructure(); + if ( childIterator->HasNext() ) + { + //this is a cascade item + //one menu item can contain only one cascade menu + //check if there are available cascade menu containers + TInt freeResource = GetNextCascadeMenuResourceId(); + if ( freeResource != KErrNotFound ) + { + //error checking + if( !iCascadeMenuMap.Insert( freeResource, + childIterator ) ) + { + //add item only if there is an + //available resource + menuData.iCascadeId = freeResource; + } + } + } + else + { + //normal entry + menuData.iCascadeId = 0; + } + positionArray.AppendL( menuItem->Position() ); + menuItemMap.InsertL( menuItem->Position(), menuData ); + } } aMenuPane->Reset(); @@ -1797,15 +1807,21 @@ if( iCurrentContainer != aWidgetContainer ) { - TBool highlightVisibleBefore = iCurrentContainer != NULL && - iCurrentContainer->IsHighlightVisible(); + // We want a highlight to be visible while switching between + // grid and list views but no highlight should be visible + // after opening a folder. + TBool highlightVisibleBefore = + iCurrentContainer && + aWidgetContainer && + iCurrentContainer->IsHighlightVisible() && + iCurrentContainer->WidgetType() != aWidgetContainer->WidgetType(); HandleWidgetChangeRefreshL( aWidgetContainer ); if ( highlightVisibleBefore ) - { - iCurrentContainer->SetHighlightVisibilityL( ETrue ); - } + { + iCurrentContainer->SetHighlightVisibilityL( ETrue ); + } } else { @@ -2026,8 +2042,8 @@ // --------------------------------------------------------------------------- // void CMmAppUi::SetEditModeL( TBool aIsEditMode ) - { - MMPERF(("CMmAppUi::SetEditModeL %d - START",aIsEditMode)); + { + MMPERF(("CMmAppUi::SetEditModeL %d - START",aIsEditMode)); if ( IsEditMode() != aIsEditMode && iCurrentSuiteModel ) { @@ -2038,20 +2054,20 @@ iCurrentContainer->StopMovingL(); if ( aIsEditMode ) - { - iEditModeStatus = ETransitionToEditMode; - } + { + iEditModeStatus = ETransitionToEditMode; + } else - { - if ( iEditModeStatus == ETransitionToEditMode ) - { - iEditModeStatus = EFastTransitionFromEditMode; - } - else - { - iEditModeStatus = ETransitionFromEditMode; - } - } + { + if ( iEditModeStatus == ETransitionToEditMode ) + { + iEditModeStatus = EFastTransitionFromEditMode; + } + else + { + iEditModeStatus = ETransitionFromEditMode; + } + } HandleHighlightOffsetL( aIsEditMode ? EOffsetNext : EOffsetPrevious ); iCurrentSuiteModel->SetSuiteHighlightL( @@ -2101,7 +2117,7 @@ TEventCode type = static_cast< TEventCode >( aEvent.Type() ); if ( ( type == EEventFocusLost || type == KAknFullOrPartialForegroundLost ) - && iCurrentContainer ) + && iCurrentContainer ) { iCurrentContainer->CacheWidgetPosition(); } @@ -2123,8 +2139,8 @@ HandleFocusGainedL(); } else if ( type == EEventFocusLost ) - { - HandleFocusLostL(); + { + HandleFocusLostL(); } else if ( type == KAknFullOrPartialForegroundGained ) { @@ -2227,8 +2243,8 @@ } break; case ESuiteItemsUpdated: - { - ClearTransitionFromEditModeFlag(); + { + ClearTransitionFromEditModeFlag(); iCurrentContainer->DrawView(); } break; @@ -2250,13 +2266,13 @@ // --------------------------------------------------------------------------- // void CMmAppUi::ClearTransitionFromEditModeFlag() - { - if ( iEditModeStatus == ETransitionFromEditMode || - iEditModeStatus == EFastTransitionFromEditMode ) - { - iEditModeStatus = ENoEditMode; - } - } + { + if ( iEditModeStatus == ETransitionFromEditMode || + iEditModeStatus == EFastTransitionFromEditMode ) + { + iEditModeStatus = ENoEditMode; + } + } // --------------------------------------------------------------------------- // @@ -2365,7 +2381,7 @@ ShowSuiteL(); iGarbage.ResetAndDestroy(); - if ( iEditModeStatus == ETransitionToEditMode ) + if ( iEditModeStatus == ETransitionToEditMode ) { iEditModeStatus = EEditMode; } @@ -2492,8 +2508,8 @@ DEBUG(("\t_Mm_:Top item index reset")); iCurrentContainer->ResetWidgetPosition(); iCurrentContainer->Widget()->UpdateScrollBarsL(); - iCurrentContainer->MakeVisible( ETrue ); - iCurrentContainer->DrawNow(); + iCurrentContainer->MakeVisible( ETrue ); + iCurrentContainer->DrawNow(); } } @@ -2508,7 +2524,7 @@ { TInt appToShowUid(0); TInt idleid(0); - if (aExitType == EExitToIdle) + if (aExitType == EExitToIdle || aExitType == EExitToPhone) { User::LeaveIfError(RProperty::Get(KPSUidAiInformation, KActiveIdleUid, appToShowUid)); @@ -2647,37 +2663,37 @@ { DEBUG(("_Mm_:CMmAppUi::SetMiddleSoftKeyL - IN")); if ( iCurrentSuiteModel && !AknLayoutUtils::PenEnabled() && !IsEditMode() ) - { - DEBUG(("\t_Mm_:suite highlight: %d", - iCurrentSuiteModel->GetSuiteHighlight())); + { + DEBUG(("\t_Mm_:suite highlight: %d", + iCurrentSuiteModel->GetSuiteHighlight())); - TBool idByContainer = iCurrentContainer->IsHighlightVisible() && - iCurrentContainer->GetSuiteModelL()->GetItemModelsCount() > 1; - TInt itemId = idByContainer ? - iCurrentSuiteModel->IdByIndex( iCurrentContainer->GetHighlight() ) : - iCurrentSuiteModel->IdByIndex( KErrNotFound ); - CHnItemModel* itemModel = iCurrentSuiteModel->GetItemModel( itemId ); + TBool idByContainer = iCurrentContainer->IsHighlightVisible() && + iCurrentContainer->GetSuiteModelL()->GetItemModelsCount() > 1; + TInt itemId = idByContainer ? + iCurrentSuiteModel->IdByIndex( iCurrentContainer->GetHighlight() ) : + iCurrentSuiteModel->IdByIndex( KErrNotFound ); + CHnItemModel* itemModel = iCurrentSuiteModel->GetItemModel( itemId ); - CHnButtonModel* mskModel = NULL; + CHnButtonModel* mskModel = NULL; - if ( itemModel ) - { - mskModel = itemModel->GetMiddleSoftKey(); - } + if ( itemModel ) + { + mskModel = itemModel->GetMiddleSoftKey(); + } - if ( mskModel ) - { - TInt event = (mskModel->GetEventId() == KErrNotFound) ? - KKeyIdSelect : mskModel->GetEventId(); - Cba()->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition, - event, mskModel->GetButtonText()); - } - else - { - // reset to default - RefreshCbaL(); - } - } + if ( mskModel ) + { + TInt event = (mskModel->GetEventId() == KErrNotFound) ? + KKeyIdSelect : mskModel->GetEventId(); + Cba()->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition, + event, mskModel->GetButtonText()); + } + else + { + // reset to default + RefreshCbaL(); + } + } DEBUG(("_Mm_:CMmAppUi::SetMiddleSoftKeyL - OUT")); } @@ -2817,6 +2833,16 @@ // // --------------------------------------------------------------------------- // +void CMmAppUi::HandleTriggerMoveItemL( const TInt aRecipientId, + CLiwGenericParamList* aEventParameters) + { + iHNInterface->TriggerHnEventL( KKeyIdMove, aRecipientId, aEventParameters); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// void CMmAppUi::RefreshIconsL() { iSkinChangeNeeded = EFalse; @@ -2888,126 +2914,133 @@ // --------------------------------------------------------------------------- // void CMmAppUi::HandleFocusGainedL() - { - DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " - "- EEventFocusGained")); + { + DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " + "- EEventFocusGained")); - iHasFocus = ETrue; + iHasFocus = ETrue; // Tricky: lack of iCurrentSuiteModel indicates that suite evaluation is in // progress - do not call HandlePresentationChangeL if evalution has not // finished. - if ( iCurrentContainer && !iCurrentContainer->IsVisible() && - iCurrentSuiteModel ) - { - HandlePresentationChangeL( iCurrentContainer ); - } + if ( iCurrentContainer && !iCurrentContainer->IsVisible() && + iCurrentSuiteModel ) + { + HandlePresentationChangeL( iCurrentContainer ); + } - if ( iCurrentSuiteModel && iCurrentContainer ) - { - iDummyContainer->MakeVisible( EFalse ); - iCurrentContainer->MakeVisible( ETrue ); - iCurrentContainer->DrawNow(); - } - if( IsForeground() ) - { - RefreshUiPanesL(); - } - if ( iCurrentContainer ) - { - iCurrentContainer->SetHasFocusL( ETrue ); - } - if ( iCurrentSuiteModel ) + if ( iCurrentSuiteModel && iCurrentContainer ) + { + iDummyContainer->MakeVisible( EFalse ); + iCurrentContainer->MakeVisible( ETrue ); + iCurrentContainer->DrawNow(); + } + if( IsForeground() ) + { + RefreshUiPanesL(); + } + if ( iCurrentContainer ) + { + iCurrentContainer->SetHasFocusL( ETrue ); + } + if ( iCurrentSuiteModel ) { iCurrentSuiteModel->SetVisibleL( ETrue ); } - } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmAppUi::HandleFocusLostL() - { - DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " - "- EEventFocusLost")); + { + DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " + "- EEventFocusLost")); - iHasFocus = EFalse; + iHasFocus = EFalse; - if( iCurrentContainer ) - { - //This is needed in case some popup is displayed - //while touching item in grid. Highlight - //should be reset to normal then. - if( AknLayoutUtils::PenEnabled() ) - { - if( iCurrentContainer->WidgetType() == EGridWidget && !IsEditMode() ) - { - iCurrentContainer->Widget()->View()->ItemDrawer()-> - SetFlags( CListItemDrawer::EDisableHighlight ); - } - iCurrentContainer->Widget()->View()-> - ItemDrawer()->ClearFlags( CListItemDrawer::EPressedDownState ); - iCurrentContainer->Widget()->View()->DrawItem( - iCurrentContainer->Widget()->CurrentItemIndex() ) ; - } - if( IsEditMode() && iCurrentContainer->IsDraggable() ) - { - HandleDragStopL( iCurrentContainer->GetHighlight() ); - iCurrentContainer->DrawNow(); - } - iCurrentContainer->SetHasFocusL( EFalse ); - } - if ( iCurrentSuiteModel ) - { - iCurrentSuiteModel->SetVisibleL( EFalse ); - } + if( iCurrentContainer ) + { + //This is needed in case some popup is displayed + //while touching item in grid. Highlight + //should be reset to normal then. + if( AknLayoutUtils::PenEnabled() ) + { + if( iCurrentContainer->WidgetType() == EGridWidget && !IsEditMode() ) + { + iCurrentContainer->Widget()->View()->ItemDrawer()-> + SetFlags( CListItemDrawer::EDisableHighlight ); + } + iCurrentContainer->Widget()->View()-> + ItemDrawer()->ClearFlags( CListItemDrawer::EPressedDownState ); + iCurrentContainer->Widget()->View()->DrawItem( + iCurrentContainer->Widget()->CurrentItemIndex() ) ; + } + if( IsEditMode() && iCurrentContainer->IsDraggable() ) + { + HandleDragStopL( iCurrentContainer->GetHighlight() ); + iCurrentContainer->DrawNow(); + } + iCurrentContainer->SetHasFocusL( EFalse ); + } + if ( iCurrentSuiteModel ) + { + iCurrentSuiteModel->SetVisibleL( EFalse ); + } - } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmAppUi::HandleFullOrPartialForegroundGainedL() - { - DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " - "- KAknFullOrPartialForegroundGained")); - if (iCurrentContainer && iCurrentSuiteModel ) - { - iCurrentContainer->HandleForegroundGainedL(); - iDummyContainer->MakeVisible( EFalse ); - iCurrentContainer->MakeVisible( ETrue ); - RefreshUiPanesL(); - } - if (iSkinChangeNeeded && !iSkinChangeInProgress) - { - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - if (skinInstance && !skinInstance->IsUpdateInProgress()) - { - RefreshIconsL(); + { + DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " + "- KAknFullOrPartialForegroundGained")); + //show Menu in TS when launched for the first time + if( isHiddenFromFS ) + { + HideApplicationFromFSW( EFalse ); + isHiddenFromFS = EFalse; + } - } - } - } + if (iCurrentContainer && iCurrentSuiteModel ) + { + iCurrentContainer->HandleForegroundGainedL(); + iDummyContainer->MakeVisible( EFalse ); + iCurrentContainer->MakeVisible( ETrue ); + RefreshUiPanesL(); + } + if (iSkinChangeNeeded && !iSkinChangeInProgress) + { + MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); + if (skinInstance && !skinInstance->IsUpdateInProgress()) + { + RefreshIconsL(); + + } + } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmAppUi::HandleFullOrPartialForegroundLostL() - { - DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " - "- KAknFullOrPartialForegroundLost")); - if ( iCurrentContainer ) - { - iCurrentContainer->HandleBackgroundGainedL(); - if ( IsRootdisplayedL() ) - { - iCurrentContainer->RestoreWidgetPosition(); - iCurrentContainer->CacheWidgetPosition(); - } - } - } + { + DEBUG(("_Mm_:CMmAppUi::HandleWsEventL " + "- KAknFullOrPartialForegroundLost")); + if ( iCurrentContainer ) + { + iCurrentContainer->HandleBackgroundGainedL(); + if ( IsRootdisplayedL() ) + { + iCurrentContainer->RestoreWidgetPosition(); + iCurrentContainer->CacheWidgetPosition(); + } + } + } // End of File diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/matrixmenu/src/mmgui.cpp --- a/menufw/menufwui/matrixmenu/src/mmgui.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/matrixmenu/src/mmgui.cpp Wed May 12 13:12:59 2010 +0300 @@ -17,7 +17,6 @@ // INCLUDE FILES -#include #include #include "mmapplication.h" @@ -38,8 +37,5 @@ // GLDEF_C TInt E32Main() { - RAllocator* iAllocator = MemoryManager::SwitchToFastAllocator(); - TInt err = EikStart::RunApplication( NewApplication ); - MemoryManager::CloseFastAllocator(iAllocator); - return err; + return EikStart::RunApplication( NewApplication ); } diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/bwins/mmwidgetsu.def --- a/menufw/menufwui/mmwidgets/bwins/mmwidgetsu.def Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/bwins/mmwidgetsu.def Wed May 12 13:12:59 2010 +0300 @@ -37,4 +37,6 @@ ?CacheWidgetPosition@CMmWidgetContainer@@QAEXXZ @ 36 NONAME ; void CMmWidgetContainer::CacheWidgetPosition(void) ?SetIsFaded@CMmWidgetContainer@@QAEXH@Z @ 37 NONAME ; void CMmWidgetContainer::SetIsFaded(int) ?CancelDragL@CMmWidgetContainer@@QAEXH@Z @ 38 NONAME ; void CMmWidgetContainer::CancelDragL(int) + ?AllowMove@CMmWidgetContainer@@QBEHXZ @ 39 NONAME ; int CMmWidgetContainer::AllowMove(void) const + ?SetTriggerMoveItemL@CMmWidgetContainer@@QAEXHPAVCLiwGenericParamList@@@Z @ 40 NONAME ; void CMmWidgetContainer::SetTriggerMoveItemL(int, class CLiwGenericParamList *) diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/eabi/mmwidgetsu.def --- a/menufw/menufwui/mmwidgets/eabi/mmwidgetsu.def Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/eabi/mmwidgetsu.def Wed May 12 13:12:59 2010 +0300 @@ -38,4 +38,6 @@ _ZN19CMmListBoxContainer20SetDefaultHighlightLEi @ 37 NONAME _ZThn52_N18CMmWidgetContainer23HandleBackgroundGainedLEv @ 38 NONAME _ZThn52_N18CMmWidgetContainer23HandleForegroundGainedLEv @ 39 NONAME + _ZN18CMmWidgetContainer19SetTriggerMoveItemLEiP20CLiwGenericParamList @ 40 NONAME + _ZNK18CMmWidgetContainer9AllowMoveEv @ 41 NONAME diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/inc/mmdraganddropobserver.h --- a/menufw/menufwui/mmwidgets/inc/mmdraganddropobserver.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/inc/mmdraganddropobserver.h Wed May 12 13:12:59 2010 +0300 @@ -24,7 +24,7 @@ * Whenever a drag begins HandleDragStartL() is invoked. * When the highlight changes during drag, HandleDragOverL() is invoked. * When item is dropped, HandleDragStopL() is invoked. - * The set of the three methods fully notifies the observer about the state + * The set of the three methods fully notifies the observer about the state * of the drag. * * @code @@ -52,7 +52,7 @@ * @param aModelItemIndex Index of item that the dragged item hovers over. */ virtual void HandleDragOverL( TInt aModelItemIndex ) = 0; - + /** * Method is invoked on the observer, when the item is dropped. * @@ -60,7 +60,7 @@ * @param aModelItemIndex Index of item on which the draging stops. */ virtual void HandleDragStopL( TInt aModelItemIndex ) = 0; - + /** * Method is invoked on the observer, when the dragged item index changes. * @@ -68,7 +68,17 @@ * @param aModelItemIndex Index of item on which the draging stops. */ virtual void HandleDraggedIndexUpdatedL( TInt aModelItemIndex ) = 0; - + + /** + * Method is invoked on the observer, when the move item event is needed. + * + * @since S60 v5.0 + * @param aRecipientId Index of item on which the move event invokes. + * @param aEventParameters Event parameters. + */ + virtual void HandleTriggerMoveItemL( const TInt aRecipientId, + CLiwGenericParamList* aEventParameters) = 0; + }; - + #endif // M_MMDRAGANDDROPOBSERVER_H diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/inc/mmdraweranimator.h --- a/menufw/menufwui/mmwidgets/inc/mmdraweranimator.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/inc/mmdraweranimator.h Wed May 12 13:12:59 2010 +0300 @@ -22,11 +22,12 @@ #include #include + #ifdef RD_UI_TRANSITION_EFFECTS_LIST #include #include #include -#endif +#endif class CMmListBoxItemDrawer; class TMmFloatingItem; @@ -56,11 +57,11 @@ */ NONSHARABLE_CLASS( CMmDrawerAnimator ) : public CActive { - + public: /** * Two-phased constructor. - * + * * @since S60 v5.0 * @param aDrawer Item drawer used to draw item. */ @@ -68,15 +69,15 @@ /** * Two-phased constructor. - * + * * @since S60 v5.0 * @param aDrawer Item drawer used to draw item. */ static CMmDrawerAnimator* NewLC( CMmListBoxItemDrawer& aDrawer ); - + /** * Destructor. - * + * * @since S60 v5.0 */ virtual ~CMmDrawerAnimator(); @@ -90,9 +91,9 @@ * @since S60 v5.0 */ void AnimateDragItemTransitionL( ); - + /** - * Animates an item with index aItemFrom into position + * Animates an item with index aItemFrom into position * indexed by aItemTo. * * @since S60 v5.0 @@ -117,14 +118,14 @@ * @return Is system ready so new animation can proceed. */ TBool IsReadyForNewAnimation(); - + /** * Cancel currently running or pending animations. * * @since S60 v5.0 */ void CancelAnimationsL(); - + /** * Triggers animation. * This methods sets the Activeobject into active state @@ -134,41 +135,39 @@ * @return Error code */ TInt Trigger(); - - /** - * Marks next redraw to be cancelled. - * - * @return Indicates if redraw occured due to cancel. - */ - TBool CancelNextRedrawL(); - + /** * Make the next animation redraw the whole screen; */ void SetNextRedrawToWholeScreen(); - + /** * Indicates that draweranimator is in garbage. - * This is used when suite model has been destroyed so there isn't - * anything to draw, therefore any animator attempts should be + * This is used when suite model has been destroyed so there isn't + * anything to draw, therefore any animator attempts should be * dropped. */ void PrepareForGarbage(); - + + /** + * Calls move event. + */ + void TriggerMoveItemL(); + private: - + /** * Default constructor. - * + * * @since S60 v3.0 * @param aDrawer Object used to draw items in widgets. */ CMmDrawerAnimator( CMmListBoxItemDrawer& aDrawer ); - + /** * 2nd phase constructor. * - * @since S60 v3.0 + * @since S60 v3.0 */ void ConstructL(); @@ -196,10 +195,10 @@ * @return Error code for error handling. */ TInt RunError( TInt aError ); - + /** * Adjusts rect to non touch. - * + * * @since S60 v3.0 * @param aRefreshRect Refresh rect. * @return Adjusted rect. @@ -207,67 +206,67 @@ TRect AdjustRefreshRectToNonTouch( const TRect& aRefreshRect ); private: // Data - + /** * Timer - */ + */ RTimer iTimer; - + /** * Associated item drawer. - */ + */ CMmListBoxItemDrawer& iDrawer; - + /** * Number of animation frames - */ + */ TInt iAnimateFrames; /** * Delay between redrawing. - */ + */ TTimeIntervalMicroSeconds iDelay; - + /** * Last redraw time - */ + */ TTime iLastRedrawTime; - + /** * Effects api. - */ + */ MAknListBoxTfx *iTransTfx; - + /** * Effects api. - */ + */ MAknListBoxTfxInternal *iTransTfxInternal; - + /** * Highlight noted when last redraw occured. */ TInt iLastNotedHighlight; - + /** * Top item index noted when last redraw occured. */ TInt iLastNotedTopItem; - + /** * Vertical offset noted when last redraw occured. */ TInt iLastNotedVerticalOffset; - + /** * Holds the previous animation refresh rectangle. */ TRect iPreviousRefreshRect; - + /** * Holds the number of frames to animate. */ const TInt iUsualAnimationFramesCount; - + /** * Holds the previous animation refresh rectangle. */ diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/inc/mmlistboxitemdrawer.h --- a/menufw/menufwui/mmwidgets/inc/mmlistboxitemdrawer.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/inc/mmlistboxitemdrawer.h Wed May 12 13:12:59 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: CMmListBoxItemDrawer -* Version : %version: MM_38.1.16 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_38.1.17 % << Don't touch! Updated by Synergy at check-out. * */ @@ -238,6 +238,14 @@ void SetRedrawItemBackground( TBool aRedraw ); /** + * Sets condition if separator line should be drawn. + * + * @since S60 v3.0 + * @param aRedraw Should separator line be drawn. + */ + void SetDrawSeparatorLines( TBool aDraw ); + + /** * Checks if item background redrawing is enabled. * * @since S60 v3.0 @@ -470,12 +478,12 @@ void SetHighlightShown( TBool aDrawn ); /** - * Draws background and separator lines. + * Draws background. * * @since S60 v3.0 * @param aItemTextRect Item rectangle. */ - void DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const; + void DrawBackground( const TRect& aItemTextRect ) const; protected: /** @@ -800,6 +808,11 @@ TBool iRedrawBackground; /** + * Draw separators flag. + */ + TBool iDrawSeparatorLines; + + /** * Ratio of zooming animation. */ TReal iIconAnimationZoomRatio; diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/inc/mmlistboxview.h --- a/menufw/menufwui/mmwidgets/inc/mmlistboxview.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/inc/mmlistboxview.h Wed May 12 13:12:59 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: -* Version : %version: MM_12.1.6 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_12.1.7 % << Don't touch! Updated by Synergy at check-out. * */ @@ -210,6 +210,13 @@ */ void DisableScrollToItem( TBool aDisable ); + /** + * Gets number of items in model. + * + * @return + */ + TInt ModelItemsCount(); + private: /** diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h --- a/menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h Wed May 12 13:12:59 2010 +0300 @@ -30,6 +30,7 @@ #include #include #include +#include #include "hnsuiteobserver.h" #include "mmvisibilityobserver.h" @@ -62,7 +63,7 @@ * @ingroup group_mmwidgets */ class TMmWidgetPosition - { + { public: /** * Default constructor. @@ -71,34 +72,34 @@ TMmWidgetPosition(); public: // data - /** - * The vertical item offset cache. - */ - TInt iVerticalItemOffset; + /** + * The vertical item offset cache. + */ + TInt iVerticalItemOffset; - /** - * The top item index cache. - */ - TInt iTopItemIndex; + /** + * The top item index cache. + */ + TInt iTopItemIndex; - /** - * Tells if the cached values are valid. - */ - TBool iValid; + /** + * Tells if the cached values are valid. + */ + TBool iValid; - /** - * The mode (portrait/landscape) for which the cache is valid. - */ - TBool iLandscape; + /** + * The mode (portrait/landscape) for which the cache is valid. + */ + TBool iLandscape; - /** - * Id from model (not index) of the currently highlighted item. - * It should only be set if the currently highlighted item is - * visible (fully or partially), otherwise it must remain - * initialized to KErrNotFound. - */ - TInt iHighlightedItemId; - }; + /** + * Id from model (not index) of the currently highlighted item. + * It should only be set if the currently highlighted item is + * visible (fully or partially), otherwise it must remain + * initialized to KErrNotFound. + */ + TInt iHighlightedItemId; + }; /** * Interface for widget containers. @@ -114,7 +115,7 @@ public MMmVisibilityObserver, public MEikListBoxObserver, public MAknLongTapDetectorCallBack - { + { public: /** @@ -142,13 +143,13 @@ public: // Highlight related methods - /** - * Sets the default highlight. - * + /** + * Sets the default highlight. + * * @since S60 v3.0 * @param aRedraw Is highlight to redraw. */ - virtual void SetDefaultHighlightL( TBool aRedraw = ETrue ) = 0; + virtual void SetDefaultHighlightL( TBool aRedraw = ETrue ) = 0; /** * Sets the highlight. @@ -157,7 +158,7 @@ * @param aItemIndex Index to set the highlight at. * @param aRedraw Is highlight to redraw. */ - IMPORT_C virtual void SetManualHighlightL(TInt aItemIndex, TBool aRedraw = ETrue ); + IMPORT_C virtual void SetManualHighlightL(TInt aItemIndex, TBool aRedraw = ETrue ); /** * Gets the highlight from the widget. @@ -165,7 +166,7 @@ * @since S60 v3.0 * @return Current Highlight in the widget. */ - IMPORT_C virtual TInt GetHighlight(); + IMPORT_C virtual TInt GetHighlight(); /** * Gets the highlight from the widget. @@ -173,7 +174,7 @@ * @since S60 v3.0 * @return Previous Highlight in the widget. */ - IMPORT_C virtual TInt GetPreviousHighlight(); + IMPORT_C virtual TInt GetPreviousHighlight(); /** * Set highlight visibility. @@ -181,22 +182,22 @@ * @since S60 v3.0 * @param aVisible Visibility status. */ - IMPORT_C virtual void SetHighlightVisibilityL( TBool aVisible ); - + IMPORT_C virtual void SetHighlightVisibilityL( TBool aVisible ); + /** * Set highlight visibility. * * @since S60 v3.0 * @return Visibility status. */ - IMPORT_C virtual TBool IsHighlightVisible(); + IMPORT_C virtual TBool IsHighlightVisible(); /** * Handle item addition. * * @since S60 v3.0 */ - IMPORT_C virtual void HandleItemAdditionL(); + IMPORT_C virtual void HandleItemAdditionL(); /** @@ -204,14 +205,14 @@ * * @since S60 v3.0 */ - IMPORT_C virtual void HandleItemRemovalL(); + IMPORT_C virtual void HandleItemRemovalL(); /** * Handle item removal. * * @since S60 v3.0 */ - IMPORT_C CHnSuiteModel* GetSuiteModelL(); + IMPORT_C CHnSuiteModel* GetSuiteModelL(); /** * Retrieve type of widget. @@ -219,40 +220,40 @@ * @since S60 v3.0 * @return Type of widget. */ - IMPORT_C virtual THnSuiteWidgetType WidgetType(); + IMPORT_C virtual THnSuiteWidgetType WidgetType(); - /** - * Removes all LIW objects owned by this object. + /** + * Removes all LIW objects owned by this object. * * LIW objects owned by non-LIW objects that are owned by * this object are also removed. - */ - virtual void RemoveLiwObjects(); + */ + virtual void RemoveLiwObjects(); - /** - * Sets the long tap observer. + /** + * Sets the long tap observer. * * @param aObserver Observer to receive long tap events. - */ - IMPORT_C virtual void SetLongTapObserver( MMmLongTapObserver* aObserver ); + */ + IMPORT_C virtual void SetLongTapObserver( MMmLongTapObserver* aObserver ); - /** - * Informs the container that long tap event is finished (e.g. because - * a command from the context menu has been issued). - * - * @param aStopTimer ETrue when the highlight timer should be stopped. - */ - IMPORT_C virtual void EndLongTapL( TBool aStopTimer = ETrue ); + /** + * Informs the container that long tap event is finished (e.g. because + * a command from the context menu has been issued). + * + * @param aStopTimer ETrue when the highlight timer should be stopped. + */ + IMPORT_C virtual void EndLongTapL( TBool aStopTimer = ETrue ); public: - /** - * Sets suite model. - * - * @since S60 v3.0 - * @param aModel Suite model. - */ - virtual void SetSuiteModelL( CHnSuiteModel* aModel ); + /** + * Sets suite model. + * + * @since S60 v3.0 + * @param aModel Suite model. + */ + virtual void SetSuiteModelL( CHnSuiteModel* aModel ); /** * Gets Multimedia Menu model. @@ -260,7 +261,7 @@ * @since S60 v3.0 * @return Model. */ - virtual CMmListBoxModel* GetMmModel() = 0; + virtual CMmListBoxModel* GetMmModel() = 0; /** * Sets widget observer. @@ -268,7 +269,7 @@ * @since S60 v3.0 * @param aObserver Widget observer. */ - IMPORT_C virtual void SetObserver( MMmWidgetObserver* aObserver); + IMPORT_C virtual void SetObserver( MMmWidgetObserver* aObserver); /** * Gets item rectangle according to item index. @@ -277,7 +278,7 @@ * @param aItemIndex Item index. * @return Item rectangle. */ - IMPORT_C TRect GetItemRectL( TInt aItemIndex ); + IMPORT_C TRect GetItemRectL( TInt aItemIndex ); /** * Sets empty text visible when model has no items. @@ -285,7 +286,7 @@ * @since S60 v3.0 * @param aText Text to be shown when view is empty. */ - virtual void SetEmptyTextL(const TDesC& aText) = 0 ; + virtual void SetEmptyTextL(const TDesC& aText) = 0 ; /** * Sets flag. @@ -293,7 +294,7 @@ * @since S60 v3.0 * @param Flag Flag. */ - virtual void SetFlag(TInt Flag); + virtual void SetFlag(TInt Flag); /** * Gets widget. @@ -301,7 +302,7 @@ * @since S60 v3.0 * @return Widget. */ - virtual CEikListBox* Widget(); + virtual CEikListBox* Widget(); /** * Sets background context for item drawer and view. @@ -309,8 +310,8 @@ * @since S60 v3.0 * @param aBgContext Background context. */ - virtual void SetItemDrawerAndViewBgContext( - CAknsBasicBackgroundControlContext * aBgContext ) =0; + virtual void SetItemDrawerAndViewBgContext( + CAknsBasicBackgroundControlContext * aBgContext ) =0; /** * Sets edit mode so UI is aware. @@ -318,7 +319,7 @@ * @since S60 v3.0 * @param aIsEditMode Is edit mode. */ - virtual void SetEditModeL( TBool aIsEditMode ); + virtual void SetEditModeL( TBool aIsEditMode ); /** * Tells if UI is aware of edit mode. @@ -326,32 +327,32 @@ * @since S60 v5.0 * @return Edit mode status. */ - virtual TBool IsEditMode() const; + virtual TBool IsEditMode() const; /** * Sets up widget layout (needed for grid). * * @since S60 v3.0 */ - virtual void SetupWidgetLayoutL() =0; + virtual void SetupWidgetLayoutL() =0; /** * Constructor. */ - CMmWidgetContainer(); + CMmWidgetContainer(); /** * Destructor. */ ~CMmWidgetContainer(); - + /** * Enables/disables animation during long tap. * Tactile feedback is also enabled and disabled with the animation. * Changes made with this method will be effective on the next long * tap, i.e. it is not possible to stop an already started animation * by using this method. - * + * * @param aEnable ETrue - enable, EFalse - disable long tap animation * and long tap tactile feedback */ @@ -404,7 +405,7 @@ * @param aPointerEvent Pointer event. */ void HandlePointerEventsInEditModeL(const TPointerEvent& aPointerEvent, - TBool aAbortAnimations ); + TBool aAbortAnimations ); /** * Set draggable. @@ -655,14 +656,38 @@ * if marquee animation can be enabled. */ IMPORT_C void SetIsFaded( TBool aIsFaded ); - + /** * Determines if long tap is in progress. - * + * * @return ETrue if long tap is in progress. */ TBool LongTapInProgress() const; + /** + * Determines if folder can be moved to another one. + */ + IMPORT_C TBool AllowMove() const; + + /** + * Sets allow move param. + * @param aAllowMove. ETrue if move item is allowed. + */ + void SetAllowMove( TBool aAllowMove ); + + /** + * Sets parameters for move event. + * @param aRecipientId Item id to be moved. + * @param aEventParameters Event parameters. + */ + IMPORT_C void SetTriggerMoveItemL( const TInt aRecipientId, + CLiwGenericParamList* aEventParameters ); + + /** + * Calls move event. + */ + void TriggerMoveItemL(); + public: // from MMmVisibilityObserver /** @@ -703,7 +728,7 @@ * * @since S60 v3.0 */ - void ConstructL(); + void ConstructL(); /** * Sets highlight locally. @@ -712,9 +737,9 @@ * @since S60 v3.0 * @param aItemIndex Index of the item. */ - void SetHighlightL(TInt aItemIndex); + void SetHighlightL(TInt aItemIndex); - /** + /** * Checks whether given point collides with specific item's re-order area. * * This function gets called during drag-and-drop operations to @@ -755,13 +780,13 @@ private: - /** - * Called when the number of items in widget model changed. - * @since S60 v5.0 - * - * @param aChange Type of change - */ - void HandleNumberOfItemsChangedL( TItemsChangeType aChange ); + /** + * Called when the number of items in widget model changed. + * @since S60 v5.0 + * + * @param aChange Type of change + */ + void HandleNumberOfItemsChangedL( TItemsChangeType aChange ); /** * Manages zooming of folder. @@ -769,7 +794,7 @@ * @since S60 v3.0 * @param aDraggedItemOverIcons Is dragged over icons flag. */ - void ManageFolderZoomingL( TBool aDraggedItemOverIcons ); + void ManageFolderZoomingL( TBool aDraggedItemOverIcons ); /** * Cancels gragging of item if relevant( Edit Mode is activated ) @@ -807,7 +832,7 @@ * @return Distance between two points in pixels. */ TInt DeltaSquare( const TPoint aTapPoint, - const TPoint aPos ); + const TPoint aPos ); /** * Checks, whether given item is a folder or root folder. @@ -817,17 +842,17 @@ TBool IsFolderL( TInt aItemIndex ); /** - * Checks, whether given item has IsDeleteLockedL flag set. - * @param aItemIndex Item index to check. - * @returns IsDeleteLockedL flag - */ - TBool IsDeleteLockedL( TInt aItemIndex ); + * Checks, whether given item has IsDeleteLockedL flag set. + * @param aItemIndex Item index to check. + * @returns IsDeleteLockedL flag + */ + TBool IsDeleteLockedL( TInt aItemIndex ); - /** - * Gets column count in current view. - * @returns Column count in current view. - */ - virtual TInt ColumnsInCurrentView(); + /** + * Gets column count in current view. + * @returns Column count in current view. + */ + virtual TInt ColumnsInCurrentView(); /** * Gets row count in current view. @@ -835,35 +860,35 @@ */ virtual TInt RowsInCurrentView(); - /** - * Scrolls the view move mode non-touch so that move indicators are visible. - */ - void ScrollViewIfNeededL(); + /** + * Scrolls the view move mode non-touch so that move indicators are visible. + */ + void ScrollViewIfNeededL(); /** * Scrolls the view in pixels. * @param aPixels THe number of pixels to scroll. If negative, the view is scrolled down. */ - void ScrollInPixelsL( TInt aPixels ); + void ScrollInPixelsL( TInt aPixels ); /** * Sets up the scrolling effect movement type. * @param aDown True if scrolling is downwards. */ - void SetupScrollingEffectsL( TBool aDown ); + void SetupScrollingEffectsL( TBool aDown ); protected: - /** - * Own. - */ - CEikListBox* iWidget; + /** + * Own. + */ + CEikListBox* iWidget; /** * Key event observer. */ - MMmKeyEventObserver* iKeyEventObserver; + MMmKeyEventObserver* iKeyEventObserver; /** * Drag and drop observer. @@ -888,24 +913,24 @@ protected: - /** - * Current Highlight. - */ - TInt iCurrentHighlight; + /** + * Current Highlight. + */ + TInt iCurrentHighlight; /** * Has drag occurred. */ TBool iDragOccured; - /** - * Processed display elelments for better performance. - */ + /** + * Processed display elelments for better performance. + */ CMmPostEvaluationProcessor* iPostProcessor; - /** - * Set when long tap is in progress (stylus popup displayed over container) - */ + /** + * Set when long tap is in progress (stylus popup displayed over container) + */ TBool iLongTapInProgress; private: @@ -915,51 +940,51 @@ * Background context. * Own. */ - CAknsBasicBackgroundControlContext* iBgContext; + CAknsBasicBackgroundControlContext* iBgContext; /** * Last drag point. */ - TPoint iLastDragPoint; + TPoint iLastDragPoint; /** * First tap point. */ - TPoint iTapPoint; + TPoint iTapPoint; /** * First tap point. */ - TPoint iItemRelativeTapPoint; + TPoint iItemRelativeTapPoint; - /** + /** * Last drag highlight. */ - TInt iLastDragHighlight; + TInt iLastDragHighlight; /** * Dragged item index. */ - TBool iDraggedIndex; + TBool iDraggedIndex; /** * Edit mode status. */ - TBool iIsEditMode; + TBool iIsEditMode; - /** + /** * Destination of item index. */ - TInt iItemIndexDestination; + TInt iItemIndexDestination; - /** + /** * Previous Highlight. */ - TInt iPreviousHighlight; + TInt iPreviousHighlight; - /** - * The current rect of the widget control. - */ + /** + * The current rect of the widget control. + */ TRect iWidgetRect; /** @@ -969,9 +994,9 @@ */ TBool iAllowLongPress; - /** - * Cache for widget position. - */ + /** + * Cache for widget position. + */ TMmWidgetPosition iWidgetPositionCache; /** @@ -1000,7 +1025,7 @@ * Observer to notify about long tap events. */ MMmLongTapObserver* iLongTapObserver; - + /** * Stores previously set highlight visibility. * ETrue - hightlight visible, EFalse - highlight disabled. @@ -1011,6 +1036,21 @@ */ TBool iPreviousHighlightVisibility; - }; + /** + * Defines if move item is allowed. + */ + TBool iAllowMove; + + /** + * Defines item id to be moved. + */ + TInt iRecipientId; + + /** + * Event parameters for move item. + */ + CLiwGenericParamList *iEventParameters; + + }; #endif // MMMWIDGETCONTAINER_H diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/inc/mmwidgetsconstants.h --- a/menufw/menufwui/mmwidgets/inc/mmwidgetsconstants.h Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/inc/mmwidgetsconstants.h Wed May 12 13:12:59 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: Constants for the matrixmenu -* Version : %version: 33.1.12 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 33.1.13 % << Don't touch! Updated by Synergy at check-out. * */ @@ -27,256 +27,256 @@ * Grid constants' namespace. */ namespace MmGrid - { - /** - * X component of the 4x3 layout. - */ - const TInt K4By3LayoutX = 4; + { + /** + * X component of the 4x3 layout. + */ + const TInt K4By3LayoutX = 4; - /** - * Y component of the 4x3 layout. - */ - const TInt K4By3LayoutY = 3; + /** + * Y component of the 4x3 layout. + */ + const TInt K4By3LayoutY = 3; - /** - * X component of the 3x4 layout. - */ + /** + * X component of the 3x4 layout. + */ - const TInt K3By4LayoutX = 3; + const TInt K3By4LayoutX = 3; - /** - * Y component of the 3x4 layout. - */ - const TInt K3By4LayoutY = 4; + /** + * Y component of the 3x4 layout. + */ + const TInt K3By4LayoutY = 4; - /** - * X component of the 4x5 layout. - */ - const TInt K4By5LayoutX = 4; + /** + * X component of the 4x5 layout. + */ + const TInt K4By5LayoutX = 4; - /** - * Y component of the 5x4 layout. - */ - const TInt K4By5LayoutY = 5; + /** + * Y component of the 5x4 layout. + */ + const TInt K4By5LayoutY = 5; - /** - * X component of the 5x4 layout. - */ - const TInt K5By4LayoutX = 5; + /** + * X component of the 5x4 layout. + */ + const TInt K5By4LayoutX = 5; - /** - * Y component of the 5x4 layout. - */ - const TInt K5By4LayoutY = 4; + /** + * Y component of the 5x4 layout. + */ + const TInt K5By4LayoutY = 4; - /** - * Below this value, default highlight in 3x4 grid - * is set up on the first item. Otherwize, on the default - * highlight. - */ - const TInt K3By4Threshold(5); + /** + * Below this value, default highlight in 3x4 grid + * is set up on the first item. Otherwize, on the default + * highlight. + */ + const TInt K3By4Threshold(5); - /** - * Below this value, default highlight in 4x3 grid - * is set up on the first item. Otherwize, on the default - * highlight. - */ - const TInt K4By3Threshold(6); + /** + * Below this value, default highlight in 4x3 grid + * is set up on the first item. Otherwize, on the default + * highlight. + */ + const TInt K4By3Threshold(6); - /** - * Below this value, default highlight in 5x4 grid - * is set up on the first item. Otherwize, on the default - * highlight. - */ - const TInt K5By4Threshold(8); + /** + * Below this value, default highlight in 5x4 grid + * is set up on the first item. Otherwize, on the default + * highlight. + */ + const TInt K5By4Threshold(8); - /** - * Below this value, default highlight in 4x5 grid - * is set up on the first item. Otherwize, on the default - * highlight. - */ - const TInt K4By5Threshold(10); + /** + * Below this value, default highlight in 4x5 grid + * is set up on the first item. Otherwize, on the default + * highlight. + */ + const TInt K4By5Threshold(10); - /** - * Default highlight in 3x4 grid. - */ - const TInt K3By4DefaultHighlight(4); + /** + * Default highlight in 3x4 grid. + */ + const TInt K3By4DefaultHighlight(4); - /** - * Default highlight in 4x3 grid. - */ - const TInt K4By3DefaultHighlight(5); + /** + * Default highlight in 4x3 grid. + */ + const TInt K4By3DefaultHighlight(5); - /** - * Default highlight in 5x4 grid. - */ - const TInt K5By4DefaultHighlight(7); + /** + * Default highlight in 5x4 grid. + */ + const TInt K5By4DefaultHighlight(7); - /** - * Default highlight in 4x5 grid. - */ - const TInt K4By5DefaultHighlight(8); + /** + * Default highlight in 4x5 grid. + */ + const TInt K4By5DefaultHighlight(8); - /** - * Number of rows in portrait/non-zoom mode; - */ - const TInt KRowsPortraitZoomNormal(4); + /** + * Number of rows in portrait/non-zoom mode; + */ + const TInt KRowsPortraitZoomNormal(4); - /** - * Number of columns in landscape/non-zoom mode; - */ - const TInt KColsPortraitZoomNormal(3); + /** + * Number of columns in landscape/non-zoom mode; + */ + const TInt KColsPortraitZoomNormal(3); - /** - * Number of rows in portrait/non-zoom mode; - */ - const TInt KRowsLandscapeZoomNormal(3); + /** + * Number of rows in portrait/non-zoom mode; + */ + const TInt KRowsLandscapeZoomNormal(3); - /** - * Number of columns in landscape/non-zoom mode; - */ - const TInt KColsLandscapeZoomNormal(4); - + /** + * Number of columns in landscape/non-zoom mode; + */ + const TInt KColsLandscapeZoomNormal(4); + /** * Focus based scrolling item threshold for grid. */ const TReal KFocusScrollingThreshold( 0.27 ); - } + } /** * Listbox constants' namespace. */ namespace MmListBox - { - /** - * Threshold value, determinign if a partial should - * be shown in a list. - */ - const TInt KPartialItemShowThreshold (0); + { + /** + * Threshold value, determinign if a partial should + * be shown in a list. + */ + const TInt KPartialItemShowThreshold( 0 ); - /** - * Default highlight in 4x5 grid. - */ - const TInt KCols(1); - + /** + * Default highlight in 4x5 grid. + */ + const TInt KCols( 1 ); + /** * Focus based scrolling item threshold for list. */ const TReal KFocusScrollingThreshold( 0.55 ); - } + } /** * Drag and drop related constants. */ namespace MmEffects - { - /** - * Threshold for items shift. - */ - const TReal KShiftRatio(0.25); + { + /** + * Threshold for items shift. + */ + const TReal KShiftRatio( 0.25 ); - /** - * Drag and drop speed limit. - */ - const TInt KDragSpeedIgnoreThreshold(15 * 15); + /** + * Drag and drop speed limit. + */ + const TInt KDragSpeedIgnoreThreshold( 15 * 15 ); - /** - * Number of frames to animate. - */ - const TInt KMaximumAnimationFramesCount( 6 ); + /** + * Number of frames to animate. + */ + const TInt KMaximumAnimationFramesCount( 6 ); - /** - * Number of frames to animate. - */ - const TInt KUsualAnimationFramesCount( 3 ); + /** + * Number of frames to animate. + */ + const TInt KUsualAnimationFramesCount( 3 ); - /** - * Number of frames to animate on non-touch devices. - */ - const TInt KUsualAnimationFramesCountNonTouch( 2 ); + /** + * Number of frames to animate on non-touch devices. + */ + const TInt KUsualAnimationFramesCountNonTouch( 2 ); - /** - * No animation frames count. - */ - const TInt KNoAnimationFramesCount( 1 ); + /** + * No animation frames count. + */ + const TInt KNoAnimationFramesCount( 1 ); - /** - * Delay between redrawing frames. - */ - const TInt KAnimationFrameDelay( 40000 ); + /** + * Delay between redrawing frames. + */ + const TInt KAnimationFrameDelay( 35000 ); - /** - * Text alpha during drag. - */ - const TInt KDragTextAlpha( 50 ); + /** + * Text alpha during drag. + */ + const TInt KDragTextAlpha( 50 ); - /** - * Value of drag ignore. - */ - const TInt KDragIgnoreRectValue(200); + /** + * Value of drag ignore. + */ + const TInt KDragIgnoreRectValue( 200 ); - /** - * Time between two butto repeat events. - */ - const TInt KDragRepeatRespawn(2); + /** + * Time between two butto repeat events. + */ + const TInt KDragRepeatRespawn( 2 ); - /** - * Determines the speed of focus-based scrolling in edit mode. - */ - const TInt KEditModeScrollingDelayFactor = 4000; - } + /** + * Determines the speed of focus-based scrolling in edit mode. + */ + const TInt KEditModeScrollingDelayFactor = 4000; + } /** * Templates' related constants. */ namespace MmTemplateContants - { - /** - * If a custom (non LCT) template is used, this is - * its default scrollbar width. - */ - const TInt KCustomTemplateScrolbarWidth (25); + { + /** + * If a custom (non LCT) template is used, this is + * its default scrollbar width. + */ + const TInt KCustomTemplateScrolbarWidth (25); - const TInt KTemplateChildTextLength (64); + const TInt KTemplateChildTextLength (64); - const TInt KSubCellsCount (6); + const TInt KSubCellsCount (6); - const TInt KItemSubCellsText (300); + const TInt KItemSubCellsText (300); - const TInt KMoveIndicatorStartingPos ( 32 ); + const TInt KMoveIndicatorStartingPos ( 32 ); - } + } /** * Shortcut constants. */ namespace MmShortcutConstants - { - /** - * Possible scancodes when interpreting shortcut key. - */ - const TInt KScanCodes[] = { '1','2','3','4','5','6','7','8','9', + { + /** + * Possible scancodes when interpreting shortcut key. + */ + const TInt KScanCodes[] = { '1','2','3','4','5','6','7','8','9', #ifndef __WINS__ '*', #else EStdKeyNkpAsterisk, #endif - '0', EStdKeyHash }; + '0', EStdKeyHash }; - /** - * Number of available scancodes. - */ - const TInt KScanCodeCount = 12; - } + /** + * Number of available scancodes. + */ + const TInt KScanCodeCount = 12; + } namespace MmMarqueeConstants - { - const TInt KTextTrimmingThreshold (80); - const TInt KClippingBufLength (80); - const TInt KLoops (1); - const TInt KScrollAmount (6); - const TInt KScrollDelay (1000000); - } + { + const TInt KTextTrimmingThreshold (80); + const TInt KClippingBufLength (80); + const TInt KLoops (1); + const TInt KScrollAmount (6); + const TInt KScrollDelay (1000000); + } /** * Matrix Template Library panic notice. */ @@ -306,7 +306,7 @@ _LIT8( KImageVisual8, "imagevisual" ); _LIT8( KImagePath8, "imagepath" ); _LIT8( KGridLayout8, "gridlayout" ); -_LIT8( KEnabled8, "enabled" ); +_LIT8( KEnabled8, "enabled" ); _LIT8( KRow8, "row" ); _LIT8( KCol8, "col" ); _LIT8( KPositionX8, "positionx" ); @@ -373,18 +373,18 @@ _LIT8( KUiaccelAagridCellImagePaneG38, "uiaccel_aagrid_cell_image_pane_g3" ); _LIT8( KUiaccelAagridCellImagePaneG48, "uiaccel_aagrid_cell_image_pane_g4" ); -_LIT8( KCellHcAppsPane8, "cell_hc_apps_pane" ); +_LIT8( KCellHcAppsPane8, "cell_hc_apps_pane" ); _LIT8( KCellHcAppsPaneT18, "cell_hc_apps_pane_t1" ); _LIT8( KCellHcAppsPaneG18, "cell_hc_apps_pane_g1" ); _LIT8( KCellHcAppsPaneG28, "cell_hc_apps_pane_g2" ); _LIT8( KCellHcAppsPaneG38, "cell_hc_apps_pane_g3" ); -_LIT8( KCellAppPane8, "cell_app_pane" ); +_LIT8( KCellAppPane8, "cell_app_pane" ); _LIT8( KCellAppsPaneG18, "cell_app_pane_g1" ); _LIT8( KCellAppsPaneT18, "cell_app_pane_t1" ); _LIT8( KCellAppsPaneG28, "cell_app_pane_g2" ); -_LIT8( KListSingleHcAppsPane8, "list_single_hc_apps_pane" ); +_LIT8( KListSingleHcAppsPane8, "list_single_hc_apps_pane" ); _LIT8( KListSingleHcAppsPaneT18, "list_single_hc_apps_pane_t1" ); _LIT8( KListSingleHcAppsPaneG18, "list_single_hc_apps_pane_g1" ); _LIT8( KListSingleHcAppsPaneG28, "list_single_hc_apps_pane_g2" ); @@ -443,7 +443,7 @@ /** * The minimal drag vector y-length that can trigger kinetic scrolling. * This is just a rough estimation of the actual trigger value used by AVKON, - * but it is sufficient for our purposes. + * but it is sufficient for our purposes. */ const TInt KDragTreshold = 18; diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmdraweranimator.cpp --- a/menufw/menufwui/mmwidgets/src/mmdraweranimator.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmdraweranimator.cpp Wed May 12 13:12:59 2010 +0300 @@ -1,20 +1,20 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: -* Version : %version: MM_41 % << Don't touch! Updated by Synergy at check-out. -* -*/ + * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "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: + * + * Description: + * Version : %version: MM_41 % << Don't touch! Updated by Synergy at check-out. + * + */ #include @@ -23,31 +23,31 @@ #include "mmfloatingitem.h" #include "mmwidgetcontainer.h" - // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// -CMmDrawerAnimator::CMmDrawerAnimator(CMmListBoxItemDrawer& aDrawer) : - CActive( AknLayoutUtils::PenEnabled() ? - EPriorityRealTime : - EPriorityAbsoluteRealTime8 ), iDrawer(aDrawer), +// +CMmDrawerAnimator::CMmDrawerAnimator( CMmListBoxItemDrawer& aDrawer ) : + CActive( AknLayoutUtils::PenEnabled() + ? EPriorityAbsoluteVeryLow + : EPriorityAbsoluteRealTime8 ), iDrawer( aDrawer ), iLastNotedHighlight( KErrNotFound ), iLastNotedTopItem( KErrNotFound ), iLastNotedVerticalOffset( 0 ), - iUsualAnimationFramesCount( AknLayoutUtils::PenEnabled() ? - MmEffects::KUsualAnimationFramesCount : - MmEffects::KUsualAnimationFramesCountNonTouch ) + iUsualAnimationFramesCount( AknLayoutUtils::PenEnabled() + ? MmEffects::KUsualAnimationFramesCount + : MmEffects::KUsualAnimationFramesCountNonTouch ), + iPreparedForGarbage( EFalse ) { } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// -CMmDrawerAnimator* CMmDrawerAnimator::NewLC(CMmListBoxItemDrawer& aDrawer) +// +CMmDrawerAnimator* CMmDrawerAnimator::NewLC( CMmListBoxItemDrawer& aDrawer ) { - CMmDrawerAnimator* self = new ( ELeave ) CMmDrawerAnimator(aDrawer); - CleanupStack::PushL(self); + CMmDrawerAnimator* self = new ( ELeave ) CMmDrawerAnimator( aDrawer ); + CleanupStack::PushL( self ); self->ConstructL(); return self; } @@ -55,10 +55,10 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// -CMmDrawerAnimator* CMmDrawerAnimator::NewL(CMmListBoxItemDrawer& aDrawer) +// +CMmDrawerAnimator* CMmDrawerAnimator::NewL( CMmListBoxItemDrawer& aDrawer ) { - CMmDrawerAnimator* self = CMmDrawerAnimator::NewLC(aDrawer); + CMmDrawerAnimator* self = CMmDrawerAnimator::NewLC( aDrawer ); CleanupStack::Pop( self ); return self; } @@ -66,18 +66,17 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// void CMmDrawerAnimator::ConstructL() { User::LeaveIfError( iTimer.CreateLocal() ); // Initialize timer - CActiveScheduler::Add( this); // Add to scheduler - iPreparedForGarbage = EFalse; + CActiveScheduler::Add( this ); // Add to scheduler } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// CMmDrawerAnimator::~CMmDrawerAnimator() { Cancel(); // Cancel any request, if outstanding @@ -88,141 +87,129 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// void CMmDrawerAnimator::DoCancel() { iTimer.Cancel(); + if( iDrawer.GetFloatingItemCount() == 0 ) + { + TRAP_IGNORE(TriggerMoveItemL()); + } } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// -TBool CMmDrawerAnimator::CancelNextRedrawL() - { - RunL(); - TTime currentTime; - currentTime.HomeTime(); - return (currentTime.MicroSecondsFrom(iLastRedrawTime) - <= MmEffects::KAnimationFrameDelay); - } -// ----------------------------------------------------------------------------- // -// ----------------------------------------------------------------------------- -// void CMmDrawerAnimator::RunL() - { - if ( iPreparedForGarbage ) - { - return; - } - - TTime currentTime; - currentTime.HomeTime(); - - if (currentTime.MicroSecondsFrom(iLastRedrawTime) - >= MmEffects::KAnimationFrameDelay && iDrawer.GetFloatingItemCount() > 0) - { - Cancel(); - - TRect refreshRect; - for(int i=0; i< iDrawer.GetFloatingItemCount(); i++) - { - TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex(i); - TSize itemSize = iDrawer.GetItemSize(current.GetDrawnItemIndex(), EFalse); + { + if( iPreparedForGarbage ) + { + return; + } + + if( iDrawer.GetFloatingItemCount() > 0 ) + { + TRect refreshRect; + for( int i = 0; i < iDrawer.GetFloatingItemCount(); i++ ) + { + TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex( i ); + TSize itemSize = iDrawer.GetItemSize(current.GetDrawnItemIndex(), EFalse); + + TRect beforeRect( current.GetItemPosition(), itemSize ); + current.MakeStep(); + TRect afterRect( current.GetItemPosition(), itemSize ); - TRect beforeRect(current.GetItemPosition(), itemSize); - current.MakeStep(); - TRect afterRect(current.GetItemPosition(), itemSize); - - if (current.GetFloatingItemType() == EDrag ) - { - TInt dragTrail = iDrawer.GetFloatingItemIndex( EPostDragRefreshItem ); - if (dragTrail != KErrNotFound) - { - refreshRect = (refreshRect == TRect(0,0,0,0)) ? beforeRect : refreshRect; - refreshRect.BoundingRect( afterRect ); - } - } - else - { - refreshRect = (refreshRect == TRect(0,0,0,0)) ? beforeRect : refreshRect; - refreshRect.BoundingRect( beforeRect ); - refreshRect.BoundingRect( afterRect ); - } - } - const TInt highlightedItemIndex = iDrawer.Widget()->View()->CurrentItemIndex(); - if ( iLastNotedHighlight != highlightedItemIndex ) - { + if( current.GetFloatingItemType() == EDrag ) + { + TInt dragTrail = iDrawer.GetFloatingItemIndex( EPostDragRefreshItem ); + if( dragTrail != KErrNotFound ) + { + refreshRect = ( refreshRect == TRect() ) ? beforeRect : refreshRect; + refreshRect.BoundingRect( afterRect ); + static_cast ( iDrawer.Widget()->Parent() )-> + SetAllowMove( EFalse ); + } + } + else + { + refreshRect = (refreshRect == TRect() ) ? beforeRect : refreshRect; + refreshRect.BoundingRect( beforeRect ); + refreshRect.BoundingRect( afterRect ); + } + } + const TInt highlightedItemIndex = iDrawer.Widget()->View()->CurrentItemIndex(); + if( iLastNotedHighlight != highlightedItemIndex ) + { TRect highlightedItemRect( iDrawer.Widget()->View()->ItemPos( highlightedItemIndex ), - iDrawer.Widget()->View()->ItemSize( highlightedItemIndex ) ); + iDrawer.Widget()->View()->ItemSize( highlightedItemIndex ) ); refreshRect.BoundingRect( highlightedItemRect ); iLastNotedHighlight = highlightedItemIndex; - } + } + + + TInt currentVerticalOffset = static_cast( + iDrawer.Widget()->Parent() )->VerticalItemOffset(); - - TInt currentVerticalOffset = static_cast( - iDrawer.Widget()->Parent() )->VerticalItemOffset(); + if( iLastNotedTopItem != iDrawer.Widget()->TopItemIndex() + || iLastNotedVerticalOffset != currentVerticalOffset ) + { + iDrawer.Widget()->DrawNow(); + iLastNotedTopItem = iDrawer.Widget()->TopItemIndex(); + iLastNotedVerticalOffset = currentVerticalOffset; + } + else + { + if( refreshRect != TRect() ) + { + TRect prev( iPreviousRefreshRect ); + iPreviousRefreshRect = refreshRect; + refreshRect.BoundingRect( prev ); + + // expand rect if non-touch + refreshRect = TRect( AdjustRefreshRectToNonTouch( refreshRect ) ); + + // never draw on the outside of widget's view rectangle + refreshRect.Intersection( iDrawer.Widget()->View()->ViewRect() ); - if (iLastNotedTopItem != iDrawer.Widget()->TopItemIndex() || - iLastNotedVerticalOffset != currentVerticalOffset ) - { - iDrawer.Widget()->DrawNow(); - iLastNotedTopItem = iDrawer.Widget()->TopItemIndex(); - iLastNotedVerticalOffset = currentVerticalOffset; - } - else - { - if ( refreshRect != TRect(0,0,0,0)) - { - TRect prev(iPreviousRefreshRect); - iPreviousRefreshRect = refreshRect; - refreshRect.BoundingRect(prev); - - // expand rect if non-touch - refreshRect = TRect( AdjustRefreshRectToNonTouch( refreshRect ) ); - - // never draw on the outside of widget's view rectangle - refreshRect.Intersection( iDrawer.Widget()->View()->ViewRect() ); - - iDrawer.Widget()->View()->Draw( &refreshRect ); - } - } + iDrawer.Widget()->View()->Draw( &refreshRect ); + } + } + + iLastRedrawTime.HomeTime(); + + } - - iLastRedrawTime.HomeTime(); - - } - - if (iDrawer.GetFloatingItemCount() > 0) - { - Trigger(); - } - else - { - Cancel(); - + if( iDrawer.GetFloatingItemCount() > 0 ) + { + Trigger(); + } + else + { + TriggerMoveItemL(); + Cancel(); + #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( iTransTfx && iTransTfxInternal->EffectsDisabled() ) - { - iTransTfx->EnableEffects( ETrue ); - - if ( iTransTfx ) - { - iTransTfxInternal->Remove( MAknListBoxTfxInternal::EListEverything ); - iDrawer.Widget()->DrawNow(); - iTransTfxInternal->Draw( iDrawer.Widget()->Rect() ); - } - } + if( iTransTfx && iTransTfxInternal->EffectsDisabled() ) + { + iTransTfx->EnableEffects( ETrue ); + + if( iTransTfx ) + { + iTransTfxInternal->Remove( MAknListBoxTfxInternal::EListEverything ); + iDrawer.Widget()->DrawNow(); + iTransTfxInternal->Draw( iDrawer.Widget()->Rect() ); + } + } #endif - } + } } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// TRect CMmDrawerAnimator::AdjustRefreshRectToNonTouch( const TRect& aRefreshRect ) { TRect rect( aRefreshRect ); @@ -231,13 +218,10 @@ TRect indicatorRect( iDrawer.GetIndicatorRect() ); TSize itemSize( iDrawer.GetItemSize( iDrawer.Widget()->CurrentItemIndex(), ETrue ) ); - + TInt horizontalMargin( ( indicatorRect.Width() - itemSize.iWidth ) / 2 ); TInt verticalMargin( ( indicatorRect.Height() - itemSize.iHeight ) / 2 ); - rect.iBr.iX += horizontalMargin; - rect.iBr.iY += verticalMargin; - rect.iTl.iX -= horizontalMargin; - rect.iTl.iY -= verticalMargin; + rect.Grow(horizontalMargin, verticalMargin); } return rect; } @@ -245,35 +229,34 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// TInt CMmDrawerAnimator::Trigger() { - if ( iPreparedForGarbage ) - { - return KErrCancel; - } - - if (!IsActive() && iDrawer.GetFloatingItemCount() > 0 ) + if( iPreparedForGarbage ) + { + return KErrCancel; + } + + if( !IsActive() && iDrawer.GetFloatingItemCount() > 0 ) { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - iTransTfx = CAknListLoader::TfxApi( iDrawer.Gc() ); - iTransTfxInternal = CAknListLoader::TfxApiInternal( - iDrawer.Gc() ); - - if ( iTransTfx && !iTransTfxInternal->EffectsDisabled() ) - { - iTransTfx->EnableEffects( EFalse ); - - if ( iTransTfxInternal ) - { - iTransTfxInternal->Remove( MAknListBoxTfxInternal::EListEverything ); - iTransTfxInternal->Draw( iDrawer.Widget()->Rect() ); - } - } + iTransTfx = CAknListLoader::TfxApi( iDrawer.Gc() ); + iTransTfxInternal = CAknListLoader::TfxApiInternal( iDrawer.Gc() ); + + if( iTransTfx && !iTransTfxInternal->EffectsDisabled() ) + { + iTransTfx->EnableEffects( EFalse ); + + if( iTransTfxInternal ) + { + iTransTfxInternal->Remove( MAknListBoxTfxInternal::EListEverything ); + iTransTfxInternal->Draw( iDrawer.Widget()->Rect() ); + } + } #endif - - iTimer.After(iStatus, TTimeIntervalMicroSeconds32( - MmEffects::KAnimationFrameDelay ) ); + + iTimer.After( iStatus, TTimeIntervalMicroSeconds32( + MmEffects::KAnimationFrameDelay ) ); SetActive(); } return KErrNone; @@ -282,8 +265,8 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// -TInt CMmDrawerAnimator::RunError(TInt aError) +// +TInt CMmDrawerAnimator::RunError( TInt aError ) { return aError; } @@ -291,39 +274,39 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// -void CMmDrawerAnimator::AnimateDragItemTransitionL( ) - { - if (KErrNotFound != iDrawer.GetFloatingItemIndex(EDrag)) +// +void CMmDrawerAnimator::AnimateDragItemTransitionL() + { + if( KErrNotFound != iDrawer.GetFloatingItemIndex( EDrag ) ) { TMmFloatingItem floatingItem( - iDrawer.GetFloatingItemL(EDrag).GetDrawnItemIndex(), - iDrawer.GetFloatingItemL(EDrag).GetItemPosition(), + iDrawer.GetFloatingItemL( EDrag ).GetDrawnItemIndex(), + iDrawer.GetFloatingItemL( EDrag ).GetItemPosition(), EDragTransition, iUsualAnimationFramesCount, - iDrawer.Widget()->View()); + iDrawer.Widget()->View() ); TPoint pointEnd = iDrawer.Widget()->View()->ItemPos( floatingItem.GetDrawnItemIndex() ); floatingItem.SetPositionStep( pointEnd - floatingItem.GetItemPosition() ); iDrawer.AddFloatingItemL( floatingItem, 0 ); - iDrawer.RemoveFloatingItem( iDrawer.GetFloatingItemIndex(EDrag) ); + iDrawer.RemoveFloatingItem( iDrawer.GetFloatingItemIndex( EDrag ) ); } } - + // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TBool CMmDrawerAnimator::IsReadyForNewAnimation() { - if ( iPreparedForGarbage ) - { - return EFalse; - } - - for(int i=0; i< iDrawer.GetFloatingItemCount(); i++) + if( iPreparedForGarbage ) { - TMmFloatingItemType type - = iDrawer.GetFloatingItemAtIndex(i).GetFloatingItemType(); - if ( type != EDrag && type != EZoomTransition ) + return EFalse; + } + + for( int i = 0; i < iDrawer.GetFloatingItemCount(); i++ ) + { + TMmFloatingItemType type = + iDrawer.GetFloatingItemAtIndex( i ).GetFloatingItemType(); + if( type != EDrag && type != EZoomTransition ) { return EFalse; } @@ -337,32 +320,32 @@ // void CMmDrawerAnimator::CancelAnimationsL() { - for(int i=0; i< iDrawer.GetFloatingItemCount(); i++) + for( int i = 0; i < iDrawer.GetFloatingItemCount(); i++ ) { - TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex(i); - if (current.GetFloatingItemType() != EDrag) + TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex( i ); + if( current.GetFloatingItemType() != EDrag ) { current.InvalidateFloatingItem(); } } } - // ----------------------------------------------------------------------------- - // - // ----------------------------------------------------------------------------- - // +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// void CMmDrawerAnimator::AnimateItemSwapL( TInt aItemFrom, TInt aItemTo ) { - TMmFloatingItem floatingItem( aItemTo, - iDrawer.Widget()->View()->ItemPos( aItemFrom ), + TMmFloatingItem floatingItem( aItemTo, + iDrawer.Widget()->View()->ItemPos( aItemFrom ), ESwapTransition, iUsualAnimationFramesCount, iDrawer.Widget()->View() ); - - for(int i=0; i< iDrawer.GetFloatingItemCount(); i++) + + for( int i = 0; i < iDrawer.GetFloatingItemCount(); i++ ) { - TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex(i); + TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex( i ); - if (current.GetFloatingItemType() == EZoomTransition + if( current.GetFloatingItemType() == EZoomTransition && current.GetDrawnItemIndex() == aItemFrom ) { current.InvalidateFloatingItem(); @@ -371,15 +354,15 @@ } } - floatingItem.SetPositionStep( iDrawer.Widget()->View()->ItemPos(aItemTo)- - iDrawer.Widget()->View()->ItemPos(aItemFrom) ); - iDrawer.AddFloatingItemL(floatingItem); + floatingItem.SetPositionStep( iDrawer.Widget()->View()->ItemPos(aItemTo) + - iDrawer.Widget()->View()->ItemPos(aItemFrom) ); + iDrawer.AddFloatingItemL( floatingItem ); } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// void CMmDrawerAnimator::AnimateItemZoomL( TInt aItemIndex, TBool aZoomIn ) { TMmFloatingItem floatingItem( aItemIndex, @@ -392,24 +375,26 @@ (aZoomIn) ? KZoomStateZoomRatio : KNormalStateZoomRatio ); TInt animationFound = EFalse; - for(int i=0; i< iDrawer.GetFloatingItemCount(); i++) + for( int i = 0; i < iDrawer.GetFloatingItemCount(); i++ ) { - TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex(i); - if (current.GetFloatingItemType() == EZoomTransition && - current.GetDrawnItemIndex() == aItemIndex ) + TMmFloatingItem& current = iDrawer.GetFloatingItemAtIndex( i ); + if( current.GetFloatingItemType() == EZoomTransition + && current.GetDrawnItemIndex() == aItemIndex ) { current.InvalidateFloatingItem(); floatingItem.SetSizeStep( current.GetCurrentZoomRatio(), (aZoomIn) ? KZoomStateZoomRatio : KNormalStateZoomRatio); animationFound = ETrue; + static_cast ( iDrawer.Widget()->Parent() )-> + SetAllowMove( EFalse ); break; } } - - if ( (aZoomIn != EFalse || animationFound != EFalse) ) + + if( ( aZoomIn != EFalse || animationFound != EFalse ) ) { // This covers the situation, when a zoom out animation is requested - // whilst no zoom in occured earlier. In this case the request is + // whilst no zoom in occured earlier. In this case the request is // neglected. iDrawer.AddFloatingItemL( floatingItem ); } @@ -418,20 +403,30 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// void CMmDrawerAnimator::SetNextRedrawToWholeScreen() - { - iPreviousRefreshRect = iDrawer.Widget()->View()->ViewRect(); - } + { + iPreviousRefreshRect = iDrawer.Widget()->View()->ViewRect(); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// void CMmDrawerAnimator::PrepareForGarbage() - { -// Cancel any outstanding requests - Cancel(); - iPreparedForGarbage = ETrue; - } + { + // Cancel any outstanding requests + Cancel(); + iPreparedForGarbage = ETrue; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +void CMmDrawerAnimator::TriggerMoveItemL() + { + static_cast ( iDrawer.Widget()->Parent() )-> + TriggerMoveItemL(); + } //End of file diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmgrid.cpp --- a/menufw/menufwui/mmwidgets/src/mmgrid.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmgrid.cpp Wed May 12 13:12:59 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: -* Version : %version: MM_102 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_103 % << Don't touch! Updated by Synergy at check-out. * */ @@ -486,12 +486,6 @@ { HandlePointerEventInNormalModeL( aPointerEvent ); } - - if ( iMmDrawer->GetFloatingItemCount() > 0 && - iMmDrawer->GetAnimator()->IsActive() ) - { - iMmDrawer->GetAnimator()->CancelNextRedrawL(); - } } // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmgridview.cpp --- a/menufw/menufwui/mmwidgets/src/mmgridview.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmgridview.cpp Wed May 12 13:12:59 2010 +0300 @@ -243,7 +243,7 @@ if ( !itemDrawer->IsEditMode() ) { - itemDrawer->DrawBackgroundAndSeparatorLines(ViewRect()); + itemDrawer->DrawBackground(ViewRect()); itemDrawer->SetRedrawItemBackground( EFalse ); CAknGridView::Draw( aClipRect ); itemDrawer->SetRedrawItemBackground( ETrue ); diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmlistbox.cpp --- a/menufw/menufwui/mmwidgets/src/mmlistbox.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmlistbox.cpp Wed May 12 13:12:59 2010 +0300 @@ -48,18 +48,18 @@ // ----------------------------------------------------------------------------- // CMmListBox::CMmListBox() : AKNDOUBLELISTBOXNAME(R_LIST_PANE_LINES_AB_COLUMN) - { - // No implementation required - } + { + // No implementation required + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // CMmListBox::~CMmListBox() - { - delete iRedrawTimer; - } + { + delete iRedrawTimer; + } // ----------------------------------------------------------------------------- // @@ -67,30 +67,30 @@ // CMmListBox* CMmListBox::NewLC( const CCoeControl* aParent, TInt aFlags, CMmTemplateLibrary* aTemplateLibrary ) - { - CMmListBox* self = new (ELeave)CMmListBox(); - CleanupStack::PushL(self); - self->ConstructL( aParent, aFlags, aTemplateLibrary ); - return self; - } + { + CMmListBox* self = new (ELeave)CMmListBox(); + CleanupStack::PushL(self); + self->ConstructL( aParent, aFlags, aTemplateLibrary ); + return self; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::SetListFlag( TInt aFlag ) - { - iListBoxFlags = iListBoxFlags | aFlag; - } + { + iListBoxFlags = iListBoxFlags | aFlag; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::ClearListFlag( TInt aFlag ) - { - iListBoxFlags = iListBoxFlags & !aFlag; - } + { + iListBoxFlags = iListBoxFlags & !aFlag; + } // ----------------------------------------------------------------------------- // @@ -98,11 +98,11 @@ // CMmListBox* CMmListBox::NewL( const CCoeControl* aParent, TInt aFlags, CMmTemplateLibrary* aTemplateLibrary ) - { - CMmListBox* self = CMmListBox::NewLC( aParent, aFlags, aTemplateLibrary ); - CleanupStack::Pop( self ); - return self; - } + { + CMmListBox* self = CMmListBox::NewLC( aParent, aFlags, aTemplateLibrary ); + CleanupStack::Pop( self ); + return self; + } // ----------------------------------------------------------------------------- // @@ -110,9 +110,9 @@ // void CMmListBox::ConstructL( const CCoeControl* aParent, TInt aFlags, CMmTemplateLibrary* aTemplateLibrary ) - { - iDisableChildComponentDrawing = EFalse; - iModel = iMmModel = CMmListBoxModel::NewL(); + { + iDisableChildComponentDrawing = EFalse; + iModel = iMmModel = CMmListBoxModel::NewL(); CreateItemDrawerL( aTemplateLibrary ); EnableExtendedDrawingL(); @@ -121,7 +121,7 @@ CEikListBox::ConstructL(aParent,aFlags); iMmDrawer->SetView( this ); iRedrawTimer = CPeriodic::NewL( EPriorityRealTime ); - } + } // ----------------------------------------------------------------------------- // Clearing ELeftDownInViewRect flag before invoking the base class @@ -148,14 +148,14 @@ iListBoxFlags &= ~ELeftDownInViewRect; } } - + TInt itemUnderPointerIndex = KErrNotFound; if ( aPointerEvent.iType == TPointerEvent::EButton1Up || aPointerEvent.iType == TPointerEvent::EButton1Down ) { TBool highlightWasVisible = parent->IsHighlightVisible(); CEikFormattedCellListBoxTypedef::HandlePointerEventL( aPointerEvent ); - // Tricky: Do not allow the base class implementation of HandlePointerEventL + // Tricky: Do not allow the base class implementation of HandlePointerEventL // to remove the highlight on EButton1Up event when context menu // is displayed for an item if ( aPointerEvent.iType == TPointerEvent::EButton1Up && @@ -237,50 +237,50 @@ TInt CMmListBox::ScrollIfNeeded( const TPointerEvent& aPointerEvent ) { TInt nextScrollDelay = 0; - - TBool readyForScrolling = - iMmDrawer->GetAnimator()->IsReadyForNewAnimation() - && iMmDrawer->GetFloatingItemCount() != 0; - - if ( IsPointerInTopScrollingThreshold( aPointerEvent ) ) - { - // scroll up by one row - TInt newCurrentItemIndex = CurrentItemIndex() - 1; + + TBool readyForScrolling = + iMmDrawer->GetAnimator()->IsReadyForNewAnimation() + && iMmDrawer->GetFloatingItemCount() != 0; - if ( newCurrentItemIndex >= 0 ) - { - nextScrollDelay = MmEffects::KEditModeScrollingDelayFactor * - Max( 1, aPointerEvent.iPosition.iY - Rect().iTl.iY ); - if (readyForScrolling) - { - View()->VScrollTo( View()->CalcNewTopItemIndexSoItemIsVisible( + if ( IsPointerInTopScrollingThreshold( aPointerEvent ) ) + { + // scroll up by one row + TInt newCurrentItemIndex = CurrentItemIndex() - 1; + + if ( newCurrentItemIndex >= 0 ) + { + nextScrollDelay = MmEffects::KEditModeScrollingDelayFactor * + Max( 1, aPointerEvent.iPosition.iY - Rect().iTl.iY ); + if (readyForScrolling) + { + View()->VScrollTo( View()->CalcNewTopItemIndexSoItemIsVisible( newCurrentItemIndex ) ); View()->SetCurrentItemIndex( newCurrentItemIndex ); UpdateScrollBarThumbs(); - } - } - } - else if ( IsPointerInBottomScrollingThreshold( aPointerEvent) ) - { - // scroll down by one row - TInt lastItemIndex = iModel->NumberOfItems() - 1; - TInt newCurrentItemIndex = CurrentItemIndex() + 1; - - - if ( newCurrentItemIndex <= lastItemIndex ) - { - nextScrollDelay = MmEffects::KEditModeScrollingDelayFactor * - Max( 1, Rect().iBr.iY - aPointerEvent.iPosition.iY ); + } + } + } + else if ( IsPointerInBottomScrollingThreshold( aPointerEvent) ) + { + // scroll down by one row + TInt lastItemIndex = iModel->NumberOfItems() - 1; + TInt newCurrentItemIndex = CurrentItemIndex() + 1; + - if (readyForScrolling) - { - View()->VScrollTo( View()->CalcNewTopItemIndexSoItemIsVisible( - newCurrentItemIndex ) ); - View()->SetCurrentItemIndex( newCurrentItemIndex ); + if ( newCurrentItemIndex <= lastItemIndex ) + { + nextScrollDelay = MmEffects::KEditModeScrollingDelayFactor * + Max( 1, Rect().iBr.iY - aPointerEvent.iPosition.iY ); + + if (readyForScrolling) + { + View()->VScrollTo( View()->CalcNewTopItemIndexSoItemIsVisible( + newCurrentItemIndex ) ); + View()->SetCurrentItemIndex( newCurrentItemIndex ); UpdateScrollBarThumbs(); - } - } - } + } + } + } return nextScrollDelay; } @@ -308,14 +308,9 @@ HandlePointerEventInEditModeL( aPointerEvent ); } else - { + { CEikFormattedCellListBoxTypedef::HandlePointerEventL( aPointerEvent ); - } - - if ( iMmDrawer->GetAnimator()->IsActive() ) - { - iMmDrawer->GetAnimator()->CancelNextRedrawL(); - } + } } @@ -383,7 +378,7 @@ // // ----------------------------------------------------------------------------- // -void CMmListBox::ProcessScrollEventL( CEikScrollBar* aScrollBar, +void CMmListBox::ProcessScrollEventL( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType ) { CEikFormattedCellListBoxTypedef::HandleScrollEventL( @@ -403,7 +398,7 @@ } iSkippedScrollbarEventsCount = 0; } - + // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -434,32 +429,32 @@ + View()->ItemSize( currentItemIndex ).iHeight; if ( currentItemIndex == BottomItemIndex() - && currentItemIndex != previousItemIndex - && itemY > View()->ViewRect().iBr.iY ) - { - if( aType == EEventKey ) - { + && currentItemIndex != previousItemIndex + && itemY > View()->ViewRect().iBr.iY ) + { + if( aType == EEventKey ) + { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( - View()->ItemDrawer()->Gc() ); - TBool effects = transApi && !transApi->EffectsDisabled(); - if ( effects ) - { - transApi->SetMoveType( MAknListBoxTfxInternal::EListScrollDown ); - } + MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( + View()->ItemDrawer()->Gc() ); + TBool effects = transApi && !transApi->EffectsDisabled(); + if ( effects ) + { + transApi->SetMoveType( MAknListBoxTfxInternal::EListScrollDown ); + } #endif - iView->VScrollTo( - iView->CalcNewTopItemIndexSoItemIsVisible( currentItemIndex ) ); + iView->VScrollTo( + iView->CalcNewTopItemIndexSoItemIsVisible( currentItemIndex ) ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( effects ) - { - transApi->Draw( Rect() ); - } + if ( effects ) + { + transApi->Draw( Rect() ); + } #endif - } - SetCurrentItemIndex( currentItemIndex ); - } + } + SetCurrentItemIndex( currentItemIndex ); + } RedrawIfNecessary( itemIndex, CurrentItemIndex()); return ret; @@ -508,13 +503,13 @@ if ( differenceIndex == 1 ) { if( sizeAllBefore != sizeAllAfter ) - { + { redrawIndex = Min( aPreviousCurrent, aCurrent ); - } + } else - { - return redrawConsumed; - } + { + return redrawConsumed; + } } else if ( differenceIndex > 1 && sizeAllBefore == sizeAllAfter ) { @@ -533,14 +528,14 @@ lastPotentialItemIndex = iView->BottomItemIndex(); if ( aPreviousCurrent < TopItemIndex() ) - { - lastPotentialItemIndex = BottomItemIndex() ; - } + { + lastPotentialItemIndex = BottomItemIndex() ; + } else if ( BottomItemIndex() < aPreviousCurrent ) - { - lastPotentialItemIndex = BottomItemIndex() + 1; - } - + { + lastPotentialItemIndex = BottomItemIndex() + 1; + } + while ( redrawIndex < lastPotentialItemIndex +1 ) { view->DrawSingleItem( redrawIndex++ ); @@ -570,22 +565,22 @@ // ----------------------------------------------------------------------------- // CMmListBoxModel* CMmListBox::MmModel() - { - return iMmModel; - } + { + return iMmModel; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::SetMmModel( CMmListBoxModel* aMmModel ) - { - if ( iMmModel != aMmModel ) - { - delete iMmModel; - iMmModel = aMmModel; - } - } + { + if ( iMmModel != aMmModel ) + { + delete iMmModel; + iMmModel = aMmModel; + } + } // ----------------------------------------------------------------------------- // @@ -610,45 +605,45 @@ // ----------------------------------------------------------------------------- // void CMmListBox::SetItemDrawerAndViewBgContext (CAknsBasicBackgroundControlContext * aBgContext) - { - iMmDrawer->SetBgContext (aBgContext); - } + { + iMmDrawer->SetBgContext (aBgContext); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TBool CMmListBox::HandleScrollbarVisibilityChangeL() - { - TBool ret = EFalse; - if ( AllItemsFitInViewRect() ) - { - if ( ScrollBarFrame()->VerticalScrollBar()->IsVisible() + { + TBool ret = EFalse; + if ( AllItemsFitInViewRect() ) + { + if ( ScrollBarFrame()->VerticalScrollBar()->IsVisible() || iMmDrawer->TemplateLibrary()->GetScrollbarVisibility() ) - { - ScrollBarFrame()->VerticalScrollBar()->MakeVisible( EFalse ); - iMmDrawer->SetScrollbarVisibilityL( EFalse ); + { + ScrollBarFrame()->VerticalScrollBar()->MakeVisible( EFalse ); + iMmDrawer->SetScrollbarVisibilityL( EFalse ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *trans = CAknListLoader::TfxApiInternal( ItemDrawer()->Gc() ); - if ( trans ) - { - trans->Remove( MAknListBoxTfxInternal::EListEverything ); - } + MAknListBoxTfxInternal *trans = CAknListLoader::TfxApiInternal( ItemDrawer()->Gc() ); + if ( trans ) + { + trans->Remove( MAknListBoxTfxInternal::EListEverything ); + } #endif - ret = ETrue; //redraw is needed - } - } - else if ( !ScrollBarFrame()->VerticalScrollBar()->IsVisible() - || !iMmDrawer->TemplateLibrary()->GetScrollbarVisibility() ) - { - ScrollBarFrame()->VerticalScrollBar()->MakeVisible( ETrue ); - iMmDrawer->SetScrollbarVisibilityL( ETrue ); - ret = ETrue; //redraw is needed - } - return ret; - } + ret = ETrue; //redraw is needed + } + } + else if ( !ScrollBarFrame()->VerticalScrollBar()->IsVisible() + || !iMmDrawer->TemplateLibrary()->GetScrollbarVisibility() ) + { + ScrollBarFrame()->VerticalScrollBar()->MakeVisible( ETrue ); + iMmDrawer->SetScrollbarVisibilityL( ETrue ); + ret = ETrue; //redraw is needed + } + return ret; + } // ----------------------------------------------------------------------------- @@ -656,23 +651,23 @@ // ----------------------------------------------------------------------------- // TBool CMmListBox::AllItemsFitInViewRect() - { - CMmListBoxView* view = static_cast< CMmListBoxView* >(iView); - TInt totalHeight = view->GetTotalHeight( view->TopItemIndex(), view->BottomItemIndex()); - if ( view->TopItemIndex() == 0 && iMmModel->NumberOfItems() <= view->BottomItemIndex() + 1 - && totalHeight <= iView->ViewRect().Height() ) - { - return ETrue; - } - else - { - return EFalse; - } - } + { + CMmListBoxView* view = static_cast< CMmListBoxView* >(iView); + TInt totalHeight = view->GetTotalHeight( view->TopItemIndex(), view->BottomItemIndex()); + if ( view->TopItemIndex() == 0 && iMmModel->NumberOfItems() <= view->BottomItemIndex() + 1 + && totalHeight <= iView->ViewRect().Height() ) + { + return ETrue; + } + else + { + return EFalse; + } + } /** * Helper class whose only purpose is to ensure that - * ScrollToItem method will be always re-enabled. + * ScrollToItem method will be always re-enabled. */ struct TScrollToItemEnabler { @@ -685,77 +680,77 @@ // ----------------------------------------------------------------------------- // void CMmListBox::UpdateScrollBarsL() - { - TBool redrawNeeded = HandleScrollbarVisibilityChangeL(); - if (ScrollBarFrame()->VerticalScrollBar()->IsVisible()) - { - CMmListBoxView* view = static_cast( View() ); - view->DisableScrollToItem( ETrue ); - TScrollToItemEnabler reverter = { view }; - CleanupClosePushL( reverter ); - CEikFormattedCellListBoxTypedef::UpdateScrollBarsL(); - CleanupStack::PopAndDestroy( &reverter ); - } - iMmDrawer->TemplateLibrary()->SetScrollbarWidthL( + { + TBool redrawNeeded = HandleScrollbarVisibilityChangeL(); + if (ScrollBarFrame()->VerticalScrollBar()->IsVisible()) + { + CMmListBoxView* view = static_cast( View() ); + view->DisableScrollToItem( ETrue ); + TScrollToItemEnabler reverter = { view }; + CleanupClosePushL( reverter ); + CEikFormattedCellListBoxTypedef::UpdateScrollBarsL(); + CleanupStack::PopAndDestroy( &reverter ); + } + iMmDrawer->TemplateLibrary()->SetScrollbarWidthL( ScrollBarFrame()->VerticalScrollBar()->Rect().Width() ); - FixViewForMirroredLayout(); - if ( redrawNeeded ) - { - DrawNow(); - } - } + FixViewForMirroredLayout(); + if ( redrawNeeded ) + { + DrawNow(); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::UpdateScrollBarsNoRedrawL() - { - HandleScrollbarVisibilityChangeL(); - if ( ScrollBarFrame()->VerticalScrollBar()->IsVisible() ) - { - CMmListBoxView* view = static_cast( View() ); - view->DisableScrollToItem( ETrue ); - TScrollToItemEnabler reverter = { view }; - CleanupClosePushL( reverter ); - CEikFormattedCellListBoxTypedef::UpdateScrollBarsL(); - CleanupStack::PopAndDestroy( &reverter ); - iMmDrawer->TemplateLibrary()->SetScrollbarWidthL( - ScrollBarFrame()->VerticalScrollBar()->Rect().Width() ); - } - } + { + HandleScrollbarVisibilityChangeL(); + if ( ScrollBarFrame()->VerticalScrollBar()->IsVisible() ) + { + CMmListBoxView* view = static_cast( View() ); + view->DisableScrollToItem( ETrue ); + TScrollToItemEnabler reverter = { view }; + CleanupClosePushL( reverter ); + CEikFormattedCellListBoxTypedef::UpdateScrollBarsL(); + CleanupStack::PopAndDestroy( &reverter ); + iMmDrawer->TemplateLibrary()->SetScrollbarWidthL( + ScrollBarFrame()->VerticalScrollBar()->Rect().Width() ); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::SetMarqueeAdapter( CMmMarqueeAdapter* aAdapter ) - { - iMarqueeAdapter = aAdapter; - iMarqueeAdapter->SetControl( const_cast< CMmListBox *>(this) ); - } + { + iMarqueeAdapter = aAdapter; + iMarqueeAdapter->SetControl( const_cast< CMmListBox *>(this) ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::SetMarqueeDrawing( TBool aIsMarqueeBeingDrawn ) - { - iMmDrawer->SetMarqueeDrawing( aIsMarqueeBeingDrawn ); - } + { + iMmDrawer->SetMarqueeDrawing( aIsMarqueeBeingDrawn ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::HandleItemRemovalL() - { - CEikFormattedCellListBoxTypedef::HandleItemRemovalL(); + { + CEikFormattedCellListBoxTypedef::HandleItemRemovalL(); DrawNow(); //avkon does not redraw the items for listbox when item is //removed. This needs to be forced here. UpdateScrollBarsL(); - } + } // ----------------------------------------------------------------------------- // If a parent to the supplied control has its Gc set, this function will find @@ -819,7 +814,7 @@ #ifdef RD_UI_TRANSITION_EFFECTS_LIST MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( gc ); - + if ( transApi ) { transApi->SetListType( MAknListBoxTfxInternal::EListBoxTypeMainPane ); @@ -842,7 +837,7 @@ { TRect clientRect; this->RestoreClientRectFromViewRect(clientRect); -#ifdef RD_UI_TRANSITION_EFFECTS_LIST +#ifdef RD_UI_TRANSITION_EFFECTS_LIST if ( transApi ) { transApi->StartDrawing( MAknListBoxTfxInternal::EListView ); @@ -883,7 +878,7 @@ // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- -// +// void CMmListBox::DrawView() { iDisableChildComponentDrawing = ETrue; @@ -896,41 +891,41 @@ // ----------------------------------------------------------------------------- // void CMmListBox::SetVerticalItemOffset( TInt aOffset ) - { - static_cast( View() )->SetItemOffsetInPixels( aOffset ); - UpdateScrollBarThumbs(); - } + { + static_cast( View() )->SetItemOffsetInPixels( aOffset ); + UpdateScrollBarThumbs(); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TInt CMmListBox::VerticalItemOffset() const - { - return static_cast( View() )->VerticalItemOffset(); - } + { + return static_cast( View() )->VerticalItemOffset(); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::SetItemHeight( TInt aItemHeight ) - { - if ( aItemHeight != iItemHeight ) - { - iItemHeight = aItemHeight; - TRAP_IGNORE( UpdateScrollBarsNoRedrawL() ); - } - } + { + if ( aItemHeight != iItemHeight ) + { + iItemHeight = aItemHeight; + TRAP_IGNORE( UpdateScrollBarsNoRedrawL() ); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBox::UpdateScrollBarThumbs() - { - CEikFormattedCellListBox::UpdateScrollBarThumbs(); - } + { + CEikFormattedCellListBox::UpdateScrollBarThumbs(); + } // ----------------------------------------------------------------------------- // @@ -940,9 +935,9 @@ { TInt componentControls(0); if ( !iDisableChildComponentDrawing ) - { + { componentControls = CEikFormattedCellListBoxTypedef::CountComponentControls(); - } + } return componentControls; } // ----------------------------------------------------------------------------- @@ -958,7 +953,7 @@ // // ----------------------------------------------------------------------------- // -void CMmListBox::HandleScrollEventL( CEikScrollBar* aScrollBar, +void CMmListBox::HandleScrollEventL( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType ) { if ( aEventType == EEikScrollThumbDragVert && !iScrollbarThumbIsBeingDragged ) diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmlistboxitemdrawer.cpp --- a/menufw/menufwui/mmwidgets/src/mmlistboxitemdrawer.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmlistboxitemdrawer.cpp Wed May 12 13:12:59 2010 +0300 @@ -1,22 +1,22 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: -* -*/ - + * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "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: + * + * Description: + * + */ #include +#include #include "mmwidgetsconstants.h" #include "hnconvutils.h" #include @@ -47,13 +47,13 @@ #include "mmmarqueeadapter.h" #include "mmfloatingitem.h" #include "mmgridview.h" +#include "mmlistboxview.h" #include "mmcacheforitem.h" #include "mmitemsdatacache.h" #include "mmwidgetcontainer.h" #include "hnsuitemodel.h" #include "menudebug.h" - // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -71,24 +71,25 @@ iTemplateLibrary = aTemplateLibrary; iMmModel = aMmListBoxModel; iRedrawBackground = ETrue; + iDrawSeparatorLines = EFalse; iZoomIconIndex = -1; iIconAnimationZoomRatio = 1; // this is needed to get iColors initialized on first use: iLastDrawnItemWasFloating = ETrue; SetFlags( CListItemDrawer::EDisableHighlight ); - } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // CMmListBoxItemDrawer::~CMmListBoxItemDrawer() - { - iFloatingItems.Close(); - delete iItemsDataCache; - delete iAnimator; - delete iSubcellText; - } + { + iFloatingItems.Close(); + delete iItemsDataCache; + delete iAnimator; + delete iSubcellText; + } // ----------------------------------------------------------------------------- // @@ -97,7 +98,7 @@ void CMmListBoxItemDrawer::EnableCachedDataUse( TBool aEnable ) { iUseCache = aEnable; - if ( aEnable ) + if( aEnable ) { RemoveFloatingItems(); } @@ -138,18 +139,18 @@ // CMmListBoxItemDrawer* CMmListBoxItemDrawer::NewLC( CMmListBoxModel* aMmListBoxModel, - const CFont* aFont, - CFormattedCellListBoxData* aFormattedCellData, - TMmWidgetType aWidgetType, - CMmTemplateLibrary* aTemplateLibrary ) - { - CMmListBoxItemDrawer* self = new (ELeave)CMmListBoxItemDrawer( - aMmListBoxModel, aFont, aFormattedCellData, aWidgetType, - aTemplateLibrary ); - CleanupStack::PushL(self); - self->ConstructL(); - return self; - } + const CFont* aFont, + CFormattedCellListBoxData* aFormattedCellData, + TMmWidgetType aWidgetType, + CMmTemplateLibrary* aTemplateLibrary ) + { + CMmListBoxItemDrawer* self = new ( ELeave ) CMmListBoxItemDrawer( + aMmListBoxModel, aFont, aFormattedCellData, aWidgetType, + aTemplateLibrary ); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } // ----------------------------------------------------------------------------- // @@ -157,24 +158,24 @@ // CMmListBoxItemDrawer* CMmListBoxItemDrawer::NewL( CMmListBoxModel* aMmListBoxModel, - const CFont* aFont, - CFormattedCellListBoxData* aFormattedCellData, - TMmWidgetType aWidgetType, - CMmTemplateLibrary* aTemplateLibrary ) - { - CMmListBoxItemDrawer* self = CMmListBoxItemDrawer::NewLC( - aMmListBoxModel, aFont, aFormattedCellData, aWidgetType, - aTemplateLibrary ); - CleanupStack::Pop( self ); - return self; + const CFont* aFont, + CFormattedCellListBoxData* aFormattedCellData, + TMmWidgetType aWidgetType, + CMmTemplateLibrary* aTemplateLibrary ) + { + CMmListBoxItemDrawer* self = CMmListBoxItemDrawer::NewLC( + aMmListBoxModel, aFont, aFormattedCellData, aWidgetType, + aTemplateLibrary ); + CleanupStack::Pop( self ); + return self; - } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::SetView(CEikListBox * aView) +void CMmListBoxItemDrawer::SetView( CEikListBox * aView ) { iWidget = aView; } @@ -193,40 +194,40 @@ // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::ConstructL() - { - iAnimator = CMmDrawerAnimator::NewL( *this ); - iItemsDataCache = CMmItemsDataCache::NewL(); - iIsEditMode = EFalse; - iHighlightShown = EFalse; - iDrawMoveIndicators = ETrue; - } + { + iAnimator = CMmDrawerAnimator::NewL( *this ); + iItemsDataCache = CMmItemsDataCache::NewL(); + iIsEditMode = EFalse; + iHighlightShown = EFalse; + iDrawMoveIndicators = ETrue; + } -// ----xm------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::DrawEmptyItem( TInt aItemIndex, - TPoint aItemRectPos, TBool aViewIsDimmed ) const + TPoint aItemRectPos, TBool aViewIsDimmed ) const { TRect r( aItemRectPos, iItemCellSize ); CFormattedCellListBoxItemDrawer::DrawEmptyItem( aItemIndex, aItemRectPos, aViewIsDimmed ); - const_cast(this)->DrawFloatingItems(r); + const_cast ( this )->DrawFloatingItems( r ); } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -TInt CMmListBoxItemDrawer::GetFloatingItemIndex(TMmFloatingItemType aType) const +TInt CMmListBoxItemDrawer::GetFloatingItemIndex( TMmFloatingItemType aType ) const { - TInt ret (KErrNotFound); - TInt i(iFloatingItems.Count()-1); - for(; i >= 0; i--) + TInt ret( KErrNotFound ); + TInt i( iFloatingItems.Count() - 1 ); + for( ; i >= 0; i-- ) { - if (iFloatingItems[i].GetFloatingItemType() == aType) + if( iFloatingItems[i].GetFloatingItemType() == aType ) { ret = i; break; @@ -242,9 +243,9 @@ // TMmFloatingItem& CMmListBoxItemDrawer::GetFloatingItemL(TMmFloatingItemType aType) { - TInt index = GetFloatingItemIndex(aType); + TInt index = GetFloatingItemIndex( aType ); User::LeaveIfError( index ); - return iFloatingItems[ index ]; + return iFloatingItems[index]; } // ----------------------------------------------------------------------------- @@ -275,6 +276,7 @@ { iAnimator->AnimateItemZoomL( aItemIndex, ETrue ); iAnimator->Trigger(); + static_cast (Widget()->Parent() )->SetAllowMove( EFalse ); } // ----------------------------------------------------------------------------- @@ -291,42 +293,42 @@ // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::DrawFloatingItems(TRect currentlyDrawnRect) +void CMmListBoxItemDrawer::DrawFloatingItems( TRect currentlyDrawnRect ) { - TBool redrawItemBackground = IsRedrawItemBackgroundEnabled( ); + TBool redrawItemBackground = IsRedrawItemBackgroundEnabled(); SetRedrawItemBackground( EFalse ); - for(TInt i(iFloatingItems.Count()-1); i >= 0 ; i--) + for( TInt i( iFloatingItems.Count() - 1 ); i >= 0; i-- ) { TMmFloatingItemType type = iFloatingItems[i].GetFloatingItemType(); - if ( iFloatingItems[i].IsFloatingItemValid() ) + if( iFloatingItems[i].IsFloatingItemValid() ) { TInt drawnItemIndex = iFloatingItems[i].GetDrawnItemIndex(); TSize size = iWidget->View()->ItemSize( drawnItemIndex ); TRect rect( iFloatingItems[i].GetItemPosition(), iFloatingItems[i].GetItemPosition() + size); - if (rect.Intersects(currentlyDrawnRect)) - { - TInt tempZoomIconIndex = iZoomIconIndex; - TInt tempZoomRatio = iIconAnimationZoomRatio; + if( rect.Intersects( currentlyDrawnRect ) ) + { + TInt tempZoomIconIndex = iZoomIconIndex; + TInt tempZoomRatio = iIconAnimationZoomRatio; - iZoomIconIndex = iFloatingItems[i].GetDrawnItemIndex(); - iIconAnimationZoomRatio = iFloatingItems[i].GetCurrentZoomRatio(); + iZoomIconIndex = iFloatingItems[i].GetDrawnItemIndex(); + iIconAnimationZoomRatio = iFloatingItems[i].GetCurrentZoomRatio(); - if ( ItemHasFloatingType( drawnItemIndex, EDrag) || - ItemHasFloatingType( drawnItemIndex, EDragTransition) ) - { - ClearFlags( CListItemDrawer::EPressedDownState ); - } + if ( ItemHasFloatingType( drawnItemIndex, EDrag) || + ItemHasFloatingType( drawnItemIndex, EDragTransition) ) + { + ClearFlags( CListItemDrawer::EPressedDownState ); + } - DrawActualItem( drawnItemIndex, rect, ETrue, EFalse, EFalse, EFalse ); - iIconAnimationZoomRatio = tempZoomRatio; - iZoomIconIndex = tempZoomIconIndex; - } + DrawActualItem( drawnItemIndex, rect, ETrue, EFalse, EFalse, EFalse ); + iIconAnimationZoomRatio = tempZoomRatio; + iZoomIconIndex = tempZoomIconIndex; + } } else - { - iFloatingItems.Remove(i); - } + { + iFloatingItems.Remove( i ); + } } SetRedrawItemBackground( redrawItemBackground ); } @@ -337,11 +339,11 @@ // TInt CMmListBoxItemDrawer::GetValidFloatingItemCount(TMmFloatingItemType aType) { - TInt count (0); + TInt count( 0 ); - for(TInt i(iFloatingItems.Count()-1); i >= 0; i--) + for( TInt i( iFloatingItems.Count() - 1 ); i >= 0; i-- ) { - if (iFloatingItems[i].GetFloatingItemType() == aType + if( iFloatingItems[i].GetFloatingItemType() == aType && iFloatingItems[i].IsFloatingItemValid() ) count++; } @@ -351,19 +353,19 @@ // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::DrawItem(TInt aItemIndex, TPoint aItemRectPos, +void CMmListBoxItemDrawer::DrawItem( TInt aItemIndex, TPoint aItemRectPos, TBool aItemIsSelected, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed) const + { + if( !Widget()->View()->RedrawDisabled() ) { - if ( !Widget()->View()->RedrawDisabled() ) - { - TBool highlightVisible = + TBool highlightVisible = !( Flags() & CListItemDrawer::ESingleClickDisabledHighlight ); - aItemIsCurrent = aItemIsCurrent && highlightVisible; - DoDrawItem( aItemIndex, aItemRectPos, aItemIsSelected, - aItemIsCurrent, aViewIsEmphasized, aViewIsDimmed); - } + aItemIsCurrent = aItemIsCurrent && highlightVisible; + DoDrawItem( aItemIndex, aItemRectPos, aItemIsSelected, + aItemIsCurrent, aViewIsEmphasized, aViewIsDimmed ); } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -372,25 +374,25 @@ TBool aItemIsSelected, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed) const { - TSize itemCellSize = TSize( GetItemSize( aItemIndex, aItemIsCurrent )); - TRect actualItemRect(aItemRectPos, itemCellSize); + TSize itemCellSize = TSize( GetItemSize( aItemIndex, aItemIsCurrent ) ); + TRect actualItemRect( aItemRectPos, itemCellSize ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc ); - if ( transApi ) - { - transApi->StartDrawing( MAknListBoxTfxInternal::EListView ); - transApi->StopDrawing(); - transApi->BeginRedraw( MAknListBoxTfxInternal::EListItem, - actualItemRect, aItemIndex ); - } + MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc ); + if( transApi ) + { + transApi->StartDrawing( MAknListBoxTfxInternal::EListView ); + transApi->StopDrawing(); + transApi->BeginRedraw( MAknListBoxTfxInternal::EListItem, + actualItemRect, aItemIndex ); + } #endif const_cast(this)->iLeftOverAreaUnderAnimatedItem = EFalse; - for(TInt i(iFloatingItems.Count()-1); i >= 0; i--) + for( TInt i( iFloatingItems.Count() - 1 ); i >= 0; i-- ) { - if ( iFloatingItems[i].GetDrawnItemIndex() == aItemIndex - && iFloatingItems[i].IsFloatingItemValid() ) + if( iFloatingItems[i].GetDrawnItemIndex() == aItemIndex + && iFloatingItems[i].IsFloatingItemValid() ) { const_cast(this)->iLeftOverAreaUnderAnimatedItem = ETrue; break; @@ -398,20 +400,20 @@ } DrawActualItem(aItemIndex, actualItemRect, aItemIsCurrent, aViewIsEmphasized, - aViewIsDimmed, aItemIsSelected); + aViewIsDimmed, aItemIsSelected); const_cast(this)->iLeftOverAreaUnderAnimatedItem = EFalse; const_cast(this)->DrawFloatingItems(actualItemRect); - if (!AknLayoutUtils::PenEnabled() && IsEditMode()) + if( !AknLayoutUtils::PenEnabled() && IsEditMode() ) { - const_cast(this)->DrawActualIndicatorItem( - aItemIndex, actualItemRect ); + const_cast ( this )->DrawActualIndicatorItem( + aItemIndex, actualItemRect ); } #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( transApi ) - { + if( transApi ) + { transApi->EndRedraw( MAknListBoxTfxInternal::EListItem, aItemIndex ); } #endif @@ -423,12 +425,12 @@ // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::DrawItemText(TInt aItemIndex, - const TRect &aItemTextRect, TBool aItemIsCurrent, - TBool aViewIsEmphasized, TBool aItemIsSelected ) const +void CMmListBoxItemDrawer::DrawItemText( TInt aItemIndex, + const TRect &aItemTextRect, TBool aItemIsCurrent, + TBool aViewIsEmphasized, TBool aItemIsSelected ) const { TRAP_IGNORE( DoDrawItemTextL( aItemIndex, aItemTextRect, aItemIsCurrent, - aViewIsEmphasized, aItemIsSelected ) ); + aViewIsEmphasized, aItemIsSelected ) ); } // ----------------------------------------------------------------------------- @@ -436,16 +438,16 @@ // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::DoDrawItemTextL( TInt aItemIndex, const TRect - &aItemTextRect, TBool aItemIsCurrent, TBool aViewIsEmphasized, - TBool /* aItemIsSelected */) const + &aItemTextRect, TBool aItemIsCurrent, TBool aViewIsEmphasized, + TBool /* aItemIsSelected */) const { CMmCacheForItem* cache = iItemsDataCache->GetItemCacheL( aItemIndex ); cache->InvalidateIfCacheMayNotBeUsed( aItemIsCurrent, iLastSubcellsSetupCode ); - if ( IsRedrawItemBackgroundEnabled() ) + if( IsRedrawItemBackgroundEnabled() ) { - DrawBackgroundAndSeparatorLines( aItemTextRect ); + DrawBackground( aItemTextRect ); } if ( !iUseCache || !cache->IsValid() ) @@ -456,54 +458,63 @@ FormattedCellData()->SetIconArray( cache->GetIconListL() ); - TBool isFloating = !iUseCache && IsFloating( aItemIndex ); - if ( !!isFloating != !!iLastDrawnItemWasFloating ) // Ex-OR - { - iLastDrawnItemWasFloating = isFloating; - iColors = SetupColors( isFloating ); - } + TBool isFloating = !iUseCache && IsFloating( aItemIndex ); + if( !!isFloating != !!iLastDrawnItemWasFloating ) // Ex-OR + { + iLastDrawnItemWasFloating = isFloating; + iColors = SetupColors( isFloating ); + } - CFormattedCellListBoxData* data = static_cast(iData); - data->EnableMarqueeL( EFalse ); + CFormattedCellListBoxData* data = static_cast(iData); + data->EnableMarqueeL( EFalse ); TBool highlightShown = ETrue; - if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized) - { + if( FormattedCellData()->RespectFocus() && !aViewIsEmphasized ) + { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); - if ( transApi ) - { - transApi->Remove( MAknListBoxTfxInternal::EListHighlight ); - } + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); + if( transApi ) + { + transApi->Remove( MAknListBoxTfxInternal::EListHighlight ); + } #endif - highlightShown = EFalse; - } + highlightShown = EFalse; + } data->Draw( Properties(aItemIndex), *iGc, &( cache->GetItemText() ), aItemTextRect, - GetHighlightVisibility( aItemIndex, aItemIsCurrent, highlightShown ), iColors ); + GetHighlightVisibility( aItemIndex, aItemIsCurrent, highlightShown ), iColors ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); - if ( transApi ) - { - transApi->StartDrawing( MAknListBoxTfxInternal::EListItem ); - } + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); + if( transApi ) + { + transApi->StartDrawing( MAknListBoxTfxInternal::EListItem ); + } #endif - if ( iMarqueeAdapter && aItemIsCurrent ) - { - DEBUG(("CMmListBoxItemDrawer::DoDrawItemTextL - DrawMarquee")); - iMarqueeAdapter->DrawMarqueeL( *iGc ); - } + if( iMarqueeAdapter && aItemIsCurrent ) + { + DEBUG(("CMmListBoxItemDrawer::DoDrawItemTextL - DrawMarquee")); + iMarqueeAdapter->DrawMarqueeL( *iGc ); + } #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( transApi ) - { - transApi->StopDrawing(); - } + if( transApi ) + { + transApi->StopDrawing(); + } #endif - ColumnData()->SetIconArray( NULL ); + if( iDrawSeparatorLines ) + { + CMmListBoxView* view = static_cast( iWidget->View() ); + if( aItemIndex != ( view->ModelItemsCount() - 1 )) + { + AknListUtils::DrawSeparator( *iGc, aItemTextRect, iColors.iBack ); + } + } + ColumnData()->SetIconArray( NULL ); + } // ----------------------------------------------------------------------------- @@ -519,29 +530,42 @@ // // ----------------------------------------------------------------------------- // +void CMmListBoxItemDrawer::SetDrawSeparatorLines( TBool aDraw ) + { + iDrawSeparatorLines = aDraw; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// TBool CMmListBoxItemDrawer::IsRedrawItemBackgroundEnabled() const { return iRedrawBackground; } -void CMmListBoxItemDrawer::DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +void CMmListBoxItemDrawer::DrawBackground( const TRect& aItemTextRect ) const { MAknsSkinInstance *skin = AknsUtils::SkinInstance(); CCoeControl* control = FormattedCellData()->Control(); - if ( IsRedrawItemBackgroundEnabled() ) + if( IsRedrawItemBackgroundEnabled() ) { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); - if ( transApi ) + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); + if( transApi ) { transApi->StartDrawing( MAknListBoxTfxInternal::EListView ); } #endif TBool bgDrawn( EFalse ); - if ( control ) + if( control ) { - if ( CAknEnv::Static()->TransparencyEnabled() ) + if( CAknEnv::Static()->TransparencyEnabled() ) { bgDrawn = AknsDrawUtils::Background( skin, iBgContext, control, *iGc, aItemTextRect, @@ -555,12 +579,12 @@ KAknsDrawParamBottomLevelRGBOnly ); } } - if ( !bgDrawn ) + if( !bgDrawn ) { iGc->Clear( aItemTextRect ); } #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( transApi ) + if( transApi ) { transApi->StopDrawing(); } @@ -596,7 +620,7 @@ ItemCellSize().iHeight * iIconAnimationZoomRatio); aSubCellTemplate.iRectAccordingToParent.iTl = TPoint(0, 0); - SetupSubCellL( aSubCellTemplate, aIndex , aItemIndex); + SetupSubCellL( aSubCellTemplate, aIndex, aItemIndex ); } // ----------------------------------------------------------------------------- @@ -604,72 +628,72 @@ // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetupSubCellL( TTemplateChild aSubCellTemplate, - TInt aIndex, TInt aItemIndex ) const - { + TInt aIndex, TInt aItemIndex ) const + { CFormattedCellListBoxData* data = static_cast(iData); TInt width = aSubCellTemplate.iRectAccordingToParent.iBr.iX - aSubCellTemplate.iRectAccordingToParent.iTl.iX; TInt height = aSubCellTemplate.iRectAccordingToParent.iBr.iY - aSubCellTemplate.iRectAccordingToParent.iTl.iY; - data->SetTransparentSubCellL(aIndex, ETrue); - data->SetSubCellSizeL( aIndex, TSize(width,height)); - data->SetSubCellIconSize( aIndex, TSize(width,height) ); - data->SetSubCellPositionL( aIndex, aSubCellTemplate.iRectAccordingToParent.iTl); - data->SetGraphicsSubCellL( aIndex, aSubCellTemplate.iIsImage ); - data->SetSubCellAlignmentL( aIndex, aSubCellTemplate.iTextAlign ); - const CFont* font = AknLayoutUtils::FontFromId(aSubCellTemplate.iFontId); - data->SetSubCellFontL (aIndex, font); - data->SetSubCellBaselinePosL( aIndex, - CAknLayoutFont::AsCAknLayoutFontOrNull( font )->TextPaneTopToBaseline() - + aSubCellTemplate.iRectAccordingToParent.iTl.iY ); + data->SetTransparentSubCellL( aIndex, ETrue ); + data->SetSubCellSizeL( aIndex, TSize( width, height ) ); + data->SetSubCellIconSize( aIndex, TSize( width, height ) ); + data->SetSubCellPositionL( aIndex, aSubCellTemplate.iRectAccordingToParent.iTl); + data->SetGraphicsSubCellL( aIndex, aSubCellTemplate.iIsImage ); + data->SetSubCellAlignmentL( aIndex, aSubCellTemplate.iTextAlign ); + const CFont* font = AknLayoutUtils::FontFromId(aSubCellTemplate.iFontId); + data->SetSubCellFontL (aIndex, font); + data->SetSubCellBaselinePosL( aIndex, + CAknLayoutFont::AsCAknLayoutFontOrNull( font )->TextPaneTopToBaseline() + + aSubCellTemplate.iRectAccordingToParent.iTl.iY ); -// If some text is clipped then marquee will do the drawing right after the subcell is drawn by ListBoxData. -// Setting the subcell size to zero prevents ListBoxData from drawing the text. - if (!aSubCellTemplate.iIsImage - && !iIsMarqueeBeingDrawn - && ( aItemIndex == iWidget->View()->CurrentItemIndex() ) - && !IsEditMode() - && iWidgetType == EListbox - && iSubcellText + // If some text is clipped then marquee will do the drawing right after the subcell is drawn by ListBoxData. + // Setting the subcell size to zero prevents ListBoxData from drawing the text. + if (!aSubCellTemplate.iIsImage + && !iIsMarqueeBeingDrawn + && ( aItemIndex == iWidget->View()->CurrentItemIndex() ) + && !IsEditMode() + && iWidgetType == EListbox + && iSubcellText && iMarqueeAdapter->IsMarqueeEnabled() ) - { - if (iMarqueeAdapter && IsTextClippedL( aSubCellTemplate, *iSubcellText ) - && STATIC_CAST(CMmWidgetContainer*,Widget()->Parent())->IsHighlightVisible() ) - { - data->SetSubCellSizeL( aIndex, TSize(0,0)); - const_cast(this)->AddSubcellMarqueeElementL( - aSubCellTemplate, aIndex, aItemIndex); - } - else if (iMarqueeAdapter) + { + if (iMarqueeAdapter && IsTextClippedL( aSubCellTemplate, *iSubcellText ) + && STATIC_CAST(CMmWidgetContainer*,Widget()->Parent())->IsHighlightVisible() ) { - iMarqueeAdapter->StopMarqueeDrawing(aIndex); + data->SetSubCellSizeL( aIndex, TSize( 0, 0 ) ); + const_cast ( this )->AddSubcellMarqueeElementL( + aSubCellTemplate, aIndex, aItemIndex ); } - } + else if( iMarqueeAdapter ) + { + iMarqueeAdapter->StopMarqueeDrawing( aIndex ); + } + } - if ( iMarqueeAdapter && iIsMarqueeBeingDrawn - && iMarqueeAdapter->SubcellMarqueeElementExists( aIndex ) ) - { - if (aItemIndex != iWidget->View()->CurrentItemIndex() ) + if( iMarqueeAdapter && iIsMarqueeBeingDrawn + && iMarqueeAdapter->SubcellMarqueeElementExists( aIndex ) ) + { + if( aItemIndex != iWidget->View()->CurrentItemIndex() ) { - iMarqueeAdapter->StopMarqueeDrawing(aIndex); + iMarqueeAdapter->StopMarqueeDrawing( aIndex ); } - else - { - data->SetSubCellSizeL(aIndex, TSize(0, 0)); - } + else + { + data->SetSubCellSizeL( aIndex, TSize( 0, 0 ) ); + } } - } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // CFormattedCellListBoxData::TColors CMmListBoxItemDrawer::SetupColors( TBool aDragged ) const - { - CFormattedCellListBoxData::TColors colors; - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + { + CFormattedCellListBoxData::TColors colors; + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - if ( !aDragged ) - { + if( !aDragged ) + { AknsUtils::GetCachedColor( skin, colors.iText, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG9 ); AknsUtils::GetCachedColor( skin, colors.iBack , KAknsIIDQsnTextColors, @@ -678,9 +702,9 @@ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ); AknsUtils::GetCachedColor( skin, colors.iHighlightedBack, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); - } - else - { + } + else + { AknsUtils::GetCachedColor( skin, colors.iText, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ); AknsUtils::GetCachedColor( skin, colors.iBack , KAknsIIDQsnTextColors, @@ -689,10 +713,10 @@ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ); AknsUtils::GetCachedColor( skin, colors.iHighlightedBack, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); - } + } - return colors; - } + return colors; + } // ----------------------------------------------------------------------------- // @@ -700,8 +724,8 @@ // TInt CMmListBoxItemDrawer::GetItemHeight( TInt aItemIndex, TBool aItemIsCurrent ) const { - TSize ret(TInt(0),TInt(0)); - ret = GetItemSize(aItemIndex, aItemIsCurrent); + TSize ret( TInt( 0 ), TInt( 0 ) ); + ret = GetItemSize( aItemIndex, aItemIsCurrent ); return ret.iHeight; } @@ -711,14 +735,14 @@ // TInt CMmListBoxItemDrawer::GetFloatingItemCount() { - for( TInt i=0; i< iFloatingItems.Count(); i++) - { - TMmFloatingItem& current = GetFloatingItemAtIndex(i); - if (current.GetDrawnItemIndex() == KErrNotFound) - { - RemoveFloatingItem(i); - } - } + for( TInt i = 0; i < iFloatingItems.Count(); i++ ) + { + TMmFloatingItem& current = GetFloatingItemAtIndex( i ); + if( current.GetDrawnItemIndex() == KErrNotFound ) + { + RemoveFloatingItem( i ); + } + } return iFloatingItems.Count(); } @@ -729,7 +753,7 @@ // TMmFloatingItem& CMmListBoxItemDrawer::GetFloatingItemAtIndex( TInt aIndex ) { - return iFloatingItems[ aIndex ]; + return iFloatingItems[aIndex]; } // ----------------------------------------------------------------------------- @@ -738,10 +762,10 @@ // void CMmListBoxItemDrawer::RemoveFloatingItem( TInt aPosition ) { - if (aPosition != KErrNotFound) - { - iFloatingItems.Remove( aPosition ); - } + if( aPosition != KErrNotFound ) + { + iFloatingItems.Remove( aPosition ); + } } // ----------------------------------------------------------------------------- @@ -761,7 +785,7 @@ TInt aPosition ) { EnableCachedDataUse( EFalse ); - if (aPosition != KErrNotFound) + if( aPosition != KErrNotFound ) { iFloatingItems.InsertL( aFloatingItem, aPosition ); } @@ -777,40 +801,40 @@ // TSize CMmListBoxItemDrawer::GetItemSize( TInt aItemIndex, TBool aItemIsCurrent ) const { - if ( aItemIndex < 0 ) + if( aItemIndex < 0 ) { return TSize( 1, 1 ); } - TSize size; + TSize size; - CMmCacheForItem* cache = NULL; - TRAPD( cacheError, cache = iItemsDataCache->GetItemCacheL( aItemIndex ) ); - if ( cacheError != KErrNone ) - { - cache = NULL; - } + CMmCacheForItem* cache = NULL; + TRAPD( cacheError, cache = iItemsDataCache->GetItemCacheL( aItemIndex ) ); + if( cacheError != KErrNone ) + { + cache = NULL; + } - if ( cache ) - { - cache->InvalidateIfCacheMayNotBeUsed( - aItemIsCurrent, iLastSubcellsSetupCode ); - } + if( cache ) + { + cache->InvalidateIfCacheMayNotBeUsed( + aItemIsCurrent, iLastSubcellsSetupCode ); + } - if ( !iUseCache || !cache || !cache->IsValid() ) + if( !iUseCache || !cache || !cache->IsValid() ) { const TDesC8& mm_template = iMmModel->GetAttributeAsText (aItemIndex, KMmTemplate8); TRect viewRect = iWidget->View()->ViewRect(); TBool landscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); - if ( iTemplateLibrary->GetSize( size, iWidgetType, mm_template, + if( iTemplateLibrary->GetSize( size, iWidgetType, mm_template, landscapeOrientation, aItemIsCurrent, viewRect ) != KErrNone ) { size = TSize( 1, 1 ); } - if ( cache ) + if( cache ) { cache->SetSize( size ); } @@ -843,19 +867,19 @@ void CMmListBoxItemDrawer::SetDraggableL( TBool aDraggable ) { - iDraggable = aDraggable; + iDraggable = aDraggable; - if (!iDraggable) + if( !iDraggable ) { - for(int i=0; i< iFloatingItems.Count(); i++) + for( int i = 0; i < iFloatingItems.Count(); i++ ) { - if (iFloatingItems[i].GetFloatingItemType() == EZoomTransition - && iFloatingItems[i].GetZoomingStatus() > 0) + if( iFloatingItems[i].GetFloatingItemType() == EZoomTransition + && iFloatingItems[i].GetZoomingStatus() > 0 ) { AnimateItemZoomOutL( iFloatingItems[i].GetDrawnItemIndex() ); } - else if (iFloatingItems[i].GetFloatingItemType() == EDrag - || iFloatingItems[i].IsManualDelete()) + else if( iFloatingItems[i].GetFloatingItemType() == EDrag + || iFloatingItems[i].IsManualDelete() ) { iFloatingItems[i].InvalidateFloatingItem(); } @@ -869,7 +893,7 @@ // void CMmListBoxItemDrawer::SetEditModeL( TBool aEditMode ) { - if ( aEditMode ) + if( aEditMode ) { EnableCachedDataUse( EFalse ); } @@ -889,9 +913,9 @@ // ----------------------------------------------------------------------------- // TBool CMmListBoxItemDrawer::IsEditMode() const - { - return iIsEditMode; - } + { + return iIsEditMode; + } // ----------------------------------------------------------------------------- // @@ -917,58 +941,58 @@ floatingItem.SetManualDelete( ETrue ); TMmFloatingItem postDragRefresh( item.GetDrawnItemIndex(), - item.GetItemPosition(), EPostDragRefreshItem, - MmEffects::KNoAnimationFramesCount, iWidget->View() ); + item.GetItemPosition(), EPostDragRefreshItem, + MmEffects::KNoAnimationFramesCount, iWidget->View() ); - iFloatingItems.Remove(dragFloatingItem); + iFloatingItems.Remove( dragFloatingItem ); - if (postDragRefresh.GetItemPosition() != floatingItem.GetItemPosition()) - { - iFloatingItems.Append( postDragRefresh ); - } - iFloatingItems.Insert( floatingItem, 0 ); - } - } + if (postDragRefresh.GetItemPosition() != floatingItem.GetItemPosition()) + { + iFloatingItems.Append( postDragRefresh ); + } + iFloatingItems.Insert( floatingItem, 0 ); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::SetDraggedIndexL(TInt aDraggedItemIndex, - TPoint aPoint) +void CMmListBoxItemDrawer::SetDraggedIndexL( TInt aDraggedItemIndex, + TPoint aPoint ) { TInt dragFloatingItem = KErrNotFound; do - { - dragFloatingItem = GetFloatingItemIndex(EDrag); - if (dragFloatingItem != KErrNotFound) - { - TMmFloatingItem & item = GetFloatingItemAtIndex( dragFloatingItem ); + { + dragFloatingItem = GetFloatingItemIndex( EDrag ); + if( dragFloatingItem != KErrNotFound ) + { + TMmFloatingItem & item = GetFloatingItemAtIndex( dragFloatingItem ); - TMmFloatingItem postDragRefresh( item.GetDrawnItemIndex(), - item.GetItemPosition(), EPostDragRefreshItem, - MmEffects::KNoAnimationFramesCount, iWidget->View() ); + TMmFloatingItem postDragRefresh( item.GetDrawnItemIndex(), + item.GetItemPosition(), EPostDragRefreshItem, + MmEffects::KNoAnimationFramesCount, iWidget->View() ); - if (postDragRefresh.GetItemPosition() != aPoint) - { - iFloatingItems.Append( postDragRefresh ); - } - } + if( postDragRefresh.GetItemPosition() != aPoint ) + { + iFloatingItems.Append( postDragRefresh ); + } + } - RemoveFloatingItem( dragFloatingItem ); + RemoveFloatingItem( dragFloatingItem ); - } - while ( dragFloatingItem != KErrNotFound ); + } + while( dragFloatingItem != KErrNotFound ); - if ( aDraggedItemIndex != KErrNotFound ) - { - TMmFloatingItem floatingItem( aDraggedItemIndex, aPoint, EDrag, - MmEffects::KNoAnimationFramesCount, iWidget->View() ); - floatingItem.SetManualDelete( ETrue ); - AddFloatingItemL(floatingItem, 0); + if( aDraggedItemIndex != KErrNotFound ) + { + TMmFloatingItem floatingItem( aDraggedItemIndex, aPoint, EDrag, + MmEffects::KNoAnimationFramesCount, iWidget->View() ); + floatingItem.SetManualDelete( ETrue ); + AddFloatingItemL( floatingItem, 0 ); - ClearFlags( CListItemDrawer::EPressedDownState ); - } + ClearFlags( CListItemDrawer::EPressedDownState ); + } iAnimator->Trigger(); } @@ -987,45 +1011,45 @@ // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetBgContext( - CAknsBasicBackgroundControlContext * aBgContext ) - { - iBgContext = aBgContext; - } + CAknsBasicBackgroundControlContext * aBgContext ) + { + iBgContext = aBgContext; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetScrollbarVisibilityL( TBool aIsScrollbarVisible ) - { - iTemplateLibrary->SetScrollbarVisibilityL( aIsScrollbarVisible ); - } + { + iTemplateLibrary->SetScrollbarVisibilityL( aIsScrollbarVisible ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TRect CMmListBoxItemDrawer::AdjustItemRect( TInt aItemIndex ) const - { - TSize size = iWidget->View()->ItemSize (iWidget->View()->CurrentItemIndex () ); - TRect rect(iWidget->View()->ItemPos (iWidget->View()->CurrentItemIndex () ), - iWidget->View()->ItemPos (iWidget->View()->CurrentItemIndex () ) + size); - if ( !AknLayoutUtils::PenEnabled () && iIsIndicatorItem) - { - TBool landscapeOrientation = - Layout_Meta_Data::IsLandscapeOrientation (); - const TDesC8& mm_template = iMmModel->GetAttributeAsText ( - 0, KMmTemplate8); - TRect relativeToParentRect = TRect (TPoint (0, 0), TPoint (0, 0)); - relativeToParentRect = iTemplateLibrary->GetMoveIndicatorRect( - iWidgetType, mm_template, landscapeOrientation, - aItemIndex == iWidget->View()->CurrentItemIndex () ); - rect.Move (relativeToParentRect.iTl); - rect.iBr.iX = rect.iBr.iX + relativeToParentRect.Width (); - rect.iBr.iY = rect.iBr.iY + relativeToParentRect.Height (); - } - return rect; - } + { + TSize size = iWidget->View()->ItemSize (iWidget->View()->CurrentItemIndex () ); + TRect rect(iWidget->View()->ItemPos (iWidget->View()->CurrentItemIndex () ), + iWidget->View()->ItemPos (iWidget->View()->CurrentItemIndex () ) + size); + if( !AknLayoutUtils::PenEnabled() && iIsIndicatorItem ) + { + TBool landscapeOrientation = + Layout_Meta_Data::IsLandscapeOrientation(); + const TDesC8& mm_template = iMmModel->GetAttributeAsText ( + 0, KMmTemplate8); + TRect relativeToParentRect = TRect( TPoint( 0, 0 ), TPoint( 0, 0 ) ); + relativeToParentRect = iTemplateLibrary->GetMoveIndicatorRect( + iWidgetType, mm_template, landscapeOrientation, + aItemIndex == iWidget->View()->CurrentItemIndex () ); + rect.Move( relativeToParentRect.iTl ); + rect.iBr.iX = rect.iBr.iX + relativeToParentRect.Width(); + rect.iBr.iY = rect.iBr.iY + relativeToParentRect.Height(); + } + return rect; + } // ----------------------------------------------------------------------------- // @@ -1040,50 +1064,50 @@ IsRedrawItemBackgroundEnabled( ); SetRedrawItemBackground( EFalse ); - DrawActualItem( aItemIndex, AdjustItemRect( aItemIndex ) , EFalse, EFalse, EFalse, EFalse); + DrawActualItem( aItemIndex, AdjustItemRect( aItemIndex ) , EFalse, EFalse, EFalse, EFalse); - SetRedrawItemBackground( redrawItemBackground ); - iIsIndicatorItem = EFalse; - } - } + SetRedrawItemBackground( redrawItemBackground ); + iIsIndicatorItem = EFalse; + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::ReplaceSubCellText( const TDesC& aText ) - { - delete iSubcellText; - iSubcellText = NULL; - if( aText.Compare( KNullDesC() ) ) - { - iSubcellText = aText.Alloc(); - } - } + { + delete iSubcellText; + iSubcellText = NULL; + if( aText.Compare( KNullDesC() ) ) + { + iSubcellText = aText.Alloc(); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::AddSubcellMarqueeElementL( TTemplateChild aSubCellTemplate, TInt aIndex, TInt aItemIndex ) - { - TRgb textColor; - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 ); - iMarqueeAdapter->AddMarqueeElementL( aSubCellTemplate.iRectAccordingToParent, *iSubcellText, - aSubCellTemplate.iFontId, textColor, aSubCellTemplate.iTextAlign, aIndex, - aSubCellTemplate.iRectAccordingToParent.iTl.iY, - aItemIndex); - } + { + TRgb textColor; + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 ); + iMarqueeAdapter->AddMarqueeElementL( aSubCellTemplate.iRectAccordingToParent, *iSubcellText, + aSubCellTemplate.iFontId, textColor, aSubCellTemplate.iTextAlign, aIndex, + aSubCellTemplate.iRectAccordingToParent.iTl.iY, + aItemIndex); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetMarqueeAdapter( CMmMarqueeAdapter* aAdapter ) - { - iMarqueeAdapter = aAdapter; - } + { + iMarqueeAdapter = aAdapter; + } // ----------------------------------------------------------------------------- // @@ -1107,17 +1131,17 @@ TInt maxClipWidth = aTemplateChild.iRectAccordingToParent.Width(); const CFont* font = AknLayoutUtils::FontFromId(aTemplateChild.iFontId); return AknBidiTextUtils::ConvertToVisualAndClipL( clipbuf, *font, - aTemplateChild.iRectAccordingToParent.Width(), maxClipWidth ); - } + aTemplateChild.iRectAccordingToParent.Width(), maxClipWidth ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::SetNumberOfColsInView(TInt aNumberOfColumns) - { - iNumberOfColsInWidget = aNumberOfColumns; - } +void CMmListBoxItemDrawer::SetNumberOfColsInView( TInt aNumberOfColumns ) + { + iNumberOfColsInWidget = aNumberOfColumns; + } // ----------------------------------------------------------------------------- // @@ -1135,80 +1159,86 @@ child.iIsImage = EFalse; } - if ( IsDraggable() && aItemIndex == iZoomIconIndex ) - { - const TReal KNormalZoomRatio = 1.0; - TReal zoomDelta = ( iIconAnimationZoomRatio - KNormalZoomRatio ) / 2.0; - TSize size = child.iRectAccordingToParent.Size(); - TSize sizeDelta( size.iWidth * zoomDelta, size.iHeight * zoomDelta ); - child.iRectAccordingToParent.Grow( sizeDelta ); - } - - TSize targetSize = child.iRectAccordingToParent.Size(); + if( IsEditMode() && IsDraggable() && aItemIndex == iZoomIconIndex ) + { + const TReal KNormalZoomRatio = 1.0; + TReal zoomDelta = ( iIconAnimationZoomRatio - KNormalZoomRatio ) / 2.0; + TSize size = child.iRectAccordingToParent.Size(); + TSize sizeDelta( size.iWidth * zoomDelta, size.iHeight * zoomDelta ); + child.iRectAccordingToParent.Grow( sizeDelta ); + TInt targetZoom( KZoomStateZoomRatio * 100 ); + Math::Round( zoomDelta, ( zoomDelta * 1000 ), 0); + if( (TInt)zoomDelta == targetZoom ) + { + static_cast (Widget()->Parent())->SetAllowMove( ETrue ); + } + } - CHnIconHolder* iconHolder = iMmModel->GetAttributeAsRefCountedGraphics( - aItemIndex, child.iData, &targetSize ); - icon = iconHolder ? iconHolder->GetGulIcon() : NULL; - if ( icon ) + TSize targetSize = child.iRectAccordingToParent.Size(); + + CHnIconHolder* iconHolder = iMmModel->GetAttributeAsRefCountedGraphics( + aItemIndex, child.iData, &targetSize ); + icon = iconHolder ? iconHolder->GetGulIcon() : NULL; + if( icon ) + { + CFbsBitmap* bitmap = icon->Bitmap(); + ASSERT( bitmap ); + //resize the item if it is a move indicator + if( iIsIndicatorItem ) { - CFbsBitmap* bitmap = icon->Bitmap(); - ASSERT( bitmap ); - //resize the item if it is a move indicator - if( iIsIndicatorItem ) - { AknIconUtils::SetSize( bitmap, child.iRectAccordingToParent.Size(), - EAspectRatioNotPreserved ); - } - else - { + EAspectRatioNotPreserved ); + } + else + { TSize bmpSize = bitmap->SizeInPixels(); TBool setSizeRequired = bitmap->DisplayMode() == ENone; if ( targetSize.iWidth && targetSize.iHeight && ( setSizeRequired || !BitmapFitsIntoTarget( bmpSize, targetSize ) ) ) { - CFbsBitmap* mask = icon->Mask(); - if ( mask ) - { + CFbsBitmap* mask = icon->Mask(); + if( mask ) + { __ASSERT_DEBUG( bmpSize == mask->SizeInPixels(), User::Invariant() ); AknIconUtils::SetSize( mask, targetSize, EAspectRatioPreservedAndUnusedSpaceRemoved ); } AknIconUtils::SetSize( bitmap, targetSize, EAspectRatioPreservedAndUnusedSpaceRemoved ); - } } + } TInt iconIndex = iItemsDataCache->GetItemCacheL( aItemIndex )->AppendIconL( iconHolder ); - HBufC8* number = HnConvUtils::NumToStr8LC( iconIndex ); - const TInt newLength = aItemText.Length() + number->Length(); + HBufC8* number = HnConvUtils::NumToStr8LC( iconIndex ); + const TInt newLength = aItemText.Length() + number->Length(); + if( aItemText.MaxLength() < newLength ) + { + aItemText.ReAllocL( newLength ); + } + CleanupStack::PopAndDestroy( number ); + aItemText.AppendNum( iconIndex ); + + SetupSubCellL( child, aSubcellIncrement, aItemIndex ); + + if( aChildIndex < aTemplateChildArray.Count() - 1 ) + { + const TInt newLength = aItemText.Length() + KTab().Length(); if( aItemText.MaxLength() < newLength ) { aItemText.ReAllocL( newLength ); } - CleanupStack::PopAndDestroy( number ); - aItemText.AppendNum( iconIndex ); - - SetupSubCellL( child, aSubcellIncrement, aItemIndex ); + aItemText.Append( KTab ); + } - if ( aChildIndex < aTemplateChildArray.Count() - 1 ) - { - const TInt newLength = aItemText.Length() + KTab().Length(); - if( aItemText.MaxLength() < newLength ) - { - aItemText.ReAllocL( newLength ); - } - aItemText.Append( KTab ); - } - - aSubcellIncrement++; - iLastSubcellsSetupCode.AddSubcellInfo( TMmSubcellsSetupCode::EGraphicsSubcell ); - } - else - { - // Mark the fact that subcell was not set to ensure that TMmSubcellsSetupCode - // works properly. + aSubcellIncrement++; + iLastSubcellsSetupCode.AddSubcellInfo( TMmSubcellsSetupCode::EGraphicsSubcell ); + } + else + { + // Mark the fact that subcell was not set to ensure that TMmSubcellsSetupCode + // works properly. iLastSubcellsSetupCode.AddSubcellInfo( TMmSubcellsSetupCode::ESkippedSubcell ); - } - } + } + } // ----------------------------------------------------------------------------- // @@ -1230,61 +1260,61 @@ // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetupTextSubcellL( - RArray& aTemplateChildArray, TInt aChildIndex, - TInt aItemIndex, RBuf& aItemText, TInt& aSubcellIncrement ) const - { - TTemplateChild child = aTemplateChildArray[aChildIndex]; - RBuf itemChildText; - CleanupClosePushL( itemChildText ); - const TDesC8& mmTitleDes8 = iMmModel->GetAttributeAsText( aItemIndex, - child.iData ); - itemChildText.Assign( HnConvUtils::Str8ToStr( mmTitleDes8 ) ); + RArray& aTemplateChildArray, TInt aChildIndex, + TInt aItemIndex, RBuf& aItemText, TInt& aSubcellIncrement ) const + { + TTemplateChild child = aTemplateChildArray[aChildIndex]; + RBuf itemChildText; + CleanupClosePushL( itemChildText ); + const TDesC8& mmTitleDes8 = iMmModel->GetAttributeAsText( aItemIndex, + child.iData ); + itemChildText.Assign( HnConvUtils::Str8ToStr( mmTitleDes8 ) ); - AppendText( aItemText, itemChildText ); + AppendText( aItemText, itemChildText ); - const_cast(this)->ReplaceSubCellText( - itemChildText ); - CleanupStack::PopAndDestroy( &itemChildText ); + const_cast ( this )->ReplaceSubCellText( + itemChildText ); + CleanupStack::PopAndDestroy( &itemChildText ); - SetupSubCellL( child, aSubcellIncrement, aItemIndex ); + SetupSubCellL( child, aSubcellIncrement, aItemIndex ); - if ( aChildIndex < aTemplateChildArray.Count() - 1 ) - { - AppendText( aItemText, KTab ); - } + if( aChildIndex < aTemplateChildArray.Count() - 1 ) + { + AppendText( aItemText, KTab ); + } - aSubcellIncrement++; - iLastSubcellsSetupCode.AddSubcellInfo( TMmSubcellsSetupCode::ETextSubcell ); - } + aSubcellIncrement++; + iLastSubcellsSetupCode.AddSubcellInfo( TMmSubcellsSetupCode::ETextSubcell ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::AppendText( RBuf& aBuffer, const TDesC& aTextToAppend ) const - { - TInt newLength = aBuffer.Length() + aTextToAppend.Length(); - TInt error = KErrNone; + { + TInt newLength = aBuffer.Length() + aTextToAppend.Length(); + TInt error = KErrNone; - if( aBuffer.MaxLength() < newLength ) - { - error = aBuffer.ReAlloc( newLength ); - } - if ( error == KErrNone ) - { - aBuffer.Append( aTextToAppend ); - } - } + if( aBuffer.MaxLength() < newLength ) + { + error = aBuffer.ReAlloc( newLength ); + } + if( error == KErrNone ) + { + aBuffer.Append( aTextToAppend ); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetupBackdropSubcellL( - RArray& aTemplateChildArray, TInt aItemIndex, - RBuf& aItemText, TInt& aSubcellIncrement ) const - { + RArray& aTemplateChildArray, TInt aItemIndex, + RBuf& aItemText, TInt& aSubcellIncrement ) const + { CGulIcon* icon = NULL; - for ( TInt i = 0; i < aTemplateChildArray.Count() /*&& - aItemIndex != iWidget->View()->CurrentItemIndex()*/; ++i ) + for( TInt i = 0; i < aTemplateChildArray.Count() /*&& + aItemIndex != iWidget->View()->CurrentItemIndex()*/; ++i ) { TTemplateChild child = aTemplateChildArray[i]; if( child.iImageVisualId == EImageVisualIdEditMode && @@ -1294,14 +1324,14 @@ aItemIndex == iWidget->View()->CurrentItemIndex() ); CHnIconHolder* iconHolder = iMmModel->GetAttributeAsRefCountedGraphics( aItemIndex, child.iData, &itemSize ); icon = iconHolder ? iconHolder->GetGulIcon() : NULL; - if ( icon ) + if( icon ) { CFbsBitmap* bitmap = icon->Bitmap(); - child.iRectAccordingToParent = TRect( TPoint( 0, 0 ), - TPoint( itemSize.iWidth, itemSize.iHeight ) ); - AknIconUtils::SetSize( bitmap, itemSize, - EAspectRatioNotPreserved ); - TInt iconIndex = iItemsDataCache->GetItemCacheL( aItemIndex )->AppendIconL( iconHolder ); + child.iRectAccordingToParent = TRect( TPoint( 0, 0 ), + TPoint( itemSize.iWidth, itemSize.iHeight ) ); + AknIconUtils::SetSize( bitmap, itemSize, + EAspectRatioNotPreserved ); + TInt iconIndex = iItemsDataCache->GetItemCacheL( aItemIndex )->AppendIconL( iconHolder ); HBufC8* number = HnConvUtils::NumToStr8LC( iconIndex ); TInt newLength = aItemText.Length() + number->Length(); @@ -1324,7 +1354,7 @@ } } } - } + } // ----------------------------------------------------------------------------- // @@ -1337,7 +1367,7 @@ cache->MarkAsInvalid(); const TDesC8& mmTemplate = iMmModel->GetAttributeAsText( aItemIndex, KMmTemplate8 ); - if ( !mmTemplate.Compare( KNullDesC8 ) || !mmTemplate.Compare( KEmpty8 ) ) + if( !mmTemplate.Compare( KNullDesC8 ) || !mmTemplate.Compare( KEmpty8 ) ) { User::Leave( KErrNotFound ); } @@ -1354,68 +1384,68 @@ RArray templateChildArray; CleanupClosePushL( templateChildArray ); - if ( !iIsIndicatorItem ) - { - iTemplateLibrary->GetChildrenL( iWidgetType, templateChildArray, mmTemplate, - landscapeOrientation, aItemIsCurrent, IsEditMode() ); - } + if( !iIsIndicatorItem ) + { + iTemplateLibrary->GetChildrenL( iWidgetType, templateChildArray, mmTemplate, + landscapeOrientation, aItemIsCurrent, IsEditMode() ); + } else if ( !AknLayoutUtils::PenEnabled() ) - { - iTemplateLibrary->GetMoveIndicatorChildrenL( iWidgetType, templateChildArray, - mmTemplate, landscapeOrientation, aItemIsCurrent ); - } + { + iTemplateLibrary->GetMoveIndicatorChildrenL( iWidgetType, templateChildArray, + mmTemplate, landscapeOrientation, aItemIsCurrent ); + } iLastSubcellsSetupCode.Clear(); //Backdrop icon as first element to draw TInt subcellIncrement( 0 ); - if ( GetBackdropVisibility( aItemIndex, aItemIsCurrent ) ) + if( GetBackdropVisibility( aItemIndex, aItemIsCurrent ) ) { SetupBackdropSubcellL( templateChildArray, aItemIndex, itemText, subcellIncrement ); iItemHasBackdrop = ETrue; } else - { - iItemHasBackdrop = EFalse; - } + { + iItemHasBackdrop = EFalse; + } - for ( TInt i( 0 ) ; i < templateChildArray.Count() && !iLeftOverAreaUnderAnimatedItem; i++ ) - { - TTemplateChild child = templateChildArray[i]; + for ( TInt i( 0 ) ; i < templateChildArray.Count() && !iLeftOverAreaUnderAnimatedItem; i++ ) + { + TTemplateChild child = templateChildArray[i]; if ( child.iImageVisualId == EImageVisualIdEditMode && child.iIsImage ) { continue; } else if( !child.iIsImage ) - { - SetupTextSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement ); - } - else - { - SetupIconSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement ); - } - } - TInt subcellsJustSet = subcellIncrement; - iCurrentNumberOfSubcellsSet = Max( iCurrentNumberOfSubcellsSet, subcellsJustSet ); - __ASSERT_DEBUG( iCurrentNumberOfSubcellsSet <= MmTemplateContants::KSubCellsCount, - User::Invariant() ); + { + SetupTextSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement ); + } + else + { + SetupIconSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement ); + } + } + TInt subcellsJustSet = subcellIncrement; + iCurrentNumberOfSubcellsSet = Max( iCurrentNumberOfSubcellsSet, subcellsJustSet ); + __ASSERT_DEBUG( iCurrentNumberOfSubcellsSet <= MmTemplateContants::KSubCellsCount, + User::Invariant() ); - for ( TInt i = subcellIncrement; i < iCurrentNumberOfSubcellsSet; i++ ) - { - SetupSubNoCellL( i, aItemIndex ); - } + for( TInt i = subcellIncrement; i < iCurrentNumberOfSubcellsSet; i++ ) + { + SetupSubNoCellL( i, aItemIndex ); + } - iLastSubcellsSetupCode.AddTemplateInfo( - iItemsDataCache->GetTemplateIdentifierL( mmTemplate ) ); - iLastSubcellsSetupCode.AddIsCurrentInfo( aItemIsCurrent ); + iLastSubcellsSetupCode.AddTemplateInfo( + iItemsDataCache->GetTemplateIdentifierL( mmTemplate ) ); + iLastSubcellsSetupCode.AddIsCurrentInfo( aItemIsCurrent ); - CleanupStack::PopAndDestroy( &templateChildArray ); + CleanupStack::PopAndDestroy( &templateChildArray ); - cache->SetSubcellsSetupCode( iLastSubcellsSetupCode ); - // the line below is here only to make the cached information complete - GetItemSize( aItemIndex, aItemIsCurrent ); - cache->MarkAsValidL(); - } + cache->SetSubcellsSetupCode( iLastSubcellsSetupCode ); + // the line below is here only to make the cached information complete + GetItemSize( aItemIndex, aItemIsCurrent ); + cache->MarkAsValidL(); + } // ----------------------------------------------------------------------------- // @@ -1431,10 +1461,10 @@ // ----------------------------------------------------------------------------- // void CMmListBoxItemDrawer::SetHighlightShown( TBool aDrawn ) - { - iHighlightShown = aDrawn; - iDrawMoveIndicators = aDrawn; - } + { + iHighlightShown = aDrawn; + iDrawMoveIndicators = aDrawn; + } // ----------------------------------------------------------------------------- // @@ -1445,16 +1475,16 @@ TBool isFloating( EFalse ); TInt index = GetFloatingItemIndex( EDrag ); - if (index == KErrNotFound) - { - index = GetFloatingItemIndex( EDragTransition ); - } + if( index == KErrNotFound ) + { + index = GetFloatingItemIndex( EDragTransition ); + } - if ( KErrNotFound != index ) + if( KErrNotFound != index ) { TMmFloatingItem& current = const_cast(this)->GetFloatingItemAtIndex( index ); TInt drawnIndex = current.GetDrawnItemIndex(); - if ( drawnIndex == aItemIndex ) + if( drawnIndex == aItemIndex ) { isFloating = ETrue; } @@ -1466,53 +1496,53 @@ // // ----------------------------------------------------------------------------- // -void CMmListBoxItemDrawer::DrawActualItem(TInt aItemIndex, - const TRect& aActualItemRect, TBool aItemIsCurrent, - TBool aViewIsEmphasized, TBool /*aViewIsDimmed*/, - TBool aItemIsSelected) const - { - if (Properties(aItemIndex).IsSelectionHidden()) - { - aItemIsSelected = EFalse; - } - DrawItemText(aItemIndex,aActualItemRect,aItemIsCurrent, - aViewIsEmphasized,aItemIsSelected); - } +void CMmListBoxItemDrawer::DrawActualItem( TInt aItemIndex, + const TRect& aActualItemRect, TBool aItemIsCurrent, + TBool aViewIsEmphasized, TBool /*aViewIsDimmed*/, + TBool aItemIsSelected ) const + { + if( Properties( aItemIndex ).IsSelectionHidden() ) + { + aItemIsSelected = EFalse; + } + DrawItemText( aItemIndex, aActualItemRect, aItemIsCurrent, + aViewIsEmphasized, aItemIsSelected ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TBool CMmListBoxItemDrawer::GetHighlightVisibility( TInt aItemIndex, - TBool aItemIsCurrent, TBool aAllowHighlightForNonDraggedItem ) const - { - TBool highlightVisibility(EFalse); - if (!iItemHasBackdrop && !iLeftOverAreaUnderAnimatedItem ) //never draw highlight when item has backdrop or when left over area under animated item - { - TBool currentlyDraggedItem = - ItemHasFloatingType( aItemIndex, EDrag ) || - ItemHasFloatingType( aItemIndex, EDragTransition ); + TBool aItemIsCurrent, TBool aAllowHighlightForNonDraggedItem ) const + { + TBool highlightVisibility( EFalse ); + if( !iItemHasBackdrop && !iLeftOverAreaUnderAnimatedItem ) //never draw highlight when item has backdrop or when left over area under animated item + { + TBool currentlyDraggedItem = + ItemHasFloatingType( aItemIndex, EDrag ) || + ItemHasFloatingType( aItemIndex, EDragTransition ); - if ( ( STATIC_CAST(CMmWidgetContainer*,Widget()->Parent())->IsHighlightVisible() - && aItemIsCurrent && aAllowHighlightForNonDraggedItem ) - || currentlyDraggedItem ) - { - highlightVisibility = ETrue; - } - } - return highlightVisibility; - } + if( ( STATIC_CAST(CMmWidgetContainer*,Widget()->Parent())->IsHighlightVisible() + && aItemIsCurrent && aAllowHighlightForNonDraggedItem ) + || currentlyDraggedItem ) + { + highlightVisibility = ETrue; + } + } + return highlightVisibility; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TBool CMmListBoxItemDrawer::GetBackdropVisibility( TInt aItemIndex, - TBool aItemIsCurrent ) const - { - TBool currentlyDraggedItem = - ItemHasFloatingType( aItemIndex, EDrag ) || - ItemHasFloatingType( aItemIndex, EDragTransition ); + TBool aItemIsCurrent ) const + { + TBool currentlyDraggedItem = + ItemHasFloatingType( aItemIndex, EDrag ) || + ItemHasFloatingType( aItemIndex, EDragTransition ); return IsEditMode() /* draw the backdrop only in edit mode */ && !currentlyDraggedItem /* backdrop is disabled for dragged items */ @@ -1520,26 +1550,26 @@ && !iLeftOverAreaUnderAnimatedItem /* is the currently drawn item the area left over behind dragged item*/ && !( STATIC_CAST( CMmWidgetContainer*,Widget()->Parent() )->IsHighlightVisible() && aItemIsCurrent );/*if the timer is active then we want to draw highlight (not backdrop) on the current index*/ - } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TBool CMmListBoxItemDrawer::ItemHasFloatingType( TInt aItemIndex, - TMmFloatingItemType aFloatingType) const - { - TBool hasFloatingType( EFalse ); - for ( TInt i = iFloatingItems.Count() - 1 ; i >= 0; i-- ) + TMmFloatingItemType aFloatingType ) const + { + TBool hasFloatingType( EFalse ); + for( TInt i = iFloatingItems.Count() - 1; i >= 0; i-- ) { - const TMmFloatingItem& item = iFloatingItems[i]; - if ( item.GetFloatingItemType() == aFloatingType - && item.GetDrawnItemIndex() == aItemIndex ) + const TMmFloatingItem& item = iFloatingItems[i]; + if( item.GetFloatingItemType() == aFloatingType + && item.GetDrawnItemIndex() == aItemIndex ) { hasFloatingType = ETrue; break; } } - return hasFloatingType; - } + return hasFloatingType; + } // End of file diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmlistboxview.cpp --- a/menufw/menufwui/mmwidgets/src/mmlistboxview.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmlistboxview.cpp Wed May 12 13:12:59 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: - * Version : %version: MM_51 % << Don't touch! Updated by Synergy at check-out. + * Version : %version: MM_52 % << Don't touch! Updated by Synergy at check-out. * */ @@ -198,6 +198,15 @@ return ret; } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +TInt CMmListBoxView::ModelItemsCount() + { + return iModel->NumberOfItems(); + } + // ----------------------------------------------------------------------------- // @@ -330,13 +339,15 @@ if ( !itemDrawer->IsEditMode() ) { - itemDrawer->DrawBackgroundAndSeparatorLines( ViewRect() ); + itemDrawer->DrawBackground( ViewRect() ); itemDrawer->SetRedrawItemBackground( EFalse ); + itemDrawer->SetDrawSeparatorLines( ETrue ); while (i < lastPotentialItemIndex) { DrawItem(i++); } itemDrawer->SetRedrawItemBackground( ETrue ); + itemDrawer->SetDrawSeparatorLines( EFalse ); } else { @@ -378,7 +389,9 @@ if ( !redrawConsumed ) { - DrawSingleItem ( aItemIndex ); + itemDrawer->SetDrawSeparatorLines( ETrue ); + DrawSingleItem ( aItemIndex ); + itemDrawer->SetDrawSeparatorLines( EFalse ); } } diff -r 1526727a5b85 -r 899e4666ea9a menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp --- a/menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp Wed May 12 13:12:59 2010 +0300 @@ -12,11 +12,10 @@ * Contributors: * * Description: -* Version : %version: MM_71.1.17.1.57 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_71.1.17.1.59 % << Don't touch! Updated by Synergy at check-out. * */ - #include #include #include @@ -83,32 +82,34 @@ return CMmListBoxContainer::NewL( aRect, aObjectProvider, aTemplateLibrary ); } - // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmWidgetContainer::ConstructL() - { + { iBgContext = CAknsBasicBackgroundControlContext::NewL( - KAknsIIDQsnBgAreaMainAppsGrid, Rect(), EFalse); + KAknsIIDQsnBgAreaMainAppsGrid, Rect(), EFalse ); iLongTapDetector = CAknLongTapDetector::NewL( this ); - iLongTapDetector->EnableLongTapAnimation(ETrue); - } + iLongTapDetector->EnableLongTapAnimation( ETrue ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // CMmWidgetContainer::CMmWidgetContainer() - : iIsFaded( EFalse ) + : iMarqueeAdapter( NULL ) + , iLongTapInProgress( EFalse ) + , iBgContext( NULL ) + , iIsFaded( EFalse ) , iHasFocus( ETrue ) , iInForeground( ETrue ) + , iAllowMove( EFalse ) + , iRecipientId( KErrNotFound ) + , iEventParameters( NULL ) { - iMarqueeAdapter = NULL; - iBgContext = NULL; iWidgetPositionCache.iValid = EFalse; - iLongTapInProgress = EFalse; } // ----------------------------------------------------------------------------- @@ -122,6 +123,7 @@ delete iBgContext; delete iPostProcessor; delete iLongTapDetector; + delete iEventParameters; } // ----------------------------------------------------------------------------- @@ -130,7 +132,7 @@ // EXPORT_C void CMmWidgetContainer::EnableLongTapAnimation( TBool aEnable ) { - if ( iLongTapDetector ) + if( iLongTapDetector ) { iLongTapDetector->EnableLongTapAnimation( aEnable ); } @@ -142,22 +144,22 @@ // void CMmWidgetContainer::SizeChanged() { - if ( iWidget && iWidgetRect != Rect() ) + if( iWidget && iWidgetRect != Rect() ) { - CMmTemplateLibrary * templateLibrary = - static_cast ( - Widget()->View()->ItemDrawer() )->TemplateLibrary(); - if ( Rect() != templateLibrary->GetParentRect( - Layout_Meta_Data::IsLandscapeOrientation() ) ) - { - templateLibrary->CleanAndClearCache(); - } + CMmTemplateLibrary * templateLibrary = + static_cast ( + Widget()->View()->ItemDrawer() )->TemplateLibrary(); + if( Rect() != templateLibrary->GetParentRect( + Layout_Meta_Data::IsLandscapeOrientation() ) ) + { + templateLibrary->CleanAndClearCache(); + } iWidget->View()->SetViewRect( Rect() ); iWidget->SetRect( Rect() ); iWidgetRect = Rect(); } - if ( iBgContext ) + if( iBgContext ) { TRect rect = iCoeEnv->ScreenDevice()->SizeInPixels(); iBgContext->SetRect( rect ); @@ -172,7 +174,7 @@ // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::Draw( const TRect& /*aRect*/ ) const +void CMmWidgetContainer::Draw( const TRect& /*aRect*/) const { // do nothing } @@ -180,14 +182,14 @@ // // ----------------------------------------------------------------------------- // -TTypeUid::Ptr CMmWidgetContainer::MopSupplyObject(TTypeUid aId) +TTypeUid::Ptr CMmWidgetContainer::MopSupplyObject( TTypeUid aId ) { - if (aId.iUid == MAknsControlContext::ETypeId && iBgContext ) + if( aId.iUid == MAknsControlContext::ETypeId && iBgContext ) { - return MAknsControlContext::SupplyMopObject(aId, iBgContext ); + return MAknsControlContext::SupplyMopObject( aId, iBgContext ); } - return CCoeControl::MopSupplyObject(aId); + return CCoeControl::MopSupplyObject( aId ); } // ----------------------------------------------------------------------------- @@ -200,19 +202,19 @@ iLastDragPoint = aPointerEvent.iPosition; iLastDragHighlight = GetHighlight(); if( !iWidget->View()->XYPosToItemIndex( - aPointerEvent.iPosition, iDraggedIndex ) ) + aPointerEvent.iPosition, iDraggedIndex ) ) { iDraggedIndex = KErrNotFound; } iItemRelativeTapPoint = aPointerEvent.iPosition - iWidget->View()->ItemPos( - iDraggedIndex ); + iDraggedIndex ); } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::HandleButtonUpL(const TPointerEvent& /*aPointerEvent*/ ) +void CMmWidgetContainer::HandleButtonUpL( const TPointerEvent& /*aPointerEvent*/) { iTapPoint = TPoint( 0, 0 ); CancelDragL( EFalse ); @@ -227,7 +229,7 @@ if ( aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange ) { - static_cast( iDrawer )->InvalidateCache(); + static_cast ( iDrawer )->InvalidateCache(); CMmTemplateLibrary * templateLibrary = static_cast( iDrawer )->TemplateLibrary(); templateLibrary->CleanAndClearCache(); @@ -235,15 +237,15 @@ TBool highlightVisibleBefore = iWidget->IsVisible() && IsHighlightVisible(); CCoeControl::HandleResourceChange( aType ); - if ( highlightVisibleBefore ) + if( highlightVisibleBefore ) { - SetHighlightVisibilityL( ETrue ); + TRAP_IGNORE( SetHighlightVisibilityL( ETrue ) ); } - if ( aType == KEikDynamicLayoutVariantSwitch && !IsHighlightVisible() ) - { - TRAP_IGNORE( SetDefaultHighlightL( EFalse ) ); - } + if( aType == KEikDynamicLayoutVariantSwitch && !IsHighlightVisible() ) + { + TRAP_IGNORE( SetDefaultHighlightL( EFalse ) ); + } } // ----------------------------------------------------------------------------- @@ -253,7 +255,7 @@ EXPORT_C void CMmWidgetContainer::ItemIconZoomL( TInt /*aItemIndex */) { TInt index = GetHighlight(); - if (index != iDraggedIndex) + if( index != iDraggedIndex ) { iDrawer->AnimateItemZoomInL( index ); } @@ -264,65 +266,65 @@ // ----------------------------------------------------------------------------- // EXPORT_C CHnSuiteModel* CMmWidgetContainer::GetSuiteModelL() - { - return GetMmModel()->GetSuiteModel(); - } + { + return GetMmModel()->GetSuiteModel(); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::HandleDragL(const TPointerEvent& aPointerEvent, +void CMmWidgetContainer::HandleDragL( const TPointerEvent& aPointerEvent, TBool aAbortAnimation ) { DEBUG(("\t_Mm_:CMmWidgetContainer::HandleDragL: iLastDragHighlight = %d ", - iLastDragHighlight )); + iLastDragHighlight )); TInt highlight = GetHighlight(); DEBUG(("\t_Mm_:CMmWidgetContainer::HandleDragL: highlight = %d ", highlight )); - TPoint dragDelta ( iLastDragPoint - aPointerEvent.iPosition); + TPoint dragDelta( iLastDragPoint - aPointerEvent.iPosition ); TInt dragSpeed = dragDelta.iX * dragDelta.iX + dragDelta.iY * dragDelta.iY; - TBool tooFast = (dragSpeed > MmEffects::KDragSpeedIgnoreThreshold); + TBool tooFast = ( dragSpeed > MmEffects::KDragSpeedIgnoreThreshold ); - if (iLastDragHighlight != highlight ) + if( iLastDragHighlight != highlight ) { - iDragAndDropObserver->HandleDragOverL( GetHighlight() ); + iDragAndDropObserver->HandleDragOverL( GetHighlight() ); } - if (!tooFast) - { - TSize itemSize = iWidget->View()->ItemSize( highlight ); - TPoint itemPos = iWidget->View()->ItemPos( highlight ); + if( !tooFast ) + { + TSize itemSize = iWidget->View()->ItemSize( highlight ); + TPoint itemPos = iWidget->View()->ItemPos( highlight ); - if ( PointInItemReorderAreaL( highlight, aPointerEvent.iPosition ) ) - { - CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); - CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( highlight )); - if (iDrawer->GetAnimator()->IsReadyForNewAnimation() && !aAbortAnimation - && onItemModel->GetItemType() != EItemTypeParentFolder - && iDraggedIndex != highlight) - { - GetMmModel()->ReorderModelL( iDraggedIndex, highlight ); - AnimateShiftL( highlight ); - iDrawer->SetDraggedIndexL( highlight, - aPointerEvent.iPosition - iItemRelativeTapPoint ); - iDraggedIndex = highlight; - iDragAndDropObserver->HandleDraggedIndexUpdatedL( highlight ); - } - } - } + if ( PointInItemReorderAreaL( highlight, aPointerEvent.iPosition ) ) + { + CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); + CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( highlight )); + if (iDrawer->GetAnimator()->IsReadyForNewAnimation() && !aAbortAnimation + && onItemModel->GetItemType() != EItemTypeParentFolder + && iDraggedIndex != highlight) + { + GetMmModel()->ReorderModelL( iDraggedIndex, highlight ); + AnimateShiftL( highlight ); + iDrawer->SetDraggedIndexL( highlight, + aPointerEvent.iPosition - iItemRelativeTapPoint ); + iDraggedIndex = highlight; + iDragAndDropObserver->HandleDraggedIndexUpdatedL( highlight ); + } + } + } if ( DeltaSquare( iTapPoint, aPointerEvent.iPosition ) > KDragDelta && - !iDrawer->IsDraggable() ) - { - iDrawer->SetDraggedIndexL( iDraggedIndex, iTapPoint - iItemRelativeTapPoint ); - iDrawer->SetDraggableL( ETrue ); - } - else if ( iDrawer->IsDraggable() ) - { - iDrawer->SetDraggedPointL( aPointerEvent.iPosition - iItemRelativeTapPoint ); - } + !iDrawer->IsDraggable() ) + { + iDrawer->SetDraggedIndexL( iDraggedIndex, iTapPoint - iItemRelativeTapPoint ); + iDrawer->SetDraggableL( ETrue ); + } + else if( iDrawer->IsDraggable() ) + { + iDrawer->SetDraggedPointL( aPointerEvent.iPosition - iItemRelativeTapPoint ); + } DEBUG(("\t_Mm_:CMmWidgetContainer::HandleDragL: iLastDragHighlight = %d ", iLastDragHighlight )); DEBUG(("\t_Mm_:CMmWidgetContainer::HandleDragL: highlight = %d ", highlight )); @@ -334,24 +336,24 @@ // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::AnimateShiftL(TInt aHighlight) - { +void CMmWidgetContainer::AnimateShiftL( TInt aHighlight ) + { TInt lowerVal = (iDraggedIndex < aHighlight)? iDraggedIndex : aHighlight; TInt higherVal = (iDraggedIndex < aHighlight)? aHighlight : iDraggedIndex; - TInt switchOperation = (iDraggedIndex < aHighlight) ? EFalse : ETrue; + TInt switchOperation = ( iDraggedIndex < aHighlight ) ? EFalse : ETrue; - for(TInt iter(lowerVal); iter < higherVal; iter++ ) - { - TInt from = iter + 1; - TInt to = iter; - if (switchOperation) - { - from = iter; - to = iter + 1; - } - iDrawer->AnimateItemSwapL( from, to ); + for( TInt iter( lowerVal ); iter < higherVal; iter++ ) + { + TInt from = iter + 1; + TInt to = iter; + if( switchOperation ) + { + from = iter; + to = iter + 1; + } + iDrawer->AnimateItemSwapL( from, to ); } - } + } // ----------------------------------------------------------------------------- // @@ -359,7 +361,7 @@ // EXPORT_C void CMmWidgetContainer::CancelDragL( TBool aAnimate ) { - if (aAnimate) + if( aAnimate ) { iDrawer->AnimateDragItemTransitionL(); } @@ -367,7 +369,7 @@ SetHighlightAfterDrag(); iDraggedIndex = -1; - iDrawer->SetDraggedIndexL( iDraggedIndex, TPoint(0,0) ); + iDrawer->SetDraggedIndexL( iDraggedIndex, TPoint( 0, 0 ) ); SetDraggableL( EFalse ); TInt dragFloatingItem; @@ -376,9 +378,7 @@ dragFloatingItem = iDrawer->GetFloatingItemIndex( EDrag ); iDrawer->RemoveFloatingItem( dragFloatingItem ); } - while ( dragFloatingItem != KErrNotFound ); - - iDrawer->GetAnimator()->CancelNextRedrawL(); + while( dragFloatingItem != KErrNotFound ); } @@ -387,24 +387,24 @@ // ----------------------------------------------------------------------------- // -TBool CMmWidgetContainer::IsFolderL(TInt aItemIndex) - { - TBool result = EFalse; +TBool CMmWidgetContainer::IsFolderL( TInt aItemIndex ) + { + TBool result = EFalse; - CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); - if (model) - { - CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( aItemIndex )); - if (onItemModel) - { - result = onItemModel->GetItemType() == EItemTypeParentFolder || - onItemModel->GetItemType() == EItemTypeFolder; - } - } + CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); + if( model ) + { + CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( aItemIndex )); + if( onItemModel ) + { + result = onItemModel->GetItemType() == EItemTypeParentFolder + || onItemModel->GetItemType() == EItemTypeFolder; + } + } - return result; + return result; - } + } // ----------------------------------------------------------------------------- // @@ -412,20 +412,20 @@ // TBool CMmWidgetContainer::IsNoItemDragged() - { - TBool noItemDragged = EFalse; - noItemDragged = ( KErrNotFound == iDraggedIndex ) ? ETrue : noItemDragged; - CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); - if ( !noItemDragged && model) - { - CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( iDraggedIndex )); - if (onItemModel) - { - noItemDragged = ( onItemModel->GetItemType() == EItemTypeParentFolder ); - } - } - return noItemDragged; - } + { + TBool noItemDragged = EFalse; + noItemDragged = ( KErrNotFound == iDraggedIndex ) ? ETrue : noItemDragged; + CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); + if( !noItemDragged && model ) + { + CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( iDraggedIndex )); + if( onItemModel ) + { + noItemDragged = ( onItemModel->GetItemType() == EItemTypeParentFolder ); + } + } + return noItemDragged; + } // ----------------------------------------------------------------------------- // @@ -433,15 +433,15 @@ // EXPORT_C void CMmWidgetContainer::SetHasFocusL( TBool aHasFocus ) { - if ( !!aHasFocus != !!iHasFocus ) // logical Ex-OR + if( !!aHasFocus != !!iHasFocus ) // logical Ex-OR { iHasFocus = aHasFocus; StartOrStopMarquee(); } - if ( !aHasFocus ) - { - SetHighlightVisibilityL( EFalse ); - } + if( !aHasFocus ) + { + SetHighlightVisibilityL( EFalse ); + } } // ----------------------------------------------------------------------------- @@ -450,7 +450,7 @@ // EXPORT_C void CMmWidgetContainer::SetIsFaded( TBool aIsFaded ) { - if ( !!aIsFaded != !!iIsFaded ) // logical Ex-OR + if( !!aIsFaded != !!iIsFaded ) // logical Ex-OR { iIsFaded = aIsFaded; StartOrStopMarquee(); @@ -470,139 +470,192 @@ // // ----------------------------------------------------------------------------- // -TBool CMmWidgetContainer::IsDeleteLockedL( TInt aItemIndex ) - { - TBool result = ETrue; +EXPORT_C TBool CMmWidgetContainer::AllowMove() const + { + return iAllowMove; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +void CMmWidgetContainer::SetAllowMove( TBool aAllowMove ) + { + iAllowMove = aAllowMove; + } + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +EXPORT_C void CMmWidgetContainer::SetTriggerMoveItemL( const TInt aRecipientId, + CLiwGenericParamList* aEventParameters ) + { + iRecipientId = aRecipientId; + if( !iEventParameters ) + { + iEventParameters = CLiwGenericParamList::NewL(); + } + else + { + iEventParameters->Reset(); + } + + iEventParameters->AppendL(*aEventParameters); + } - CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); - if (model) - { - CHnItemModel* onItemModel = model->GetItemModel(model->IdByIndex( - aItemIndex)); - if (onItemModel) - { - result = onItemModel->IsDeleteLocked(); - } - } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +void CMmWidgetContainer::TriggerMoveItemL() + { + if( iRecipientId != KErrNotFound && iDragAndDropObserver ) + { + iDragAndDropObserver->HandleTriggerMoveItemL( iRecipientId, + iEventParameters ); + iRecipientId = KErrNotFound; + iEventParameters->Reset(); + } + } - return result; - } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +TBool CMmWidgetContainer::IsDeleteLockedL( TInt aItemIndex ) + { + TBool result = ETrue; + + CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); + if( model ) + { + CHnItemModel* onItemModel = model->GetItemModel( model->IdByIndex( + aItemIndex ) ); + if( onItemModel ) + { + result = onItemModel->IsDeleteLocked(); + } + } + + return result; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmWidgetContainer::ManageFolderZoomingL( TBool aDraggedItemOverIcons ) - { - TBool isAnimated; + { + TBool isAnimated( EFalse ); - isAnimated = EFalse; - for(int i=0; i< iDrawer->GetFloatingItemCount(); i++) - { - TMmFloatingItem& current = iDrawer->GetFloatingItemAtIndex(i); - if (/*current.GetFloatingItemType() != EZoomTransition &&*/ - current.GetFloatingItemType() != EPostHighlightChangeRefreshItem && - current.GetDrawnItemIndex() == GetHighlight() ) - { - isAnimated = ETrue; - break; - } - } + for( int i = 0; i < iDrawer->GetFloatingItemCount(); i++ ) + { + TMmFloatingItem& current = iDrawer->GetFloatingItemAtIndex( i ); + if( /*current.GetFloatingItemType() != EZoomTransition &&*/ + current.GetFloatingItemType() != EPostHighlightChangeRefreshItem + && current.GetDrawnItemIndex() == GetHighlight() ) + { + isAnimated = ETrue; + break; + } + } - if (!isAnimated) - { - if ( GetHighlight() != iDraggedIndex && - IsFolderL( GetHighlight() ) && - !IsDeleteLockedL( GetHighlight() ) && - iDrawer->IsDraggable() ) - { - iDrawer->AnimateItemZoomInL( GetHighlight() ); - } - } + if( !isAnimated ) + { + if( GetHighlight() != iDraggedIndex + && IsFolderL( GetHighlight() ) + && !IsDeleteLockedL( GetHighlight() ) + && iDrawer->IsDraggable() ) + { + iDrawer->AnimateItemZoomInL( GetHighlight() ); + } + } - isAnimated = EFalse; - for(int i=0; i< iDrawer->GetFloatingItemCount(); i++) - { - TMmFloatingItem& current = iDrawer->GetFloatingItemAtIndex(i); - if (current.GetFloatingItemType() != EZoomTransition && - current.GetFloatingItemType() != EPostHighlightChangeRefreshItem && - current.GetDrawnItemIndex() == iLastDragHighlight ) - { - isAnimated = ETrue; - break; - } - } + isAnimated = EFalse; + for( int i = 0; i < iDrawer->GetFloatingItemCount(); i++ ) + { + TMmFloatingItem& current = iDrawer->GetFloatingItemAtIndex( i ); + if( current.GetFloatingItemType() != EZoomTransition + && current.GetFloatingItemType() != EPostHighlightChangeRefreshItem + && current.GetDrawnItemIndex() == iLastDragHighlight ) + { + isAnimated = ETrue; + break; + } + } - if (!isAnimated) - { - if ( ( !aDraggedItemOverIcons && IsFolderL( iLastDragHighlight ) ) || - iLastDragHighlight != Widget()->CurrentItemIndex() ) - { - iDrawer->AnimateItemZoomOutL( iLastDragHighlight ); - } - } - } + if( !isAnimated ) + { + if( ( !aDraggedItemOverIcons && IsFolderL( iLastDragHighlight ) ) + || iLastDragHighlight != Widget()->CurrentItemIndex() ) + { + iDrawer->AnimateItemZoomOutL( iLastDragHighlight ); + } + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmWidgetContainer::HandlePointerEventsInEditModeL( - const TPointerEvent& aPointerEvent, TBool aAbortAnimations ) - { + const TPointerEvent& aPointerEvent, TBool aAbortAnimations ) + { - TInt pointedItem = KErrNotFound; - TBool draggedItemOverIcons = iWidget->View()->XYPosToItemIndex( - aPointerEvent.iPosition, pointedItem ); + TInt pointedItem = KErrNotFound; + TBool draggedItemOverIcons = iWidget->View()->XYPosToItemIndex( + aPointerEvent.iPosition, pointedItem ); - if (aPointerEvent.iType == TPointerEvent::EButton1Down) + if( aPointerEvent.iType == TPointerEvent::EButton1Down ) { -//TODO: PROTO OF 2PHASE HIGHLIGHT EDITMODE BEHAVIOUR -// if (!IsFolderL(pointedItem)) -// { -// iDrawer->ClearFlags( CListItemDrawer::EPressedDownState ); -// } - HandleButtonDownL(aPointerEvent); + //TODO: PROTO OF 2PHASE HIGHLIGHT EDITMODE BEHAVIOUR + // if (!IsFolderL(pointedItem)) + // { + // iDrawer->ClearFlags( CListItemDrawer::EPressedDownState ); + // } + HandleButtonDownL( aPointerEvent ); iDragAndDropObserver->HandleDragStartL( GetHighlight() ); } - else if ( (aPointerEvent.iType == TPointerEvent::EDrag || - aPointerEvent.iType == TPointerEvent::EButtonRepeat) && - iDraggedIndex != KErrNotFound) + else if( ( aPointerEvent.iType == TPointerEvent::EDrag + || aPointerEvent.iType == TPointerEvent::EButtonRepeat ) + && iDraggedIndex != KErrNotFound ) { -//TODO: PROTO OF 2PHASE HIGHLIGHT EDITMODE BEHAVIOUR -// if (!IsFolderL(pointedItem)) -// { -// iDrawer->SetFlags( CListItemDrawer::EPressedDownState ); -// } + //TODO: PROTO OF 2PHASE HIGHLIGHT EDITMODE BEHAVIOUR + // if (!IsFolderL(pointedItem)) + // { + // iDrawer->SetFlags( CListItemDrawer::EPressedDownState ); + // } TPointerEvent pointerEvent = aPointerEvent; if( WidgetType() == EListWidget ) - { - pointerEvent.iPosition.iX = - iWidget->View()->ItemPos( pointedItem ).iX + - iItemRelativeTapPoint.iX; - } + { + pointerEvent.iPosition.iX = + iWidget->View()->ItemPos( pointedItem ).iX + + iItemRelativeTapPoint.iX; + } - if (GetHighlight() != Widget()->CurrentItemIndex() ) - { - SetHighlightL( Widget()->CurrentItemIndex() ); - } + if( GetHighlight() != Widget()->CurrentItemIndex() ) + { + SetHighlightL( Widget()->CurrentItemIndex() ); + } ManageFolderZoomingL( draggedItemOverIcons ); - HandleDragL(pointerEvent, aAbortAnimations); + HandleDragL( pointerEvent, aAbortAnimations ); } else if (aPointerEvent.iType == TPointerEvent::EButton1Up && iDrawer->IsDraggable()) { - if ( !draggedItemOverIcons ) - { - SetManualHighlightL( iDraggedIndex ); - } + if( !draggedItemOverIcons ) + { + SetManualHighlightL( iDraggedIndex ); + } iDragAndDropObserver->HandleDragStopL( GetHighlight() ); - HandleButtonUpL(aPointerEvent); + iAllowMove = EFalse ; + HandleButtonUpL( aPointerEvent ); } - } + } // ----------------------------------------------------------------------------- // @@ -611,70 +664,70 @@ void CMmWidgetContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent ) { if ( iMarqueeAdapter && aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - iMarqueeAdapter->StopMarqueeDrawing(); - } + { + iMarqueeAdapter->StopMarqueeDrawing(); + } TInt index = KErrNotFound; TBool itemExists = iWidget->View()->XYPosToItemIndex( aPointerEvent.iPosition, index ); - if ( iLongTapDetector ) + if( iLongTapDetector ) { - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) + if( aPointerEvent.iType == TPointerEvent::EButton1Down ) { iLongTapDetector->EnableLongTapAnimation( itemExists && GetMmModel()->GetNumberOfSpecificMenuItemsL( index ) > 0 ); } TPointerEvent longTapPointerEvent = aPointerEvent; - if ( aPointerEvent.iType == TPointerEvent::EButtonRepeat ) + if( aPointerEvent.iType == TPointerEvent::EButtonRepeat ) { longTapPointerEvent.iType = TPointerEvent::EDrag; } iLongTapDetector->PointerEventL( longTapPointerEvent ); } - CCoeControl::HandlePointerEventL(aPointerEvent); + CCoeControl::HandlePointerEventL( aPointerEvent ); if ( aPointerEvent.iType == TPointerEvent::EButton1Down && itemExists ) { - SetHighlightL( index );///////////-- + SetHighlightL( index ); } - else if ( aPointerEvent.iType == TPointerEvent::EDrag - // the line below is needed to enable edit mode in the list widget - // because behaviour in the grid and list is different - || (aPointerEvent.iType == TPointerEvent::EButtonRepeat && WidgetType() == EGridWidget )) - { - if ( itemExists ) - { - if ( GetHighlight() != index ) - { - SetHighlightVisibilityL( EFalse ); - if ( IsEditMode() ) - { - SetHighlightL( index ); - } - } - } - else - { - SetHighlightVisibilityL( EFalse ); - } - } + else if( aPointerEvent.iType == TPointerEvent::EDrag + // the line below is needed to enable edit mode in the list widget + // because behaviour in the grid and list is different + || (aPointerEvent.iType == TPointerEvent::EButtonRepeat && WidgetType() == EGridWidget )) + { + if( itemExists ) + { + if( GetHighlight() != index ) + { + SetHighlightVisibilityL( EFalse ); + if( IsEditMode() ) + { + SetHighlightL( index ); + } + } + } + else + { + SetHighlightVisibilityL( EFalse ); + } + } - TInt lastTopItemIndex = Widget()->TopItemIndex(); + TInt lastTopItemIndex = Widget()->TopItemIndex(); TBool abortAnimation = lastTopItemIndex != Widget()->TopItemIndex(); - if (abortAnimation) + if( abortAnimation ) { iDrawer->GetAnimator()->CancelAnimationsL(); } - if ( IsEditMode() && iDragAndDropObserver ) - { - HandlePointerEventsInEditModeL(aPointerEvent, abortAnimation); - } + if( IsEditMode() && iDragAndDropObserver ) + { + HandlePointerEventsInEditModeL( aPointerEvent, abortAnimation ); + } } // ----------------------------------------------------------------------------- @@ -682,12 +735,12 @@ // ----------------------------------------------------------------------------- // EXPORT_C TRect CMmWidgetContainer::GetItemRectL( TInt aItemIndex ) - { - User::LeaveIfNull( iWidget ); - TPoint pos = iWidget->View()->ItemPos( aItemIndex ); - TSize size = iDrawer->GetItemSize( aItemIndex, EFalse ); - return TRect( pos.iX, pos.iY, pos.iX + size.iWidth, pos.iY + size.iHeight ); - } + { + User::LeaveIfNull( iWidget ); + TPoint pos = iWidget->View()->ItemPos( aItemIndex ); + TSize size = iDrawer->GetItemSize( aItemIndex, EFalse ); + return TRect( pos.iX, pos.iY, pos.iX + size.iWidth, pos.iY + size.iHeight ); + } // ----------------------------------------------------------------------------- // @@ -705,9 +758,9 @@ // ----------------------------------------------------------------------------- // TBool CMmWidgetContainer::IsEditMode() const - { - return iIsEditMode; - } + { + return iIsEditMode; + } // ----------------------------------------------------------------------------- // @@ -716,15 +769,16 @@ void CMmWidgetContainer::SetEditModeL( TBool aIsEditMode ) { iIsEditMode = aIsEditMode; + iAllowMove = EFalse; StartOrStopMarquee(); ASSERT(iDrawer); iDrawer->SetEditModeL( aIsEditMode ); - if ( !AknLayoutUtils::PenEnabled() && aIsEditMode ) - { + if( !AknLayoutUtils::PenEnabled() && aIsEditMode ) + { iDraggedIndex = iWidget->CurrentItemIndex(); ScrollViewIfNeededL(); //only edit mode non-touch - } + } // scrollbar does not work when scrolling is disabled // iWidget->DisableScrolling( aIsEditMode ); @@ -739,24 +793,24 @@ // activate the model CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); - if ( suiteModel ) + if( suiteModel ) { suiteModel->SetActiveL( aEnable ); } - if ( ( !!aEnable != !!iPreviousHighlightVisibility ) // Ex-OR + if( ( !!aEnable != !!iPreviousHighlightVisibility ) // Ex-OR || ( !!aEnable != !!IsHighlightVisible() ) ) // Ex-OR { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( - iDrawer->Gc() ); + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( + iDrawer->Gc() ); #endif - if ( !aEnable ) + if( !aEnable ) { iWidget->View()->ItemDrawer()->SetFlags( - CListItemDrawer::ESingleClickDisabledHighlight ); + CListItemDrawer::ESingleClickDisabledHighlight ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( transApi ) + if( transApi ) { transApi->Remove( MAknListBoxTfxInternal::EListHighlight ); } @@ -765,10 +819,10 @@ else { iWidget->View()->ItemDrawer()->ClearFlags( - CListItemDrawer::ESingleClickDisabledHighlight ); + CListItemDrawer::ESingleClickDisabledHighlight ); } - if ( IsVisible() ) + if( IsVisible() ) { TInt highlight = GetHighlight(); CListBoxView* view = Widget()->View(); @@ -785,8 +839,8 @@ // EXPORT_C TBool CMmWidgetContainer::IsHighlightVisible() { - return !( iWidget->View()->ItemDrawer()->Flags() & - CListItemDrawer::ESingleClickDisabledHighlight ); + return !( iWidget->View()->ItemDrawer()->Flags() + & CListItemDrawer::ESingleClickDisabledHighlight ); } // ----------------------------------------------------------------------------- @@ -794,7 +848,7 @@ // ----------------------------------------------------------------------------- // EXPORT_C TBool CMmWidgetContainer::IsDraggable() - { + { iDrawer = STATIC_CAST(CMmListBoxItemDrawer*, iWidget->View()->ItemDrawer()); return iDrawer->IsDraggable(); } @@ -813,7 +867,7 @@ // // ----------------------------------------------------------------------------- // -CCoeControl* CMmWidgetContainer::ComponentControl(TInt aIndex) const +CCoeControl* CMmWidgetContainer::ComponentControl( TInt aIndex ) const { switch( aIndex ) { @@ -836,12 +890,12 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C void CMmWidgetContainer::SetObserver( MMmWidgetObserver* aObserver ) +EXPORT_C void CMmWidgetContainer::SetObserver( MMmWidgetObserver* aObserver ) { //iWidget->SetListBoxObserver( aObserver ); iListBoxObserver = aObserver; iKeyEventObserver = aObserver; - iDragAndDropObserver = aObserver; + iDragAndDropObserver = aObserver; } // ----------------------------------------------------------------------------- @@ -856,7 +910,7 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C TInt CMmWidgetContainer::GetHighlight( ) +EXPORT_C TInt CMmWidgetContainer::GetHighlight() { return iCurrentHighlight; } @@ -866,24 +920,24 @@ // ----------------------------------------------------------------------------- // void CMmWidgetContainer::SetManualHighlightL( TInt aItemIndex, - TBool aRedraw ) - { - SetHighlightL( aItemIndex ); + TBool aRedraw ) + { + SetHighlightL( aItemIndex ); - if ( aItemIndex >= 0 && aItemIndex < GetMmModel()->NumberOfItems() ) - { - if ( aItemIndex != iWidget->CurrentItemIndex() ) - { - iWidget->View()->SetCurrentItemIndex( aItemIndex ); - } + if( aItemIndex >= 0 && aItemIndex < GetMmModel()->NumberOfItems() ) + { + if( aItemIndex != iWidget->CurrentItemIndex() ) + { + iWidget->View()->SetCurrentItemIndex( aItemIndex ); + } - if ( aRedraw ) - { - iWidget->SetCurrentItemIndex( aItemIndex ); - iWidget->DrawNow(); - } - } - } + if( aRedraw ) + { + iWidget->SetCurrentItemIndex( aItemIndex ); + iWidget->DrawNow(); + } + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -892,49 +946,48 @@ { ASSERT( aItemIndex >= KErrNotFound ); - if (aItemIndex == KErrNotFound) + if( aItemIndex == KErrNotFound ) { - iCurrentHighlight = iPreviousHighlight = KErrNotFound; + iCurrentHighlight = iPreviousHighlight = KErrNotFound; SetDefaultHighlightL( EFalse ); } - else if (aItemIndex >= 0 && aItemIndex < GetMmModel()->NumberOfItems()) + else if( aItemIndex >= 0 && aItemIndex < GetMmModel()->NumberOfItems() ) { iPreviousHighlight = iCurrentHighlight; iCurrentHighlight = aItemIndex; - if ( iPreviousHighlight != iCurrentHighlight ) + if( iPreviousHighlight != iCurrentHighlight ) { HideOptionsMenuIfDisplayed(); } CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); - if (suiteModel) + if( suiteModel ) { suiteModel->SetSuiteHighlightL( iCurrentHighlight ); } } + if( IsEditMode() ) + { + TMmFloatingItem postDragCurrent( GetHighlight(), + Widget()->View()->ItemPos( GetHighlight() ), + EPostHighlightChangeRefreshItem, + MmEffects::KNoAnimationFramesCount, Widget()->View() ); - if ( IsEditMode() ) - { - TMmFloatingItem postDragCurrent( GetHighlight(), - Widget()->View()->ItemPos( GetHighlight() ), - EPostHighlightChangeRefreshItem, - MmEffects::KNoAnimationFramesCount, Widget()->View() ); - - iDrawer->AddFloatingItemL( postDragCurrent ); + iDrawer->AddFloatingItemL( postDragCurrent ); - if ( GetPreviousHighlight() != GetHighlight() ) - { - TMmFloatingItem postDragPrevious( GetPreviousHighlight(), - Widget()->View()->ItemPos( GetPreviousHighlight() ), - EPostHighlightChangeRefreshItem, - MmEffects::KNoAnimationFramesCount, Widget()->View() ); + if( GetPreviousHighlight() != GetHighlight() ) + { + TMmFloatingItem postDragPrevious( GetPreviousHighlight(), + Widget()->View()->ItemPos( GetPreviousHighlight() ), + EPostHighlightChangeRefreshItem, + MmEffects::KNoAnimationFramesCount, Widget()->View() ); - iDrawer->AddFloatingItemL( postDragPrevious ); - } - } + iDrawer->AddFloatingItemL( postDragPrevious ); + } + } } // ----------------------------------------------------------------------------- @@ -957,7 +1010,7 @@ void CMmWidgetContainer::HideOptionsMenuIfDisplayed() { CEikMenuBar* menuBar = CEikonEnv::Static()->AppUiFactory()->MenuBar(); - if ( menuBar && menuBar->IsDisplayed() ) + if( menuBar && menuBar->IsDisplayed() ) { menuBar->StopDisplayingMenuBar(); } @@ -968,7 +1021,7 @@ // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::SetFlag(TInt /*Flag*/) +void CMmWidgetContainer::SetFlag( TInt /*Flag*/) { } @@ -994,25 +1047,25 @@ TBool highlightVisibleWhenEventReceived = IsHighlightVisible(); - if ( IsEditMode() && IsDraggable() ) - return resp; + if( IsEditMode() && IsDraggable() ) + return resp; resp = HandleKeyEventL( aKeyEvent, aType ); - if ( iMarqueeAdapter && ( aType == EEventKeyDown ) ) - { - iMarqueeAdapter->StopMarqueeDrawing(); - } + if( iMarqueeAdapter && ( aType == EEventKeyDown ) ) + { + iMarqueeAdapter->StopMarqueeDrawing(); + } - if (!AknLayoutUtils::PenEnabled() && iIsEditMode ) + if( !AknLayoutUtils::PenEnabled() && iIsEditMode ) { - if ((GetHighlight() + ColumnsInCurrentView() > NumberOfItems() - 1) - && aKeyEvent.iScanCode == EStdKeyDownArrow) - // the second condition is needed to block moving item down when there is no item below the moved item. - { - return resp; - } + if( ( GetHighlight() + ColumnsInCurrentView() > NumberOfItems() - 1 ) + && aKeyEvent.iScanCode == EStdKeyDownArrow ) + // the second condition is needed to block moving item down when there is no item below the moved item. + { + return resp; + } - if (aType == EEventKey ) + if( aType == EEventKey ) { TInt prevIndex = GetHighlight(); static_cast(iDrawer)->SetHighlightShown( EFalse ); @@ -1022,45 +1075,45 @@ ScrollViewIfNeededL(); //only edit mode non-touch if ( prevIndex != GetHighlight() - && KErrNotFound != prevIndex ) - { - iDraggedIndex = prevIndex; + && KErrNotFound != prevIndex ) + { + iDraggedIndex = prevIndex; iDragAndDropObserver->HandleDragStartL( iDraggedIndex ); GetMmModel()->ReorderModelL( iDraggedIndex, GetHighlight() ); - iDrawer->AnimateItemSwapL( iDraggedIndex , GetHighlight() ); + iDrawer->AnimateItemSwapL( iDraggedIndex, GetHighlight() ); AnimateShiftL( GetHighlight() ); - } + } return resp; } } - if ( resp == EKeyWasNotConsumed ) + if( resp == EKeyWasNotConsumed ) { resp = iWidget->OfferKeyEventL( aKeyEvent, aType ); } - if ( iKeyEventObserver ) - { - resp = iKeyEventObserver->HandleKeyPressedL( aKeyEvent, aType ); - } + if( iKeyEventObserver ) + { + resp = iKeyEventObserver->HandleKeyPressedL( aKeyEvent, aType ); + } if ( ( aKeyEvent.iScanCode == EStdKeyDevice3 || - aKeyEvent.iScanCode == EStdKeyEnter || - aKeyEvent.iScanCode == EStdKeyNkpEnter ) && aType == EEventKeyDown ) - { - if ( highlightVisibleWhenEventReceived ) - { - iAllowLongPress = EFalse; - } - else - { - iAllowLongPress = ETrue; + aKeyEvent.iScanCode == EStdKeyEnter || + aKeyEvent.iScanCode == EStdKeyNkpEnter ) && aType == EEventKeyDown ) + { + if( highlightVisibleWhenEventReceived ) + { + iAllowLongPress = EFalse; + } + else + { + iAllowLongPress = ETrue; - SetHighlightVisibilityL( ETrue ); - SetDefaultHighlightL( ETrue ); - HandleForegroundGainedL(); - } - } + SetHighlightVisibilityL( ETrue ); + SetDefaultHighlightL( ETrue ); + HandleForegroundGainedL(); + } + } return resp; } @@ -1069,10 +1122,10 @@ // ----------------------------------------------------------------------------- // TInt CMmWidgetContainer::ColumnsInCurrentView() - { - //should be overridden by deriving classes - return NumberOfItems(); - } + { + //should be overridden by deriving classes + return NumberOfItems(); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -1080,8 +1133,8 @@ TInt CMmWidgetContainer::RowsInCurrentView() { //should be overridden by deriving classes - CListBoxView *view = ((CListBoxView*) Widget()->View()); - return view->NumberOfItemsThatFitInRect( Rect());//Widget()->View()->ViewRect()); + CListBoxView *view = ( (CListBoxView* ) Widget()->View() ); + return view->NumberOfItemsThatFitInRect( Rect() );//Widget()->View()->ViewRect()); } // ----------------------------------------------------------------------------- @@ -1089,7 +1142,7 @@ // ----------------------------------------------------------------------------- // void CMmWidgetContainer::HandleRockerPressL() - { + { TKeyEvent ke; ke.iScanCode = EStdKeyNull; ke.iCode = EStdKeyNull; @@ -1099,7 +1152,7 @@ { iKeyEventObserver->HandleKeyPressedL( ke, EEventUser ); } - } + } // ----------------------------------------------------------------------------- // @@ -1109,37 +1162,37 @@ TEventCode aType ) { TKeyResponse resp = EKeyWasNotConsumed; - TBool arrowKeyPressed = aKeyEvent.iScanCode == EStdKeyRightArrow || - aKeyEvent.iScanCode == EStdKeyLeftArrow || - aKeyEvent.iScanCode == EStdKeyUpArrow || - aKeyEvent.iScanCode == EStdKeyDownArrow; + TBool arrowKeyPressed = aKeyEvent.iScanCode == EStdKeyRightArrow + || aKeyEvent.iScanCode == EStdKeyLeftArrow + || aKeyEvent.iScanCode == EStdKeyUpArrow + || aKeyEvent.iScanCode == EStdKeyDownArrow; TBool arrowHasHandling = ( aKeyEvent.iScanCode == EStdKeyRightArrow - && WidgetType() != EListWidget ) - || ( aKeyEvent.iScanCode == EStdKeyLeftArrow - && WidgetType() != EListWidget ) - || aKeyEvent.iScanCode == EStdKeyUpArrow - || aKeyEvent.iScanCode == EStdKeyDownArrow; + && WidgetType() != EListWidget ) + || ( aKeyEvent.iScanCode == EStdKeyLeftArrow + && WidgetType() != EListWidget ) + || aKeyEvent.iScanCode == EStdKeyUpArrow + || aKeyEvent.iScanCode == EStdKeyDownArrow; // handle arrow: draw highlight when arrow used - if ( arrowHasHandling ) + if( arrowHasHandling ) { - if ( !IsHighlightVisible() ) + if( !IsHighlightVisible() ) { - if ( aType == EEventKey || aType == EEventKeyUp ) + if( aType == EEventKey || aType == EEventKeyUp ) { SetHighlightVisibilityL( ETrue ); SetDefaultHighlightL( ETrue ); } - // override avkon's default highlight setting - resp = EKeyWasConsumed; + // override avkon's default highlight setting + resp = EKeyWasConsumed; } else { // this block is used to set the highlight only once for each event - if ( aKeyEvent.iRepeats > 0 ) + if( aKeyEvent.iRepeats > 0 ) { // if repeated key events we move focus on EEventKey - if ( aType == EEventKey ) + if( aType == EEventKey ) { SetHighlightL( iWidget->CurrentItemIndex() ); } @@ -1147,13 +1200,13 @@ else { // if single event we move focus on EEventKeyUp - if ( aType == EEventKeyUp ) + if( aType == EEventKeyUp ) { SetHighlightL( iWidget->CurrentItemIndex() ); } } } - } + } else if( arrowKeyPressed ) { // ignore left and right arrows in list @@ -1161,19 +1214,19 @@ } // rocker select (short press) else if ( ( aKeyEvent.iScanCode == EStdKeyDevice3 ) && ( aType == EEventKeyDown ) ) - { - HandleRockerPressL(); - resp = EKeyWasConsumed; - } + { + HandleRockerPressL(); + resp = EKeyWasConsumed; + } else if ( iAllowLongPress && aType == EEventKey && aKeyEvent.iRepeats > 0 && - ( aKeyEvent.iScanCode == EStdKeyDevice3 - || aKeyEvent.iScanCode == EStdKeyEnter - || aKeyEvent.iScanCode == EStdKeyNkpEnter ) ) - { - HandleRockerPressL(); - resp = EKeyWasConsumed; - iAllowLongPress = EFalse; - } + ( aKeyEvent.iScanCode == EStdKeyDevice3 + || aKeyEvent.iScanCode == EStdKeyEnter + || aKeyEvent.iScanCode == EStdKeyNkpEnter ) ) + { + HandleRockerPressL(); + resp = EKeyWasConsumed; + iAllowLongPress = EFalse; + } return resp; } @@ -1183,11 +1236,11 @@ // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::SetSuiteModelL(CHnSuiteModel* aModel) +void CMmWidgetContainer::SetSuiteModelL( CHnSuiteModel* aModel ) { CHnSuiteModel* prevModel = GetMmModel()->GetSuiteModel(); - TInt numberOfItemsBefore (0); + TInt numberOfItemsBefore( 0 ); numberOfItemsBefore = GetMmModel()->NumberOfItems(); GetMmModel()->SetSuiteModelL( aModel ); @@ -1197,8 +1250,8 @@ // This needs to be in place (disabling redraw) // to udpate widget internal state, however to wait for // drawing until all highlight set matters are solved. - iWidget->MakeVisible(EFalse); - if ( GetMmModel()->NumberOfItems() >= numberOfItemsBefore ) + iWidget->MakeVisible( EFalse ); + if( GetMmModel()->NumberOfItems() >= numberOfItemsBefore ) { HandleItemAdditionL(); } @@ -1206,20 +1259,20 @@ { HandleItemRemovalL(); } - if ( prevModel && aModel ) + if( prevModel && aModel ) { SetupWidgetLayoutL(); } - iWidget->MakeVisible(ETrue); + iWidget->MakeVisible( ETrue ); - if ( highlightVisibleBefore ) + if( highlightVisibleBefore ) { SetHighlightVisibilityL( ETrue ); } Widget()->View()->ItemDrawer()->ClearFlags( - CListItemDrawer::EPressedDownState ); - iPostProcessor->StartAt( iWidget->BottomItemIndex() + 1 ); + CListItemDrawer::EPressedDownState ); + iPostProcessor->StartAt( iWidget->BottomItemIndex() + 1 ); } // --------------------------------------------------------------------------- @@ -1227,19 +1280,18 @@ // --------------------------------------------------------------------------- // void CMmWidgetContainer::SetupDrawer() - { - iDrawer = STATIC_CAST(CMmListBoxItemDrawer*, iWidget->View()->ItemDrawer()); - } - + { + iDrawer = STATIC_CAST(CMmListBoxItemDrawer*, iWidget->View()->ItemDrawer()); + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C THnSuiteWidgetType CMmWidgetContainer::WidgetType() - { - return EUnspecified; - } + { + return EUnspecified; + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- @@ -1263,11 +1315,11 @@ // Fix for EMWK-7NYKRJ // Matrix Menu: Scrollbar highligted when App Key is pressed while it is held - if ( AknLayoutUtils::PenEnabled() ) + if( AknLayoutUtils::PenEnabled() ) { CEikScrollBar* scrollBar = iWidget->ScrollBarFrame()->VerticalScrollBar(); - if ( scrollBar && scrollBar->IsVisible() ) + if( scrollBar && scrollBar->IsVisible() ) { TPointerEvent fakeButton1UpEvent; fakeButton1UpEvent.iType = TPointerEvent::EButton1Up; @@ -1292,21 +1344,21 @@ // --------------------------------------------------------------------------- // TInt CMmWidgetContainer::DeltaSquare( const TPoint aTapPoint, - const TPoint aPos ) - { - TInt delta( KErrNotFound ); - TInt height = aTapPoint.iY - aPos.iY; - TInt width = aTapPoint.iX - aPos.iX; + const TPoint aPos ) + { + TInt delta( KErrNotFound ); + TInt height = aTapPoint.iY - aPos.iY; + TInt width = aTapPoint.iX - aPos.iX; if( WidgetType() == EListWidget ) - { - delta = height * height + height * height; - } + { + delta = height * height + height * height; + } else - { - delta = height * height + width * width; - } - return delta; - } + { + delta = height * height + width * width; + } + return delta; + } // --------------------------------------------------------------------------- // @@ -1328,120 +1380,118 @@ // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::HandleItemAdditionL() - { - // only the the descended method should be invoked. - // this is needed to avoid codescanner warning - User::Leave( KErrNotSupported ); - } - + { + // only the the descended method should be invoked. + // this is needed to avoid codescanner warning + User::Leave( KErrNotSupported ); + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::HandleItemRemovalL() - { - // only the the descended method should be invoked. - // this is needed to avoid codescanner warning - User::Leave( KErrNotSupported ); - } + { + // only the the descended method should be invoked. + // this is needed to avoid codescanner warning + User::Leave( KErrNotSupported ); + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::StopMovingL() - { - if ( !AknLayoutUtils::PenEnabled() && iDragAndDropObserver ) - iDragAndDropObserver->HandleDragStopL( GetHighlight() ); - } - + { + if( !AknLayoutUtils::PenEnabled() && iDragAndDropObserver ) + iDragAndDropObserver->HandleDragStopL( GetHighlight() ); + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmWidgetContainer::ScrollViewIfNeededL() - { - if ((iWidget->BottomItemIndex() / ColumnsInCurrentView() - - iWidget->TopItemIndex() / ColumnsInCurrentView() ) <= 1 ) - { - return; - } + { + if( ( iWidget->BottomItemIndex() / ColumnsInCurrentView() + - iWidget->TopItemIndex() / ColumnsInCurrentView() ) <= 1 ) + { + return; + } - TBool needToScrollUp = - GetHighlight() - iWidget->TopItemIndex() < ColumnsInCurrentView() - && iWidget->TopItemIndex() != 0; + TBool needToScrollUp = + GetHighlight() - iWidget->TopItemIndex() < ColumnsInCurrentView() + && iWidget->TopItemIndex() != 0; - TBool needToScrollDown = - iWidget->BottomItemIndex() - GetHighlight() < ColumnsInCurrentView() - && iWidget->BottomItemIndex() / ColumnsInCurrentView() - != ( NumberOfItems() - 1 ) / ColumnsInCurrentView(); + TBool needToScrollDown = + iWidget->BottomItemIndex() - GetHighlight() < ColumnsInCurrentView() + && iWidget->BottomItemIndex() / ColumnsInCurrentView() + != ( NumberOfItems() - 1 ) / ColumnsInCurrentView(); - if ( WidgetType() == EGridWidget ) - { - // TODO: temporary - invisible partial items in MCL grid :/ - needToScrollDown = - iWidget->BottomItemIndex() - ColumnsInCurrentView() - GetHighlight() < ColumnsInCurrentView() - && ( iWidget->BottomItemIndex() / ColumnsInCurrentView() ) - 1 - != ( NumberOfItems() - 1 ) / ColumnsInCurrentView() - && iWidget->BottomItemIndex() - iWidget->TopItemIndex() - > ColumnsInCurrentView() * RowsInCurrentView(); - } + if( WidgetType() == EGridWidget ) + { + // TODO: temporary - invisible partial items in MCL grid :/ + needToScrollDown = + iWidget->BottomItemIndex() - ColumnsInCurrentView() - GetHighlight() < ColumnsInCurrentView() + && ( iWidget->BottomItemIndex() / ColumnsInCurrentView() ) - 1 + != ( NumberOfItems() - 1 ) / ColumnsInCurrentView() + && iWidget->BottomItemIndex() - iWidget->TopItemIndex() + > ColumnsInCurrentView() * RowsInCurrentView(); + } - if ( needToScrollUp ) - { + if( needToScrollUp ) + { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iDrawer->Gc() ); - if ( transApi ) - { - transApi->SetMoveType( MAknListBoxTfxInternal::EListScrollUp ); - } + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iDrawer->Gc() ); + if( transApi ) + { + transApi->SetMoveType( MAknListBoxTfxInternal::EListScrollUp ); + } #endif - iDrawer->RemoveFloatingItems(); - iWidget->View()->VScrollTo( - iWidget->TopItemIndex() - ColumnsInCurrentView() ); + iDrawer->RemoveFloatingItems(); + iWidget->View()->VScrollTo( + iWidget->TopItemIndex() - ColumnsInCurrentView() ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( transApi ) - { - transApi->Draw( Rect() ); - } + if( transApi ) + { + transApi->Draw( Rect() ); + } #endif - UpdateViewScrollBarThumbs(); - } - else if ( needToScrollDown ) - { + UpdateViewScrollBarThumbs(); + } + else if( needToScrollDown ) + { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iDrawer->Gc() ); - if ( transApi ) - { - transApi->SetMoveType( MAknListBoxTfxInternal::EListScrollDown ); - } + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iDrawer->Gc() ); + if( transApi ) + { + transApi->SetMoveType( MAknListBoxTfxInternal::EListScrollDown ); + } #endif - iDrawer->RemoveFloatingItems(); - iWidget->View()->VScrollTo( - iWidget->TopItemIndex() + ColumnsInCurrentView() ); + iDrawer->RemoveFloatingItems(); + iWidget->View()->VScrollTo( + iWidget->TopItemIndex() + ColumnsInCurrentView() ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST - if ( transApi ) - { - transApi->Draw( Rect() ); - } + if( transApi ) + { + transApi->Draw( Rect() ); + } #endif - UpdateViewScrollBarThumbs(); - } - } + UpdateViewScrollBarThumbs(); + } + } //---------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmWidgetContainer::UpdateViewScrollBarThumbs() - { + { - } + } //---------------------------------------------------------------------------- // @@ -1449,15 +1499,15 @@ // void CMmWidgetContainer::StartOrStopMarquee() { - if ( iMarqueeAdapter ) + if( iMarqueeAdapter ) { TBool marqueeShouldBeEnabled = iHasFocus && iInForeground && !iIsFaded && !IsEditMode(); - // logical Ex-OR + // logical Ex-OR if ( !!marqueeShouldBeEnabled != !!iMarqueeAdapter->IsMarqueeEnabled() ) { - if ( !marqueeShouldBeEnabled ) + if( !marqueeShouldBeEnabled ) { iMarqueeAdapter->StopMarqueeDrawing(); } @@ -1472,89 +1522,89 @@ // --------------------------------------------------------------------------- // void CMmWidgetContainer::SetHighlightAfterDrag() - { - if ( AknLayoutUtils::PenEnabled() && - iDraggedIndex != KErrNotFound && - iDraggedIndex != Widget()->CurrentItemIndex() - && iDraggedIndex < NumberOfItems() ) - { - TBool isFolder(EFalse); - CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); - CHnItemModel* onItemModel = model->GetItemModel( - model->IdByIndex( Widget()->CurrentItemIndex() )); - if (onItemModel) - { - isFolder = onItemModel->GetItemType() == EItemTypeParentFolder || - onItemModel->GetItemType() == EItemTypeFolder; - } - if (!isFolder) - { - Widget()->View()->SetCurrentItemIndex( iDraggedIndex ); - } - } - } + { + if( AknLayoutUtils::PenEnabled() + && iDraggedIndex != KErrNotFound + && iDraggedIndex != Widget()->CurrentItemIndex() + && iDraggedIndex < NumberOfItems() ) + { + TBool isFolder( EFalse ); + CHnSuiteModel* model = GetMmModel()->GetSuiteModel(); + CHnItemModel* onItemModel = model->GetItemModel( + model->IdByIndex( Widget()->CurrentItemIndex() )); + if( onItemModel ) + { + isFolder = onItemModel->GetItemType() == EItemTypeParentFolder + || onItemModel->GetItemType() == EItemTypeFolder; + } + if( !isFolder ) + { + Widget()->View()->SetCurrentItemIndex( iDraggedIndex ); + } + } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmWidgetContainer::ValidateWidgetCurrentItemIndex() - { - if (Widget()->CurrentItemIndex() >= GetMmModel()->NumberOfItems() - || Widget()->CurrentItemIndex() == KErrNotFound ) - { - iCurrentHighlight = GetMmModel()->NumberOfItems(); - if( iCurrentHighlight > 0 ) - { - Widget()->View()->SetCurrentItemIndex( --iCurrentHighlight ); - } - else - { - iCurrentHighlight = KErrNotFound ; - } - } - } + { + if( Widget()->CurrentItemIndex() >= GetMmModel()->NumberOfItems() + || Widget()->CurrentItemIndex() == KErrNotFound ) + { + iCurrentHighlight = GetMmModel()->NumberOfItems(); + if( iCurrentHighlight > 0 ) + { + Widget()->View()->SetCurrentItemIndex( --iCurrentHighlight ); + } + else + { + iCurrentHighlight = KErrNotFound; + } + } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::CacheWidgetPosition() - { - iWidgetPositionCache.iVerticalItemOffset = VerticalItemOffset(); - iWidgetPositionCache.iTopItemIndex = Widget()->TopItemIndex(); - iWidgetPositionCache.iLandscape - = Layout_Meta_Data::IsLandscapeOrientation(); - iWidgetPositionCache.iHighlightedItemId = KErrNotFound; + { + iWidgetPositionCache.iVerticalItemOffset = VerticalItemOffset(); + iWidgetPositionCache.iTopItemIndex = Widget()->TopItemIndex(); + iWidgetPositionCache.iLandscape + = Layout_Meta_Data::IsLandscapeOrientation(); + iWidgetPositionCache.iHighlightedItemId = KErrNotFound; - TInt highlightedItemIndex = Widget()->CurrentItemIndex(); - CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); - if ( suiteModel && highlightedItemIndex != KErrNotFound - && suiteModel->GetSuiteHighlight() == highlightedItemIndex - && ItemIsVisible( highlightedItemIndex ) ) - { - iWidgetPositionCache.iHighlightedItemId = + TInt highlightedItemIndex = Widget()->CurrentItemIndex(); + CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); + if( suiteModel && highlightedItemIndex != KErrNotFound + && suiteModel->GetSuiteHighlight() == highlightedItemIndex + && ItemIsVisible( highlightedItemIndex ) ) + { + iWidgetPositionCache.iHighlightedItemId = suiteModel->IdByIndex( highlightedItemIndex ); - } + } - iWidgetPositionCache.iValid = ETrue; - } + iWidgetPositionCache.iValid = ETrue; + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::RestoreWidgetPosition() - { - if (iWidgetPositionCache.iValid) - { - if ( iWidgetPositionCache.iLandscape - == Layout_Meta_Data::IsLandscapeOrientation() ) - { + { + if( iWidgetPositionCache.iValid ) + { + if( iWidgetPositionCache.iLandscape + == Layout_Meta_Data::IsLandscapeOrientation() ) + { // If view position was cached during boundary effect, correct the // cached position. - if ( iWidgetPositionCache.iTopItemIndex == 0 && - iWidgetPositionCache.iVerticalItemOffset > 0 ) + if( iWidgetPositionCache.iTopItemIndex == 0 + && iWidgetPositionCache.iVerticalItemOffset > 0 ) { iWidgetPositionCache.iVerticalItemOffset = 0; // This corrects the position cached during the upper boundary @@ -1562,139 +1612,139 @@ // effect. } - Widget()->View()->SetTopItemIndex(iWidgetPositionCache.iTopItemIndex); - SetVerticalItemOffset(iWidgetPositionCache.iVerticalItemOffset); - TRAP_IGNORE( AlignBottomOfViewL() ); + Widget()->View()->SetTopItemIndex(iWidgetPositionCache.iTopItemIndex); + SetVerticalItemOffset( iWidgetPositionCache.iVerticalItemOffset ); + TRAP_IGNORE( AlignBottomOfViewL() ); - // Important: If an item that was previously highlighted and visible is - // still highlighted and yet somehow is not visible after the position - // has been restored, fix the problem by scrolling the view until that - // item is visible again: - CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); - if ( suiteModel && IsHighlightVisible() ) - { - TInt highlightedItemIndex = suiteModel->GetSuiteHighlight(); - TInt highlightedItemId = highlightedItemIndex != KErrNotFound ? - suiteModel->IdByIndex( highlightedItemIndex ) : KErrNotFound; - if ( highlightedItemId != KErrNotFound - && highlightedItemId == iWidgetPositionCache.iHighlightedItemId - && !ItemIsVisible( highlightedItemIndex ) ) - { - TRAP_IGNORE( ScrollToItemL( highlightedItemIndex ) ); - } - } - } - else - { - TRAP_IGNORE( ScrollToItemL(Widget()->CurrentItemIndex()) ); - } + // Important: If an item that was previously highlighted and visible is + // still highlighted and yet somehow is not visible after the position + // has been restored, fix the problem by scrolling the view until that + // item is visible again: + CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); + if( suiteModel && IsHighlightVisible() ) + { + TInt highlightedItemIndex = suiteModel->GetSuiteHighlight(); + TInt highlightedItemId = highlightedItemIndex != KErrNotFound ? + suiteModel->IdByIndex( highlightedItemIndex ) : KErrNotFound; + if ( highlightedItemId != KErrNotFound + && highlightedItemId == iWidgetPositionCache.iHighlightedItemId + && !ItemIsVisible( highlightedItemIndex ) ) + { + TRAP_IGNORE( ScrollToItemL( highlightedItemIndex ) ); + } + } + } + else + { + TRAP_IGNORE( ScrollToItemL(Widget()->CurrentItemIndex()) ); + } - iWidgetPositionCache.iValid = EFalse; - } - } + iWidgetPositionCache.iValid = EFalse; + } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // -void CMmWidgetContainer::MakeVisible(TBool aVisible) - { - if ( !aVisible ) - { - RestoreWidgetPosition(); - CacheWidgetPosition(); - iDrawer->RemoveFloatingItems(); - } - else if ( aVisible ) - { - RestoreWidgetPosition(); - } - CCoeControl::MakeVisible(aVisible); - iWidget->MakeVisible(aVisible); - if ( !aVisible ) +void CMmWidgetContainer::MakeVisible( TBool aVisible ) + { + if( !aVisible ) + { + RestoreWidgetPosition(); + CacheWidgetPosition(); + iDrawer->RemoveFloatingItems(); + } + else if( aVisible ) { - TRAP_IGNORE( SetHighlightVisibilityL( EFalse ) ); + RestoreWidgetPosition(); } - } + CCoeControl::MakeVisible( aVisible ); + iWidget->MakeVisible( aVisible ); + if( !aVisible ) + { + TRAP_IGNORE( SetHighlightVisibilityL( EFalse ) ); + } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::ResetWidgetPosition() - { - iWidgetPositionCache.iVerticalItemOffset = 0; - iWidgetPositionCache.iTopItemIndex = 0; - iWidgetPositionCache.iValid = EFalse; - iWidgetPositionCache.iHighlightedItemId = KErrNotFound; - Widget()->SetTopItemIndex(0); - SetVerticalItemOffset(0); - } + { + iWidgetPositionCache.iVerticalItemOffset = 0; + iWidgetPositionCache.iTopItemIndex = 0; + iWidgetPositionCache.iValid = EFalse; + iWidgetPositionCache.iHighlightedItemId = KErrNotFound; + Widget()->SetTopItemIndex( 0 ); + SetVerticalItemOffset( 0 ); + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::NumberOfItemsChangedL( TItemsChangeType aChange ) - { - if ( AknLayoutUtils::PenEnabled() ) - { - CacheWidgetPosition(); - Widget()->View()->SetDisableRedraw( ETrue ); + { + if( AknLayoutUtils::PenEnabled() ) + { + CacheWidgetPosition(); + Widget()->View()->SetDisableRedraw( ETrue ); - HandleNumberOfItemsChangedL( aChange ); + HandleNumberOfItemsChangedL( aChange ); - Widget()->View()->SetDisableRedraw( EFalse ); - RestoreWidgetPosition(); - } - else - { - // there is no need to cache and restore widget position in non-touch; - // moreover, it can cause some problems with scrolling when adding - // new folder - HandleNumberOfItemsChangedL( aChange ); - } - } + Widget()->View()->SetDisableRedraw( EFalse ); + RestoreWidgetPosition(); + } + else + { + // there is no need to cache and restore widget position in non-touch; + // moreover, it can cause some problems with scrolling when adding + // new folder + HandleNumberOfItemsChangedL( aChange ); + } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmWidgetContainer::HandleNumberOfItemsChangedL( TItemsChangeType aChange ) - { - SetHighlightVisibilityL( EFalse ); - if ( aChange == EItemsAdded ) - { - HandleItemAdditionL(); - } - else if ( aChange == EItemsRemoved ) - { - HandleItemRemovalL(); - } - } + { + SetHighlightVisibilityL( EFalse ); + if( aChange == EItemsAdded ) + { + HandleItemAdditionL(); + } + else if( aChange == EItemsRemoved ) + { + HandleItemRemovalL(); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // TBool CMmWidgetContainer::AlignBottomOfViewL() - { - TInt scrollConsumed( EFalse ); - TInt pixelsToScroll( 0 ); + { + TInt scrollConsumed( EFalse ); + TInt pixelsToScroll( 0 ); - if ( NumberOfItems() > 0 ) - { - pixelsToScroll = CalcBottomPixelsToScroll(); - } + if( NumberOfItems() > 0 ) + { + pixelsToScroll = CalcBottomPixelsToScroll(); + } - if ( pixelsToScroll != 0 ) - { - ScrollInPixelsL( pixelsToScroll ); - scrollConsumed = ETrue; - } + if( pixelsToScroll != 0 ) + { + ScrollInPixelsL( pixelsToScroll ); + scrollConsumed = ETrue; + } - return scrollConsumed; - } + return scrollConsumed; + } // ----------------------------------------------------------------------------- // @@ -1705,11 +1755,11 @@ const TInt firstItemIndex( 0 ); TInt lastItemIndex = NumberOfItems() - 1; TInt viewHeight = Widget()->View()->ViewRect().Height(); - TInt lastItemBottomY = Widget()->View()->ItemPos(lastItemIndex).iY - + Widget()->ItemHeight(); + TInt lastItemBottomY = Widget()->View()->ItemPos( lastItemIndex ).iY + + Widget()->ItemHeight(); TInt pixelsToScroll( 0 ); - if ( Widget()->ScrollBarFrame()->VerticalScrollBar()->IsVisible() ) + if( Widget()->ScrollBarFrame()->VerticalScrollBar()->IsVisible() ) { pixelsToScroll = Min( 0, lastItemBottomY - viewHeight ); } @@ -1721,7 +1771,6 @@ return pixelsToScroll; } - // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- @@ -1735,155 +1784,156 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C TBool CMmWidgetContainer::ItemIsFullyVisible(TInt aIndex) - { - return ItemIsVisible( aIndex ) - && !Widget()->View()->ItemIsPartiallyVisible(aIndex); - } +EXPORT_C TBool CMmWidgetContainer::ItemIsFullyVisible( TInt aIndex ) + { + return ItemIsVisible( aIndex ) + && !Widget()->View()->ItemIsPartiallyVisible( aIndex ); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::ScrollInPixelsL(TInt aPixels) - { - SetupScrollingEffectsL( aPixels > 0 ); +void CMmWidgetContainer::ScrollInPixelsL( TInt aPixels ) + { + SetupScrollingEffectsL( aPixels > 0 ); - if ( AknLayoutUtils::PenEnabled() ) - { - Widget()->HandlePhysicsScrollEventL(aPixels); - } - else - { - // non-touch avkon doesn't seem to support scrolling by given - // amount of pixels - TInt delta = aPixels / Widget()->View()->ItemHeight(); + if( AknLayoutUtils::PenEnabled() ) + { + Widget()->HandlePhysicsScrollEventL( aPixels ); + } + else + { + // non-touch avkon doesn't seem to support scrolling by given + // amount of pixels + TInt delta = aPixels / Widget()->View()->ItemHeight(); - Widget()->View()->VScrollTo( Widget()->TopItemIndex() + - delta * ColumnsInCurrentView() ); - } - } + Widget()->View()->VScrollTo( Widget()->TopItemIndex() + + delta * ColumnsInCurrentView() ); + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -EXPORT_C TBool CMmWidgetContainer::ScrollToItemL(TInt aIndex) - { - TInt scrollConsumed(EFalse); - if (aIndex >= 0 && aIndex <= NumberOfItems()) - { - scrollConsumed = AlignBottomOfViewL(); - if ( !scrollConsumed && Widget()->View()->ItemIsPartiallyVisible(aIndex)) - { -// the case when the item is partially visible at top or -// bottom of screen. Th e view is scrolled the offset to -// make the item entirely visible. - TInt offsetBottom = Widget()->View()->ItemPos(aIndex).iY - + Widget()->ItemHeight() - - Widget()->View()->ViewRect().Height(); - TInt offsetTop = Widget()->View()->ItemPos(aIndex).iY; - TBool takeTop = Abs(offsetTop) < Abs(offsetBottom); - TInt offset = (takeTop) ? offsetTop : offsetBottom; - if (offset != 0) - { - ScrollInPixelsL( offset ); - scrollConsumed = ETrue; - } +EXPORT_C TBool CMmWidgetContainer::ScrollToItemL( TInt aIndex ) + { + TInt scrollConsumed( EFalse ); + if( aIndex >= 0 && aIndex <= NumberOfItems() ) + { + scrollConsumed = AlignBottomOfViewL(); + if ( !scrollConsumed && Widget()->View()->ItemIsPartiallyVisible(aIndex)) + { + // the case when the item is partially visible at top or + // bottom of screen. Th e view is scrolled the offset to + // make the item entirely visible. + TInt offsetBottom = Widget()->View()->ItemPos( aIndex ).iY + + Widget()->ItemHeight() + - Widget()->View()->ViewRect().Height(); + TInt offsetTop = Widget()->View()->ItemPos( aIndex ).iY; + TBool takeTop = Abs( offsetTop ) < Abs( offsetBottom ); + TInt offset = ( takeTop ) ? offsetTop : offsetBottom; + if( offset != 0 ) + { + ScrollInPixelsL( offset ); + scrollConsumed = ETrue; + } - } - else if (!Widget()->View()->ItemIsVisible(aIndex)) - { -// the case when the item is not visible on screen - SetupScrollingEffectsL( aIndex > Widget()->BottomItemIndex() ); - Widget()->ScrollToMakeItemVisible(aIndex); - AlignBottomOfViewL(); - scrollConsumed = ETrue; - } - } - return scrollConsumed; - } + } + else if( !Widget()->View()->ItemIsVisible( aIndex ) ) + { + // the case when the item is not visible on screen + SetupScrollingEffectsL( aIndex > Widget()->BottomItemIndex() ); + Widget()->ScrollToMakeItemVisible( aIndex ); + AlignBottomOfViewL(); + scrollConsumed = ETrue; + } + } + return scrollConsumed; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CMmWidgetContainer::SetupScrollingEffectsL(TBool aDown) - { +void CMmWidgetContainer::SetupScrollingEffectsL( TBool aDown ) + { #ifdef RD_UI_TRANSITION_EFFECTS_LIST - MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( - iDrawer->Gc()); - if (transApi) - { - MAknListBoxTfxInternal::TMovementType movementType; - movementType = (aDown == (TInt)ETrue ) ? MAknListBoxTfxInternal::EListScrollDown - : MAknListBoxTfxInternal::EListScrollUp; - transApi->SetMoveType(movementType); - } + MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( + iDrawer->Gc() ); + if( transApi ) + { + MAknListBoxTfxInternal::TMovementType movementType; + movementType = ( aDown == (TInt ) ETrue ) + ? MAknListBoxTfxInternal::EListScrollDown + : MAknListBoxTfxInternal::EListScrollUp; + transApi->SetMoveType( movementType ); + } #endif - } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::PrepareForGarbage() - { -// This is called when the suite model is destoyed and the container is set to be destroyed -// by the garbage collector. There should be no redraws done to the widget in this period -// because this will cause the screen to be redrawn only containing the balnk background. -// Before garbage cleanup an asynchronous redraw event may intend to redraw the widget. -// SetDisableRedraw() prevents redrawing. Animator is also prepared for garbage so there is -// no instance which can enable redraw of the widget. - Widget()->View()->SetDisableRedraw( ETrue ); - iDrawer->RemoveFloatingItems(); -// Prapares the animator for garbage, which means it blocks any animator drawing. - iDrawer->GetAnimator()->PrepareForGarbage(); - } + { + // This is called when the suite model is destoyed and the container is set to be destroyed + // by the garbage collector. There should be no redraws done to the widget in this period + // because this will cause the screen to be redrawn only containing the balnk background. + // Before garbage cleanup an asynchronous redraw event may intend to redraw the widget. + // SetDisableRedraw() prevents redrawing. Animator is also prepared for garbage so there is + // no instance which can enable redraw of the widget. + Widget()->View()->SetDisableRedraw( ETrue ); + iDrawer->RemoveFloatingItems(); + // Prapares the animator for garbage, which means it blocks any animator drawing. + iDrawer->GetAnimator()->PrepareForGarbage(); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CMmWidgetContainer::HandleLongTapEventL( const TPoint& aPenEventLocation, - const TPoint& aPenEventScreenLocation ) - { - TInt index( KErrNotFound ); - if ( iWidget->View()->XYPosToItemIndex( aPenEventLocation, index ) ) - { - SetHighlightVisibilityL( ETrue ); - iLongTapInProgress = ETrue; - if ( iLongTapObserver ) - { - iLongTapObserver->HandleLongTapEventL( aPenEventScreenLocation ); - } - } - } + const TPoint& aPenEventScreenLocation ) + { + TInt index( KErrNotFound ); + if( iWidget->View()->XYPosToItemIndex( aPenEventLocation, index ) ) + { + SetHighlightVisibilityL( ETrue ); + iLongTapInProgress = ETrue; + if( iLongTapObserver ) + { + iLongTapObserver->HandleLongTapEventL( aPenEventScreenLocation ); + } + } + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::SetLongTapObserver( MMmLongTapObserver* aObserver ) - { - iLongTapObserver = aObserver; - } + { + iLongTapObserver = aObserver; + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // EXPORT_C void CMmWidgetContainer::EndLongTapL( TBool aStopTimer ) - { - if ( iLongTapInProgress ) - { - iLongTapInProgress = EFalse; - if( aStopTimer ) - { - SetHighlightVisibilityL( EFalse ); - } - } - } + { + if( iLongTapInProgress ) + { + iLongTapInProgress = EFalse; + if( aStopTimer ) + { + SetHighlightVisibilityL( EFalse ); + } + } + } // --------------------------------------------------------------------------- // @@ -1892,65 +1942,65 @@ void CMmWidgetContainer::HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ) { -// handle same behaviour in edit mode and normal mode - switch ( aEventType ) - { - case MEikListBoxObserver::EEventPenDownOnItem: - case MEikListBoxObserver::EEventItemSingleClicked: - { - iDragOccured = EFalse; - break; - } - case MEikListBoxObserver::EEventItemDraggingActioned: - { - iDragOccured = ETrue; - break; - } - } + // handle same behaviour in edit mode and normal mode + switch( aEventType ) + { + case MEikListBoxObserver::EEventPenDownOnItem: + case MEikListBoxObserver::EEventItemSingleClicked: + { + iDragOccured = EFalse; + break; + } + case MEikListBoxObserver::EEventItemDraggingActioned: + { + iDragOccured = ETrue; + break; + } + } -// handle different behaviour in edit mode and normal mode - if ( !IsEditMode() ) - { - switch ( aEventType ) - { - case MEikListBoxObserver::EEventFlickStarted: - case MEikListBoxObserver::EEventPanningStarted: - { - static_cast( - Widget()->View()->ItemDrawer() )-> - EnableCachedDataUse( ETrue ); - break; - } - case MEikListBoxObserver::EEventFlickStopped: - { - static_cast( - Widget()->View()->ItemDrawer() )-> - EnableCachedDataUse( EFalse ); - DrawView(); - break; - } - case MEikListBoxObserver::EEventPanningStopped: - { - static_cast( - Widget()->View()->ItemDrawer() )-> - EnableCachedDataUse( EFalse ); - break; - } - } - } - else - { - switch ( aEventType ) - { - case MEikListBoxObserver::EEventFlickStopped: - { - // this fixes some problems with messed edit mode - // caused by kinetic scrolling - iDrawer->GetAnimator()->SetNextRedrawToWholeScreen(); - break; - } - } - } + // handle different behaviour in edit mode and normal mode + if( !IsEditMode() ) + { + switch( aEventType ) + { + case MEikListBoxObserver::EEventFlickStarted: + case MEikListBoxObserver::EEventPanningStarted: + { + static_cast( + Widget()->View()->ItemDrawer() )-> + EnableCachedDataUse( ETrue ); + break; + } + case MEikListBoxObserver::EEventFlickStopped: + { + static_cast( + Widget()->View()->ItemDrawer() )-> + EnableCachedDataUse( EFalse ); + DrawView(); + break; + } + case MEikListBoxObserver::EEventPanningStopped: + { + static_cast( + Widget()->View()->ItemDrawer() )-> + EnableCachedDataUse( EFalse ); + break; + } + } + } + else + { + switch( aEventType ) + { + case MEikListBoxObserver::EEventFlickStopped: + { + // this fixes some problems with messed edit mode + // caused by kinetic scrolling + iDrawer->GetAnimator()->SetNextRedrawToWholeScreen(); + break; + } + } + } if ( aEventType == MEikListBoxObserver::EEventItemSingleClicked && iListBoxObserver && !iLongTapInProgress && !iDrawer->IsDraggable() ) diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/bwins/dummyCu.def --- a/menufw/menusuites/foldersuite/bwins/dummyCu.def Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?E32Main@@YAHXZ @ 1 NONAME ; int E32Main(void) - diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/data/matrixmenudata.dtd --- a/menufw/menusuites/foldersuite/data/matrixmenudata.dtd Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menusuites/foldersuite/data/matrixmenudata.dtd Wed May 12 13:12:59 2010 +0300 @@ -296,5 +296,114 @@ --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/data/matrixmenudata.xml --- a/menufw/menusuites/foldersuite/data/matrixmenudata.xml Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menusuites/foldersuite/data/matrixmenudata.xml Wed May 12 13:12:59 2010 +0300 @@ -12,8 +12,8 @@ mask_id="16399" icon_skin_minor_id="0x1ead" icon_skin_major_id="0x101F86E3"> --> - - + + @@ -37,39 +37,15 @@ - - - - - - - + + - - - - - - + + + @@ -116,19 +92,26 @@ + + - + - + icon_file="aimcsplugin.mif" + icon_id="16394" + mask_id="16395" + long_name="&qtn_apps_connectivity_list;"/> + + icon_file="aimcsplugin.mif" + icon_id="16392" + mask_id="16393" + long_name="&qtn_apps_installations_list;"/> - - - - - @@ -223,7 +184,8 @@ - + + diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/eabi/dummyCu.def --- a/menufw/menusuites/foldersuite/eabi/dummyCu.def Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _Z7E32Mainv @ 1 NONAME - diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/group/foldersuite.mmp --- a/menufw/menusuites/foldersuite/group/foldersuite.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/menufw/menusuites/foldersuite/group/foldersuite.mmp Wed May 12 13:12:59 2010 +0300 @@ -19,21 +19,13 @@ #include #include -TARGET dummyC.dll -TARGETTYPE dll - -UID 0x0 0x02349823 -CAPABILITY CAP_GENERAL_DLL +TARGET foldersuite +TARGETTYPE NONE APP_LAYER_SYSTEMINCLUDE -SOURCEPATH ../src -SOURCE dummyC.cpp - -SOURCEPATH . USERINCLUDE ../../../menufwui/matrixmenu/loc - START RESOURCE ../data/foldersuite.rss HEADER TARGETPATH APP_RESOURCE_DIR diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/loc/matrixmenudata.loc Binary file menufw/menusuites/foldersuite/loc/matrixmenudata.loc has changed diff -r 1526727a5b85 -r 899e4666ea9a menufw/menusuites/foldersuite/src/dummyC.cpp --- a/menufw/menusuites/foldersuite/src/dummyC.cpp Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: -* -* Description: -* -*/ - -#include - -EXPORT_C int E32Main() -{ - return 0; -} diff -r 1526727a5b85 -r 899e4666ea9a package_definition.xml --- a/package_definition.xml Fri Mar 26 15:15:17 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/rom/tscontextservices.iby --- a/taskswitcher/contextengine/rom/tscontextservices.iby Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/rom/tscontextservices.iby Wed May 12 13:12:59 2010 +0300 @@ -21,10 +21,5 @@ // Context Services binaries file=ABI_DIR/BUILD_DIR/tscontextservicesutils.dll SHARED_LIB_DIR/tscontextservicesutils.dll -// backup registration -data=DATAZ_/private/20011417/backup_registration.xml private/20011417/backup_registration.xml - -// stub sis -data=ZSYSTEM/install/tsctxsrv_stub.sis system/install/tsctxsrv_stub.sis #endif // TSCONTEXTSERVICES diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswpreviewprovider/wsplugin/inc/previewprovidercrp.h --- a/taskswitcher/contextengine/tsfswpreviewprovider/wsplugin/inc/previewprovidercrp.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswpreviewprovider/wsplugin/inc/previewprovidercrp.h Wed May 12 13:12:59 2010 +0300 @@ -178,6 +178,7 @@ RArray iWgIds; TTime iScreenChangedTime; // fix for orientation changed/wg group changed problem TBool iClockwiseRot; // for marking rotation direction + TBool iLastWgIdRedraw; }; #endif // PREVIEWPROVIDERCRP_H diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswpreviewprovider/wsplugin/src/previewprovidercrp.cpp --- a/taskswitcher/contextengine/tsfswpreviewprovider/wsplugin/src/previewprovidercrp.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswpreviewprovider/wsplugin/src/previewprovidercrp.cpp Wed May 12 13:12:59 2010 +0300 @@ -53,7 +53,8 @@ // -------------------------------------------------------------------------- // void CPreviewProviderCRP::ConstructL() - { + { + iLastWgIdRedraw = ETrue; } // -------------------------------------------------------------------------- @@ -147,7 +148,8 @@ BaseConstructL( aEnv, aId, aOwner ); aEnv.RegisterEventHandler( this, this, TWservCrEvent::EWindowGroupChanged | - TWservCrEvent::EDeviceOrientationChanged ); + TWservCrEvent::EDeviceOrientationChanged | + TWservCrEvent::EScreenDrawing ); iScreenChangedTime = 0; TSLOG_OUT(); @@ -174,7 +176,10 @@ TInt err = currTime.SecondsFrom( iScreenChangedTime, secondsFrom ); if ( err != KErrNone || secondsFrom.Int() > KMinTimeForOrientationSwitch ) { - TRAP_IGNORE( ScreenshotL() ); + if ( iLastWgIdRedraw ) + { + TRAP_IGNORE( ScreenshotL() ); + } } else { @@ -186,11 +191,19 @@ iPrevReg = 0; } iPrevId = wgId; + iLastWgIdRedraw = EFalse; } else if ( aEvent.Type() == TWservCrEvent::EDeviceOrientationChanged ) { iScreenChangedTime.HomeTime(); - TRAP_IGNORE( ScreenshotL() ); + if ( iLastWgIdRedraw ) + { + TRAP_IGNORE( ScreenshotL() ); + } + } + else if ( aEvent.Type() == TWservCrEvent::EScreenDrawing ) + { + iLastWgIdRedraw = ETrue; } TSLOG_OUT(); diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/group/tsfswengine.mmp --- a/taskswitcher/contextengine/tsfswserver/engine/group/tsfswengine.mmp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/group/tsfswengine.mmp Wed May 12 13:12:59 2010 +0300 @@ -28,6 +28,8 @@ SOURCE tsfsalwaysshownapplist.cpp SOURCE tsfswidgetlist.cpp SOURCE tsfswiconcache.cpp +SOURCE tsfswdatalist.cpp +SOURCE tscpsnotifier.cpp MW_LAYER_SYSTEMINCLUDE @@ -52,6 +54,7 @@ LIBRARY featmgr.lib LIBRARY bitmaptransforms.lib +LIBRARY liwservicehandler.lib LIBRARY tspreviewprovider.lib LIBRARY tsfswutils.lib diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/inc/tscpsnotifier.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tscpsnotifier.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,112 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: Task monitor engine + * +*/ + +#ifndef TSCPSNOTIFIER_H +#define TSCPSNOTIFIER_H + +#include +#include + +class CLiwGenericParamList; +class CLiwServiceHandler; +class MLiwInterface; +class CLiwDefaultMap; +class CLiwMap; +class CTsFswEngine; + +NONSHARABLE_CLASS(CTSCpsNotifier) : + public CBase, + private MLiwNotifyCallback + { +public: + /** + * Two-phased constructor. + */ + static CTSCpsNotifier* NewL( CTsFswEngine& aEngine ); + + /** + * Destructor. + */ + virtual ~CTSCpsNotifier(); + +private: + /** + * Constructor. + */ + CTSCpsNotifier( CTsFswEngine& aEngine ); + + /** + * + */ + void ConstructL(); +private: + // Form base class MLiwNotifyCallback. + /** + * Callback from LIW framework to process an event that was expected. + * @see MLiwNotifyCallback::HandleNotifyL + */ + TInt HandleNotifyL( TInt aCmdId, + TInt aEventId, + CLiwGenericParamList& aEventParamList, + const CLiwGenericParamList& aInParamList ); + +private: + /** + * Create and return map filled with widgets identifiers + */ + CLiwDefaultMap* WidgetFilterLC(); + + /** + * Initalise CPS service interface + */ + void InitCpsInterfaceL(); + + /** + * Request for CPS notifications abou widgets + */ + void ExecuteRegistrationCommandL( TUint aOption ); + + /** + * Obtain widget information and + * forward widgets data change handling to iEngine + */ + void HandleWidgetUpdateL( const CLiwMap& aChangeMap ); + + /** + * Obtain from CPS information about widget + */ + void GetWidgetDataL( const TDesC& aContentId, + TInt& aWidgetId, + TInt& aBitmapHandle ); + + /** + * Obtain from CPS information about widget from data map + */ + void GetWidgetDataFromDataMapL( const CLiwMap& aDataMap, + TInt& aWidgetId, + TInt& aBitmapHandle ); + +private: + + MLiwInterface* iCpsInterface;//own + + CLiwServiceHandler* iServiceHandler;//own + + CTsFswEngine& iEngine;//not own + }; + +#endif //TSCPSNOTIFIER_H diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/inc/tsfswdatalist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswdatalist.h Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,315 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: Non-closeable app list class + * +*/ + + +#ifndef TSFSWDATALIST_H +#define TSFSWDATALIST_H + +#include +#include +#include +#include +#include +#include "tsfswentry.h" +#include "tsfswobservers.h" + +class CTsFswEngine; +class CTsFsAlwaysShownAppList; +class CTsFsHiddenAppList; +class CTsFsWidgetList; +class CTsFswIconCache; +class CApaWindowGroupName; + +/** + * Engine's data list. + */ +NONSHARABLE_CLASS( CTsFswDataList ) : public CBase + { +public: + /** + * Two-phased constructor. + * + * @param aParent + */ + static CTsFswDataList* NewL( CTsFswEngine& aEngine ); + + /* + * Destructor + */ + ~CTsFswDataList(); + +private: + /** + * Constructor. + */ + CTsFswDataList( CTsFswEngine& aEngine ); + + /** + * Performs 2nd phase construction. + */ + void ConstructL(); + +public: + /** + * Returns a reference to the current content. + * Also performs sanity checks, e.g. associates application icons + * when no screenshot has been received. + * @return ref to content array + */ + const RTsFswArray& FswDataL(); + + /** + * Gets the window group list and reconstructs the fsw content. + * @return TBool ETrue if the content iData has been modified + */ + TBool CollectTasksL(); + + /** + * Return contained iAlwaysShownAppList member. + */ + CTsFsAlwaysShownAppList* AlwaysShownApps(); + + /** + * Return contained iHiddenAppList member. + */ + CTsFsHiddenAppList* HiddenApps(); + + /** + * Return containd iWidgetList member + */ + CTsFsWidgetList* Widgets(); + + /** + * Set flag iTaskListDirty; + */ + void SetDirty(); + + /** + * Set flag iAppDataRefreshNeeded + */ + void SetAppDataRefreshNeeded(); + + /** + * Store or updarte screenshot bitmap for specified window group. + */ + TBool StoreScreenshot( TInt aWgId, CFbsBitmap* aBmp ); + + /** + * remove screenshot bitmap. + */ + TBool RemoveScreenshot( TInt aWgId ); + + /** + * Obtain screenshot if exists + */ + CFbsBitmap** FindScreenshot( TInt aWgId ); + + /** + * Moves entry on given window app/widget id to + * the first position on conten data list + */ + void MoveEntryAtStart( TInt aAppId, TBool aWidget ); + + /** + * If application uid exists in the contained CTsFsAlwaysShownAppList + * @return ETrue application uid exists in the list + * EFalse application uid doesn't exist in the list + * @param TInt aWgId the window group application + */ + TBool IsAlwaysShownAppL( TInt aWgId ); + + /** + * Finds out the app uid for the given window group id. + * @param aWgId a valid window group id + * @param aUid requested uid + * @return error code + */ + TInt AppUidForWgId( TInt aWgId, TUid& aUid ); + + /** + * Finds out the app uid for the given window group id. + * @param aWgId a valid window group id + * @return application uid + */ + TUid AppUidForWgIdL( TInt aWgId ); + +private: + /** + * Adds running apps to the list. + * @param aAppsList array to add to + */ + void CollectAppsL( RTsFswArray& aAppsList ); + + /** + * Called from CollectTasksL for each entry in the task list. + * @param aWgId window group id + * @param aAppUid application uid + * @param aWgName window group name or NULL + * @param aNewList list to add to + * @param aIsWidget true if the entry corresponds to a web widget + * @return TBool ETrue if it was really a new entry in the list + */ + TBool AddEntryL( TInt aWgId, + const TUid& aAppUid, + CApaWindowGroupName* aWgName, + RTsFswArray& aNewList, + TBool aIsWidget ); + + /** + * Checks if there is an entry for same app in the content list. + * If yes then it takes some of the data for the entry that + * will correspond to the same app in the refreshed content list. + * In case of widget, update window group field in content list. + * @param aEntry new entry in content list + * @param aAppUid application uid + * @param aChanged ref to change-flag, set to ETrue if it is sure + * that the new content list will be different from the previous one + * @param aNewList ref to new content list + * @return ETrue if app was found + */ + TBool ConsiderOldDataL( CTsFswEntry& aEntry, + const TUid& aAppUid, + TBool& aChanged, + RTsFswArray& aNewList ); + + /** + * Adds running widgets to the list. + * @param aWidgetsList array to add to + */ + void CollectWidgetsL( RTsFswArray& aWidgetsList ); + + /** + * Returns the parent's wg id or KErrNotFound. + * @param aWgId a valid window group id + * @return parent wg id or KErrNotFound if there is no parent + */ + TInt FindParentWgId( TInt aWgId ); + + /** + * Returns the most top parent's wg id or KErrNotFound. + * @param aWgId a valid window group id + * @return parent wg id or KErrNotFound if there is no parent + */ + TInt FindMostTopParentWgId( TInt aWgId ); + + /** + * Finds out the application name. + * @param aWindowName window group name or NULL + * @param aAppUId application uid + * @param aWgId window group id + * @return application name, ownership transferred to caller + */ + HBufC* FindAppNameLC( CApaWindowGroupName* aWindowName, + const TUid& aAppUid, + TInt aWgId ); + + /** + * Checks if the app to which the screenshot belongs is in the task list + * and updates the entry when found. Also triggers change notification + * to observer when data is modified. + * @param aWgIdForScreenshot wgid for the screenshot + * @param aBitmapHandle handle for screenshot bitmap + * @return TBool ETrue if the list has been modified + */ + TBool AssignScreenshotHandle( TInt aWgIdForScreenshot, TInt aBitmapHandle ); + + /** + * Checks if the app to which the screenshot belongs is in the task list + * and updates the entry when found. + * @param aWgIdForScreenshot wgid for the screenshot, + * in case of widget it stands for widget id + * @param aBitmapHandle handle for screenshot bitmap + * @param aAsigned result of operation + */ + void AssignScreenshotHandle( TInt aWgIdForScreenshot, + TInt aBitmapHandle, + TBool& aAsigned ); + + /** + * Returns the bitmap handle for the screenshot belonging to the given app + * or 0 if not (yet) found. + * @param aWgIdForApp a window group id (from the window group list) + * @return bitmap handle or 0 + */ + TInt LookupScreenshotHandle( TInt aWgIdForApp ); + + /** + * Fit existing class contained data list into give one. + * Data is being changed with application type consideration that is based + * on aConsiderWidgets param. + * Function removes or add entries into data depend on given list. + * @param aListToFit list with actual data + * @param aConsiderWidgets application type + * @return ETrue if change occours on data list, EFalse otherwise + */ + TBool FitDataToListL( RTsFswArray& aListToFit, TBool aConsiderWidgets ); + + /** + * Checks if there is an entry for same app in the given list. + * @param aEntry entry + * @param aNewList ref to list + * @return ETrue if app was found + */ + TBool CheckIfExists( const CTsFswEntry& aEntry, + const RTsFswArray& aNewList ) const; + +private: + CTsFswEngine& iEngine; + + RTsFswArray iData; // current fsw content, i.e. the task list + + // always shown app list, own + CTsFsAlwaysShownAppList* iAlwaysShownAppList; + + // hidden app list, own + CTsFsHiddenAppList* iHiddenAppList; + + // web widget list, own + CTsFsWidgetList* iWidgetList; + + // window server session + RWsSession iWsSession; + + // apparc session + RApaLsSession iAppArcSession; + + /** + * Hash table storing the screenshots. + * Key: window group id for the screenshot + * (the one received in ApplicationChange) + * Value: CFbsBitmap*, pointers owned + */ + RHashMap iScreenshots; + + // app icon provider/container instance, own + CTsFswIconCache* iAppIcons; + + // true if web widgets are supported by the system + TBool iWidgetsSupported; + + // when true CollectTasksL will call GetAllApps etc. + // which is slow and need not be done normally, except + // during startup and perhaps when new applications are installed + TBool iAppDataRefreshNeeded; + + // Dirty flag, indicates that iData is not up-to-date because + // there were no subscribed clients during a previous possible + // change of the task list. + TBool iTaskListDirty; + }; + +#endif //TSFSWDATALIST_H diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h --- a/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h Wed May 12 13:12:59 2010 +0300 @@ -32,15 +32,14 @@ #include "tsfswentry.h" #include "tsfswobservers.h" -class CTsFsAlwaysShownAppList; -class CTsFsHiddenAppList; -class CTsFsWidgetList; class MTsFswEngineObserver; -class CTsFswIconCache; class CTsFastSwapPreviewProvider; class CApaWindowGroupName; class CBitmapRotator; class CTsRotationTask; +class CTSCpsNotifier; + +class CTsFswDataList; // descriptor big enough to store hex repr of 32-bit integer plus 0x prefix typedef TBuf<10> TAppUidHexString; @@ -62,12 +61,12 @@ * @param aObserver ref to observer */ IMPORT_C static CTsFswEngine* NewL( MTsFswEngineObserver& aObserver ); - + /** * @copydoc NewL */ IMPORT_C static CTsFswEngine* NewLC( MTsFswEngineObserver& aObserver ); - + /** * Destructor. */ @@ -80,13 +79,13 @@ * @return ref to content array */ IMPORT_C const RTsFswArray& FswDataL(); - + /** * Tries to close the given app. * @param aWgId value given by WgId() for an entry in iData */ IMPORT_C void CloseAppL( TInt aWgId ); - + /** * Brings the given app to foreground. * @param aWgId value given by WgId() for an entry in iData @@ -106,15 +105,23 @@ */ IMPORT_C TUid ForegroundAppUidL( TInt aType ); +public: /** * Callback for rotation completion. Takes ownership of a given * bitmap. */ - void RotationComplete( TInt aWgId, + void RotationComplete( TInt aWgId, CFbsBitmap* aBitmap, CTsRotationTask* aCompletedTask, TInt aError ); - + + /** + * Called by CPS publisher when changes occours on widgets' CPS data. + * Copies screenshot with use of delivered bitmap handle. + * Moves last changed widget with entry into start position. + */ + void HandleWidgetUpdateL( TInt aWidgetId, TInt aBitmapHandle ); + private: // from CActive void RunL(); @@ -123,7 +130,7 @@ // from MTsFswTaskListObserver void UpdateTaskList(); - + // from MTsFswResourceObserver void HandleResourceChange( TInt aType ); @@ -134,7 +141,7 @@ void HandleFswPpApplicationChange( TInt aWgId, TInt aFbsHandle ); void HandleFswPpApplicationUnregistered( TInt aWgId ); void HandleFswPpApplicationBitmapRotation( TInt aWgId, TBool aClockwise ); - + void RotateL( CFbsBitmap& aBitmap, TInt aWgId, TBool aClockwise ); private: @@ -142,83 +149,18 @@ * Constructor. */ CTsFswEngine( MTsFswEngineObserver& aObserver ); - + /** * Performs 2nd phase construction. */ void ConstructL(); - + /** * Gets the window group list and reconstructs the fsw content. * @return TBool ETrue if the list has been modified */ TBool CollectTasksL(); - - /** - * Called from CollectTasksL for each entry in the task list. - * @param aWgId window group id - * @param aAppUid application uid - * @param aWgName window group name or NULL - * @param aNewList list to add to - * @param aIsWidget true if the entry corresponds to a web widget - * @return TBool ETrue if it was really a new entry in the list - */ - TBool AddEntryL( TInt aWgId, const TUid& aAppUid, - CApaWindowGroupName* aWgName, RTsFswArray& aNewList, - TBool aIsWidget ); - /** - * Checks if there is an entry for same app in the content list. - * If yes then it takes some of the data for the entry that - * will correspond to the same app in the refreshed content list. - * @param aEntry new entry in content list - * @param aAppUid application uid - * @param aChanged ref to change-flag, set to ETrue if it is sure - * that the new content list will be different from the previous one - * @param aNewList ref to new content list - * @return ETrue if app was found - */ - TBool CheckIfExistsL( CTsFswEntry& aEntry, - const TUid& aAppUid, - TBool& aChanged, - RTsFswArray& aNewList ); - - /** - * Adds running widgets to the list. - * @param aNewList array to add to - */ - void CheckWidgetsL( RTsFswArray& aNewList ); - - /** - * Finds out the app uid for the given window group id. - * @param aWgId a valid window group id - * @return application uid - */ - TUid AppUidForWgIdL( TInt aWgId ); - - /** - * Returns the parent's wg id or KErrNotFound. - * @param aWgId a valid window group id - * @return parent wg id or KErrNotFound if there is no parent - */ - TInt FindParentWgId( TInt aWgId ); - - /** - * Returns the most top parent's wg id or KErrNotFound. - * @param aWgId a valid window group id - * @return parent wg id or KErrNotFound if there is no parent - */ - TInt FindMostTopParentWgId( TInt aWgId ); - - /** - * Finds out the application name. - * @param aWindowName window group name or NULL - * @param aAppUId application uid - * @param aWgId window group id - * @return application name, ownership transferred to caller - */ - HBufC* FindAppNameLC( CApaWindowGroupName* aWindowName, - const TUid& aAppUid, TInt aWgId ); /** * Makes a copy of the bitmap with the given handle. @@ -227,34 +169,7 @@ * @return CFbsBitmap* the copy, ownership transferred to caller */ CFbsBitmap* CopyBitmapL( TInt aFbsHandle, TBool aKeepAspectRatio ); - - /** - * Checks if the app to which the screenshot belongs is in the task list - * and updates the entry when found. Also triggers change notification - * to observer when data is modified. - * @param aWgIdForScreenshot wgid for the screenshot - * @param aBitmapHandle handle for screenshot bitmap - */ - void AssignScreenshotHandle( TInt aWgIdForScreenshot, TInt aBitmapHandle ); - - /** - * Checks if the app to which the screenshot belongs is in the task list - * and updates the entry when found. - * @param aWgIdForScreenshot wgid for the screenshot - * @param aBitmapHandle handle for screenshot bitmap - * @param aAsigned result of operation - */ - void AssignScreenshotHandle( TInt aWgIdForScreenshot, - TInt aBitmapHandle, TBool& aAsigned ); - - /** - * Returns the bitmap handle for the screenshot belonging to the given app - * or 0 if not (yet) found. - * @param aWgIdForApp a window group id (from the window group list) - * @return bitmap handle or 0 - */ - TInt LookupScreenshotHandle( TInt aWgIdForApp ); - + /** * Callback for the iUpdateStarter timer. * Calls CollectTasksL and notifies the observer if the task list @@ -288,62 +203,44 @@ * Close running widget * @param aOffset - widget info offset */ - void CloseWidgetL(TInt aOffset); + void CloseWidgetL( TInt aOffset ); -private: // data - MTsFswEngineObserver& iObserver; - RTsFswArray iData; // current fsw content, i.e. the task list - CEikonEnv* iEnv; // not own + /** + * Removes screenshot bitmap from contained iDataList + */ + void RemoveScreenshot( TInt aWgId ); - // always shown app list, own - CTsFsAlwaysShownAppList* iAlwaysShownAppList; - - // hidden app list, own - CTsFsHiddenAppList* iHiddenAppList; - - // web widget list, own - CTsFsWidgetList* iWidgetList; + /** + * Add or overwrite screenshot datamap into iDataList + * @return ETrue if content was changed + */ + TBool StoreScreenshot( TInt aWgId, CFbsBitmap* aBmp ); + +private: + // data + MTsFswEngineObserver& iObserver; + CEikonEnv* iEnv; // not own // window server session RWsSession iWsSession; - + // apparc session RApaLsSession iAppArcSession; - /** - * Hash table storing the screenshots. - * Key: window group id for the screenshot - * (the one received in ApplicationChange) - * Value: CFbsBitmap*, pointers owned - */ - RHashMap iScreenshots; - // preview provider instance, own CTsFastSwapPreviewProvider* iPreviewProvider; - + // timer to defer content refresh CPeriodic* iUpdateStarter; - - // app icon provider/container instance, own - CTsFswIconCache* iAppIcons; - + // true if web widgets are supported by the system TBool iWidgetsSupported; // PS property to listen for swi status changes RProperty iSwiProp; - // when true CollectTasksL will call GetAllApps etc. - // which is slow and need not be done normally, except - // during startup and perhaps when new applications are installed - TBool iAppDataRefreshNeeded; // window group ids returned by last WindowGroupList call RArray iWgIds; - - // Dirty flag, indicates that iData is not up-to-date because - // there were no subscribed clients during a previous possible - // change of the task list. - TBool iTaskListDirty; // For publishing the foreground app uid to Context Framework TAppUidHexString iFgAppUidStr; @@ -351,9 +248,13 @@ // For rotating bitmaps RPointerArray iRotaTasks; + + CTsFswDataList* iDataList;//own + + //Used to observ wigets' actions on CPS service + CTSCpsNotifier* iCpsWidgetPublisher;//owned }; - /** * Listener for rotation complete event */ @@ -362,13 +263,12 @@ public: CTsRotationTask( CTsFswEngine& aEngine ); ~CTsRotationTask(); - void StartLD( TInt aWgId, - CFbsBitmap* aBitmapHandle, - TBool aClockwise ); + void StartLD( TInt aWgId, CFbsBitmap* aBitmapHandle, TBool aClockwise ); private: void RunL(); void DoCancel(); -private: // Data +private: + // Data CTsFswEngine& iEngine; TInt iWgId; CFbsBitmap* iBitmap; // owned for the duration of transformation diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/inc/tsfswidgetlist.h --- a/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswidgetlist.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswidgetlist.h Wed May 12 13:12:59 2010 +0300 @@ -21,13 +21,9 @@ #include #include - -_LIT(KWidgetAppName, "widgetlauncher.exe"); - + const TUint32 KWidgetAppUidValue = 0x10282822; -const TInt KCloseWidgetCmd(2); - /** * class handling the list of running wrt widgets */ @@ -42,21 +38,28 @@ /** * Initializes the list that stores widgets. * @return - - */ + */ void InitializeWidgetListL(); /** * Returns a ref to the list of running widgets. */ const RWidgetInfoArray& RunningWidgets() const { return iRunningWidgets; } + + /** + * Check if widget's uid is recognized as CWRT type. + */ + TBool IsCWRTWidget( TUid aUid ); private: /** Constructor */ CTsFsWidgetList(); void ResetArrayOfWidgetInfo( RWidgetInfoArray& aWidgetInfoArr ); - + static void CleanupConnect( TAny* aThis ); + TBool IsValBetween( TInt aMinor, TInt aMajor, TInt aBetween ); + private: /** Contains list of widgets that are currently running */ RWidgetInfoArray iRunningWidgets; diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/inc/tsfswobservers.h --- a/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswobservers.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswobservers.h Wed May 12 13:12:59 2010 +0300 @@ -56,12 +56,6 @@ * Called when there is a change in the task list. */ virtual void FswDataChanged() = 0; - - /** - * Called to find out how many clients are subscribed - * for fsw content change notifications. - */ - virtual TInt FswDataListenerCount() = 0; }; /** diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tscpsnotifier.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tscpsnotifier.cpp Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,348 @@ +/* +* Copyright (c) 2008 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: +* +* Description: Internal class definition for WidgetUI application. +* +*/ + + +#include "tscpsnotifier.h" +#include "tsfswengine.h" +#include +#include +#include +#include +#include + +_LIT8( KCPService, "Service.ContentPublishing" ); +_LIT8( KCPInterface, "IDataSource" ); + +_LIT8( KType, "type" ); +_LIT( KCpData, "cp_data" ); + +_LIT8( KPublisherId, "publisher" ); +_LIT8( KContentType, "content_type" ); +_LIT8( KContentId, "content_id" ); + +_LIT8( KGetList, "GetList"); +_LIT8( KDataMap, "data_map" ); +_LIT8( KWidgetId, "widget_id"); +_LIT8( KBitmapHandle, "bitmap_handle"); + +_LIT( KWidgetUi, "widget_ui"); +_LIT( KScreenshot, "screenshot"); + +_LIT8( KFilter, "filter" ); +_LIT8( KResults, "results"); +_LIT8( KOperation, "operation" ); +_LIT8( KRequestNotification, "RequestNotification" ); +_LIT( KUpdate, "update" ); +_LIT( K16Add, "add" ); +_LIT( KAddUpdate, "add:update" ); +_LIT8( KChangeInfo, "change_info" ); + +_LIT( KAll, "all"); + +// ================= MEMBER FUNCTIONS ======================= + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::NewL +// -------------------------------------------------------------------------- +// +CTSCpsNotifier* CTSCpsNotifier::NewL(CTsFswEngine& aEngine ) + { + CTSCpsNotifier* self = new (ELeave) CTSCpsNotifier(aEngine); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::~CTSCpsNotifier +// -------------------------------------------------------------------------- +// +CTSCpsNotifier::~CTSCpsNotifier() + { + TRAP_IGNORE(ExecuteRegistrationCommandL( KLiwOptCancel )); + + if( iCpsInterface ) + { + iCpsInterface->Close(); + iCpsInterface = NULL; + } + if( iServiceHandler ) + { + iServiceHandler->Reset(); + delete iServiceHandler; + iServiceHandler = NULL; + } + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::CTSCpsNotifier +// -------------------------------------------------------------------------- +// +CTSCpsNotifier::CTSCpsNotifier(CTsFswEngine& aEngine): + iEngine(aEngine) + { + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::ConstructL +// -------------------------------------------------------------------------- +// +void CTSCpsNotifier::ConstructL() + { + InitCpsInterfaceL(); + ExecuteRegistrationCommandL( 0 ); + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::WidgetFilterLC +// -------------------------------------------------------------------------- +// +CLiwDefaultMap* CTSCpsNotifier::WidgetFilterLC() + { + //Create filter criteria for requested entries in form of LIW map: + CLiwDefaultMap* filter = CLiwDefaultMap::NewLC(); + filter->InsertL( KPublisherId, TLiwVariant( KWidgetUi )); + filter->InsertL( KContentType, TLiwVariant( KScreenshot )); + return filter; + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::ExecuteRegistrationCommandL +// -------------------------------------------------------------------------- +// +void CTSCpsNotifier::ExecuteRegistrationCommandL( + TUint aOption ) + { + CLiwDefaultMap* filter = WidgetFilterLC(); + filter->InsertL( KContentId, TLiwVariant( KAll )); + filter->InsertL( KOperation, TLiwVariant( KAddUpdate )); + + CLiwGenericParamList& inParamList = iServiceHandler->InParamListL(); + CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL(); + + // Fill in input list for RequestNotification command + inParamList.AppendL( TLiwGenericParam( KType, TLiwVariant( KCpData ))); + inParamList.AppendL( TLiwGenericParam( KFilter, TLiwVariant( filter ))); + + iCpsInterface->ExecuteCmdL( + KRequestNotification, + inParamList, + outParamList, + aOption, + this ); + + outParamList.Reset(); + inParamList.Reset(); + CleanupStack::PopAndDestroy( filter ); + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::HandleNotifyL +// -------------------------------------------------------------------------- +// +TInt CTSCpsNotifier::HandleNotifyL( + TInt /*aCmdId*/, + TInt /*aEventId*/, + CLiwGenericParamList& aEventParamList, + const CLiwGenericParamList& /*aInParamList*/ ) + { + TInt pos(0); + aEventParamList.FindFirst( pos, KChangeInfo ); + if (pos != KErrNotFound) + { + // Get list of maps + TLiwVariant variant = ( aEventParamList )[pos].Value(); + variant.PushL(); + const CLiwList* changeMapsList = variant.AsList(); + + TPtrC operation; + // Iter through list content + for (TInt i = 0; i < changeMapsList->Count(); ++i) + { + if ( changeMapsList->AtL( i, variant )) + { + const CLiwMap* changeMap = variant.AsMap(); + // Check what triggered a notification + if ( changeMap->FindL( KOperation, variant )) + { + operation.Set( variant.AsDes()); + } + if (!operation.Compare(KUpdate) || !operation.Compare(K16Add)) + { + HandleWidgetUpdateL( *changeMap ); + } + } + } + CleanupStack::PopAndDestroy( &variant ); + } + return KErrNone; + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::InitCpsInterfaceL +// -------------------------------------------------------------------------- +// +void CTSCpsNotifier::InitCpsInterfaceL() + { + if( !iServiceHandler ) + { + iServiceHandler = CLiwServiceHandler::NewL(); + } + + CLiwGenericParamList& inParam = iServiceHandler->InParamListL(); + CLiwGenericParamList& outParam = iServiceHandler->OutParamListL(); + + CLiwCriteriaItem* crit = CLiwCriteriaItem::NewLC( KLiwCmdAsStr, KCPInterface, + KCPService ); + crit->SetServiceClass( TUid::Uid(KLiwClassBase) ); + + RCriteriaArray a; + a.AppendL(crit); + iServiceHandler->AttachL( a ); + CleanupStack::Pop(crit); + iServiceHandler->ExecuteServiceCmdL( *crit, inParam, outParam ); + delete crit; + a.Reset(); + + // find service interface + TInt pos = 0; + MLiwInterface* msgInterface = NULL; + outParam.FindFirst( pos, KCPInterface ); + if ( pos != KErrNotFound ) + { + msgInterface = (outParam)[pos].Value().AsInterface(); + } + + outParam.Reset(); + inParam.Reset(); + iCpsInterface = msgInterface; + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::HandleWidgetUpdateL +// -------------------------------------------------------------------------- +// +void CTSCpsNotifier::HandleWidgetUpdateL(const CLiwMap& aChangeMap) + { + //ectract content_id which is widget bundled name + TPtrC contentid; + TLiwVariant contentIdVar; + contentIdVar.PushL(); + if (aChangeMap.FindL(KContentId, contentIdVar)) + { + contentid.Set( contentIdVar.AsDes()); + } + + TInt widgetId(0); + TInt bitmapHandle(0); + GetWidgetDataL(contentid, widgetId, bitmapHandle); + iEngine.HandleWidgetUpdateL(widgetId, bitmapHandle ); + CleanupStack::PopAndDestroy( &contentIdVar ); + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::GetWidgetData +// -------------------------------------------------------------------------- +// +void CTSCpsNotifier::GetWidgetDataL(const TDesC& aContentId, TInt& aWidgetId, + TInt& aBitmapHandle) + { + CLiwGenericParamList* inParamList = &iServiceHandler->InParamListL(); + CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL(); + + TLiwGenericParam type( KType, TLiwVariant( KCpData ) ); + inParamList->AppendL( type ); + + //append filter to input param + CLiwDefaultMap* filter = WidgetFilterLC(); + filter->InsertL(KContentId, TLiwVariant(aContentId)); + TLiwGenericParam item( KFilter, filter); + inParamList->AppendL( item ); + + // It is assumed that interface is already initiated + iCpsInterface->ExecuteCmdL( KGetList, *inParamList, *outParamList); + + type.Reset(); + item.Reset(); + inParamList->Reset(); + + //extracts data map + TInt pos = 0; + outParamList->FindFirst( pos, KResults ); + if( pos != KErrNotFound ) + // results present + { + //extract iterator on results list + TLiwVariant variant = (*outParamList)[pos].Value(); + CLiwIterable* iterable = variant.AsIterable(); + iterable->Reset(); + + //get next result + if( iterable->NextL( variant ) ) + { + //extract content map + CLiwDefaultMap *map = CLiwDefaultMap::NewLC(); + variant.Get( *map ); + if( map && map->FindL( KDataMap, variant) ) + { + CLiwDefaultMap *dataMap = CLiwDefaultMap::NewLC(); + variant.Get( *dataMap ); + if( dataMap ) + { + GetWidgetDataFromDataMapL(*dataMap, aWidgetId, aBitmapHandle); + } + CleanupStack::PopAndDestroy( dataMap ); + } + variant.Reset(); + CleanupStack::PopAndDestroy( map ); + } + iterable->Reset(); + } + outParamList->Reset(); + CleanupStack::PopAndDestroy( filter ); + } + +// -------------------------------------------------------------------------- +// CTSCpsNotifier::GetWidgetDataFromDataMap +// -------------------------------------------------------------------------- +// +void CTSCpsNotifier::GetWidgetDataFromDataMapL(const CLiwMap& aDataMap, + TInt& aWidgetId, TInt& aBitmapHandle) + { + TLiwVariant bitmapHandleVar; + bitmapHandleVar.PushL(); + if( aDataMap.FindL( KBitmapHandle, bitmapHandleVar )) + { + aBitmapHandle = bitmapHandleVar.AsTInt32(); + } + CleanupStack::PopAndDestroy(&bitmapHandleVar); + + TLiwVariant widgetIdVar; + widgetIdVar.PushL(); + if( aDataMap.FindL( KWidgetId, widgetIdVar )) + { + aWidgetId = widgetIdVar.AsTInt32(); + } + CleanupStack::PopAndDestroy(&widgetIdVar); + } + +// END OF FILE + + + + diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tsfsalwaysshownapplist.cpp --- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfsalwaysshownapplist.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfsalwaysshownapplist.cpp Wed May 12 13:12:59 2010 +0300 @@ -25,8 +25,7 @@ Also, there will be no Close option for such apps. */ const TUint32 KTsFsUidArray[] = { - 0x102750F0 // Idle App Uid - ,0x0EFC346A //Search App Uid + 0x0EFC346A //Search App Uid /* never show menu app */ //,0x101F4CD2 // Menu App Uid }; diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tsfshiddenapplist.cpp --- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfshiddenapplist.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfshiddenapplist.cpp Wed May 12 13:12:59 2010 +0300 @@ -37,7 +37,8 @@ */ const TUint32 KTsFsAlwaysHiddenUidArray[] = { - 0x100056CF // screensaver + 0x100056CF, // screensaver + 0x102750F0 // Idle App Uid }; // ----------------------------------------------------------------------------- diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tsfswdatalist.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswdatalist.cpp Wed May 12 13:12:59 2010 +0300 @@ -0,0 +1,803 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* +* Description: File containing application list classes + * +*/ + + +//INCLUDES: +#include "tsfswdatalist.h" +#include "tsfswengine.h" +#include "tsfsalwaysshownapplist.h" +#include "tsfshiddenapplist.h" +#include "tsfswidgetlist.h" +#include "tsfswiconcache.h" +#include "enginelogging.h" +#include // for CleanupResetAndDestroyPushL +#include +#include + + + +// ================= MEMBER FUNCTIONS ======================= + +// -------------------------------------------------------------------------- +// CTsFswDataList::NewL +// -------------------------------------------------------------------------- +// +CTsFswDataList* CTsFswDataList::NewL(CTsFswEngine& aEngine) + { + CTsFswDataList* self = new (ELeave) CTsFswDataList(aEngine); + CleanupStack::PushL (self ); + self->ConstructL ( ); + CleanupStack::Pop ( self ); + return self; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::CTsFswDataList +// -------------------------------------------------------------------------- +// +CTsFswDataList::CTsFswDataList(CTsFswEngine& aEngine) : + iEngine(aEngine) + { + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::~CTsFswDataList +// -------------------------------------------------------------------------- +// +CTsFswDataList::~CTsFswDataList( ) + { + // delete the bitmaps as the hash map cannot do that + THashMapIter iter( iScreenshots ); + while ( const TInt* key = iter.NextKey() ) + { + CFbsBitmap** value = iter.CurrentValue(); + delete *value; + } + iScreenshots.Close(); + delete iAppIcons; + + iData.ResetAndDestroy(); + + delete iHiddenAppList; + delete iAlwaysShownAppList; + delete iWidgetList; + iAppArcSession.Close(); + iWsSession.Close(); + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::ConstructL +// -------------------------------------------------------------------------- +// +void CTsFswDataList::ConstructL( ) + { + User::LeaveIfError( iWsSession.Connect() ); + User::LeaveIfError( iAppArcSession.Connect() ); + iHiddenAppList = CTsFsHiddenAppList::NewL( iEngine ); + iAlwaysShownAppList = CTsFsAlwaysShownAppList::NewL(); + + iWidgetsSupported = FeatureManager::FeatureSupported( KFeatureIdWebWidgets ); + if ( iWidgetsSupported ) + { + iWidgetList = CTsFsWidgetList::NewL(); + } + + // create app icon retriever instance + iAppIcons = CTsFswIconCache::NewL(); + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::FswDataL +// -------------------------------------------------------------------------- +// +const RTsFswArray& CTsFswDataList::FswDataL() + { + TSLOG_CONTEXT( FswDataL, TSLOG_LOCAL ); + TSLOG1_IN( "dirty flag = %d", iTaskListDirty ); + + // check the dirty flag and refresh if needed + if ( iTaskListDirty ) + { + CollectTasksL(); + // dirty flag is cleared in the above call + } + + // Get app icon for entries without screenshot, + // do this only here as the app icon is not needed in case a screenshot + // is already available. + for ( TInt i = 0, ie = iData.Count(); i != ie; ++i ) + { + if ( !iData[i]->ScreenshotHandle() ) + { + CFbsBitmap* bmp; + CFbsBitmap* mask; + TUid appUid = iData[i]->AppUid(); + // this will leave with -46 in case of widgets if we do not have AllFiles cap + TRAPD( err, iAppIcons->GetIconL( appUid, bmp, mask ) ); + if ( err == KErrNone && bmp ) + { + iData[i]->SetAppIconHandles( bmp->Handle(), + mask ? mask->Handle() : 0 ); + } + else + { + iAppIcons->DefaultIcon( bmp, mask ); + iData[i]->SetAppIconHandles( bmp->Handle(), + mask ? mask->Handle() : 0 ); + } + } + } + + TSLOG_OUT(); + return iData; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::CollectTasksL +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::CollectTasksL() + { + // clear dirty flag + TBool changed = iTaskListDirty; + iTaskListDirty = EFalse; + + RTsFswArray newAppsList; + RTsFswArray newWidgetsList; + + CleanupResetAndDestroyPushL(newAppsList); + CleanupResetAndDestroyPushL(newWidgetsList); + + CollectAppsL(newAppsList); + CollectWidgetsL(newWidgetsList); + + changed |= FitDataToListL(newAppsList, EFalse); + changed |= FitDataToListL(newWidgetsList, ETrue); + + CleanupStack::PopAndDestroy( &newWidgetsList ); + CleanupStack::PopAndDestroy( &newAppsList ); + + return changed; + } + + +// -------------------------------------------------------------------------- +// CTsFswDataList::AlwaysShown() +// -------------------------------------------------------------------------- +// +CTsFsAlwaysShownAppList* CTsFswDataList::AlwaysShownApps() + { + return iAlwaysShownAppList; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::HiddenApps() +// -------------------------------------------------------------------------- +// +CTsFsHiddenAppList* CTsFswDataList::HiddenApps() + { + return iHiddenAppList; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::Widgets() +// -------------------------------------------------------------------------- +// +CTsFsWidgetList* CTsFswDataList::Widgets() + { + return iWidgetList; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::SetDirty() +// -------------------------------------------------------------------------- +// +void CTsFswDataList::SetDirty() + { + iTaskListDirty = ETrue; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::SetAppDataRefreshNeeded() +// -------------------------------------------------------------------------- +// +void CTsFswDataList::SetAppDataRefreshNeeded() + { + iAppDataRefreshNeeded = ETrue; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::ForwardScreenshot +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::StoreScreenshot(TInt aId, CFbsBitmap* aBmp) + { + TBool changed = EFalse; + CFbsBitmap** oldbmp = iScreenshots.Find( aId ); + if ( oldbmp ) + { + delete *oldbmp; + } + if ( iScreenshots.Insert( aId, aBmp ) != KErrNone ) + { + delete aBmp; + iScreenshots.Remove( aId ); + } + else + { + changed = AssignScreenshotHandle( aId, aBmp->Handle() ); + } + return changed; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::RemoveScreenshotByWgId +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::RemoveScreenshot(TInt aId) + { + TBool changed = EFalse; + CFbsBitmap** bmp = iScreenshots.Find( aId ); + if ( bmp ) + { + delete *bmp; + iScreenshots.Remove( aId ); + changed = AssignScreenshotHandle( aId, 0 ); + } + return changed; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::FindScreenshotByWgId +// -------------------------------------------------------------------------- +// +CFbsBitmap** CTsFswDataList::FindScreenshot(TInt aId) + { + CFbsBitmap** result = 0; + result = iScreenshots.Find( aId ); + return result; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::MoveEntryAtStart +// -------------------------------------------------------------------------- +// +void CTsFswDataList::MoveEntryAtStart(TInt aAppId, TBool aWidget) + { + TSLOG_CONTEXT( MoveEntryAtStart, TSLOG_LOCAL ); + + TInt appId(0); + //check embeded case + if( !aWidget ) + { + TInt wgId(0); + CApaWindowGroupName::FindByAppUid(TUid::Uid(aAppId), iWsSession, wgId); + TInt parentWgId = FindMostTopParentWgId( wgId ); + if( parentWgId != KErrNotFound ) + { + TUid appUid = TUid::Uid(0); + AppUidForWgId(parentWgId, appUid); + appId = appUid.iUid; + } + } + + if( !appId ) + { + appId = aAppId; + } + + for ( TInt i = 0; i < iData.Count(); ++i ) + { + if( iData[i]->AppUid().iUid == appId && iData[i]->Widget() == aWidget) + { + CTsFswEntry* entry = iData[i]; + iData.Remove(i); + iData.Insert(entry, 0); + break; + } + } + TSLOG_OUT(); + } + +// -------------------------------------------------------------------------- +// CTsFswDataList:: +// -------------------------------------------------------------------------- +// +void CTsFswDataList::CollectAppsL(RTsFswArray& aAppsList) + { + TSLOG_CONTEXT( CollectTasksL, TSLOG_LOCAL ); + TSLOG_IN(); + + // update app data if needed + // (usually on startup and when new apps might have been installed) + if ( iAppDataRefreshNeeded ) + { + TSLOG0( TSLOG_INFO, "refreshing app data" ); + iAppArcSession.GetAllApps(); + iAlwaysShownAppList->InitializeAlwaysShownListL(); + iAppDataRefreshNeeded = EFalse; + } + + // get all window groups + RArray allWgIds; + CleanupClosePushL( allWgIds ); + User::LeaveIfError( iWsSession.WindowGroupList( 0, &allWgIds ) ); + + TInt count = allWgIds.Count(); + for ( TInt i = 0; i < count; ++i ) + { + // ignore uninteresting entries (e.g. embedded apps) + if ( allWgIds[i].iParentId > 0 ) + { + continue; + } + + // get window group name + TInt wgId = allWgIds[i].iId; + CApaWindowGroupName* windowName = + CApaWindowGroupName::NewLC( iWsSession, wgId ); + TUid appUid = windowName->AppUid(); + + // ignore entries with null uid + if ( !appUid.iUid ) + { + CleanupStack::PopAndDestroy( windowName ); + continue; + } + + // will append the task to our own list only if it is not hidden + TBool onHiddenList = iHiddenAppList->IsHiddenL( + appUid, iWsSession, wgId ); + + // get screen number (-1=console, 0=main screen, 1=cover ui) + TInt appScreen = 0; + TInt scrNumErr = iAppArcSession.GetDefaultScreenNumber( appScreen, appUid ); + + // check if it is on always-shown list + TBool mustShow = iAlwaysShownAppList->IsAlwaysShownApp( appUid ); + +#ifdef _DEBUG + const TDesC& captionDbg( windowName->Caption() ); + TSLOG4( TSLOG_INFO, "[%d] wgid=%d appuid=%x (%S)", i, wgId, + appUid.iUid, &captionDbg ); + TSLOG4( TSLOG_INFO, "hidden=%d onhiddenlist=%d mustshow=%d scrno=%d", + windowName->Hidden(), onHiddenList, mustShow, appScreen ); +#endif + if ( iWidgetsSupported && appUid.iUid == KWidgetAppUidValue ) + { + //continue, leave widgetui, do nothing + } + // add item to task list if it is always-shown OR it is not hidden + // and it is not on cover ui + else if (mustShow || (!onHiddenList && !windowName->Hidden() && (appScreen + == 0 || appScreen == -1) && scrNumErr == KErrNone)) + { + AddEntryL(wgId, appUid, windowName, aAppsList, EFalse); + } + CleanupStack::PopAndDestroy( windowName ); + } + CleanupStack::PopAndDestroy( &allWgIds ); + TSLOG_OUT(); + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::AddEntryL +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::AddEntryL( TInt aWgId, const TUid& aAppUid, + CApaWindowGroupName* aWgName, RTsFswArray& aNewList, + TBool aIsWidget ) + { + TBool changed = EFalse; + CTsFswEntry* entry = CTsFswEntry::NewLC(); + entry->SetWgId( aWgId ); + entry->SetAppUid( aAppUid ); + entry->SetWidget( aIsWidget ); + + // check if present in old list and if yes then take some of the old data + TBool found = ConsiderOldDataL( *entry, aAppUid, changed, aNewList ); + + // if not present previously then find out app name + // and check if screenshot is already available + if ( !found ) + { + // when adding a new entry to the list it is changed for sure + changed = ETrue; + HBufC* name = FindAppNameLC( aWgName, aAppUid, aWgId ); + if ( name ) + { + entry->SetAppNameL( *name ); + } + CleanupStack::PopAndDestroy( name ); + + entry->SetAlwaysShown( iAlwaysShownAppList->IsAlwaysShownApp( aAppUid ) ); + if ( aWgName ) + { + entry->SetSystemApp( aWgName->IsSystem() ); + } + } + TInt h = LookupScreenshotHandle( aWgId ); + if ( h ) + { + entry->SetScreenshotHandle( h ); + } + // add to new list, ownership is transferred + aNewList.AppendL( entry ); + CleanupStack::Pop( entry ); + return changed; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::ConsiderOldDataL +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::ConsiderOldDataL( CTsFswEntry& aEntry, + const TUid& aAppUid, + TBool& aChanged, + RTsFswArray& aNewList ) + { + for ( TInt entryIdx = 0, oldCount = iData.Count(); + entryIdx < oldCount; ++entryIdx ) + { + // Enough to check appuid, no need to bother with wgid as the + // screenshot handle is up-to-date or will be updated later anyway. + if ( iData[entryIdx]->AppUid() == aAppUid ) + { + iData[entryIdx]->SetWgId( aEntry.WgId()); + // if positions do not match then the list is different than before + if ( entryIdx != aNewList.Count() ) + { + aChanged = ETrue; + } + CTsFswEntry* oldEntry = iData[entryIdx]; + aEntry.SetAppNameL( oldEntry->AppName() ); + aEntry.SetScreenshotHandle( oldEntry->ScreenshotHandle() ); + aEntry.SetAlwaysShown( oldEntry->AlwaysShown() ); + aEntry.SetSystemApp( oldEntry->SystemApp() ); + return ETrue; + } + } + return EFalse; + } +// -------------------------------------------------------------------------- +// CTsFswDataList::CollectWidgetsL +// -------------------------------------------------------------------------- +// +void CTsFswDataList::CollectWidgetsL(RTsFswArray& aWidgetsList) + { + if( iWidgetsSupported ) + { + iWidgetList->InitializeWidgetListL(); + const RWidgetInfoArray& arr( iWidgetList->RunningWidgets() ); + for ( TInt i = 0, ie = arr.Count(); i != ie; ++i ) + { + //verify if widget is working in full screen mode + if( arr[i]->iFileSize ) + { + // wgid will be a special negative value + // windowgroupname is not needed here so pass NULL + AddEntryL( -(i+1), arr[i]->iUid, 0, aWidgetsList, ETrue ); + } + } + } + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::FindParentWgId +// -------------------------------------------------------------------------- +// +TInt CTsFswDataList::FindParentWgId( TInt aWgId ) + { + TInt parent( KErrNotFound ); + RArray allWgIds; + // Ask for window group list from RWsSession + TInt error = iWsSession.WindowGroupList( 0, &allWgIds ); + if ( !error ) + { + TInt count( allWgIds.Count() ); + for ( TInt i( 0 ); i < count; i++ ) + { + RWsSession::TWindowGroupChainInfo info = allWgIds[i]; + if ( info.iId == aWgId && info.iParentId > 0) + { + parent = info.iParentId; + break; + } + } + } + allWgIds.Close(); + return parent; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::FindMostTopParentWgId +// -------------------------------------------------------------------------- +// +TInt CTsFswDataList::FindMostTopParentWgId( TInt aWgId ) + { + TInt parent( KErrNotFound ); + parent = FindParentWgId( aWgId ); + if( parent != KErrNotFound) + { + TInt topParent = FindMostTopParentWgId(parent); + if( topParent != KErrNotFound ) + { + parent = topParent; + } + } + return parent; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::FindAppNameLC +// -------------------------------------------------------------------------- +// +HBufC* CTsFswDataList::FindAppNameLC( CApaWindowGroupName* aWindowName, + const TUid& aAppUid, + TInt aWgId ) + { + //Retrieve the app name + TApaAppInfo info; + iAppArcSession.GetAppInfo( info, aAppUid ); + TPtrC caption = info.iShortCaption; + + HBufC* tempName = 0; + if ( !caption.Length() && aWindowName ) // if not set - use thread name instead + { + if ( aWindowName->Caption().Length() ) + { + tempName = aWindowName->Caption().AllocL(); + //put on cleanupstack after the if + } + else + { + TThreadId threadId; + TInt err = iWsSession.GetWindowGroupClientThreadId( + aWgId, threadId ); + if ( err == KErrNone ) + { + RThread thread; + CleanupClosePushL( thread ); + err = thread.Open ( threadId ); + if ( err==KErrNone ) + { + tempName = thread.Name().AllocL(); // codescanner::forgottoputptroncleanupstack + // tempName put on cleanupstack after the if + } + CleanupStack::PopAndDestroy( &thread ); + } + } + } + else + { + tempName = caption.AllocL(); + //put on cleanupstack after the if + } + CleanupStack::PushL( tempName ); + return tempName; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::AssignScreenshotHandle +// Called when a screenshot arrives to check if there is a corresponding +// application in the task list. Firstly try to match screenshot into parental +// application then into standalone one. +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::AssignScreenshotHandle( TInt aWgIdForScreenshot, + TInt aBitmapHandle ) + { +// aWgIdForScreenshot, aBitmapHandle); + TBool changed = EFalse; + TInt parentWgId = FindMostTopParentWgId( aWgIdForScreenshot ); + // now parentWgId is a valid wgid or KErrNotFound (-1) + if (parentWgId != KErrNotFound) + { + AssignScreenshotHandle( parentWgId, aBitmapHandle, changed ); + } + if (!changed) + { + AssignScreenshotHandle( aWgIdForScreenshot, aBitmapHandle, changed ); + } + return changed; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::AssignScreenshotHandle +// Called when a screenshot arrives to check if there is a corresponding +// application in the task list. It might be tried to be match into parental +// or standalone application. +// -------------------------------------------------------------------------- +// +void CTsFswDataList::AssignScreenshotHandle(TInt aWgIdForScreenshot, + TInt aBitmapHandle, TBool& aAsigned) + { + aAsigned = EFalse; + for (TInt i = 0, ie = iData.Count(); i != ie; ++i) + { + if (iData[i]->Widget()) + { + TInt widgetId = iData[i]->AppUid().iUid; + if (widgetId == aWgIdForScreenshot) + { + iData[i]->SetScreenshotHandle(aBitmapHandle); + aAsigned = ETrue; + break; + } + continue; + } + TInt appWgId = iData[i]->WgId(); + if (appWgId == aWgIdForScreenshot) + { + iData[i]->SetScreenshotHandle(aBitmapHandle); + aAsigned = ETrue; + break; + } + } + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::LookupScreenshotHandle +// Called to check if there is a screenshot already stored for the given +// app. (or a screenshot with a wgid for which aWgIdForApp is the parent) +// -------------------------------------------------------------------------- +// +TInt CTsFswDataList::LookupScreenshotHandle( TInt aWgIdForApp ) + { + CFbsBitmap** bmp = NULL; + + if ( aWgIdForApp > 0 ) + { + // must check if there is a screenshot for which aWgIdForApp is the parent + THashMapIter iter( iScreenshots ); + while ( const TInt* wgid = iter.NextKey() ) + { + if ( FindMostTopParentWgId( *wgid ) == aWgIdForApp ) + { + THashMapIter iter2( iScreenshots ); + TBool hasChild = false; + while ( const TInt* wgid2 = iter2.NextKey() ) + { + if ( FindParentWgId( *wgid2 ) == *wgid ) + { + hasChild = true; + break; + } + } + if ( !hasChild ) + { + bmp = iter.CurrentValue(); + if ( bmp ) + { + return (*bmp)->Handle(); + } + } + } + } + if ( !bmp ) + { + bmp = iScreenshots.Find( aWgIdForApp ); + if ( bmp ) + { + // there is a screenshot stored for this wgid + return (*bmp)->Handle(); + } + } + } + else if ( aWgIdForApp < 0 ) + { + // Must be a widget, wgid is useless in this case. + // Do not do anything for now => no screenshot for widgets. + } + return 0; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::FitDataToListL +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::FitDataToListL(RTsFswArray& aListToFit, + TBool aConsiderWidgets) + { + TSLOG_CONTEXT( FitDataToListL, TSLOG_LOCAL ); + TBool changed = EFalse; + TInt listCount = aListToFit.Count(); + TInt dataCount = iData.Count(); + + //remove items that dont't exists in newly collected list + //consider widget and non-widget type + for (TInt i = dataCount -1; i >= 0; --i) + { + if ( (iData[i]->Widget() == aConsiderWidgets) && + !CheckIfExists(*iData[i], aListToFit) ) + { + delete iData[i]; + iData.Remove(i); + changed = ETrue; + } + } + + //add new item at start + for (TInt i = 0; i < aListToFit.Count(); ++i) + { + if (!CheckIfExists(*aListToFit[i], iData)) + { + iData.Insert(aListToFit[i], 0); + aListToFit[i] = 0; + changed = ETrue; + } + } + + TSLOG1_OUT( "change flag = %d", changed ); + return changed; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::CheckIfExists +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::CheckIfExists(const CTsFswEntry& aEntry, + const RTsFswArray& aList) const + { + TSLOG_CONTEXT( FitDataToListL, TSLOG_LOCAL ); + TBool exists(EFalse); + TInt dataCount = aList.Count(); + for (TInt entryIdx = 0; entryIdx < dataCount; ++entryIdx) + { + if (aList[entryIdx]->AppUid() == aEntry.AppUid()) + { + exists = ETrue; + break; + } + } + TSLOG_OUT(); + return exists; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::AppUidForWgIdL +// -------------------------------------------------------------------------- +// +TBool CTsFswDataList::IsAlwaysShownAppL( TInt aWgId ) + { + return iAlwaysShownAppList->IsAlwaysShownApp( AppUidForWgIdL(aWgId) ); + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::AppUidForWgId +// -------------------------------------------------------------------------- +// +TInt CTsFswDataList::AppUidForWgId( TInt aWgId, TUid& aUid ) + { + TRAPD(err, aUid = AppUidForWgIdL( aWgId ) ); + return err; + } + +// -------------------------------------------------------------------------- +// CTsFswDataList::AppUidForWgIdL +// -------------------------------------------------------------------------- +// +TUid CTsFswDataList::AppUidForWgIdL( TInt aWgId ) + { + CApaWindowGroupName* windowName = + CApaWindowGroupName::NewLC( iWsSession, aWgId ); + TUid appUid = windowName->AppUid(); + CleanupStack::PopAndDestroy( windowName ); + return appUid; + } + +// end of file diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp --- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp Wed May 12 13:12:59 2010 +0300 @@ -17,10 +17,11 @@ #include "tsfswengine.h" +#include "tscpsnotifier.h" +#include "tsfswdatalist.h" #include "tsfsalwaysshownapplist.h" #include "tsfshiddenapplist.h" #include "tsfswidgetlist.h" -#include "tsfswiconcache.h" #include "tspreviewprovider.h" #include "tsfswclient.h" #include @@ -34,7 +35,7 @@ #include "enginelogging.h" // time to wait before refreshing content -const TInt KContentRefreshDelay = 500000; // 0.5 sec +const TInt KContentRefreshDelay = 50000; // 0.05 sec // for screenshots, they are scaled down to (screensize/this_factor). const TInt KScreenSizeFactor = 2; @@ -42,6 +43,15 @@ // format to get a lowercase hex string prefixed with 0x _LIT( KHexFmt, "0x%x" ); +const TUid KTsCameraUid = { 0x101F857a }; + +//close command for widget +const TInt KCloseWidgetCmd(9); +//handle close cmd for s60 widgets +_LIT(KWidgetAppName, "widgetlauncher.exe"); +//handle close cmd for CWRT widgets +_LIT(KWidgetAppNameWgt,"wgtwidgetlauncher.exe"); + // -------------------------------------------------------------------------- // CTsFswEngine::NewL // -------------------------------------------------------------------------- @@ -86,20 +96,11 @@ User::LeaveIfError( iWsSession.Connect() ); User::LeaveIfError( iAppArcSession.Connect() ); - iHiddenAppList = CTsFsHiddenAppList::NewL( *this ); - iAlwaysShownAppList = CTsFsAlwaysShownAppList::NewL(); - + iDataList = CTsFswDataList::NewL(*this); iWidgetsSupported = FeatureManager::FeatureSupported( KFeatureIdWebWidgets ); - if ( iWidgetsSupported ) - { - iWidgetList = CTsFsWidgetList::NewL(); - } - - // create app icon retriever instance - iAppIcons = CTsFswIconCache::NewL(); // get an initial list of tasks - iAppDataRefreshNeeded = ETrue; + iDataList->SetAppDataRefreshNeeded(); CollectTasksL(); // listen for app screenshots @@ -116,6 +117,7 @@ iSwiProp.Subscribe( iStatus ); SetActive(); } + iCpsWidgetPublisher = CTSCpsNotifier::NewL(*this); } // -------------------------------------------------------------------------- @@ -130,22 +132,8 @@ delete iUpdateStarter; delete iPreviewProvider; - // delete the bitmaps as the hash map cannot do that - THashMapIter iter( iScreenshots ); - while ( const TInt* key = iter.NextKey() ) - { - CFbsBitmap** value = iter.CurrentValue(); - delete *value; - } - iScreenshots.Close(); - delete iAppIcons; - - iData.ResetAndDestroy(); iWgIds.Close(); - delete iHiddenAppList; - delete iAlwaysShownAppList; - delete iWidgetList; iAppArcSession.Close(); iWsSession.Close(); @@ -155,7 +143,8 @@ delete iRotaTasks[i]; } iRotaTasks.Close(); -// delete iContextUtility; + delete iDataList; + delete iCpsWidgetPublisher; } // -------------------------------------------------------------------------- @@ -165,43 +154,8 @@ EXPORT_C const RTsFswArray& CTsFswEngine::FswDataL() { TSLOG_CONTEXT( FswDataL, TSLOG_LOCAL ); - TSLOG1_IN( "dirty flag = %d", iTaskListDirty ); - - // check the dirty flag and refresh if needed - if ( iTaskListDirty ) - { - CollectTasksL(); - // dirty flag is cleared in the above call - } - - // Get app icon for entries without screenshot, - // do this only here as the app icon is not needed in case a screenshot - // is already available. - for ( TInt i = 0, ie = iData.Count(); i != ie; ++i ) - { - if ( !iData[i]->ScreenshotHandle() ) - { - CFbsBitmap* bmp; - CFbsBitmap* mask; - TUid appUid = iData[i]->AppUid(); - // this will leave with -46 in case of widgets if we do not have AllFiles cap - TRAPD( err, iAppIcons->GetIconL( appUid, bmp, mask ) ); - if ( err == KErrNone && bmp ) - { - iData[i]->SetAppIconHandles( bmp->Handle(), - mask ? mask->Handle() : 0 ); - } - else - { - iAppIcons->DefaultIcon( bmp, mask ); - iData[i]->SetAppIconHandles( bmp->Handle(), - mask ? mask->Handle() : 0 ); - } - } - } - TSLOG_OUT(); - return iData; + return iDataList->FswDataL(); } // -------------------------------------------------------------------------- @@ -218,7 +172,7 @@ // convert aWgId to an index in the list of running widgets and close widget CloseWidgetL( -aWgId -1 ); } - else if( !iAlwaysShownAppList->IsAlwaysShownApp( AppUidForWgIdL( aWgId ) ) ) + else if( !iDataList->IsAlwaysShownAppL( aWgId ) ) { // send window group event to kill the app TWsEvent event; @@ -242,7 +196,7 @@ if ( iWidgetsSupported && aWgId < 0 ) { // for widgets clients see a wgid that is -1*(index+1) - const RWidgetInfoArray& arr( iWidgetList->RunningWidgets() ); + const RWidgetInfoArray& arr( iDataList->Widgets()->RunningWidgets() ); // convert aWgId to an index in the list of running widgets TInt idx = -aWgId - 1; // if index is valid then handle the widget specially @@ -267,17 +221,14 @@ // void CTsFswEngine::SwitchToWidgetL( TInt aWidgetIndex ) { - const RWidgetInfoArray& arr( iWidgetList->RunningWidgets() ); - RApaLsSession ls; - User::LeaveIfError( ls.Connect() ); - CleanupClosePushL( ls ); + const RWidgetInfoArray& arr( iDataList->Widgets()->RunningWidgets() ); CApaCommandLine* cmdLine = CApaCommandLine::NewLC(); cmdLine->SetCommandL( EApaCommandRun ); TApaAppInfo info; iAppArcSession.GetAppInfo( info, arr[aWidgetIndex]->iUid ); // codescanner::accessArrayElementWithoutCheck2 (aWidgetIndex checked in SwitchToAppL()) cmdLine->SetExecutableNameL( info.iFullName ); - ls.StartApp( *cmdLine ); - CleanupStack::PopAndDestroy( 2, &ls ); + iAppArcSession.StartApp( *cmdLine ); + CleanupStack::PopAndDestroy(cmdLine); } // -------------------------------------------------------------------------- @@ -290,24 +241,13 @@ TSLOG_CONTEXT( UpdateTaskList, TSLOG_LOCAL ); TSLOG_IN(); - // If no clients are subscribed for fsw content change notifications - // then there is no need to waste time with rebuilding the task list, - // just set the dirty flag. - TInt listenerCount = iObserver.FswDataListenerCount(); - TSLOG1( TSLOG_INFO, "listener count = %d", listenerCount ); - if ( listenerCount > 0 ) + // There can be many calls in a row, use a timer to prevent degrading + // device performance. + iDataList->SetDirty(); + if ( !iUpdateStarter->IsActive() ) { - // There can be many calls in a row, use a timer to prevent degrading - // device performance. - if ( !iUpdateStarter->IsActive() ) - { - iUpdateStarter->Start( KContentRefreshDelay, 0, + iUpdateStarter->Start( KContentRefreshDelay, 0, TCallBack( UpdateStarterCallback, this ) ); - } - } - else - { - iTaskListDirty = ETrue; } // screenshot taking support - call Register and Unregister when needed @@ -349,7 +289,7 @@ CApaWindowGroupName* wgn = CApaWindowGroupName::NewLC( iWsSession, allWgIds[i].iId ); TUid newUid = wgn->AppUid(); - TBool hidden = wgn->Hidden() || iHiddenAppList->IsHiddenL( + TBool hidden = wgn->Hidden() || iDataList->HiddenApps()->IsHiddenL( newUid, iWsSession, allWgIds[i].iId ); CleanupStack::PopAndDestroy( wgn ); @@ -410,222 +350,12 @@ TBool CTsFswEngine::CollectTasksL() { TSLOG_CONTEXT( CollectTasksL, TSLOG_LOCAL ); - TSLOG_IN(); - - // clear dirty flag - iTaskListDirty = EFalse; - - TBool changed = EFalse; - RTsFswArray newList; - CleanupResetAndDestroyPushL( newList ); - - // update app data if needed - // (usually on startup and when new apps might have been installed) - if ( iAppDataRefreshNeeded ) - { - TSLOG0( TSLOG_INFO, "refreshing app data" ); - iAppArcSession.GetAllApps(); - iAlwaysShownAppList->InitializeAlwaysShownListL(); - iAppDataRefreshNeeded = EFalse; - } - - // get all window groups - RArray allWgIds; - CleanupClosePushL( allWgIds ); - User::LeaveIfError( iWsSession.WindowGroupList( 0, &allWgIds ) ); - TInt count = allWgIds.Count(); - - for ( TInt i = 0; i < count; ++i ) - { - // ignore uninteresting entries (e.g. embedded apps) - if ( allWgIds[i].iParentId > 0 ) - { - continue; - } - - // get window group name - TInt wgId = allWgIds[i].iId; - CApaWindowGroupName* windowName = - CApaWindowGroupName::NewLC( iWsSession, wgId ); - TUid appUid = windowName->AppUid(); - - // ignore entries with null uid - if ( !appUid.iUid ) - { - CleanupStack::PopAndDestroy( windowName ); - continue; - } - - // will append the task to our own list only if it is not hidden - TBool onHiddenList = iHiddenAppList->IsHiddenL( - appUid, iWsSession, wgId ); - - // get screen number (-1=console, 0=main screen, 1=cover ui) - TInt appScreen = 0; - TInt scrNumErr = iAppArcSession.GetDefaultScreenNumber( appScreen, appUid ); - - // check if it is on always-shown list - TBool mustShow = iAlwaysShownAppList->IsAlwaysShownApp( appUid ); - -#ifdef _DEBUG - const TDesC& captionDbg( windowName->Caption() ); - TSLOG4( TSLOG_INFO, "[%d] wgid=%d appuid=%x (%S)", i, wgId, - appUid.iUid, &captionDbg ); - TSLOG4( TSLOG_INFO, "hidden=%d onhiddenlist=%d mustshow=%d scrno=%d", - windowName->Hidden(), onHiddenList, mustShow, appScreen ); -#endif - - // if this is the widget app then save wgid for later use - // and ignore it, but include running widgets instead - if ( iWidgetsSupported && appUid.iUid == KWidgetAppUidValue ) - { - changed = ETrue; - } - // add item to task list if it is always-shown OR it is not hidden - // and it is not on cover ui - else if ( mustShow - || ( !onHiddenList - && !windowName->Hidden() - && ( appScreen == 0 || appScreen == -1 ) - && scrNumErr == KErrNone ) ) - { - if ( AddEntryL( wgId, appUid, windowName, newList, EFalse ) ) - { - changed = ETrue; - } - } - CleanupStack::PopAndDestroy( windowName ); - } - CleanupStack::PopAndDestroy( &allWgIds ); - CheckWidgetsL(newList); - - // if counts for old and new lists do not match then there is a change for sure, - // probably an app has been closed - if ( iData.Count() != newList.Count() ) - { - changed = ETrue; - } - - // move pointers from the temporary list into the real one - iData.ResetAndDestroy(); - TInt newListCount = newList.Count(); - TSLOG1( TSLOG_INFO, "new list count = %d", newListCount ); - for ( TInt i = 0; i < newListCount; ++i ) - { - TSLOG3( TSLOG_INFO, "[%d] %S wgid=%d", - i, &newList[i]->AppName(), newList[i]->WgId() ); - iData.AppendL( newList[i] ); - newList[i] = 0; - } - CleanupStack::PopAndDestroy( &newList ); - + TBool changed = iDataList->CollectTasksL(); TSLOG1_OUT( "change flag = %d", changed ); return changed; } -// -------------------------------------------------------------------------- -// CTsFswEngine::AddEntryL -// -------------------------------------------------------------------------- -// -TBool CTsFswEngine::AddEntryL( TInt aWgId, const TUid& aAppUid, - CApaWindowGroupName* aWgName, RTsFswArray& aNewList, - TBool aIsWidget ) - { - TBool changed = EFalse; - CTsFswEntry* entry = CTsFswEntry::NewLC(); - entry->SetWgId( aWgId ); - entry->SetAppUid( aAppUid ); - entry->SetWidget( aIsWidget ); - - // check if present in old list and if yes then take some of the old data - TBool found = CheckIfExistsL( *entry, aAppUid, changed, aNewList ); - - // if not present previously then find out app name - // and check if screenshot is already available - if ( !found ) - { - // when adding a new entry to the list it is changed for sure - changed = ETrue; - HBufC* name = FindAppNameLC( aWgName, aAppUid, aWgId ); - if ( name ) - { - entry->SetAppNameL( *name ); - } - CleanupStack::PopAndDestroy( name ); - TInt h = LookupScreenshotHandle( aWgId ); - if ( h ) - { - entry->SetScreenshotHandle( h ); - } - entry->SetAlwaysShown( iAlwaysShownAppList->IsAlwaysShownApp( aAppUid ) ); - if ( aWgName ) - { - entry->SetSystemApp( aWgName->IsSystem() ); - } - } - - // add to new list, ownership is transferred - aNewList.AppendL( entry ); - CleanupStack::Pop( entry ); - return changed; - } - -// -------------------------------------------------------------------------- -// CTsFswEngine::CheckIfExistsL -// -------------------------------------------------------------------------- -// -TBool CTsFswEngine::CheckIfExistsL( CTsFswEntry& aEntry, - const TUid& aAppUid, - TBool& aChanged, - RTsFswArray& aNewList ) - { - for ( TInt entryIdx = 0, oldCount = iData.Count(); - entryIdx < oldCount; ++entryIdx ) - { - // Enough to check appuid, no need to bother with wgid as the - // screenshot handle is up-to-date or will be updated later anyway. - if ( iData[entryIdx]->AppUid() == aAppUid ) - { - // if positions do not match then the list is different than before - if ( entryIdx != aNewList.Count() ) - { - aChanged = ETrue; - } - CTsFswEntry* oldEntry = iData[entryIdx]; - aEntry.SetAppNameL( oldEntry->AppName() ); - aEntry.SetScreenshotHandle( oldEntry->ScreenshotHandle() ); - aEntry.SetAlwaysShown( oldEntry->AlwaysShown() ); - aEntry.SetSystemApp( oldEntry->SystemApp() ); - return ETrue; - } - } - return EFalse; - } -// -------------------------------------------------------------------------- -// CTsFswEngine::CheckWidgetsL -// -------------------------------------------------------------------------- -// -void CTsFswEngine::CheckWidgetsL( RTsFswArray& aNewList ) - { - if( iWidgetsSupported ) - { - iWidgetList->InitializeWidgetListL(); - const RWidgetInfoArray& arr( iWidgetList->RunningWidgets() ); - for ( TInt i = 0, ie = arr.Count(); i != ie; ++i ) - { - //verify if widget is working in full screen mode - if( arr[i]->iFileSize ) - { - // wgid will be a special negative value - // windowgroupname is not needed here so pass NULL - AddEntryL( -(i+1), arr[i]->iUid, 0, aNewList, ETrue ); - } - } - } - } - -// -------------------------------------------------------------------------- // CTsFswEngine::HiddenAppListUpdated // Callback from the hidden app list watcher // -------------------------------------------------------------------------- @@ -636,119 +366,13 @@ } // -------------------------------------------------------------------------- -// CTsFswEngine::AppUidForWgIdL -// -------------------------------------------------------------------------- -// -TUid CTsFswEngine::AppUidForWgIdL( TInt aWgId ) - { - CApaWindowGroupName* windowName = - CApaWindowGroupName::NewLC( iWsSession, aWgId ); - TUid appUid = windowName->AppUid(); - CleanupStack::PopAndDestroy( windowName ); - return appUid; - } - -// -------------------------------------------------------------------------- -// CTsFswEngine::FindParentWgId -// -------------------------------------------------------------------------- -// -TInt CTsFswEngine::FindParentWgId( TInt aWgId ) - { - TInt parent( KErrNotFound ); - RArray allWgIds; - // Ask for window group list from RWsSession - TInt error = iWsSession.WindowGroupList( 0, &allWgIds ); - if ( !error ) - { - TInt count( allWgIds.Count() ); - for ( TInt i( 0 ); i < count; i++ ) - { - RWsSession::TWindowGroupChainInfo info = allWgIds[i]; - if ( info.iId == aWgId && info.iParentId > 0) - { - parent = info.iParentId; - break; - } - } - } - allWgIds.Close(); - return parent; - } - -// -------------------------------------------------------------------------- -// CTsFswEngine::FindMostTopParentWgId -// -------------------------------------------------------------------------- -// -TInt CTsFswEngine::FindMostTopParentWgId( TInt aWgId ) - { - TInt parent( KErrNotFound ); - parent = FindParentWgId( aWgId ); - if( parent != KErrNotFound) - { - TInt topParent = FindMostTopParentWgId(parent); - if( topParent != KErrNotFound ) - { - parent = topParent; - } - } - return parent; - } - -// -------------------------------------------------------------------------- -// CTsFswEngine::FindAppNameLC -// -------------------------------------------------------------------------- -// -HBufC* CTsFswEngine::FindAppNameLC( CApaWindowGroupName* aWindowName, - const TUid& aAppUid, - TInt aWgId ) - { - //Retrieve the app name - TApaAppInfo info; - iAppArcSession.GetAppInfo( info, aAppUid ); - TPtrC caption = info.iShortCaption; - - HBufC* tempName = 0; - if ( !caption.Length() && aWindowName ) // if not set - use thread name instead - { - if ( aWindowName->Caption().Length() ) - { - tempName = aWindowName->Caption().AllocL(); - //put on cleanupstack after the if - } - else - { - TThreadId threadId; - TInt err = iWsSession.GetWindowGroupClientThreadId( - aWgId, threadId ); - if ( err == KErrNone ) - { - RThread thread; - CleanupClosePushL( thread ); - err = thread.Open ( threadId ); - if ( err==KErrNone ) - { - tempName = thread.Name().AllocL(); // codescanner::forgottoputptroncleanupstack - // tempName put on cleanupstack after the if - } - CleanupStack::PopAndDestroy( &thread ); - } - } - } - else - { - tempName = caption.AllocL(); - //put on cleanupstack after the if - } - CleanupStack::PushL( tempName ); - return tempName; - } - -// -------------------------------------------------------------------------- // CTsFswEngine::CopyBitmapL // -------------------------------------------------------------------------- // CFbsBitmap* CTsFswEngine::CopyBitmapL( TInt aFbsHandle, TBool aKeepAspectRatio ) { + TSLOG_CONTEXT( CopyBitmapL, TSLOG_LOCAL ); + CFbsBitmap* ret = new (ELeave) CFbsBitmap; CleanupStack::PushL( ret ); CFbsBitmap* bmp = new (ELeave) CFbsBitmap; @@ -788,6 +412,7 @@ CleanupStack::PopAndDestroy( bmp ); CleanupStack::Pop( ret ); + TSLOG_OUT(); return ret; } @@ -856,25 +481,24 @@ TSLOG_CONTEXT( HandleFswPpApplicationChange, TSLOG_LOCAL ); TSLOG2_IN( "aWgId = %d aFbsHandle = %d", aWgId, aFbsHandle ); + TUid appUid; + TInt err = iDataList->AppUidForWgId( aWgId, appUid ); + if ( err || appUid == KTsCameraUid ) + { + // Dont't assign screenshot to camera app + TSLOG0( TSLOG_LOCAL, "Screenshot for camera - ignore" ); + iPreviewProvider->AckPreview(aFbsHandle); + TSLOG_OUT(); + return; + } + CFbsBitmap* bmp = 0; - TRAPD( err, bmp = CopyBitmapL( aFbsHandle, EFalse ) ); + TRAP( err, bmp = CopyBitmapL( aFbsHandle, EFalse ) ); iPreviewProvider->AckPreview(aFbsHandle); if ( err == KErrNone ) { - CFbsBitmap** oldbmp = iScreenshots.Find( aWgId ); - if ( oldbmp ) - { - delete *oldbmp; - } - if ( iScreenshots.Insert( aWgId, bmp ) != KErrNone ) - { - delete bmp; - iScreenshots.Remove( aWgId ); - } - else - { - AssignScreenshotHandle( aWgId, bmp->Handle() ); - } + iDataList->MoveEntryAtStart(appUid.iUid, EFalse); + StoreScreenshot(aWgId, bmp); } TSLOG_OUT(); @@ -890,14 +514,8 @@ TSLOG_CONTEXT( HandleFswPpApplicationUnregistered, TSLOG_LOCAL ); TSLOG1_IN( "aWgId = %d", aWgId ); - CFbsBitmap** bmp = iScreenshots.Find( aWgId ); - if ( bmp ) - { - delete *bmp; - iScreenshots.Remove( aWgId ); - AssignScreenshotHandle( aWgId, 0 ); - } - + RemoveScreenshot(aWgId); + TSLOG_OUT(); } @@ -911,15 +529,14 @@ TSLOG_CONTEXT( HandleFswPpApplicationBitmapRotation, TSLOG_LOCAL ); TSLOG1_IN( "aWgId = %d", aWgId ); - CFbsBitmap** bmp = iScreenshots.Find( aWgId ); + CFbsBitmap** bmp = iDataList->FindScreenshot(aWgId); + if ( bmp ) { // Rotate bitmap TRAP_IGNORE( RotateL( **bmp, aWgId, aClockwise ) ); // Bitmap in a array is invalid, remove it - delete *bmp; - iScreenshots.Remove( aWgId ); - AssignScreenshotHandle( aWgId, 0 ); + RemoveScreenshot(aWgId); } TSLOG_OUT(); @@ -968,16 +585,7 @@ if ( aError == KErrNone ) { - if ( iScreenshots.Insert( aWgId, aBitmap ) != KErrNone ) - { - delete aBitmap; - iScreenshots.Remove( aWgId ); - AssignScreenshotHandle( aWgId, 0 ); - } - else - { - AssignScreenshotHandle( aWgId, aBitmap->Handle() ); - } + StoreScreenshot(aWgId, aBitmap); } else { @@ -988,97 +596,6 @@ TSLOG_OUT(); } - -// -------------------------------------------------------------------------- -// CTsFswEngine::AssignScreenshotHandle -// Called when a screenshot arrives to check if there is a corresponding -// application in the task list. Firstly try to match screenshot into parental -// application then into standalone one. -// -------------------------------------------------------------------------- -// -void CTsFswEngine::AssignScreenshotHandle( TInt aWgIdForScreenshot, - TInt aBitmapHandle ) - { - TBool changed = EFalse; - TInt parentWgId = FindMostTopParentWgId( aWgIdForScreenshot ); - // now parentWgId is a valid wgid or KErrNotFound (-1) - if (parentWgId != KErrNotFound) - { - AssignScreenshotHandle( parentWgId, aBitmapHandle, changed ); - } - if (!changed) - { - AssignScreenshotHandle( aWgIdForScreenshot, aBitmapHandle, changed ); - } - if ( changed ) - { - iObserver.FswDataChanged(); - } - } - -// -------------------------------------------------------------------------- -// CTsFswEngine::AssignScreenshotHandle -// Called when a screenshot arrives to check if there is a corresponding -// application in the task list. It might be tried to be match into parental -// or standalone application. -// -------------------------------------------------------------------------- -// -void CTsFswEngine::AssignScreenshotHandle(TInt aWgIdForScreenshot, - TInt aBitmapHandle, TBool& aAsigned) - { - aAsigned = EFalse; - for (TInt i = 0, ie = iData.Count(); i != ie; ++i) - { - if (iData[i]->Widget()) - { - // Do not do anything for now => no screenshot for widgets. - continue; - } - TInt appWgId = iData[i]->WgId(); - if (appWgId == aWgIdForScreenshot) - { - iData[i]->SetScreenshotHandle(aBitmapHandle); - aAsigned = ETrue; - break; - } - } - } - -// -------------------------------------------------------------------------- -// CTsFswEngine::LookupScreenshotHandle -// Called to check if there is a screenshot already stored for the given -// app. (or a screenshot with a wgid for which aWgIdForApp is the parent) -// -------------------------------------------------------------------------- -// -TInt CTsFswEngine::LookupScreenshotHandle( TInt aWgIdForApp ) - { - CFbsBitmap** bmp = iScreenshots.Find( aWgIdForApp ); - if ( bmp ) - { - // there is a screenshot stored for this wgid - return (*bmp)->Handle(); - } - else if ( aWgIdForApp > 0 ) - { - // must check if there is a screenshot for which aWgIdForApp is the parent - THashMapIter iter( iScreenshots ); - while ( const TInt* wgid = iter.NextKey() ) - { - if ( FindParentWgId( *wgid ) == aWgIdForApp ) - { - CFbsBitmap** bmp = iter.CurrentValue(); - return (*bmp)->Handle(); - } - } - } - else if ( aWgIdForApp < 0 ) - { - // Must be a widget, wgid is useless in this case. - // Do not do anything for now => no screenshot for widgets. - } - return 0; - } - // -------------------------------------------------------------------------- // CTsFswEngine::RunL // -------------------------------------------------------------------------- @@ -1095,7 +612,7 @@ // refresh the app list during the next task list update. if ( operationStatus == Swi::ESwisStatusSuccess ) { - iAppDataRefreshNeeded = ETrue; + iDataList->SetAppDataRefreshNeeded(); } } iSwiProp.Subscribe( iStatus ); @@ -1160,15 +677,12 @@ { TSLOG_CONTEXT( CloseWidgetL, TSLOG_LOCAL ); TSLOG1_IN( "aOffset = %d", aOffset ); - if( iWidgetList->RunningWidgets().Count() <= aOffset ) + if( iDataList->Widgets()->RunningWidgets().Count() <= aOffset ) { User::Leave(KErrArgument); } - const CWidgetInfo* widgetInfo(iWidgetList->RunningWidgets()[aOffset]); + const CWidgetInfo* widgetInfo(iDataList->Widgets()->RunningWidgets()[aOffset]); const TPtrC bundleName(*widgetInfo->iBundleName); - RApaLsSession ls; - User::LeaveIfError( ls.Connect() ); - CleanupClosePushL( ls ); CApaCommandLine* const cmdLine = CApaCommandLine::NewLC(); HBufC8* const @@ -1185,14 +699,80 @@ cmdLine->SetCommandL( EApaCommandBackgroundAndWithoutViews ); cmdLine->SetOpaqueDataL( *opaque ); CleanupStack::PopAndDestroy( opaque ); - cmdLine->SetExecutableNameL( KWidgetAppName ); - ls.StartApp( *cmdLine ); + + if (iDataList->Widgets()->IsCWRTWidget(widgetInfo->iUid)) + { + cmdLine->SetExecutableNameL( KWidgetAppNameWgt); + } + else + { + cmdLine->SetExecutableNameL( KWidgetAppName ); + } + + iAppArcSession.StartApp( *cmdLine ); CleanupStack::PopAndDestroy( cmdLine ); - CleanupStack::PopAndDestroy( &ls ); TSLOG_OUT(); } +// -------------------------------------------------------------------------- +// CTsFswEngine::StoreScreenshot +// -------------------------------------------------------------------------- +// +TBool CTsFswEngine::StoreScreenshot(TInt aWgId, CFbsBitmap* aBmp) + { + TSLOG_CONTEXT( StoreScreenshot, TSLOG_LOCAL ); + //iDataList would take ownership + TBool change = EFalse; + change = iDataList->StoreScreenshot(aWgId, aBmp); + if(change) + { + iObserver.FswDataChanged(); + } + TSLOG1_OUT( "Screenshot for = %d", aWgId ); + return change; + } +// -------------------------------------------------------------------------- +// CTsFswEngine::RemoveScreenshot() +// -------------------------------------------------------------------------- +// +void CTsFswEngine::RemoveScreenshot(TInt aWgId) + { + TBool change = EFalse; + change = iDataList->RemoveScreenshot(aWgId); + if( change ) + { + iObserver.FswDataChanged(); + } + } + +// -------------------------------------------------------------------------- +// CTsFswEngine::HandleWidgetUpdateL() +// -------------------------------------------------------------------------- +// +void CTsFswEngine::HandleWidgetUpdateL(TInt aWidgetId, TInt aBitmapHandle) + { + TSLOG_CONTEXT( HandleWidgetUpdateL, TSLOG_LOCAL ); + + iDataList->MoveEntryAtStart(aWidgetId, ETrue); + + CFbsBitmap* bmp = 0; + TBool contentChanged(EFalse); + if( aBitmapHandle ) + { + TRAPD( err, bmp = CopyBitmapL( aBitmapHandle, EFalse ) ); + if ( err == KErrNone ) + { + contentChanged = StoreScreenshot(aWidgetId, bmp); + } + } + if(!contentChanged) + { + iObserver.FswDataChanged(); + } + + TSLOG_OUT(); + } // -------------------------------------------------------------------------- // CTsRotationListener::CTsRotationListener diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tsfswiconcache.cpp --- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswiconcache.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswiconcache.cpp Wed May 12 13:12:59 2010 +0300 @@ -23,8 +23,8 @@ #include // size for the created app icons -const TInt KAppIconWidth = 96; -const TInt KAppIconHeight = 96; +const TInt KAppIconWidth = 300; +const TInt KAppIconHeight = 300; // -------------------------------------------------------------------------- // CTsFswIconCache::NewL diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/engine/src/tsfswidgetlist.cpp --- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswidgetlist.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswidgetlist.cpp Wed May 12 13:12:59 2010 +0300 @@ -18,6 +18,7 @@ #include "tsfswidgetlist.h" #include +#include // -------------------------------------------------------------------------- // CTsFsWidgetList::NewL @@ -91,5 +92,35 @@ } } +// -------------------------------------------------------------------------- +// CTsFsWidgetList::IsCWRTWidget +// -------------------------------------------------------------------------- +// +TBool CTsFsWidgetList::IsCWRTWidget( TUid aUid ) + { + TBool ret(EFalse); + if(IsValBetween(KWidgetUidCWRTInternalMemoryStart, + KWidgetUidCWRTInternalMemoryStop, aUid.iUid) || + IsValBetween(KWidgetUidCWRTExternalMemoryStart, + KWidgetUidCWRTExternalMemoryStop, aUid.iUid) ) + { + ret = ETrue;//it is cwrt widget + } + return ret; + } + +// -------------------------------------------------------------------------- +// CTsFsWidgetList::IsValBetween +// -------------------------------------------------------------------------- +// +TBool CTsFsWidgetList::IsValBetween( TInt aMinor, TInt aMajor, TInt aBetween ) + { + TBool ret(EFalse); + if ( aBetween >= aMinor && aBetween < aMajor ) + { + ret = ETrue; + } + return ret; + } // end of file diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/server/inc/tsfswserver.h --- a/taskswitcher/contextengine/tsfswserver/server/inc/tsfswserver.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/server/inc/tsfswserver.h Wed May 12 13:12:59 2010 +0300 @@ -66,8 +66,6 @@ // from MTsFswEngineObserver void FswDataChanged(); - TInt FswDataListenerCount(); - private: TInt iSessionCount; CTsFswEngine* iEngine; diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/contextengine/tsfswserver/server/src/tsfswserver.cpp --- a/taskswitcher/contextengine/tsfswserver/server/src/tsfswserver.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/contextengine/tsfswserver/server/src/tsfswserver.cpp Wed May 12 13:12:59 2010 +0300 @@ -188,25 +188,6 @@ } // -------------------------------------------------------------------------- -// CTsFswServer::FswDataListenersCount -// callback from engine -// -------------------------------------------------------------------------- -// -TInt CTsFswServer::FswDataListenerCount() - { - TInt n = 0; - iSessionIter.SetToFirst(); - while ( CTsFswSession* session = static_cast( iSessionIter++ ) ) - { - if ( session->IsListening() ) - { - ++n; - } - } - return n; - } - -// -------------------------------------------------------------------------- // RunServerL // -------------------------------------------------------------------------- // diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher.rss --- a/taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher.rss Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher.rss Wed May 12 13:12:59 2010 +0300 @@ -275,6 +275,7 @@ RESOURCE TBUF r_ts_fsw_activate { buf = qtn_task_switcher_popup_open_app; } RESOURCE TBUF r_ts_fsw_close { buf = qtn_task_switcher_popup_close_app; } RESOURCE TBUF r_ts_fsw_close_all { buf = qtn_task_switcher_popup_close_all; } +RESOURCE TBUF r_ts_fsw_no_apps { buf = qtn_task_switcher_no_apps; } RESOURCE TBUF r_ts_fsw_confirm_close { buf = qtn_memlo_confirm_close; } RESOURCE TBUF r_task_switcher_heading_applications { buf = qtn_task_switcher_heading_applications; } diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher_reg.rss --- a/taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher_reg.rss Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher_reg.rss Wed May 12 13:12:59 2010 +0300 @@ -27,5 +27,6 @@ app_file="taskswitcher"; localisable_resource_file="\\resource\\apps\\taskswitcher"; localisable_resource_id = R_LOCALISABLE_APP_INFO; - hidden=KAppIsHidden; + hidden = KAppIsHidden; + launch = KAppLaunchInBackground; } diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappui.h --- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappui.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappui.h Wed May 12 13:12:59 2010 +0300 @@ -51,7 +51,8 @@ ENoneTransition = 0, EForegroundTransition = 3, EBackgroundTransition = 4, - EActivationTransition = 5 + EActivationTransition = 5, + EActivationAppShowTransition = 1507, }; /** @@ -80,7 +81,9 @@ /** * Function start transition */ - void StartTransion( TUint aTransitionType ); + void StartTransion( TUint aTransitionType, + TUid aNextAppUid = TUid::Null(), + TInt aWgId = 0 ); /** * from MGfxTransEffectObserver @@ -88,7 +91,9 @@ void TransitionFinished(const CCoeControl* aControl, TUint aAction); void MoveAppToForeground( TUint aTransitionType ); - void MoveAppToBackground( TUint aTransitionType ); + void MoveAppToBackground( TUint aTransitionType, + TUid aAppUid = TUid::Null(), + TInt aWgId = 0 ); /** * Functions for showing/hiding popups. @@ -96,6 +101,11 @@ void RequestPopUpL(); void DisablePopUpL(); + /** + * Function for layout change check + */ + TBool LayoutChangeAllowed(); + public: /** * From MTsCenrepChangeObserver @@ -112,11 +122,15 @@ void HandleResourceChangeL( TInt aType ); void HandleForegroundEventL( TBool aForeground ); void HandleCommandL( TInt aCommand ); + void HandleWsEventL(const TWsEvent& aEvent, + CCoeControl* aDestination); void StartTransition( TUint aTranstionId, TBool aVisibility, TBool aLayers, TUint aSubCom ); + + void StartAppActivateTransition( TUid aNextAppUid, TInt aWgId ); private: // New functions @@ -144,8 +158,33 @@ * task switcher app */ void FreeMemoryRequest(); + + /** + * Returns id of window group lying beneath task + * switcher window group. + * In case of embeded app it returns top paren window group. + * + * @param aIgnoreParentChild if set to ETrue, parent/child relationship + * will be ignored when deteriminig window + * group id + */ + TInt WgIdOfUnderlyingApp( TBool aIgnoreParentChild ); static TInt GoToBackgroundTimerCallback( TAny* aParam ); + + /* + * Returns id of top parent window group for embeded window group. + * @param aChildWg embeded window group id + * @return top parent window group id or 0 in case od standlalone + */ + TInt GetTopParentWg( TInt aChildWg); + + /* + * Returns id of parent window group for embeded window group. + * @param aChildWg embeded window group id + * @return parent window group id or 0 in case od standlalone + */ + TInt GetParentWg( TInt aChildWg ); private: @@ -182,6 +221,12 @@ // Monitors popup mode TBool iIsPopUpShown; + // For starting in background + TBool iUiStarted; + TBool iDisableAppKeyHandling; + + TInt iUnderAppWgId; + }; #endif // TSAPPUI_H diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappview.h --- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappview.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappview.h Wed May 12 13:12:59 2010 +0300 @@ -102,6 +102,21 @@ * background redraw. */ void OrderFullWindowRedraw(); + + /** + * Orders window invalidation to perform full + * background redraw. + */ + void EnableDragEvents( TBool aEnable ); + + /** + * Checks if app with the given wg id is closing + * + * @param aWgId id of window group which is checked + * if it is closing + * @return ETrue if application is being closed, EFalse otherwise + */ + TBool AppCloseInProgress( TInt aWgId ); protected: // from MCoeControlObserver @@ -165,7 +180,7 @@ /** * Updates the text in the applications and suggestions heading panes. */ - void UpdateHeadingsL(); + void UpdateHeadingsL( TInt aNewCount ); /** * Disables transition animations for taskswitcher app. @@ -186,8 +201,11 @@ TTouchFeedbackType aFeedbackType, const TPointerEvent& aPointerEvent); - - + /** + * Area, where drag events are being handled. + */ + TRect DragArea(); + public://From MTsEventControlerObserver /** * Declare drag gesture handling. diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/inc/tseventcontroler.h --- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tseventcontroler.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tseventcontroler.h Wed May 12 13:12:59 2010 +0300 @@ -168,6 +168,7 @@ * EFalse - disables event handling */ void EnableEventHandling( TBool aEnable ); + void EnableDragEventHandling( TBool aEnable ); private: /** @@ -189,6 +190,7 @@ * Flag to enable/disable event handling */ TBool iHandleEvents; + TBool iHandleDragEvents; }; #endif // TSEVENTCONTROLER_H diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswaparea.h --- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswaparea.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswaparea.h Wed May 12 13:12:59 2010 +0300 @@ -218,6 +218,11 @@ */ TPoint ViewPos()const; + /** + * Checks if the app with the given window group id is closing + */ + TBool IsAppClosing( TInt aWgId ); + public: // from CCoeControl TInt CountComponentControls() const; @@ -270,6 +275,11 @@ void ReCreateGridL(); /** + * Setup grid layout + */ + void LayoutGridL(); + + /** * Returns rectangles for fast swap area controls */ void GetFastSwapAreaRects( RArray& aRects ); @@ -290,12 +300,6 @@ * Sends the data-changed notification. */ void NotifyChange(); - - /** - * Chage application order. - * move Homescreen to first left position. - */ - void SwapApplicationOrder( RPointerArray& aArray ); /** * Retrieves and returns size for image graphics. @@ -382,7 +386,17 @@ * @return 1 if landscape, 0 if portait */ TInt GetCurrentScreenOrientation(); - + + /** + * Retrieves variety value, based on current screen resolution. + * + * @param aVariety result of the function, 0 value means portrait + * value of 1 indicates landscape + * @return ETrue if screen resolution differs from vale returned by + * layout meta data functions. + */ + TBool GetVariety( TInt& aVariety ); + private: // Data // parent control @@ -416,7 +430,6 @@ CTsEventControler& iEvtHandler; TInt iMaxItemsOnScreen; - TInt iPreviousNoOfItems; // Tap event TPointerEvent iTapEvent; @@ -438,6 +451,10 @@ // Key event handling TBool iConsumeEvent; TBool iKeyEvent; + + // App closing handling + RArray iIsClosing; + TInt iWidgetClosingCount; }; #endif // TSFASTSWAPAREA_H diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h --- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h Wed May 12 13:12:59 2010 +0300 @@ -77,9 +77,9 @@ public: // From CCoeControl void HandlePointerEventL( const TPointerEvent &aPointerEvent ); - TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); void HandleResourceChange( TInt aType ); void SizeChanged(); + void Draw( const TRect& aRect ) const; public: //From MTsDeviceStateObserver /** @@ -117,6 +117,23 @@ void ResetCloseHit(); /** + * Sets color for the screenshot stroke. + * + * @param aColor color for the thumbnail + * @param aHighlightedColor color for thumbnail when item is highlighted + */ + void SetStrokeColors( TRgb aColor, + TRgb aHighlightedColor ); + + /** + * Sets items for which stroke will be drawn + * + * @param aItemIndex array of item indexes for which stroke + * is drawn + */ + void SetStrokeItemsL( RArray& aItemIndex ); + + /** * Sets grid behaviour * * @param aBehaviour behaviour to be set @@ -160,43 +177,19 @@ TRect VisibleViewRect(); /** - * Launch tactile ETouchFeedbackSensitive feedback. + * Updates layout data for item drawer. Should be called when + * layout maybe out of date */ - void LaunchTactileFeedback(); - - /** - * Set tactile feedback support. - * - * @param aSupport new support value - */ - void SetTactileFeedbackSupport(TBool aSupport); + void UpdateItemDrawerLayoutDataL(); /** - * Remove item from iFullyVisibleItems and iPartialVisibleItems arrays - * - * @param aItem idem index - * @return ETrue if item was removed - * EFalse if item was not found - */ - TBool RemoveFromVisibleItems(TInt aItem) const; - - /** - * Add item to iFullyVisibleItems array + * Enables/disables avkon event handling. * - * @param aItem idem index - * @return ETrue if item was added - * EFalse if item was not added because it was there before + * @param aEnable if set to ETrue, pointer events will be forwarded + * to CAknGrid base class if necessary. If set to EFalse, + * no pointer events will be forwarded. */ - TBool AddToFullyVisibleItems(TInt aItem) const; - - /** - * Remove item from iPartialVisibleItems array - * - * @param aItem idem index - * @return ETrue if item was removed - * EFalse if item was not removed because it was not found - */ - TBool MoveToPartialVisibleItems(TInt aItem) const; + void EnableAknEventHandling( TBool aEnable ); private: // From CAknGrid virtual void CreateItemDrawerL(); @@ -209,7 +202,7 @@ /** * Loads close icon bitmap and mask */ - void LoadCloseIcon(); + void LoadCloseIconAndStrokeParams(); /** * Redraws grid and parent controls @@ -221,9 +214,6 @@ // Grid's parent const CCoeControl* iParent; - // Background context for grid - CAknsFrameBackgroundControlContext* iBgContext; - // Close icon handling RArray iCloseItems; TInt iCloseIconHitIdx; @@ -237,12 +227,8 @@ // Visible view rectangle (horizontal scrolling support) TRect iVisibleViewRect; - // Feedback support - TBool iTactileFeedbackSupport; - CTsFastSwapTimer* iFeedbackTimer; - - mutable RArray iFullyVisibleItems; - mutable RArray iPartialVisibleItems; + // Flag controlling input handling by grid + TBool iAknEventHandlingEnabled; }; @@ -255,8 +241,7 @@ public: // Constructor and destructor CTsGridItemDrawer( CTsFastSwapGrid* aGrid, - CFormattedCellListBoxData* aData, - TRect aScreenRect ); + CFormattedCellListBoxData* aData ); ~CTsGridItemDrawer(); public: // New functions @@ -265,7 +250,8 @@ * Sets close icon drawn for items that can be closed. * Ownership transferred. */ - void SetCloseIcon( CFbsBitmap* aBmp, CFbsBitmap* aMask ); + void SetCloseIcon( CFbsBitmap* aBmp, CFbsBitmap* aBmpMask, + CFbsBitmap* aBmpPressed, CFbsBitmap* aBmpPressedMask ); /** * Initializes close icon rectangles. @@ -296,6 +282,41 @@ * if set to EFalse, background will not be redrawn */ void SetRedrawBackground( TBool aEnable ); + + /** + * Sets color for the screenshot stroke. + * + * @param aColor color for the thumbnail + * @param aHighlightedColor color for thumbnail when item is highlighted + */ + void SetStrokeColors( TRgb aNormalColor, + TRgb aHighlightedColor ); + + /** + * Sets items for which stroke will be drawn + * + * @param aItemIndex array of item indexes for which stroke + * is drawn. + */ + void SetStrokeItemsL( RArray& aItemIndex ); + + /** + * Sets stroke offset and size: values must be relative + * to item rectangle. + * + * @param aStrokeOffset offset of the stroke rectangle relative + * to item rectangle + * @param aStrokeSize size of the stroke rectangle + */ + void SetStrokeOffset( TPoint aStrokeOffset, TSize aStrokeSize ); + + /** + * Set screen rectangle, used by the item drawer to determine + * drawn area. + * + * @param aRect screen rectangle + */ + void SetScreenRect( TRect aRect ); private: // From CFormattedCellListBoxItemDrawer void DrawActualItem( TInt aItemIndex, const TRect& aActualItemRect, @@ -333,16 +354,24 @@ // Owned CFbsBitmap* iCloseIcon; CFbsBitmap* iCloseIconMask; + CFbsBitmap* iCloseIconPressed; + CFbsBitmap* iCloseIconPressedMask; TRect iScreenRect; TInt iLeftOffset; TInt iRightOffset; - // Layout data + // Close button data TRect iCloseIconRect; TRect iCloseButtonRect; TBool iRedrawBackground; + + // Stroke data + TRgb iStrokeColor; + TRgb iHighlightStrokeColor; + RArray iStrokeItems; + TRect iStrokeRect; }; diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/loc/taskswitcher.loc --- a/taskswitcher/taskswitcherui/taskswitcherapp/loc/taskswitcher.loc Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/loc/taskswitcher.loc Wed May 12 13:12:59 2010 +0300 @@ -41,7 +41,13 @@ //l:heading_pane_t1 //r:5.0 // -#define qtn_task_switcher_heading_applications "Open applications" +#define qtn_task_switcher_heading_applications "Open applications (%d)" + +//d:Text for no appliactions +//l:none +//r:5.0 +// +#define qtn_task_switcher_no_apps "No open application" //d:Text for appliactions that has no name //l:none diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp --- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp Wed May 12 13:12:59 2010 +0300 @@ -60,7 +60,9 @@ // time to wait before sending the task to background // (must give time to animation) -const TInt KWaitBeforeGoingToBackground = 100000; +const TInt KWaitBeforeGoingToBackground = 200000; + +const TUid KTsAppUid = { KTsAppUidValue }; // ----------------------------------------------------------------------------- // CTsAppUi::ConstructL() @@ -118,6 +120,7 @@ // Create custom window group iWg = RWindowGroup(CCoeEnv::Static()->WsSession()); iWg.Construct((TUint32)&iWg, ETrue); + iWg.EnableScreenChangeEvents(); // Create UI iAppView = CTsAppView::NewL( ApplicationRect(), *iDeviceState, iWg ); @@ -144,10 +147,15 @@ // And finally, go to background. MoveAppToBackground( ENoneTransition ); - iEikonEnv->RootWin().SetOrdinalPosition(-1); + iEikonEnv->RootWin().SetOrdinalPosition(-1, ECoeWinPriorityNeverAtFront); iEikonEnv->RootWin().EnableReceiptOfFocus(EFalse); + RWindowGroup& windowGroup = CCoeEnv::Static()->RootWin(); + windowGroup.EnableGroupListChangeEvents(); + iIsPopUpShown = EFalse; + iUiStarted = EFalse; + iDisableAppKeyHandling = EFalse; TSLOG_OUT(); } @@ -207,7 +215,7 @@ // CTsAppUi::StartTransion // ----------------------------------------------------------------------------- // -void CTsAppUi::StartTransion( TUint aTransitionType ) +void CTsAppUi::StartTransion( TUint aTransitionType, TUid aNextAppUid, TInt aWgId ) { if( !EffectsEnabled() ) { @@ -228,10 +236,7 @@ CAknTransitionUtils::EForceInvisible ); break; case EActivationTransition: - StartTransition( aTransitionType, - EFalse, - ETrue, - CAknTransitionUtils::EForceInvisible ); + StartAppActivateTransition( aNextAppUid, aWgId ); break; } } @@ -260,6 +265,46 @@ } // ----------------------------------------------------------------------------- +// CTsAppUi::StartAppActivateTransition +// ----------------------------------------------------------------------------- +// +void CTsAppUi::StartAppActivateTransition( TUid aNextAppUid, TInt aWgId ) + { + // Check what type of transition will be trigerred + if ( aWgId == iUnderAppWgId ) + { + // App under task switcher was launched + StartTransition( EBackgroundTransition, + EFalse, + ETrue, + CAknTransitionUtils::EForceInvisible ); + } + else + { + // App start animation + TRAP_IGNORE( RequestPopUpL() ); + const TDesC8* ptr = reinterpret_cast(iAppView); + GfxTransEffect::Abort(iAppView); + TInt groupId = GfxTransEffect::BeginGroup(); + GfxTransEffect::BeginFullScreen( + EActivationAppShowTransition, ApplicationRect(), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam( aNextAppUid , KTsAppUid ) ); + GfxTransEffect::Begin( iAppView, EBackgroundTransition ); + GfxTransEffect::SetDemarcation( iAppView, iAppView->Rect() ); + GfxTransEffect::NotifyExternalState( ECaptureComponentsBegin, ptr ); + iAppView->MakeVisible( EFalse ); + CAknTransitionUtils::MakeVisibleSubComponents( + iAppView, + static_cast(CAknTransitionUtils::EForceInvisible) ); + GfxTransEffect::NotifyExternalState( ECaptureComponentsEnd, ptr ); + GfxTransEffect::End( iAppView ); + GfxTransEffect::EndFullScreen(); + GfxTransEffect::EndGroup(groupId); + } + } + +// ----------------------------------------------------------------------------- // CTsAppUi::TransitionFinished // ----------------------------------------------------------------------------- // @@ -336,14 +381,27 @@ // Both this function and the 'manual' MoveAppTo functions must fire the events // because in some cases only one of them will run (e.g. when bringing to foreground // not with the hw key but by other means etc.) + iDisableAppKeyHandling = EFalse; + if ( !iUiStarted ) + { + // Ignore foreground events if UI is starting + return; + } if ( aForeground ) { HandleSwitchToForegroundEvent(); } // exclude cases with dialogs like power menu, memory card - else if( !IsFaded()) + else { - HandleSwitchToBackgroundEvent(); + if( !IsFaded() ) + { + HandleSwitchToBackgroundEvent(); + } + else + { + iDisableAppKeyHandling = ETrue; + } } // Call Base class method @@ -381,12 +439,12 @@ { MoveAppToBackground( EBackgroundTransition ); } - else + else if( !iDisableAppKeyHandling ) { iAppView->HandleAppKey(KAppKeyTypeLong); } } - else if( value & KTaskswitcherShortAppKeyPressed ) + else if( value & KTaskswitcherShortAppKeyPressed && !iDisableAppKeyHandling ) { iAppView->HandleAppKey(KAppKeyTypeShort); } @@ -413,18 +471,10 @@ // Must call base class implementation first, // sizes from LayoutMetricsRect etc. will only be correct after this. CAknAppUi::HandleResourceChangeL( aType ); - if( aType == KEikDynamicLayoutVariantSwitch && iAppView ) + if( aType == KEikDynamicLayoutVariantSwitch && iAppView && !LayoutChangeAllowed() ) { - // Check if layout switch is necessary - TSizeMode mode = iEikonEnv->ScreenDevice()->GetCurrentScreenModeAttributes(); - TBool isLandscape = mode.iScreenSize.iWidth > mode.iScreenSize.iHeight; - TRect appRect = ApplicationRect(); - TBool isAppLandscape = appRect.Width() > appRect.Height(); - if(isLandscape != isAppLandscape) - { - // Keep displayed orientation - return; - } + // Keep displayed orientation + return; } // forward event iDeviceState->HandleResourceChange( aType ); @@ -439,7 +489,7 @@ // CTsAppUi::MoveAppToBackground() // ----------------------------------------------------------------------------- // -void CTsAppUi::MoveAppToBackground( TUint aTransitionType ) +void CTsAppUi::MoveAppToBackground( TUint aTransitionType, TUid aAppUid, TInt aWgId ) { TSLOG_CONTEXT( MoveAppToBackground, TSLOG_LOCAL ); TSLOG_IN(); @@ -450,7 +500,7 @@ } else { - StartTransion(aTransitionType); + StartTransion(aTransitionType, aAppUid, aWgId); iGoToBackgroundTimer->Cancel(); iGoToBackgroundTimer->Start( KWaitBeforeGoingToBackground, @@ -500,6 +550,8 @@ TSLOG_CONTEXT( MoveAppToForeground, TSLOG_LOCAL ); TSLOG_IN(); + iUiStarted = ETrue; + // Request window server to bring our application // to foreground iApplicationTask.BringToForeground(); @@ -529,6 +581,8 @@ // notify view iAppView->HandleSwitchToBackgroundEvent(); + + iWg.SetOrdinalPosition(-1, ECoeWinPriorityNormal); } TSLOG_OUT(); @@ -558,6 +612,8 @@ // notify view iAppView->HandleSwitchToForegroundEvent(); + + iWg.SetOrdinalPosition(iWg.OrdinalPosition(), ECoeWinPriorityAlwaysAtFront); } TSLOG_OUT(); @@ -661,4 +717,122 @@ TSLOG_OUT(); } + +// ----------------------------------------------------------------------------- +// CTsAppUi::LayoutCanBeChanged +// ----------------------------------------------------------------------------- +// +TBool CTsAppUi::LayoutChangeAllowed() + { + // Check if layout switch is necessary + TSizeMode mode = iEikonEnv->ScreenDevice()->GetCurrentScreenModeAttributes(); + TBool isLandscape = mode.iScreenSize.iWidth > mode.iScreenSize.iHeight; + TRect appRect = ApplicationRect(); + TBool isAppLandscape = appRect.Width() > appRect.Height(); + TBool retVal; + if(isLandscape != isAppLandscape) + { + retVal = EFalse; + } + else + { + retVal = ETrue; + } + return retVal; + } + + +// ----------------------------------------------------------------------------- +// CTsAppUi::HandleWsEventL +// ----------------------------------------------------------------------------- +// +void CTsAppUi::HandleWsEventL(const TWsEvent& aEvent, + CCoeControl* aDestination) + { + CAknAppUi::HandleWsEventL(aEvent, aDestination); + TInt eventType = aEvent.Type(); + if ( eventType == EEventWindowGroupListChanged ) + { + TInt wgId = WgIdOfUnderlyingApp(EFalse); + if ( iForeground && + wgId != iUnderAppWgId && + !iAppView->AppCloseInProgress(iUnderAppWgId) ) + { + MoveAppToBackground( ENoneTransition ); + } + if ( WgIdOfUnderlyingApp(ETrue) != iUnderAppWgId ) + { + HandleResourceChangeL(KEikDynamicLayoutVariantSwitch); + } + iUnderAppWgId = wgId; + } + } + + +// ----------------------------------------------------------------------------- +// CTsAppUi::WgIdOfUnderlyingApp +// ----------------------------------------------------------------------------- +// +TInt CTsAppUi::WgIdOfUnderlyingApp( TBool aIgnoreParentChild ) + { + TInt retVal(0); + TApaTaskList taskList( iEikonEnv->WsSession() ); + TInt underlyingWg = taskList.FindByPos(0).WgId(); + if ( aIgnoreParentChild ) + { + retVal = underlyingWg; + } + else + { + TInt parentWg = GetTopParentWg( underlyingWg ); + retVal = parentWg ? parentWg : underlyingWg; + } + return retVal; + } + +// ----------------------------------------------------------------------------- +// CTsAppUi::GetTopParentWg +// ----------------------------------------------------------------------------- +// +TInt CTsAppUi::GetTopParentWg( TInt aChildWg ) + { + TInt parentWg = GetParentWg( aChildWg ); + if( parentWg ) + { + TInt topParentWg = GetTopParentWg( parentWg ); + if( topParentWg ) + { + parentWg = topParentWg; + } + } + return parentWg; + } + +// ----------------------------------------------------------------------------- +// CTsAppUi::GetParentWg +// ----------------------------------------------------------------------------- +// +TInt CTsAppUi::GetParentWg( TInt aChildWg ) + { + TInt retVal(0); + RArray allWgIds; + // Ask for window group list from RWsSession + TInt error = iEikonEnv->WsSession().WindowGroupList( 0, &allWgIds ); + if ( !error ) + { + TInt count( allWgIds.Count() ); + for ( TInt i( 0 ); i < count; i++ ) + { + RWsSession::TWindowGroupChainInfo info = allWgIds[i]; + if ( info.iId == aChildWg && info.iParentId > 0) + { + retVal = info.iParentId; + break; + } + } + } + allWgIds.Close(); + return retVal; + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp --- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp Wed May 12 13:12:59 2010 +0300 @@ -134,7 +134,7 @@ KAknsIIDQsnFrPopup, iBgContextOuterRect, iBgContextInnerRect, - ETrue ); + EFalse ); iBgContext->SetFrameRects(iBgContextOuterRect, iBgContextInnerRect); iBgContext->SetCenter( KAknsIIDQsnFrPopupCenter ); @@ -249,7 +249,7 @@ CleanupStack::PopAndDestroy( &rects ); - UpdateHeadingsL(); + UpdateHeadingsL(0); } // ----------------------------------------------------------------------------- @@ -309,6 +309,7 @@ iViewRect = Rect(); UpdatePopupRects(); iBgContext->SetFrameRects(iBgContextOuterRect, iBgContextInnerRect); + iBgContext->SetParentPos(PositionRelativeToScreen()); if ( iFastSwapArea && iAppsHeading ) { RArray rects; @@ -456,6 +457,18 @@ TSLOG_CONTEXT( CTsAppView::HandleSwitchToForegroundEvent, TSLOG_LOCAL ); TSLOG_IN(); + // Forward event to interested controls + iFastSwapArea->HandleSwitchToForegroundEvent(); + iFastSwapArea->UpdateComponentVisibility(); + + // Check for layout updates + CTsAppUi* appUi = static_cast(iCoeEnv->AppUi()); + if ( iViewRect != appUi->ApplicationRect() && + appUi->LayoutChangeAllowed() ) + { + HandleDeviceStateChanged( EOrientation ); + } + Window().Invalidate(Rect()); iEvtHandler->EnableEventHandling(ETrue); @@ -468,9 +481,6 @@ // Focus jumps back to fsw ChangeFocus( iFastSwapArea ); - // Forward event to interested controls - iFastSwapArea->HandleSwitchToForegroundEvent(); - // Start animation CTsAppUi* appui = static_cast( iEikonEnv->AppUi() ); @@ -604,9 +614,8 @@ { LaunchFeedback(ETouchFeedbackBasic, TTouchFeedbackType( ETouchFeedbackVibra | ETouchFeedbackAudio), aPointerEvent); - if ( !( iFastSwapArea->Rect().Contains(aPointerEvent.iParentPosition) || - iAppsHeading->Rect().Contains(aPointerEvent.iParentPosition) - ) ) + + if( !DragArea().Contains(aPointerEvent.iParentPosition)) { //move task switcher to background iEvtHandler->EnableEventHandling(EFalse); @@ -620,28 +629,22 @@ // CTsAppView::DataChanged // ----------------------------------------------------------------------------- // -void CTsAppView::DataChanged( CCoeControl* /*aWhere*/, TInt /*aNewCount*/ ) +void CTsAppView::DataChanged( CCoeControl* /*aWhere*/, TInt aNewCount ) { - TRAP_IGNORE( UpdateHeadingsL() ); + TRAP_IGNORE( UpdateHeadingsL( aNewCount ) ); } // ----------------------------------------------------------------------------- // CTsAppView::UpdateHeadingsL // ----------------------------------------------------------------------------- // -void CTsAppView::UpdateHeadingsL() +void CTsAppView::UpdateHeadingsL( TInt aNewCount ) { -#ifndef TASKSWITCHER_USE_CUSTOM_LAYOUT HBufC* text = StringLoader::LoadLC( - R_TASK_SWITCHER_HEADING_APPLICATIONS ); -#else - _LIT( KTitle, "Task switcher" ); - HBufC* text = KTitle().AllocLC(); -#endif + R_TASK_SWITCHER_HEADING_APPLICATIONS, aNewCount ); iAppsHeading->SetTextL( *text ); iAppsHeading->DrawDeferred(); CleanupStack::PopAndDestroy( text ); - } @@ -667,6 +670,16 @@ // ----------------------------------------------------------------------------- +// CTsAppView::EnableDragEvents +// ----------------------------------------------------------------------------- +// +void CTsAppView::EnableDragEvents( TBool aEnable ) + { + iEvtHandler->EnableDragEventHandling( aEnable ); + } + + +// ----------------------------------------------------------------------------- // CTsAppView::MoveOffset // ----------------------------------------------------------------------------- // @@ -710,13 +723,7 @@ // void CTsAppView::DragL(const MAknTouchGestureFwDragEvent& aEvent) { - if( aEvent.State() == EAknTouchGestureFwStop ) - { - LaunchFeedback(ETouchFeedbackBasic, TTouchFeedbackType( - ETouchFeedbackVibra | ETouchFeedbackAudio), TPointerEvent()); - } - if( iFastSwapArea->Rect().Contains(aEvent.StartPosition()) || - iAppsHeading->Rect().Contains(aEvent.StartPosition()) ) + if(DragArea().Contains(aEvent.StartPosition())) { iFastSwapArea->DragL(aEvent); } @@ -758,6 +765,34 @@ } +// ----------------------------------------------------------------------------- +// CTsAppView::AppCloseInProgress() +// ----------------------------------------------------------------------------- +// +TBool CTsAppView::AppCloseInProgress( TInt aWgId ) + { + return iFastSwapArea->IsAppClosing(aWgId); + } +// ----------------------------------------------------------------------------- +// CTsAppView::DragArea +// ----------------------------------------------------------------------------- +// +TRect CTsAppView::DragArea() + { + TRect dragArea; + if (Layout_Meta_Data::IsLandscapeOrientation()) + { + dragArea.SetRect(iAppsHeading->Rect().iTl.iX, + iAppsHeading->Rect().iTl.iY, iFastSwapArea->Rect().iBr.iX, + iFastSwapArea->Rect().iBr.iY); + } + else + { + dragArea.SetRect(Rect().iTl.iX, iAppsHeading->Rect().iTl.iY, + Rect().iBr.iX, iFastSwapArea->Rect().iBr.iY); + } + return dragArea; + } // End of file diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp --- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp Wed May 12 13:12:59 2010 +0300 @@ -66,7 +66,8 @@ : CBase(), iObserver(aObserver), - iHandleEvents(ETrue) + iHandleEvents(ETrue), + iHandleDragEvents(ETrue) { } @@ -134,10 +135,13 @@ void CTsEventControler::HandleDragEventL( MAknTouchGestureFwDragEvent& aEvent) { - iObserver.DragL(aEvent); - if ( iHandleEvents ) + if ( iHandleDragEvents ) { - iPhysicsHelper->HandleDragEvent(aEvent); + iObserver.DragL(aEvent); + if ( iHandleEvents && iHandleDragEvents ) + { + iPhysicsHelper->HandleDragEvent(aEvent); + } } } @@ -221,4 +225,18 @@ } } + +// ----------------------------------------------------------------------------- +// EnableDragEventHandling +// ----------------------------------------------------------------------------- +// +void CTsEventControler::EnableDragEventHandling( TBool aEnable ) + { + iHandleDragEvents = aEnable; + if ( !aEnable && IsPhysicsRunning() ) + { + iPhysicsHelper->Stop(); + } + } + // end of file diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswaparea.cpp --- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswaparea.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswaparea.cpp Wed May 12 13:12:59 2010 +0300 @@ -50,15 +50,8 @@ /** Number of closable applications, to show "close all" option. */ const TInt KTsMaxClosableApps = 2; -/** Uid of Active Idle application. - Used when movind Ai to specified position.*/ -const TUid KAiUid = TUid::Uid( 0x102750F0 ); - -/** Position of Ai in fsw grid.*/ -const TInt KAiPosition = 0; - /** Default grid item to highlight.*/ -const TInt KItemToHighlight = 3; +const TInt KItemToHighlight = 2; const TInt KAppKeyTypeShort = 1; const TInt KAppKeyTypeLong = 2; @@ -110,7 +103,7 @@ CTsDeviceState& aDeviceState, CTsEventControler& aEventHandler) : iParent(aParent), iDeviceState(aDeviceState), iEvtHandler(aEventHandler), - iPreviousNoOfItems(0), iIgnoreLayoutSwitch(EFalse) + iIgnoreLayoutSwitch(EFalse), iWidgetClosingCount(0) { // no implementation required } @@ -122,6 +115,7 @@ CTsFastSwapArea::~CTsFastSwapArea() { iArray.ResetAndDestroy(); + iIsClosing.Close(); delete iGrid; delete iFSClient; delete iPopup; @@ -141,7 +135,7 @@ SetRect( aRect ); - // setup ganes grid + // setup grid ReCreateGridL(); // create stylus popup instance @@ -195,6 +189,44 @@ AknListBoxLayouts::SetupStandardGrid( *iGrid ); + // Setup layout + LayoutGridL(); + + if( wasHighlight ) + { + iGrid->ShowHighlight(); + } + else + { + iGrid->HideHighlight(); + } + + // Setup empty text + HBufC* text = StringLoader::LoadLC( R_TS_FSW_NO_APPS ); + iGrid->SetEmptyGridTextL( *text ); + CleanupStack::PopAndDestroy( text ); + + // Setup grid observers + if ( obs ) + { + iGrid->SetObserver( obs ); + } + iGrid->SetListBoxObserver(this); + iGrid->SetFastSwapGridObserver(this); + iGrid->SetContainerWindowL(*this); + + // Make sure that there is an ActivateL call even when we are not + // called from ConstructL. (in order to have the grid's parent ptr set properly) + ActivateL(); + } + + +// -------------------------------------------------------------------------- +// CTsFastSwapArea::LayoutGridL +// -------------------------------------------------------------------------- +// +void CTsFastSwapArea::LayoutGridL() + { RArray rects; CleanupClosePushL(rects); rects.ReserveL(KLayoutItemCount); @@ -205,8 +237,14 @@ TAknLayoutRect gridNextItem = rects[3]; CleanupStack::PopAndDestroy(&rects); - TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; iGrid->SetRect(gridAppPane.Rect()); + + TInt variety; + TBool disable = GetVariety(variety); + if ( disable ) + { + TRAP_IGNORE(static_cast(iEikonEnv->AppUi())->RequestPopUpL()); + } TAknLayoutScalableParameterLimits gridParams = AknLayoutScalable_Apps::cell_tport_appsw_pane_ParamLimits( variety ); TPoint empty( ELayoutEmpty, ELayoutEmpty ); @@ -224,7 +262,7 @@ // Text colors TRgb textColor; AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor, - KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); + KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19 ); TRgb highlightTextColor; AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), highlightTextColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ); @@ -234,15 +272,7 @@ colors.iHighlightedText = highlightTextColor; colors.iHighlightedBack = iGrid->ItemDrawer()->HighlightedBackColor(); iGrid->ItemDrawer()->FormattedCellData()->SetSubCellColorsL(1, colors); - - // Setup grid observers - if ( obs ) - { - iGrid->SetObserver( obs ); - } - iGrid->SetListBoxObserver(this); - iGrid->SetFastSwapGridObserver(this); - iGrid->SetContainerWindowL(*this); + iGrid->SetStrokeColors(textColor, highlightTextColor); if ( AknLayoutUtils::LayoutMirrored() ) { @@ -264,22 +294,16 @@ } iGridItemWidth = gridItem.Rect().Width(); - iGrid->ItemDrawer()->ColumnData()->SetDrawBackground(EFalse); + // Update item drawer + iGrid->UpdateItemDrawerLayoutDataL(); // Update state HandleDeviceStateChanged( EDeviceType ); - if( wasHighlight ) - { - iGrid->ShowHighlight(); - } - else + + if ( disable ) { - iGrid->HideHighlight(); + TRAP_IGNORE(static_cast(iEikonEnv->AppUi())->DisablePopUpL()); } - - // Make sure that there is an ActivateL call even when we are not - // called from ConstructL. (in order to have the grid's parent ptr set properly) - ActivateL(); } @@ -294,7 +318,12 @@ TAknLayoutRect gridImage; TAknLayoutRect gridNextItem; - TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; + TInt variety; + TBool disable = GetVariety(variety); + if ( disable ) + { + TRAP_IGNORE(static_cast(iEikonEnv->AppUi())->RequestPopUpL()); + } gridAppPane.LayoutRect( Rect(), AknLayoutScalable_Apps::tport_appsw_pane( variety ) ); @@ -310,6 +339,11 @@ gridNextItem.LayoutRect( gridAppPane.Rect(), AknLayoutScalable_Apps::cell_tport_appsw_pane_cp03( variety ) ); aRects.Append(gridNextItem); + + if ( disable ) + { + TRAP_IGNORE(static_cast(iEikonEnv->AppUi())->DisablePopUpL()); + } } @@ -337,11 +371,11 @@ // data with new layout values TInt selIdx = SelectedIndex(); TRAPD(err, - ReCreateGridL(); - /*iEvtHandler.ReInitPhysicsL(GridWorldSize(), ViewSize(), ETrue);*/); + /*ReCreateGridL()*/ + LayoutGridL() ); if ( err != KErrNone ) { - TSLOG1( TSLOG_INFO, "ReCreateGridL leaves with %d", err ); + TSLOG1( TSLOG_INFO, "LayoutGridL leaves with %d", err ); } HandleFswContentChanged(); iGrid->SetCurrentDataIndex(selIdx); @@ -384,6 +418,7 @@ if ( aIndex >= 0 && aIndex < iArray.Count() ) { TInt wgId = iArray[aIndex]->WgId(); + TUid appUid = iArray[aIndex]->AppUid(); // Move other app to foreground and then move ourselves to background. // Order is important and cannot be reversed. iFSClient->SwitchToApp( wgId ); @@ -393,7 +428,7 @@ iIgnoreLayoutSwitch = ETrue; CTsAppUi* appui = static_cast( iEikonEnv->AppUi() ); - appui->MoveAppToBackground( CTsAppUi::EActivationTransition ); + appui->MoveAppToBackground( CTsAppUi::EActivationTransition, appUid, wgId ); iIgnoreLayoutSwitch = EFalse; // Orientation update @@ -422,6 +457,11 @@ } TInt wgId = iArray[aIndex]->WgId(); iFSClient->CloseApp( wgId ); + iIsClosing.Append(wgId); + if ( iArray[aIndex]->Widget() ) + { + iWidgetClosingCount++; + } // The fsw content will change sooner or later // but the updated content (without the closed app) will not // come very fast. It looks better to the user if the item @@ -432,12 +472,14 @@ delete iArray[aIndex]; iArray.Remove( aIndex ); NotifyChange(); - if ( !aSuppressRendering ) + + // Hide highlight + if ( iGrid->GridBehaviour() == CTsFastSwapGrid::ETouchOnly ) { - RenderContentL( ETrue ); + iGrid->HideHighlight(); } - // Update item selection on the screen if last item was deleted - TInt newItemCount = GridItemCount(); + // Update selection + TInt newItemCount = GridItemCount() - 1; if ( aIndex == newItemCount ) { newItemCount--; @@ -445,9 +487,13 @@ } else { - DrawDeferred(); iGrid->SetCurrentDataIndex(selIdx); } + // Render contect + if ( !aSuppressRendering ) + { + RenderContentL( ETrue ); + } // Orientation update iPrevScreenOrientation = GetCurrentScreenOrientation(); @@ -479,7 +525,7 @@ { RenderContentL(); RestoreSelectedIndex(); - UpdateGrid(); + UpdateGrid( ETrue, EFalse ); } } @@ -544,7 +590,6 @@ // get current content from fastswap server iFSClient->GetContentL( iArray ); - SwapApplicationOrder( iArray ); #ifdef _DEBUG for ( TInt i = 0, ie = iArray.Count(); i != ie; ++i ) @@ -554,6 +599,20 @@ TSLOG4( TSLOG_INFO, "[%d]: %d %d %S", i, e->WgId(), e->AppUid(), &name ); } #endif + + // Update closing widget count if necessary + if ( iWidgetClosingCount ) + { + TInt widgetCount(0); + for ( TInt i = 0, ie = iArray.Count(); i != ie; ++i ) + { + if ( iArray[i]->Widget() ) + { + widgetCount++; + } + } + iWidgetClosingCount = widgetCount; + } // draw RenderContentL(); @@ -581,8 +640,9 @@ CleanupStack::PushL( textArray ); RArray closeItemArray; CleanupClosePushL(closeItemArray); + RArray strokeItemArray; + CleanupClosePushL(strokeItemArray); - TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; RArray rects; CleanupClosePushL(rects); rects.ReserveL(KLayoutItemCount); @@ -591,6 +651,8 @@ CleanupStack::PopAndDestroy(&rects); if ( iArray.Count() ) { + iGrid->ItemDrawer()->ColumnData()->SetDrawBackground(EFalse); + static_cast(&iParent)->EnableDragEvents(ETrue); if ( AknLayoutUtils::LayoutMirrored() ) { iGrid->SetLayoutL( EFalse, EFalse, ETrue, iArray.Count(), 1, gridItem.Rect().Size(), iGridItemGap ); @@ -600,6 +662,11 @@ iGrid->SetLayoutL( EFalse, ETrue, ETrue, iArray.Count(), 1, gridItem.Rect().Size(), iGridItemGap ); } } + else + { + iGrid->ItemDrawer()->ColumnData()->SetDrawBackground(ETrue); + static_cast(&iParent)->EnableDragEvents(EFalse); + } for ( TInt i = 0, ie = iArray.Count(); i != ie; ++i ) { @@ -623,10 +690,16 @@ CFbsBitmap* mask = 0; if ( !h ) { + // No screenshot, take app icon h = iArray[i]->AppIconBitmapHandle(); maskh = iArray[i]->AppIconMaskHandle(); TSLOG1( TSLOG_INFO, "using appicon, handle = %d", h ); } + else + { + // Screenshot exists, mark it for stroke + strokeItemArray.AppendL(i); + } __ASSERT_DEBUG( h, User::Invariant() ); bitmap = CopyBitmapL( h, sz ); CleanupStack::PushL( bitmap ); @@ -658,8 +731,10 @@ } iGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL(iconArray); iGrid->SetCloseItemsL(closeItemArray); + iGrid->SetStrokeItemsL(strokeItemArray); // Cleanup + CleanupStack::PopAndDestroy(&strokeItemArray); CleanupStack::PopAndDestroy(&closeItemArray); CleanupStack::Pop(textArray); CleanupStack::Pop(iconArray); @@ -671,17 +746,9 @@ } // refresh the items in the grid - if(iPreviousNoOfItems < iArray.Count()) - { - iGrid->HandleItemAdditionL(); - } - else if(iPreviousNoOfItems > iArray.Count()) - { - iGrid->HandleItemRemovalL(); - } - iPreviousNoOfItems = iArray.Count(); iEvtHandler.ReInitPhysicsL( GridWorldSize(), ViewSize(), ETrue ); UpdateGrid( ETrue, !aSuppressAnimation ); + iGrid->HandleItemAdditionL(); TSLOG_OUT(); } @@ -703,7 +770,6 @@ // do not always use aSize, preserving the aspect ratio is quite // important when showing app icons instead of screenshots TSize sz = CalculateSizePreserveRatio( aSize, bmp->SizeInPixels() ); - User::LeaveIfError( ret->Create( sz, bmp->DisplayMode() ) ); AknIconUtils::ScaleBitmapL( sz, ret, bmp ); @@ -744,6 +810,11 @@ { // stop listening for changes in fsw content iFSClient->CancelSubscribe(); + // Hide highlight + if ( iGrid->GridBehaviour() == CTsFastSwapGrid::ETouchOnly ) + { + iGrid->HideHighlight(); + } } // ----------------------------------------------------------------------------- @@ -755,14 +826,21 @@ TSLOG_CONTEXT( CTsFastSwapArea::HandleSwitchToForegroundEvent, TSLOG_LOCAL ); TSLOG_IN(); - // Reset grid - TRAP_IGNORE( ReCreateGridL() ); + iIsClosing.Reset(); + iWidgetClosingCount = 0; + + CTsGridItemDrawer* itemDrawer = + static_cast( iGrid->ItemDrawer() ); + itemDrawer->SetRedrawBackground(ETrue); - // get the current task list - HandleFswContentChanged(); - // and then start listening for changes - iFSClient->Subscribe( *this ); + // Update Layout + CTsAppUi* appUi = static_cast(iEikonEnv->AppUi()); + if ( appUi && appUi->EffectsEnabled() ) + { + TRAP_IGNORE( LayoutGridL() ); + } + // Reset grid if ( iDeviceState.DeviceType() == CTsDeviceState::EFullTouch ) { iGrid->HideHighlight(); @@ -772,12 +850,19 @@ iGrid->ShowHighlight(); } + // get the current task list + HandleFswContentChanged(); + // and then start listening for changes + iFSClient->Subscribe( *this ); + RestoreSelectedIndex(); UpdateGrid(EFalse, EFalse); iRedrawTimer->Cancel(); iRedrawTimer->After(KRedrawTime); + itemDrawer->SetRedrawBackground(EFalse); + // give feedback LaunchPopupFeedback(); @@ -816,7 +901,6 @@ TEventCode aType ) { iKeyEvent = ETrue; - iGrid->SetTactileFeedbackSupport(EFalse); // handle the 'clear' key if ( aType == EEventKey && aKeyEvent.iCode == EKeyBackspace ) { @@ -913,10 +997,12 @@ void CTsFastSwapArea::HandlePointerEventL( const TPointerEvent& aPointerEvent ) { iKeyEvent = EFalse; - iGrid->SetTactileFeedbackSupport(ETrue); if(aPointerEvent.iType == TPointerEvent::EButton1Down) { iTapEvent = aPointerEvent; + iGrid->EnableAknEventHandling(EFalse); + iGrid->HandlePointerEventL(aPointerEvent); + iGrid->EnableAknEventHandling(ETrue); } } @@ -947,7 +1033,7 @@ iSavedSelectedIndex = KErrNotFound; if ( GridItemCount() ) { - // highlight second recent item (that has index 2) if possible + // highlight second recent item (that has index 1) if possible TInt highlightItem = 0; TInt count = GridItemCount(); while( highlightItem < count @@ -1137,26 +1223,6 @@ } // ----------------------------------------------------------------------------- -// CTsFastSwapArea::SwapApplicationOrder -// ----------------------------------------------------------------------------- -// -void CTsFastSwapArea::SwapApplicationOrder( - RPointerArray& aArray ) - { - for ( TInt i = 0; i < aArray.Count(); ++i ) - { - if( aArray[i]->AppUid() == KAiUid ) - { - CTsFswEntry* homescreenEntry(0); - homescreenEntry = aArray[i]; - aArray.Remove(i); - aArray.Insert(homescreenEntry, KAiPosition); - break; - } - } - } - -// ----------------------------------------------------------------------------- // CTsFastSwapArea::PreferredImageSize // ----------------------------------------------------------------------------- // @@ -1219,20 +1285,16 @@ const TSize& aTargetAreaSize, const TSize& aSourceSize ) { - TSize sz; - if ( aSourceSize.iWidth > aSourceSize.iHeight ) - { - sz.iWidth = aTargetAreaSize.iWidth; - TReal ratio = aSourceSize.iWidth / (TReal) aSourceSize.iHeight; - sz.iHeight = sz.iWidth / ratio; - } - else - { - sz.iHeight = aTargetAreaSize.iHeight; - TReal ratio = aSourceSize.iHeight / (TReal) aSourceSize.iWidth; - sz.iWidth = sz.iHeight / ratio; - } - return sz; + const TReal + resizedAspectRatio(aTargetAreaSize.iWidth/(TReal)aTargetAreaSize.iHeight); + const TReal + orginalAspectRatio(aSourceSize.iWidth/(TReal)aSourceSize.iHeight); + //this condition avoid empty margins ( bigger output ). to realy fit area change it + const TReal scaleFactor = + ( orginalAspectRatio > resizedAspectRatio ) ? + (aTargetAreaSize.iHeight /(TReal)aSourceSize.iHeight) ://scale by height + (aTargetAreaSize.iWidth /(TReal)aSourceSize.iWidth) ;//scale by width + return TSize(aSourceSize.iWidth * scaleFactor, aSourceSize.iHeight * scaleFactor); } // -------------------------------------------------------------------------- @@ -1242,7 +1304,6 @@ void CTsFastSwapArea::SelectNextItem() { iKeyEvent = ETrue; - iGrid->SetTactileFeedbackSupport(EFalse); TBool forceRedraw(ETrue); TBool animate(ETrue); TInt selectedItem = SelectedIndex(); @@ -1282,7 +1343,7 @@ TPoint absViewPos = ViewPos(); absViewPos.iX -= Rect().Width() / 2; if( !iEvtHandler.IsPhysicsRunning() && - ( absViewPos.iX < 0 || absViewPos.iX + Rect().Width() > GridWorldSize().iWidth ) + ( absViewPos.iX < 0 ||( absViewPos.iX + Rect().Width() > GridWorldSize().iWidth && GridItemCount() ) ) ) { // View is outside of grid world - update view @@ -1320,6 +1381,7 @@ } if ( aForceRedraw ) { + iParent.DrawDeferred(); iGrid->DrawNow(); } } @@ -1331,20 +1393,27 @@ // void CTsFastSwapArea::HandleAppKey(TInt aType) { - if( aType == KAppKeyTypeShort ) + if ( iArray.Count() ) { - if(iGrid->IsHighlightVisible()) + if( aType == KAppKeyTypeShort ) { - SelectNextItem(); + if(iGrid->IsHighlightVisible()) + { + SelectNextItem(); + } + else + { + iGrid->ShowHighlight(); + } } - else + else if( aType == KAppKeyTypeLong ) { - iGrid->ShowHighlight(); + SwitchToApp( SelectedIndex() ); } } - else if( aType == KAppKeyTypeLong ) + else { - SwitchToApp( SelectedIndex() ); + TRAP_IGNORE( iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit) ); } } @@ -1374,13 +1443,13 @@ gridViewRect.iTl.iX = -currentXPos; // Take edge offset into account gridViewRect.iTl.iX += Rect().iTl.iX; - if(GridItemCount() <= iMaxItemsOnScreen) + if(GridItemCount() && GridItemCount() <= iMaxItemsOnScreen) { // Center view gridViewRect.iTl.iX += ( Rect().Width() - GridItemCount() * iGridItemWidth ) / 2; } + DrawDeferred(); iGrid->SetRect( gridViewRect ); - DrawDeferred(); iLogicalViewPosOffset = 0; } else @@ -1396,7 +1465,7 @@ // void CTsFastSwapArea::TapL(const TPoint& aPoint) { - if(Rect().Contains(aPoint)) + if(Rect().Contains(aPoint) && iArray.Count()) { //provide tap pointer event to grid iGrid->HandlePointerEventL(iTapEvent); @@ -1417,7 +1486,7 @@ void CTsFastSwapArea::LongTapL(const TPoint& aPoint) { TInt index(KErrNotFound); - if( iGrid->GridView()->XYPosToItemIndex(aPoint,index) ) + if( iGrid->GridView()->XYPosToItemIndex(aPoint,index) && iArray.Count() ) { iGrid->SetCurrentItemIndex(index); SaveSelectedIndex(); @@ -1448,8 +1517,7 @@ { CenterItem( KUpdateGridTime ); } - - iGrid->SetTactileFeedbackSupport(ETrue); + iGrid->HideHighlight(); } @@ -1482,7 +1550,7 @@ retVal.iY = iGrid->Rect().iTl.iY + Rect().Height() / 2; retVal.iX = - (iGrid->Rect().iTl.iX - Rect().iTl.iX) + Rect().Width() / 2 ; TInt gridItemCount = iGrid->Model()->ItemTextArray()->MdcaCount(); - if( gridItemCount <= iMaxItemsOnScreen) + if(gridItemCount && gridItemCount <= iMaxItemsOnScreen) { // View centered retVal.iX += ( Rect().Width() - gridItemCount * iGridItemWidth ) / 2; @@ -1498,7 +1566,12 @@ TPoint CTsFastSwapArea::ItemViewPosition( TInt aItemIdx ) { TPoint retVal = Rect().iTl; - if ( aItemIdx == 0 ) + if ( aItemIdx < 0 ) + { + // No items + retVal.iX = 0; + } + else if ( aItemIdx == 0 ) { // First item if( AknLayoutUtils::LayoutMirrored() ) @@ -1676,4 +1749,57 @@ return availableRect.iPixelSize.iWidth > availableRect.iPixelSize.iHeight; } + +// ----------------------------------------------------------------------------- +// CTsFastSwapArea::GetVariety +// ----------------------------------------------------------------------------- +// +TBool CTsFastSwapArea::GetVariety( TInt& aVariety ) + { + aVariety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; + TInt screenOrientation = GetCurrentScreenOrientation(); + if ( aVariety != screenOrientation ) + { + aVariety = screenOrientation; + return ETrue; + } + return EFalse; + } + +// ----------------------------------------------------------------------------- +// CTsFastSwapArea::IsAppClosing +// ----------------------------------------------------------------------------- +// +TBool CTsFastSwapArea::IsAppClosing( TInt aWgId ) + { + TBool retVal(EFalse); + if ( iIsClosing.Count() ) + { + TInt idx = iIsClosing.Find(aWgId); + retVal = idx != KErrNotFound; + if ( retVal ) + { + iIsClosing.Remove(idx); + } + else if ( iWidgetClosingCount ) + { + retVal = ETrue; + iWidgetClosingCount--; + } + } + else + { + // Check current item list + for ( TInt i = 0; i < iArray.Count(); i++ ) + { + TInt wgId = iArray[i]->WgId(); + if ( wgId == aWgId ) + { + retVal = ETrue; + } + } + } + return retVal; + } + // End of file diff -r 1526727a5b85 -r 899e4666ea9a taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswapgrid.cpp --- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswapgrid.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswapgrid.cpp Wed May 12 13:12:59 2010 +0300 @@ -31,7 +31,8 @@ */ const TInt KCloseIconRedrawTime = 300000; // 0.3 second -const TInt KFeedbackTime = 0; + +const TInt KStrokeThickness = 1; // ----------------------------------------------------------------------------- // CTsFastSwapGrid::CTsFastSwapGrid @@ -41,7 +42,8 @@ : CAknGrid(), iCloseIconHitIdx( KErrNotFound ), iBehaviour( ETouchOnly ), - iHighlightVisible( EFalse ) + iHighlightVisible( EFalse ), + iAknEventHandlingEnabled(ETrue) { } @@ -53,11 +55,7 @@ CTsFastSwapGrid::~CTsFastSwapGrid() { iCloseItems.Close(); - delete iBgContext; delete iCloseIconRedrawTimer; - delete iFeedbackTimer; - iFullyVisibleItems.Close(); - iPartialVisibleItems.Close(); } // ----------------------------------------------------------------------------- @@ -73,16 +71,8 @@ CAknGrid::ConstructL( aParent, EAknListBoxSelectionGrid ); SetPrimaryScrollingType(CAknGridView::EScrollFollowsItemsAndLoops); SetSecondaryScrollingType(CAknGridView::EScrollFollowsItemsAndLoops); - iBgContext = CAknsFrameBackgroundControlContext::NewL( - KAknsIIDQsnFrPopup, - TRect(), - TRect(), - ETrue ); - iBgContext->SetCenter( KAknsIIDQsnFrPopupCenter ); iCloseIconRedrawTimer = new (ELeave) CTsFastSwapTimer( *this ); iCloseIconRedrawTimer->ConstructL(); - iFeedbackTimer = new (ELeave) CTsFastSwapTimer( *this ); - iFeedbackTimer->ConstructL(); TSLOG_OUT(); } @@ -123,27 +113,27 @@ if ( closeIconRect.Contains( aPointerEvent.iParentPosition ) ) { // Close icon hit + TInt hitDataIdx(hitItem); + if ( AknLayoutUtils::LayoutMirrored() ) + { + // Calculate logical item index + hitDataIdx = Model()->ItemTextArray()->MdcaCount() - 1 - hitItem; + } + iCloseIconHitIdx = hitDataIdx; + eventHandled = ETrue; + if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) { - // pointer down - finish processing but do not forward to grid - eventHandled = ETrue; + // Update current item and redraw grid + SetCurrentItemIndex( hitItem ); + DrawNow(); + + iCloseIconRedrawTimer->Cancel(); + iCloseIconRedrawTimer->After(KCloseIconRedrawTime); } else { // Pointer up - TInt hitDataIdx(hitItem); - if ( AknLayoutUtils::LayoutMirrored() ) - { - // Calculate logical item index - hitDataIdx = Model()->ItemTextArray()->MdcaCount() - 1 - hitItem; - } - iCloseIconHitIdx = hitDataIdx; - eventHandled = ETrue; - // Hide highlight to mark close icon - HideHighlight(); - // Update current item and redraw grid - SetCurrentItemIndex( hitItem ); - DrawNow(); if ( iFastSwapGridObserver ) { MTouchFeedback* feedback = MTouchFeedback::Instance(); @@ -151,8 +141,6 @@ ETouchFeedbackBasicButton, ETouchFeedbackVibra, aPointerEvent); - iCloseIconRedrawTimer->Cancel(); - iCloseIconRedrawTimer->After(KCloseIconRedrawTime); } if ( GridBehaviour() == EHybrid ) { @@ -162,6 +150,8 @@ { Redraw(); } + iFastSwapGridObserver->HandleCloseEventL( hitDataIdx ); + ResetCloseHit(); } } } @@ -179,7 +169,10 @@ { itemDrawer->SetRedrawBackground( EFalse ); } - CAknGrid::HandlePointerEventL( aPointerEvent ); + if ( iAknEventHandlingEnabled ) + { + CAknGrid::HandlePointerEventL( aPointerEvent ); + } Redraw(); } @@ -198,25 +191,12 @@ if ( aChangeType == ESkin ) { - LoadCloseIcon(); + LoadCloseIconAndStrokeParams(); } TSLOG_OUT(); } -// ----------------------------------------------------------------------------- -// CTsFastSwapGrid::MopSupplyObject -// ----------------------------------------------------------------------------- -// -TTypeUid::Ptr CTsFastSwapGrid::MopSupplyObject( TTypeUid aId ) - { - if ( aId.iUid == MAknsControlContext::ETypeId ) - { - return MAknsControlContext::SupplyMopObject( aId, iBgContext ); - } - return CCoeControl::MopSupplyObject( aId ); - } - // ----------------------------------------------------------------------------- // CTsFastSwapGrid::HandleResourceChange @@ -247,6 +227,20 @@ // ----------------------------------------------------------------------------- +// CTsFastSwapGrid::Draw +// ----------------------------------------------------------------------------- +// +void CTsFastSwapGrid::Draw( const TRect& aRect ) const + { + CAknGrid::Draw(aRect); + if ( !Model()->ItemTextArray()->MdcaCount() ) + { + GridView()->DrawEmptyList(); + } + } + + +// ----------------------------------------------------------------------------- // CTsFastSwapGrid::SetFastSwapGridObserver // ----------------------------------------------------------------------------- // @@ -265,9 +259,31 @@ TSLOG_CONTEXT( CTsFastSwapGrid::CreateItemDrawerL, TSLOG_LOCAL ); TSLOG_IN(); + CFormattedCellGridData* data = CFormattedCellGridData::NewL(); + CleanupStack::PushL( data ); + CTsGridItemDrawer* itemDrawer = + new ( ELeave ) CTsGridItemDrawer( this, data ); + iItemDrawer = itemDrawer; + CleanupStack::Pop( data ); + + TSLOG_OUT(); + } + + +// ----------------------------------------------------------------------------- +// CTsFastSwapGrid::UpdateItemDrawerLayoutDataL +// ----------------------------------------------------------------------------- +// +void CTsFastSwapGrid::UpdateItemDrawerLayoutDataL() + { + CTsGridItemDrawer* itemDrawer = + static_cast( ItemDrawer() ); + TPixelsAndRotation screenSize; iEikonEnv->ScreenDevice()->GetDefaultScreenSizeAndRotation(screenSize); TRect availableRect = TRect( TPoint(0,0), screenSize.iPixelSize ); + itemDrawer->SetScreenRect(availableRect); + TAknLayoutRect fastSwapAreaPane; TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; fastSwapAreaPane.LayoutRect( availableRect, @@ -275,19 +291,19 @@ const TInt leftOffset = iParent->Rect().iTl.iX; const TInt rightOffset = availableRect.Width() - iParent->Rect().iBr.iX; SetVisibleViewRect(fastSwapAreaPane.Rect()); + itemDrawer->SetEdgeOffset( leftOffset, rightOffset ); - CFormattedCellGridData* data = CFormattedCellGridData::NewL(); - CleanupStack::PushL( data ); - CTsGridItemDrawer* itemDrawer = - new ( ELeave ) CTsGridItemDrawer( this, data, availableRect ); - CleanupStack::PushL( itemDrawer ); - itemDrawer->SetEdgeOffset( leftOffset, rightOffset ); - iItemDrawer = itemDrawer; - CleanupStack::Pop( itemDrawer ); - CleanupStack::Pop( data ); - LoadCloseIcon(); - - TSLOG_OUT(); + LoadCloseIconAndStrokeParams(); + } + + +// ----------------------------------------------------------------------------- +// CTsFastSwapGrid::EnableAknEventHandling +// ----------------------------------------------------------------------------- +// +void CTsFastSwapGrid::EnableAknEventHandling( TBool aEnable ) + { + iAknEventHandlingEnabled = aEnable; } // ----------------------------------------------------------------------------- @@ -298,17 +314,7 @@ { if ( aSource == iCloseIconRedrawTimer ) { - TInt itemToClose = iCloseIconHitIdx; ResetCloseHit(); - iFastSwapGridObserver->HandleCloseEventL( itemToClose ); - } - else if ( aSource == iFeedbackTimer ) - { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if (feedback) - { - feedback->InstantFeedback(ETouchFeedbackSensitive); - } } } @@ -357,6 +363,27 @@ // ----------------------------------------------------------------------------- +// CTsFastSwapGrid::SetStrokeColor +// ----------------------------------------------------------------------------- +// +void CTsFastSwapGrid::SetStrokeColors( TRgb aColor, + TRgb aHighlightedColor ) + { + static_cast(iItemDrawer)->SetStrokeColors(aColor, aHighlightedColor); + } + + +// ----------------------------------------------------------------------------- +// CTsFastSwapGrid::SetStrokeItemsL +// ----------------------------------------------------------------------------- +// +void CTsFastSwapGrid::SetStrokeItemsL( RArray& aItemIndex ) + { + static_cast(iItemDrawer)->SetStrokeItemsL(aItemIndex); + } + + +// ----------------------------------------------------------------------------- // CTsFastSwapGrid::SetBehaviour // ----------------------------------------------------------------------------- // @@ -459,31 +486,38 @@ // ----------------------------------------------------------------------------- -// CTsFastSwapGrid::LoadCloseIconL +// CTsFastSwapGrid::LoadCloseIconAndStrokeParams // ----------------------------------------------------------------------------- // -void CTsFastSwapGrid::LoadCloseIcon() +void CTsFastSwapGrid::LoadCloseIconAndStrokeParams() { // Load and set close icon CFbsBitmap* icon = NULL; - CFbsBitmap* mask = NULL; - - TRAP_IGNORE(AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), - KAknsIIDQgnIndiItutListCollapse, - KAknsIIDQsnTextColors, // we use text color here, eventhough this is an icon - EAknsCIQsnTextColorsCG13, // softkey text color + CFbsBitmap* iconMask = NULL; + CFbsBitmap* iconPressed = NULL; + CFbsBitmap* iconPressedMask = NULL; + + TRAP_IGNORE(AknsUtils::CreateIconL( AknsUtils::SkinInstance(), + KAknsIIDQgnIndiTsButtonClose, icon, - mask, + iconMask, KAvkonBitmapFile, EMbmAvkonQgn_indi_button_preview_close, - EMbmAvkonQgn_indi_button_preview_close_mask, - KRgbWhite - ); - CleanupStack::Pop( 2 ); // codescanner::cleanup - ); + EMbmAvkonQgn_indi_button_preview_close_mask + )); + + TRAP_IGNORE(AknsUtils::CreateIconL( AknsUtils::SkinInstance(), + KAknsIIDQgnIndiTsButtonClosePressed, + iconPressed, + iconPressedMask, + KAvkonBitmapFile, + EMbmAvkonQgn_indi_button_preview_close, + EMbmAvkonQgn_indi_button_preview_close_mask + )); TAknLayoutRect gridAppPane; TAknLayoutRect gridItem; + TAknLayoutRect gridImage; TAknLayoutRect gridCloseButton; TAknLayoutRect gridCloseIcon; TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; @@ -492,15 +526,21 @@ AknLayoutScalable_Apps::tport_appsw_pane( variety ) ); gridItem.LayoutRect( gridAppPane.Rect(), AknLayoutScalable_Apps::cell_tport_appsw_pane( variety, 0, 0 ) ); + gridImage.LayoutRect( gridItem.Rect(), + AknLayoutScalable_Apps::cell_tport_appsw_pane_g1( variety ) ); gridCloseButton.LayoutRect( gridItem.Rect(), AknLayoutScalable_Apps::bg_button_pane_cp16( variety, 0, 0 )); gridCloseIcon.LayoutRect( gridItem.Rect(), AknLayoutScalable_Apps::cell_tport_appsw_pane_g3( variety, 0, 0 )); + + // Set icon size AknIconUtils::SetSize( icon, gridCloseIcon.Rect().Size(), EAspectRatioPreserved ); - AknIconUtils::SetSize( mask, gridCloseIcon.Rect().Size(), EAspectRatioPreserved ); + AknIconUtils::SetSize( iconPressed, gridCloseIcon.Rect().Size(), EAspectRatioPreserved ); CTsGridItemDrawer* itemDrawer = static_cast(iItemDrawer); - itemDrawer->SetCloseIcon( icon, mask ); + + // Setup close parameters + itemDrawer->SetCloseIcon( icon, iconMask, iconPressed, iconPressedMask ); TRect relGridCloseButton = TRect( TPoint( gridCloseButton.Rect().iTl.iX - gridItem.Rect().iTl.iX, gridCloseButton.Rect().iTl.iY - gridItem.Rect().iTl.iY), gridCloseButton.Rect().Size() ); @@ -508,6 +548,15 @@ gridCloseIcon.Rect().iTl.iY - gridItem.Rect().iTl.iY), gridCloseIcon.Rect().Size() ); itemDrawer->SetCloseIconRect( relGridCloseButton, relGridCloseIconRect ); + + // Setup stroke parameters + TPoint strokeOffset; + strokeOffset.iX = gridImage.Rect().iTl.iX - gridItem.Rect().iTl.iX - KStrokeThickness; + strokeOffset.iY = gridImage.Rect().iTl.iY - gridItem.Rect().iTl.iY - KStrokeThickness; + TSize strokeSize = gridImage.Rect().Size(); + strokeSize.iHeight += KStrokeThickness * 2; + strokeSize.iWidth += KStrokeThickness * 2; + itemDrawer->SetStrokeOffset( strokeOffset, strokeSize ); } @@ -530,96 +579,8 @@ } } -// ----------------------------------------------------------------------------- -// CTsFastSwapGrid::LaunchTactileFeedback -// ----------------------------------------------------------------------------- -// -void CTsFastSwapGrid::LaunchTactileFeedback() - { - if( !iTactileFeedbackSupport ) - { - return; - } - - iFeedbackTimer->Cancel(); - iFeedbackTimer->After(KFeedbackTime); - } - -// ----------------------------------------------------------------------------- -// CTsFastSwapGrid::SetTactileFeedbackSupport -// ----------------------------------------------------------------------------- -// -void CTsFastSwapGrid::SetTactileFeedbackSupport(TBool aSupport) - { - iTactileFeedbackSupport = aSupport; - } -// ----------------------------------------------------------------------------- -// CTsFastSwapGrid::RemoveFromVisibleItems -// ----------------------------------------------------------------------------- -// -TBool CTsFastSwapGrid::RemoveFromVisibleItems(TInt aItem) const - { - TBool retVal(EFalse); - TInt idx(0); - idx = iFullyVisibleItems.Find(aItem); - if( idx >= 0) - { - iFullyVisibleItems.Remove(idx); - retVal = ETrue; - } - idx = iPartialVisibleItems.Find( aItem ); - if( idx >= 0) - { - iPartialVisibleItems.Remove(idx); - retVal = ETrue; - } - return retVal; - } - -// ----------------------------------------------------------------------------- -// CTsFastSwapGrid::AddToFullyVisibleItems -// ----------------------------------------------------------------------------- -// -TBool CTsFastSwapGrid::AddToFullyVisibleItems( TInt aItem ) const - { - TBool retVal(EFalse); - TInt idx(0); - - idx = iPartialVisibleItems.Find(aItem); - if( idx >= 0) - { - iPartialVisibleItems.Remove(idx); - } - idx = iFullyVisibleItems.Find( aItem ); - if( idx == KErrNotFound ) - { - iFullyVisibleItems.Append(aItem); - retVal = ETrue; - } - return retVal; - } - -// ----------------------------------------------------------------------------- -// CTsFastSwapGrid::MoveToPartialVisibleItems -// ----------------------------------------------------------------------------- -// -TBool CTsFastSwapGrid::MoveToPartialVisibleItems( TInt aItem ) const - { - TInt idx(0); - idx = iFullyVisibleItems.Find(aItem); - if( idx >= 0) - { - iFullyVisibleItems.Remove(idx); - } - idx = iPartialVisibleItems.Find( aItem ); - if( idx == KErrNotFound ) - { - iPartialVisibleItems.Append(aItem); - } - return EFalse; - } /* ================================================================================ * CTsGridItemDrawer @@ -632,13 +593,13 @@ // CTsGridItemDrawer::CTsGridItemDrawer( CTsFastSwapGrid* aGrid, - CFormattedCellListBoxData* aData, - TRect aScreenRect ) + CFormattedCellListBoxData* aData ) : CFormattedCellListBoxItemDrawer( aGrid->Model(), NULL, aData ), iGrid( aGrid ), - iScreenRect(aScreenRect) + iStrokeColor( KRgbBlack ), + iHighlightStrokeColor( KRgbBlack ) { } @@ -651,6 +612,9 @@ { delete iCloseIcon; delete iCloseIconMask; + delete iCloseIconPressed; + delete iCloseIconPressedMask; + iStrokeItems.Close(); } @@ -658,12 +622,17 @@ // CTsGridItemDrawer::SetCloseIcon // ----------------------------------------------------------------------------- // -void CTsGridItemDrawer::SetCloseIcon( CFbsBitmap* aBmp, CFbsBitmap* aMask ) +void CTsGridItemDrawer::SetCloseIcon( CFbsBitmap* aBmp, CFbsBitmap* aBmpMask, + CFbsBitmap* aBmpPressed, CFbsBitmap* aBmpPressedMask ) { delete iCloseIcon; iCloseIcon = aBmp; delete iCloseIconMask; - iCloseIconMask = aMask; + iCloseIconMask = aBmpMask; + delete iCloseIconPressed; + iCloseIconPressed = aBmpPressed; + delete iCloseIconPressedMask; + iCloseIconPressedMask = aBmpPressedMask; } @@ -714,6 +683,52 @@ // ----------------------------------------------------------------------------- +// CTsGridItemDrawer::SetStrokeColor +// ----------------------------------------------------------------------------- +// +void CTsGridItemDrawer::SetStrokeColors( TRgb aColor, + TRgb aHighlightedColor ) + { + iStrokeColor = aColor; + iHighlightStrokeColor = aHighlightedColor; + } + + +// ----------------------------------------------------------------------------- +// CTsGridItemDrawer::SetStrokeItemsL +// ----------------------------------------------------------------------------- +// +void CTsGridItemDrawer::SetStrokeItemsL( RArray& aItemIndex ) + { + iStrokeItems.Close(); + for ( TInt i = 0; i < aItemIndex.Count(); i++ ) + { + iStrokeItems.AppendL( aItemIndex[i] ); + } + } + + +// ----------------------------------------------------------------------------- +// CTsGridItemDrawer::SetStrokeOffset +// ----------------------------------------------------------------------------- +// +void CTsGridItemDrawer::SetStrokeOffset( TPoint aStrokeOffset, TSize aStrokeSize ) + { + iStrokeRect = TRect( aStrokeOffset, aStrokeSize ); + } + + +// ----------------------------------------------------------------------------- +// CTsGridItemDrawer::SetScreenRect +// ----------------------------------------------------------------------------- +// +void CTsGridItemDrawer::SetScreenRect( TRect aRect ) + { + iScreenRect = aRect; + } + + +// ----------------------------------------------------------------------------- // CTsGridItemDrawer::DrawActualItem // ----------------------------------------------------------------------------- // @@ -721,8 +736,6 @@ TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, TBool aItemIsSelected ) const { - TBool feedbackNeed(EFalse);//feedback when item disappear or fully appear - if (IsItemRectVisible(aActualItemRect)) { // Calculate offset of the visible rectangle @@ -736,15 +749,6 @@ drawRect.iBr.iX = iScreenRect.Width() - iRightOffset; } iGc->SetClippingRect(drawRect); - - if(IsRectContained( aActualItemRect, drawRect )) - { - feedbackNeed = iGrid->AddToFullyVisibleItems( aItemIndex ); - } - else - { - feedbackNeed = iGrid->MoveToPartialVisibleItems( aItemIndex ); - } // Check for item highlight TBool itemIsCurrent = !iGrid->IsHighlightVisible() ? EFalse : aItemIsCurrent; @@ -769,7 +773,25 @@ CFormattedCellListBoxItemDrawer::DrawActualItem(aItemIndex, aActualItemRect, itemIsCurrent, aViewIsEmphasized, aViewIsDimmed, aItemIsSelected ); - if ( iGrid->CanCloseItem( aItemIndex ) && iCloseIcon && iCloseIconMask ) + // Draw stroke + if ( iStrokeItems.Find( aItemIndex ) != KErrNotFound ) + { + TRect strokeRect = iStrokeRect; + strokeRect.Move( aActualItemRect.iTl ); + if ( itemIsCurrent ) + { + iGc->SetPenColor( iHighlightStrokeColor ); + } + else + { + iGc->SetPenColor( iStrokeColor ); + } + // Thumbnail stroke + iGc->DrawRect( strokeRect ); + } + + // Draw close button + if ( iGrid->CanCloseItem( aItemIndex ) && iCloseIcon && iCloseIconPressed ) { TRect closeIconRect = GetCloseButtonRect( aActualItemRect ); // Draw frame @@ -778,27 +800,24 @@ MAknsSkinInstance* skin = AknsUtils::SkinInstance(); if ( iGrid->IsItemCloseHit( aItemIndex ) ) { - AknsDrawUtils::DrawFrame(skin, *iGc, outerRect, innerRect, - KAknsIIDQgnFrSctrlButtonPressed, KAknsIIDQgnFrSctrlButtonCenterPressed); + TRect sourceRect( TPoint(0,0), iCloseIconPressed->SizeInPixels() ); + iGc->DrawBitmapMasked( innerRect, + iCloseIconPressed, + sourceRect, + iCloseIconPressedMask, + ETrue ); } else { - AknsDrawUtils::DrawFrame(skin, *iGc, outerRect, innerRect, - KAknsIIDQgnFrSctrlButton, KAknsIIDQgnFrSctrlButtonCenter); + TRect sourceRect( TPoint(0,0), iCloseIcon->SizeInPixels() ); + iGc->DrawBitmapMasked( innerRect, + iCloseIcon, + sourceRect, + iCloseIconMask, + ETrue ); } - // Draw close icon - TRect sourceRect( TPoint(0,0), iCloseIcon->SizeInPixels() ); - iGc->DrawBitmapMasked( innerRect, iCloseIcon, sourceRect, iCloseIconMask, ETrue ); } } - else - { - feedbackNeed = iGrid->RemoveFromVisibleItems(aItemIndex); - } - if(feedbackNeed) - { - iGrid->LaunchTactileFeedback(); - } } // -----------------------------------------------------------------------------