Namespaces
Variants
Actions
Revision as of 09:34, 26 July 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ScShortcuts Engine Wrapper API

Jump to: navigation, search
Article Metadata

Code Example
Article
Created: ltomuta (16 Jun 2007)
Last edited: hamishwillee (26 Jul 2012)
Note.png
Note: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.

Contents

APIPurpose

This API can be used to change the softkey shortcuts in Active Idle Screen of the S60 3rd Edition phones.

Use cases

To assign shortcut for S60 Calendar application.In the active idle screen we will get left soft key option for launching Calendar

Example code

Header Files

#include<MScShortcutEngineWrapperObserver.h>
#include<cscshortcutenginewrapper.h>

Library : scshortcutenginewrapper.lib

Capabities Required : ReadUserData ReadDeviceData WriteDeviceData

  1. Derive your class from MScShortcutEngineWrapperObserver
  2. Provide implementations for MScShortcutEngineWrapperObserver::HandleShortcutEvent() and MScShortcutEngineWrapperObserver::HandleShortcutError() methods.
  3. Create an object for CScShortcutWrapper
  4. Call AsynchronouslyPrepareShortcutListL(RPointerArray&).If the list gets created successfully then MScShortcutEngineWrapperObserver::HandleShortcutEvent() will be called along with "EShortcutListComplete" event.
  5. Inside MScShortcutEngineWrapperObserver::HandleShortcutEvent() implementation call CScShortcutWrapper::SetShortcutL( ).The index which we pass as argument to the above mentioned API call will decide the application as to which we are creating the shorcut for.
RFs iSession;
CScShortcutEngineWrapper* iShortcut;
RPointerArray<CScWrapperShortcut> iPArray;
 
//In the ConstructL
iSession.Connect();
iShortcut=CScShortcutEngineWrapper::NewL(iSession,*this);
iShortcut->AsynchronouslyPrepareShortcutListL(iPArray);
//Implementing MScShortcutEngineWrapperObserver::HandleShortcutEvent() method
void CShortCutEngineUsage::HandleShortcutEvent( TScShortcutEvent aEvent )
{
if(aEvent==EShortcutListComplete)
{
//note here 1 is the index to denote that we are creating a shortcut for calendar application
iShortcut->SetShorcutL(CScShortcutEngineWrapper::EKeyTypeLeft,1)
}
 
}

Example Project

File:ShortCutExample.zip

130 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved