1 /* |
|
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Interface used by AP to report events and request services |
|
15 * from client application |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 * @file ActivePalette2Observer.h |
|
23 * Interface used by AP to report events and request services from |
|
24 * client application |
|
25 */ |
|
26 |
|
27 |
|
28 #ifndef _ACTIVE_PALETTE_2_OBSERVER_H |
|
29 #define _ACTIVE_PALETTE_2_OBSERVER_H |
|
30 |
|
31 #include <e32std.h> |
|
32 |
|
33 class TActivePalette2EventData; |
|
34 |
|
35 /** |
|
36 * Interface for an Active Palette 2 observer. The AP will use this interface to inform the client app |
|
37 * about certain events, and to request services. |
|
38 */ |
|
39 class MActivePalette2Observer |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Called when a new item is focused |
|
44 * @param aPrevItem Item ID of previously focused item |
|
45 * @param aFocusedItem Item ID of newly focused item |
|
46 */ |
|
47 virtual void NotifyItemFocused(TInt aPrevItem, TInt aFocusedItem) = 0; |
|
48 |
|
49 /** |
|
50 * Called when the user has selected an item from the AP, before the plugin is informed |
|
51 * @param aEvent The event data |
|
52 */ |
|
53 virtual void NotifyItemSelected(const TActivePalette2EventData& aEvent) = 0; |
|
54 |
|
55 /** |
|
56 * Called when the user has selected an item from the AP, after the relevant plugin |
|
57 * has completed processing the event |
|
58 * @param aEvent The event data |
|
59 * @param aDataDes Data descriptor |
|
60 * @param aDataInt Data integer |
|
61 */ |
|
62 virtual void NotifyItemComplete(const TActivePalette2EventData& aEvent, |
|
63 const TDesC8& aDataDes, |
|
64 TInt aDataInt) = 0; |
|
65 |
|
66 /** |
|
67 * Called when a plugin generates a message for the client app. |
|
68 * @param aEvent The event data |
|
69 * @param aMessageID The ID of the message |
|
70 * @param aDataDes Data descriptor |
|
71 * @param aDataInt Data integer |
|
72 */ |
|
73 virtual void NotifyMessage(const TActivePalette2EventData& aEvent, |
|
74 TInt aMessageID, |
|
75 const TDesC8& aDataDes, |
|
76 TInt aDataInt) = 0; |
|
77 |
|
78 /** |
|
79 * Request for the client app to redraw the given area underneath the AP. Used to support semi-transparency. |
|
80 * It is important that this completes quickly. This will only be called if a CCoeControl-derived AP is |
|
81 * in use. |
|
82 * @param aArea The area to redraw. |
|
83 */ |
|
84 virtual void Redraw(const TRect& aArea) = 0; |
|
85 |
|
86 /** |
|
87 * Informs the observer that the AP has been updated in some way. Includes animations. |
|
88 * Only called if SetGc() has previously been called on the AP with a non-NULL parameter, and if the AP |
|
89 * in use is a CCoeControl. |
|
90 */ |
|
91 virtual void ActivePaletteUpdated(void) = 0; |
|
92 }; |
|
93 |
|
94 #endif // _ACTIVE_PALETTE_2_OBSERVER_H |
|