271
|
1 |
// Copyright (c) 2010 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 |
// e32test\window\d_keyrepeat.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#if !defined(__D_KEYREPEAT_H__)
|
|
19 |
#define __D_KEYREPEAT_H__
|
|
20 |
|
|
21 |
#include <e32cmn.h>
|
|
22 |
#include <e32keys.h>
|
|
23 |
#ifndef __KERNEL_MODE__
|
|
24 |
#include <e32std.h>
|
|
25 |
#endif
|
|
26 |
|
|
27 |
_LIT(KLddName,"D_KEYREPEAT.LDD");
|
|
28 |
|
|
29 |
|
|
30 |
// class RKeyEvent
|
|
31 |
class RKeyEvent
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
RKeyEvent();
|
|
35 |
RKeyEvent(TStdScanCode aKey, TInt aRepeatCount);
|
|
36 |
public:
|
|
37 |
TStdScanCode iKey;
|
|
38 |
TInt iRepeatCount;
|
|
39 |
};
|
|
40 |
|
|
41 |
// class RTestKeyRepeatLdd
|
|
42 |
class RTestKeyRepeatLdd : public RBusLogicalChannel
|
|
43 |
{
|
|
44 |
public:
|
|
45 |
|
|
46 |
enum TControl
|
|
47 |
{
|
|
48 |
ESetRepeat=1,
|
|
49 |
ERepeats
|
|
50 |
};
|
|
51 |
|
|
52 |
public:
|
|
53 |
inline TInt Open();
|
|
54 |
inline TInt SetRepeat(RKeyEvent &aEvent);
|
|
55 |
inline TInt Repeats();
|
|
56 |
};
|
|
57 |
|
|
58 |
// inlines
|
|
59 |
#ifndef __KERNEL_MODE__
|
|
60 |
inline TInt RTestKeyRepeatLdd::Open()
|
|
61 |
{
|
|
62 |
return DoCreate(KLddName,TVersion(0,1,0),KNullUnit,NULL,NULL);
|
|
63 |
}
|
|
64 |
|
|
65 |
inline TInt RTestKeyRepeatLdd::SetRepeat(RKeyEvent &aEvent)
|
|
66 |
{
|
|
67 |
return DoControl(ESetRepeat,&aEvent);
|
|
68 |
}
|
|
69 |
|
|
70 |
inline TInt RTestKeyRepeatLdd::Repeats()
|
|
71 |
{
|
|
72 |
return DoControl(ERepeats);
|
|
73 |
}
|
|
74 |
|
|
75 |
#endif //__KERNEL_MODE__
|
|
76 |
|
|
77 |
#endif //__D_KEYREPEAT_H__
|