fix some flag usage in mmakefiles. provide suitable names for amiga hardware devices...
[AROS.git] / arch / m68k-amiga / hidd / keyboard / kbd.h
blob884cc6926ece84231406f10872a025aa1890bfda
1 #ifndef HIDD_KBD_H
2 #define HIDD_KBD_H
4 /*
5 Copyright © 1995-2018, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Include for the kbd HIDD.
9 Lang: English.
12 #ifndef EXEC_LIBRARIES_H
13 # include <exec/libraries.h>
14 #endif
16 #ifndef OOP_OOP_H
17 # include <oop/oop.h>
18 #endif
20 #ifndef EXEC_SEMAPHORES_H
21 # include <exec/semaphores.h>
22 #endif
24 #ifndef EXEC_INTRERRUPTS_H
25 # include <exec/interrupts.h>
26 #endif
28 #include <dos/bptr.h>
30 /****************************************************************************************/
32 /***** Kbd HIDD *******************/
34 /* IDs */
35 #define IID_Hidd_HwKbd "hidd.kbd.hw"
36 #define CLID_Hidd_HwKbd "hidd.kbd.hw"
38 /* Methods */
39 enum
41 moHidd_Kbd_HandleEvent
44 struct pHidd_Kbd_HandleEvent
46 OOP_MethodID mID;
47 ULONG event;
50 /* misc */
52 struct abdescr
54 STRPTR interfaceid;
55 OOP_AttrBase *attrbase;
58 struct kbd_staticdata
60 struct SignalSemaphore sema; /* Protexting this whole struct */
61 struct Interrupt kbint;
62 struct Resource *ciares;
63 struct timerequest *timerio;
64 struct Library *TimerBase;
66 OOP_Class *kbdclass;
67 OOP_Object *kbdhidd;
69 OOP_AttrBase hiddAB;
70 OOP_AttrBase hiddKbdAB;
72 OOP_MethodID hiddKbdBase;
74 BPTR cs_SegList;
75 struct Library *cs_OOPBase;
78 struct kbdbase
80 struct Library library;
81 struct kbd_staticdata ksd;
84 struct kbd_data
86 VOID (*kbd_callback)(APTR, UWORD);
87 APTR callbackdata;
88 struct Library *TimerBase;
89 UBYTE resetstate;
92 /****************************************************************************************/
94 BOOL obtainattrbases(struct abdescr *abd, struct Library *OOPBase);
95 VOID releaseattrbases(struct abdescr *abd, struct Library *OOPBase);
97 /****************************************************************************************/
99 #define XSD(cl) (&((struct kbdbase *)cl->UserData)->ksd)
101 #undef HiddAttrBase
102 #define HiddAttrBase (XSD(cl)->hiddAB)
104 #undef HiddKbdAB
105 #define HiddKbdAB (XSD(cl)->hiddKbdAB)
107 #undef HiddKbdBase
108 #define HiddKbdBase (XSD(cl)->hiddKbdBase)
110 #define OOPBase (XSD(cl)->cs_OOPBase)
112 /****************************************************************************************/
114 #endif /* HIDD_KBD_H */