|
||
class CCoeFep : public CBase, protected MFepAttributeStorer, public MCoeForegroundObserver, public MCoeFocusObserver, private
MCoeMessageObserver;
Abstract base class for all FEPs.
FEP authors must derive a class from CCoeFep. The CCoeFep-derived class should implement all of its pure virtual functions including the ones which CCoeFep inherits from its base classes. For information on these functions, see the documentation of the base classes. The global NewFepL() function is used to create a fully initialised object of the derived class.
FEPs that need to intercept key events should own a CCoeControl-derived object. This object is referred to as the FEP control. The FEP control should be added to the control stack at a priority of ECoeStackPriorityFep, so that it receives first refusal of key events from the window server.
In general, focus is retained by the underlying application. This has the advantage that the user can see where the output
produced by the FEP will go. When focus is switched between controls, the FEP must be notified in case the input capability
of the focussed control changes. For instance, the FEP needs to prevent the user composing a large amount of text only for
it to be passed to a newly focussed control that cannot accept text input. CCoeFep derives from MCoeFocusObserver
, which enables FEPs to receive notification when the focus for the underlying control changes. The implementation of MCoeFocusObserver's
functions can call the enquiry functions of class TCoeInputCapabilities to find out what input capabilities are supported
by the new target control (you need to get the TCoeInputCapabilities object from the application UI first: see CCoeAppUi::InputCapabilities()).
MCoeMessageObserver
- Interface for handling incoming window server messages.
MCoeFocusObserver
- Interface providing notification if any control gains or loses focus or is destr...
MCoeForegroundObserver
- Interface providing notification of foreground/background changes.
MFepAttributeStorer
- Protocol for storing, restoring and synchronising FEP attributes.
CBase
-
Base class for all classes to be instantiated on the heap.
CCoeFep
- Abstract base class for all FEPs.
Defined in CCoeFep
:
BaseConstructL(const CCoeFepParameters &)
Initialises the FEP's generic settings (whether the FEP is on or off and what ke...CCoeFep(CCoeEnv &)
Protected C++ constructor.CCoeFep_Reserved_1()
CCoeFep_Reserved_2()
CancelTransaction()
Cancels the FEP transaction.EEventWasConsumed
< Indicates that the FEP did process the event. EEventWasNotConsumed
HandleMessageL(TUint32,TUid,const TDesC8 &)
IsOn()const
Tests whether the FEP is on or off.IsOnHasChangedState()
Called to notify the FEP that it has either just been turned on or just been tur...IsSimulatingKeyEvent()const
Tests whether or not the FEP is simulating key events.IsTurnedOffByL(const TKeyEvent &)const
Since the advent of Platform security in Symbian OS, the turning on/off of FEPs ...IsTurnedOnByL(const TKeyEvent &)const
Since the advent of Platform security in Symbian OS, the turning on/off of FEPs ...MCoeFocusObserver_Reserved_1()
MCoeFocusObserver_Reserved_2()
MCoeForegroundObserver_Reserved_1()
MCoeForegroundObserver_Reserved_2()
MCoeMessageObserver_Reserved_1()
MCoeMessageObserver_Reserved_2()
MDeferredFunctionCall
Enables FEPs to have some code called but not in the context of the current call...MFepAttributeStorer_Reserved_1()
MFepAttributeStorer_Reserved_2()
MModifiedCharacter
FEPs send character codes to the application underneath them using CCoeFep::Simu...MakeDeferredFunctionCall(MDeferredFunctionCall &)
Uses a high-priority active object to call the specified object's ExecuteFunctio...OfferKeyEventL(TEventResponse &,const TKeyEvent &,TEventCode)
OfferPointerBufferReadyEventL(TEventResponse &,const CCoeControl *)
OfferPointerEventL(TEventResponse &,const TPointerEvent &,const CCoeControl *)
ReadAllAttributesL()
Sets this FEP's attributes with values from the global settings.SimulateKeyEventsL(const TArray< MModifiedCharacter > &)
SimulateKeyEventsL(const TArray< TUint > &)
Simulates a key event for each of the character codes in the array passed to it.TEventResponse
Response to key or pointer event WriteAttributeDataAndBroadcastL(TUid)
After changing the value of a single FEP attribute that needs to be synchronised...WriteAttributeDataAndBroadcastL(const TArray< TUid > &)
After changing the value of multiple FEP attributes that need to be synchronised...~CCoeFep()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from MCoeFocusObserver
:
HandleChangeInFocus()
Handles changes in focus. The function is called if any control gains or loses f...HandleDestructionOfFocusedItem()
Handles the destruction of any control. It is called by the framework if any con...Inherited from MCoeForegroundObserver
:
HandleGainingForeground()
Handles the application coming to the foreground. HandleLosingForeground()
Handles the application going into the background. Inherited from MCoeMessageObserver
:
EMessageHandled
Message handled. EMessageNotHandled
Message not handled. TMessageResponse
Message response flags. Inherited from MFepAttributeStorer
:
AttributeAtIndex(TInt)const
Returns the UID of the FEP attribute at the index specified.NumberOfAttributes()const
Returns the total number of FEP attributes.ReadAllAttributesL(CCoeEnv &)
Reads all of the FEP's attributes from the system settings.ReadAttributeDataFromStreamL(TUid,RReadStream &)
Reads the value of the attribute identified by the UID specified in aAttributeUi...WriteAttributeDataAndBroadcastL(CCoeEnv &,TUid)
Call this function after changing the value of an attribute that needs to be syn...WriteAttributeDataAndBroadcastL(CCoeEnv &,const TArray< TUid > &)
Call this function after changing the value of multiple attributes that need to ...WriteAttributeDataToStreamL(TUid,RWriteStream &)const
Writes the value of the attribute specified to the specified write stream.IMPORT_C virtual ~CCoeFep();
Destructor.
Removes the FEP from the control environment's message observer list prior to its destruction.
protected: IMPORT_C CCoeFep(CCoeEnv &aConeEnvironment);
Protected C++ constructor.
This function should be called from within the FEP's constructor.
|
IMPORT_C TBool IsSimulatingKeyEvent() const;
Tests whether or not the FEP is simulating key events.
This function should be called early in the FEP's implementation of CCoeFep::OfferKeyEventL(TEventResponse &,const TKeyEvent &,TEventCode)
. If it returns ETrue, CCoeFep::OfferKeyEventL(TEventResponse &,const TKeyEvent &,TEventCode)
should immediately return EKeyWasNotConsumed so that the application gets the key event as intended.
It is called by the FEP_START_KEY_EVENT_HANDLER_L and FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L macros.
|
Interface status: | deprecated |
IMPORT_C TBool IsTurnedOnByL(const TKeyEvent &aKeyEvent) const;
Since the advent of Platform security in Symbian OS, the turning on/off of FEPs is handled via a different means (which is secure). Hence this function now only ever returns EFalse.
|
|
Interface status: | deprecated |
IMPORT_C TBool IsTurnedOffByL(const TKeyEvent &aKeyEvent) const;
Since the advent of Platform security in Symbian OS, the turning on/off of FEPs is handled via a different means (which is secure). Hence this function now only ever returns EFalse.
|
|
virtual void CancelTransaction()=0;
Cancels the FEP transaction.
A FEP transaction begins when an event is first intercepted by the FEP and ends either when the processed text is committed to the application underneath, or if it is cancelled.
protected: IMPORT_C void BaseConstructL(const CCoeFepParameters &aFepParameters);
Initialises the FEP's generic settings (whether the FEP is on or off and what key events should turn it on or off).
During construction, all FEPs must call this member function. It also initialises the FEP as an observer so that it receives notification of changes from the control environment. Examples of such changes are the target control gaining or losing focus or changes to the generic FEP settings made by another running instance of the same FEP.
|
protected: IMPORT_C void ReadAllAttributesL();
Sets this FEP's attributes with values from the global settings.
Calls the FEP's implementation of MFepAttributeStorer::ReadAttributeDataFromStreamL(TUid,RReadStream &)
for each FEP attribute which needs to be synchronised.
protected: IMPORT_C void MakeDeferredFunctionCall(MDeferredFunctionCall &aDeferredFunctionCall);
Uses a high-priority active object to call the specified object's ExecuteFunctionL().
This function must be used to handle an event if that event starts a transaction and if handling that event is dependent on
the target control's input capabilities. In such a case, CCoeFep::MakeDeferredFunctionCall(MDeferredFunctionCall &)
should be called by the FEP, (passing in the relevant MDeferredFunctionCall-derived object) before calling HandleStartOfTransactionL().
Note:
The reason why key event handling must be done inside a high priority active object is as follows:
In some UI situations, pressing a key should move focus to a previously non-focused or non-existent text editor control, and should insert the character corresponding to that key event into the newly focused control.
When text entry is via a FEP, for this focus-shift to occur at the right time, when the FEP receives its first key event,
it should call MCoeFepObserver::HandleStartOfTransactionL()
. The implementation of this function should do whatever focus shift is required (e.g. launch the dialog).
However, if it is a waiting dialog, text cannot now be entered into the FEP until the dialog's RunLD() or ExecuteLD() returns (this occurs when the dialog is either cancelled or committed). Therefore, HandleStartOfTransactionL() will block. The solution is for the FEP to handle the key event from within a high priority active object.
|
protected: IMPORT_C void SimulateKeyEventsL(const TArray< TUint > &aArrayOfCharacters);
Simulates a key event for each of the character codes in the array passed to it.
This function should be called in order to send key events to the application underneath the FEP (unless inline editing is
taking place, in which case a different mechanism is used). FEPs should not use CCoeEnv::SimulateKeyEventL(const TKeyEvent &,TEventCode)
to simulate key events.
|
protected: IMPORT_C void SimulateKeyEventsL(const TArray< MModifiedCharacter > &aArrayOfModifiedCharacters);
|
Capability: | WriteDeviceData |
protected: IMPORT_C void WriteAttributeDataAndBroadcastL(TUid aAttributeUid);
After changing the value of a single FEP attribute that needs to be synchronised, call this function to synchronise other running instances of the FEP.
It first calls MFepAttributeStorer::WriteAttributeDataToStreamL(TUid,RWriteStream &)const
which writes the attribute's new value to the stream and then it causes all other running instances of the FEP to be notified
of the change.
|
Capability: | WriteDeviceData |
protected: IMPORT_C void WriteAttributeDataAndBroadcastL(const TArray< TUid > &aAttributeUids);
After changing the value of multiple FEP attributes that need to be synchronised, call this function to synchronise other running instances of the FEP.
It first calls MFepAttributeStorer::WriteAttributeDataToStreamL(TUid,RWriteStream &)const
which writes the attributes' new values to the stream and then it causes all other running instances of the FEP to be notified
of the changes.
|
protected: IMPORT_C TBool IsOn() const;
Tests whether the FEP is on or off.
|
private: IMPORT_C virtual TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const
TDesC8 &aMessageParameters);
|
|
private: virtual void IsOnHasChangedState()=0;
Called to notify the FEP that it has either just been turned on or just been turned off (it can find out which by calling
CCoeFep::IsOn()const
).
If FEPs want to change their appearance when they are off (e.g. make themselves invisible), then they should implement this function accordingly.
Interface status: | deprecated |
private: inline virtual void OfferKeyEventL(TEventResponse &, const TKeyEvent &, TEventCode);
|
Interface status: | deprecated |
private: inline virtual void OfferPointerEventL(TEventResponse &, const TPointerEvent &, const CCoeControl *);
|
Interface status: | deprecated |
private: inline virtual void OfferPointerBufferReadyEventL(TEventResponse &, const CCoeControl *);
|
class MDeferredFunctionCall;
Enables FEPs to have some code called but not in the context of the current call stack, hence the name "deferred".
For an explanation of the intended use of this class, see CCoeFep::MakeDeferredFunctionCall(MDeferredFunctionCall &)
.
Defined in CCoeFep::MDeferredFunctionCall
:
ExecuteFunctionL()
This function is called from within a high-priority active object's RunL() short...MDeferredFunctionCall_Reserved_1()
MDeferredFunctionCall_Reserved_2()
ExecuteFunctionL()
virtual void ExecuteFunctionL()=0;
This function is called from within a high-priority active object's RunL() shortly after the active object has been queued
by calling CCoeFep::MakeDeferredFunctionCall(MDeferredFunctionCall &)
.
MDeferredFunctionCall_Reserved_1()
private: IMPORT_C virtual void MDeferredFunctionCall_Reserved_1();
MDeferredFunctionCall_Reserved_2()
private: IMPORT_C virtual void MDeferredFunctionCall_Reserved_2();
class MModifiedCharacter;
FEPs send character codes to the application underneath them using CCoeFep::SimulateKeyEventsL(const TArray< TUint > &)
. Occasionally a FEP may wish to also specify the modifiers (e.g. Fn, Ctrl, Shift) to be sent with that character code. In
this case, they should use the overload of CCoeFep::SimulateKeyEventsL(const TArray< TUint > &)
which takes an array of MModifiedCharacters.
Defined in CCoeFep::MModifiedCharacter
:
CharacterCode()const
Returns the character code of the key combination.MModifiedCharacter_Reserved_1()
MModifiedCharacter_Reserved_2()
ModifierMask()const
Returns a TUint which indicates which modifiers to override, rather than using t...ModifierValues()const
Returns a TUint which indicates which of the modifiers specified in the mask (re...CharacterCode()const
virtual TUint CharacterCode() const=0;
Returns the character code of the key combination.
|
ModifierMask()const
virtual TUint ModifierMask() const=0;
Returns a TUint which indicates which modifiers to override, rather than using the current state of the keyboard's modifiers.
|
ModifierValues()const
virtual TUint ModifierValues() const=0;
Returns a TUint which indicates which of the modifiers specified in the mask (returned by CCoeFep::MModifiedCharacter::ModifierMask()const
) must be on and which must be off.
|
MModifiedCharacter_Reserved_1()
private: IMPORT_C virtual void MModifiedCharacter_Reserved_1();
MModifiedCharacter_Reserved_2()
private: IMPORT_C virtual void MModifiedCharacter_Reserved_2();
TEventResponse
Response to key or pointer event
|