1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 class MCoeControlObserver
25 /** Interface for a control to send events to its observer control.
31 /** Observer event types. */
35 This event is used to indicate exit from a mode when
36 the user has completed an operation 'successfully'. For example, this
37 event might be sent when the user has a choice list open and presses
38 enter to select an item. The UI Control Framework does not use this
42 This event is used to indicate exit from a mode when the user has cancelled
43 the operation that caused entry into the mode originally. For example, this
44 event might be sent when the user presses escape to close the list and leave
45 the choice as it was. The UI Control Framework does not use this event itself. */
48 This event is notified by the UI Control Framework during pointer down event
49 processing after EEventPrepareFocusTransition is handled. */
51 /** Prepare focus transition.
52 This event is notified by the UI Control Framework during pointer down event
53 processing if the control does not yet have, but could get, focus. */
54 EEventPrepareFocusTransition,
56 This event can be used by a control to report that some piece of internal
57 data has changed, and hence that any observer should be notified accordingly.
58 The UI Control Framework does not use this value itself. */
60 /** Interaction refused.
61 This event is notified by the UI Control Framework during pointer down event
62 processing if the control is dimmed (disabled). */
63 EEventInteractionRefused
66 /** Handles an event from an observed control.
68 This function is called when a control for which this control is the observer
69 calls CCoeControl::ReportEventL(). It should be implemented by the observer
70 control, and should handle all events sent by controls it observes.
72 @param aControl The control that sent the event.
73 @param aEventType The event type. */
74 virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)=0;
76 IMPORT_C MCoeControlObserver();
79 IMPORT_C virtual void MCoeControlObserver_Reserved1();
80 IMPORT_C virtual void MCoeControlObserver_Reserved2();
83 TInt iMCoeControlObserver_Reserved1;
86 class MCoeControlStateObserver
87 /** This class defines an interface which will given notification of when a CCoeControl
88 changes its visibility or dimmed state.
93 friend class CCoeControl;
95 /** The MObjectProvider framework should use this UID to know when to return a concrete instance of this interface. */
96 DECLARE_TYPE_ID(0x10285A45)
99 /** This enum is used to say that the control has changed its Dimmed state */
101 /** This enum is used to say that the control has changed its Visibility state */
106 If an object implementing this interface has been attached to the MObjectProvider
107 hierarchy in which a CCoeControl is a member, any call to the CCoeControl's
108 SetDimmed() or MakeVisible() (that results in an actual state change) will trigger
109 a call to this interface.
111 @param aControl A pointer to the control that has changed.
112 @param aState An enum from TCoeState to say how the control has changed.
113 @return A system wide error code, currently ignored but may not be in future.*/
114 virtual TInt HandleControlStateChange(CCoeControl* aControl,TCoeState aState)=0;
117 #endif // __COECOBS_H__