author | Mike Kinghan <mikek@symbian.org> |
Mon, 22 Nov 2010 13:48:58 +0000 | |
branch | GCC_SURGE |
changeset 120 | 10294cf40451 |
parent 21 | 524118fd998f |
permissions | -rwxr-xr-x |
0 | 1 |
// Copyright (c) 2008-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 "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// omap3530\beagle_variant\inc\serialmouse.h |
|
15 |
// Header for serial mouse driver |
|
16 |
// |
|
17 |
||
18 |
#ifndef __VSERIALMOUSE_H__ |
|
19 |
#define __VSERIALMOUSE_H__ |
|
20 |
||
21 |
#include <e32cmn.h> |
|
22 |
#include <assp/omap3530_assp/omap3530_uart.h> |
|
23 |
||
24 |
||
25 |
class TSerialMouse |
|
26 |
{ |
|
27 |
public: |
|
28 |
TSerialMouse(); |
|
29 |
~TSerialMouse(); |
|
30 |
TInt Create(); |
|
31 |
static void Isr(TAny* aPtr); |
|
32 |
TInt HalFunction(TInt aFunction, TAny* a1, TAny* a2); |
|
33 |
||
34 |
private: |
|
35 |
static void KeyDfcFn(TAny* aPtr); |
|
36 |
inline void KeyDfc(); |
|
37 |
||
38 |
TInt Scale(const TInt& aVal); |
|
39 |
void Clip(TInt& aX, TInt& aY); |
|
40 |
void GetScreenInfo(); |
|
41 |
||
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
42 |
// AndyS support for sending keyboard events |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
43 |
void AddKey( TUint aKey ); |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
44 |
|
0 | 45 |
enum TState { ENormal, EEscapingStart, EEscapingType1, EEscapingType2 }; |
46 |
private: |
|
47 |
TDfc iKeyDfc; |
|
48 |
TUint iKey; |
|
49 |
TInt iDebugPort; |
|
50 |
TState iState; |
|
51 |
Omap3530Uart::TUart iUart; |
|
52 |
TUint iPrmClientId; |
|
53 |
||
54 |
private: |
|
55 |
TInt iScreenWidth; |
|
56 |
TInt iScreenHeight; |
|
57 |
TInt iByteIndex; |
|
58 |
TUint8 iB0; |
|
59 |
TUint8 iB1; |
|
60 |
TUint8 iB2; |
|
61 |
TInt iX; |
|
62 |
TInt iY; |
|
63 |
TInt iLastX; |
|
64 |
TInt iLastY; |
|
65 |
TBool iLastLeftButtonDown; |
|
66 |
TBool iLastRightButtonDown; |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
67 |
|
0 | 68 |
#ifdef _FRAME_BUFFER_CURSOR_ |
69 |
void DrawCursor(TInt x, TInt y); |
|
70 |
void Blit(TInt x, TInt y, TUint16 aColour); |
|
71 |
TUint8* iVideoAddress; |
|
72 |
TUint16* iCursorBuffer; |
|
73 |
#endif |
|
74 |
||
75 |
}; |
|
76 |
||
77 |
||
78 |
#endif /* __VSERIALMOUSE_H__ */ |