|
1 /* |
|
2 * Copyright (c) 2007 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: Definition of the commonly used custom event ids. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ALFWIDGETEVENTS_H |
|
20 #define ALFWIDGETEVENTS_H |
|
21 |
|
22 namespace Alf |
|
23 { |
|
24 /** |
|
25 * The list of commonly used custom event ids. |
|
26 * The widget-specific ids should use values from ELastCommonWidgetEvent. |
|
27 * |
|
28 * @lib alfwidgetmodel.lib |
|
29 * @since S60 ?S60_version |
|
30 */ |
|
31 enum CommonWidgetEvent |
|
32 { |
|
33 EEventActivateState = 0, |
|
34 EEventDeactivateState = 1, |
|
35 EEventWidgetInitialized = 2, |
|
36 EEventSetFocus = 3, |
|
37 EEventClearFocus = 4, |
|
38 EEventFocusedItemTypeChanged = 5, |
|
39 EEventItemSelected = 6, |
|
40 EEventNavigatePrimaryNext = 7, |
|
41 EEventNavigatePrimaryPrev = 8, |
|
42 EEventNavigateSecondaryNext = 9, |
|
43 EEventNavigateSecondaryPrev = 10, |
|
44 EEventNavigateLeft = 11, |
|
45 EEventNavigateRight = 12, |
|
46 EEventNavigateUp = 13, |
|
47 EEventNavigateDown = 14, |
|
48 EEventScrollToTarget = 15, |
|
49 EEventScrollPrimaryNext = 16, |
|
50 EEventScrollPrimaryPrev = 17, |
|
51 EEventScrollSecondaryNext = 18, |
|
52 EEventScrollSecondaryPrev = 19, |
|
53 EEventScrollToFirst = 20, |
|
54 EEventScrollToLast = 21, |
|
55 EEventScrollUp = 22, |
|
56 EEventScrollDown = 23, |
|
57 EEventScrollLeft = 24, |
|
58 EEventScrollRight = 25, |
|
59 EEventScrollPageUp = 26, |
|
60 EEventScrollPageDown = 27, |
|
61 EEventScrollPageLeft = 28, |
|
62 EEventScrollPageRight = 29, |
|
63 EEventScrollBarModelChanged = 30, |
|
64 EEventFocusNextWidget = 31, |
|
65 EEventFocusPreviousWidget = 32, |
|
66 EEventWidgetGainedFocus = 33, |
|
67 EEventWidgetLostFocus = 34, |
|
68 EEventWidgetAttributeChanged = 35, |
|
69 EEventWidgetPresentationDestroyed = 36, |
|
70 EEventDragVertical = 37, |
|
71 EEventDragHorizontal = 38, |
|
72 EEventMissedPointerUp = 39, |
|
73 ELastCommonWidgetEvent = 99 |
|
74 }; |
|
75 |
|
76 /** |
|
77 * OSN pointer event enumeration. |
|
78 * |
|
79 * @lib alfwidgetmodel.lib |
|
80 * @since S60 ?S60_version |
|
81 */ |
|
82 enum WidgetPointerEvent |
|
83 { |
|
84 pointerEventDown = ELastCommonWidgetEvent + 1, |
|
85 pointerEventUp, |
|
86 pointerEventDrag |
|
87 }; |
|
88 |
|
89 /** |
|
90 * Event type flags. |
|
91 */ |
|
92 enum EventTypeFlags |
|
93 { |
|
94 custom = 0x0001, // custom event |
|
95 keyDown = 0x0002, // key down event, key repeat generates this event also |
|
96 keyUp = 0x0004, // key up event |
|
97 |
|
98 /** Flag to indicate that the custom event data |
|
99 * should be used to determine the accepted events. |
|
100 * Can not be used with key events. |
|
101 */ |
|
102 useEventData = 0x8000 |
|
103 }; |
|
104 |
|
105 /** |
|
106 * Key event modifiers. |
|
107 */ |
|
108 enum KeyEventModifiers |
|
109 { |
|
110 alt = 0x0001, |
|
111 ctrl = 0x0002, |
|
112 shift = 0x0004, |
|
113 func = 0x0008, |
|
114 capsLock = 0x0010, |
|
115 numLock = 0x0020, |
|
116 scrollLock = 0x0040 |
|
117 }; |
|
118 |
|
119 } // namespace Alf |
|
120 |
|
121 #endif // ALFWIDGETEVENTS_H |