revert between 56095 -> 55830 in arch
[AROS.git] / rom / devs / input / input_intern.h
blob3d0cc6065acefd9e8613355a5fe7bc8f5937fb3e
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Internal definitions for the input.device
6 Lang: english
7 */
9 #ifndef INPUT_INTERN_H
10 #define INPUT_INTERN_H
12 #ifndef AROS_LIBCALL_H
13 # include <aros/libcall.h>
14 #endif
15 #ifndef EXEC_EXECBASE_H
16 # include <exec/execbase.h>
17 #endif
18 #ifndef EXEC_DEVICES_H
19 # include <exec/devices.h>
20 #endif
21 #ifndef DOS_DOS_H
22 # include <dos/dos.h>
23 #endif
24 #ifndef EXEC_SEMAPHORES_H
25 # include <exec/semaphores.h>
26 #endif
27 #include <devices/input.h>
28 #ifndef DEVICES_INPUTEVENT_H
29 # include <devices/inputevent.h>
30 #endif
31 #ifndef DEVICES_TIMER_H
32 # include <devices/timer.h>
33 #endif
35 /* Size of the input device's stack */
36 #define IDTASK_STACKSIZE (AROS_STACKSIZE + 10240)
38 /* Priority of the input.device task */
39 #define IDTASK_PRIORITY 20
41 /* Default key repeat threshold/interval in 1/50 secs */
43 #define DEFAULT_KEY_REPEAT_THRESHOLD 25
44 #define DEFAULT_KEY_REPEAT_INTERVAL 2
46 struct inputbase
48 struct InputDevice pub;
50 /* The stuff below will never get deallocated, since
51 ** input device is never removed, once it's initialized.
53 struct Task *InputTask;
54 struct MsgPort *CommandPort;
55 struct MinList HandlerList;
56 struct InputEvent *EventQueueHead;
57 struct InputEvent *EventQueueTail;
58 struct timeval KeyRepeatThreshold;
59 struct timeval KeyRepeatInterval;
60 ULONG ResetSig;
61 UWORD ActQualifier;
62 UBYTE Prev1DownCode;
63 UBYTE Prev1DownQual;
64 UBYTE Prev2DownCode;
65 UBYTE Prev2DownQual;
68 /* Prototypes */
69 VOID ProcessEvents(struct inputbase *InputDevice);
70 struct Task *CreateInputTask(APTR taskparams,
71 struct inputbase *InputDevice);
72 VOID AddEQTail(struct InputEvent *ie, struct inputbase *InputDevice);
73 struct InputEvent *GetEventsFromQueue(struct inputbase *InputDevice);
74 BOOL IsQualifierKey(UWORD key);
75 BOOL IsRepeatableKey(UWORD key);
77 #endif /* INPUT_INTERN_H */