|
1 /* |
|
2 * Copyright (c) 2008 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: Common defines for Contact Action Menu |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FSCCONTACTACTIONMENUDEFINES_H |
|
20 #define FSCCONTACTACTIONMENUDEFINES_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 // DEFINES |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 // TYPEDEFS |
|
29 |
|
30 // CONSTS |
|
31 const TUid KFscDefaultItemUid = { 0 }; |
|
32 |
|
33 // ENUMS |
|
34 |
|
35 /** |
|
36 * Action Menu positions |
|
37 * Position is used by client application to specify |
|
38 * Action Menu's vertical position |
|
39 */ |
|
40 // <cmail> Touch |
|
41 enum TFscContactActionMenuPosition |
|
42 { |
|
43 EFscTop, |
|
44 EFscCenter, |
|
45 EFscBottom, |
|
46 EFscCustom |
|
47 }; |
|
48 // </cmail> |
|
49 |
|
50 /** |
|
51 * Action Menu modes |
|
52 * In EFscContactActionMenuModeNormal mode Action Menu works |
|
53 * like a normal modal dialog. In EFscContactActionMenuModeAI mode |
|
54 * number key events close the menu without consuming the events. |
|
55 * AI Mode is intended to be used in Active Idle when it must be |
|
56 * possible to start an emergency call while Action Menu is open |
|
57 */ |
|
58 enum TFscContactActionMenuMode |
|
59 { |
|
60 EFscContactActionMenuModeNormal, |
|
61 EFscContactActionMenuModeAI |
|
62 }; |
|
63 |
|
64 /** |
|
65 * Action Menu execution result codes |
|
66 * |
|
67 * EFscMenuDismissed is used when Action Menu is closed with cancel key etc. |
|
68 * EFscMenuDismissedAIMode is used when menu is in AI mode and for example |
|
69 * numberic key is pressed |
|
70 * EFscCasItemSelectedAndExecuted is used when CAS item was selected from the menu |
|
71 * EFscCustomItemSelected is used when custom (non-CAS) item was selected from the menu. |
|
72 * Client of AM needs to take care of custom action execution. |
|
73 */ |
|
74 enum TFscActionMenuResult |
|
75 { |
|
76 EFscMenuDismissed, |
|
77 EFscMenuDismissedAIMode, |
|
78 EFscCasItemSelectedAndExecuting, |
|
79 EFscCasItemSelectedAndExecuted, |
|
80 EFscCustomItemSelected |
|
81 }; |
|
82 |
|
83 // <cmail> |
|
84 /** |
|
85 * Interface for asking the menu launcher for menu position |
|
86 */ |
|
87 class MFsActionMenuPositionGiver |
|
88 { |
|
89 public: |
|
90 /** |
|
91 * The action menu asks through this function where it should place itself |
|
92 * |
|
93 * @return The action menu position |
|
94 */ |
|
95 virtual TPoint ActionMenuPosition() = 0; |
|
96 }; |
|
97 |
|
98 // </cmail> |
|
99 |
|
100 #endif // FSCCONTACTACTIONMENUDEFINES_H |