author | Arnaud Lenoir |
Tue, 27 Jul 2010 14:02:05 +0100 | |
changeset 17 | fc9a6286e87d |
parent 0 | bb4b476bbb96 |
permissions | -rw-r--r-- |
0
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
1 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
2 |
keyboard_chipset_api.h |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
3 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
4 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
5 |
All rights reserved. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
6 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
7 |
This program and the accompanying materials are made available |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
8 |
under the terms of the Eclipse Public License v1.0 which accompanies |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
9 |
this distribution, and is available at |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
10 |
http://www.eclipse.org/legal/epl-v10.html |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
11 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
12 |
Initial Contributors: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
13 |
Nokia Corporation - initial contribution. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
14 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
15 |
Contributors: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
16 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
17 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
18 |
/** @file |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
19 |
@brief Keyboard Chipset API H |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
20 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
21 |
This is the header file for Keyboard Chipset API that is used to access |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
22 |
the matrix keyboard and power key services provided by the third party chipset vendors. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
23 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
24 |
@publishedDeviceAbstraction |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
25 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
26 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
27 |
#ifndef __KEYBOARD_CHIPSET_API_H__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
28 |
#define __KEYBOARD_CHIPSET_API_H__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
29 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
30 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
31 |
// Include files |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
32 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
33 |
#include <kern_priv.h> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
34 |
#include <e32event.h> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
35 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
36 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
37 |
// Constants |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
38 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
39 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
40 |
// Macros |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
41 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
42 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
43 |
// Data types |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
44 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
45 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
46 |
This defines the type of a callback function which is called to |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
47 |
notify a new key event to the client. The callback function is |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
48 |
executed in the context of the calling thread. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
49 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
50 |
typedef void (*TKeyboardEventCbFn)(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
51 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
52 |
// Function prototypes |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
53 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
54 |
// Forward declarations |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
55 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
56 |
// Class declaration |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
57 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
58 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
59 |
This class defines the Chipset API that is used to access |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
60 |
the matrix keyboard service provided by the third party chipset vendors. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
61 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
62 |
class KeyboardMatrix |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
63 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
64 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
65 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
66 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
67 |
This function is used to do the necessary initialization with the given matrix size |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
68 |
so that the chipset is ready to provide the matrix keyboard service. It registers |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
69 |
a callback function which is called to notify a new key event. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
70 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
71 |
@param aSize The size of matrix keyboard that the client is using. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
72 |
@param aCallback The callback function which is called to notify a new key event. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
73 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
74 |
@return Symbian OS system wide error code, and the followings are required: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
75 |
KErrNone – the operation is successfully executed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
76 |
KErrGeneral – error condition; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
77 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
78 |
@pre Pre-condition, it should be called before the other methods in the class are used. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
79 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
80 |
IMPORT_C static TInt Init(TUint aSize, TKeyboardEventCbFn aCallback); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
81 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
82 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
83 |
This function is used to enable the matrix keyboard service. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
84 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
85 |
@return Symbian OS system wide error code, and the followings are required: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
86 |
KErrNone – the operation is successfully executed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
87 |
KErrGeneral – error condition; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
88 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
89 |
@pre Pre-condition, the matrix keyboard service has been initialized successfully. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
90 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
91 |
IMPORT_C static TInt Enable(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
92 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
93 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
94 |
This function is used to disable the matrix keyboard service. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
95 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
96 |
@return Symbian OS system wide error code, and the followings are required: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
97 |
KErrNone – the operation is successfully executed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
98 |
KErrGeneral – error condition; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
99 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
100 |
@pre Pre-condition, the matrix keyboard service has been enabled. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
101 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
102 |
IMPORT_C static TInt Disable(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
103 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
104 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
105 |
This function is used to read the key state of the matrix keyboard. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
106 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
107 |
@param aKeys Reference to the number of keys that are currently pressed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
108 |
If the return value is 0 then it means all the previously pressed keys are released. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
109 |
@param aBuffer Pointer to the buffer where all the key presses shall be reported. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
110 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
111 |
@return Symbian OS system wide error code, and the followings are required: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
112 |
KErrNone – the operation is successfully executed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
113 |
KErrGeneral – error condition; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
114 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
115 |
@pre Pre-condition, the matrix keyboard service has been enabled. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
116 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
117 |
IMPORT_C static TInt Read(TInt& aKeys, TInt* aBuffer); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
118 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
119 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
120 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
121 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
122 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
123 |
This class defines the Chipset API that is used to access |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
124 |
the power key service provided by the third party chipset vendors. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
125 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
126 |
class KeyboardPowerKey |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
127 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
128 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
129 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
130 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
131 |
This function is used to do the necessary initialization so that |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
132 |
the chipset is ready to provide the power key service. It registers |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
133 |
a callback function which is called to notify a new power key event. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
134 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
135 |
@param aCallback The callback function which is called to notify a new power key event. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
136 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
137 |
@return Symbian OS system wide error code, and the followings are required: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
138 |
KErrNone – the operation is successfully executed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
139 |
KErrGeneral – error condition; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
140 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
141 |
IMPORT_C static TInt Init(TKeyboardEventCbFn aCallback); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
142 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
143 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
144 |
This function is used to read the key state of the power key. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
145 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
146 |
@param aState Reference to the variable that contains the power key state. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
147 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
148 |
@return Symbian OS system wide error code, and the followings are required: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
149 |
KErrNone – the operation is successfully executed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
150 |
KErrGeneral – error condition; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
151 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
152 |
IMPORT_C static TInt Read(TRawEvent::TType& aState); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
153 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
154 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
155 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
156 |
#endif // __KEYBOARD_CHIPSET_API_H__ |