2 Copyright © 1995-2018, The AROS Development Team. All rights reserved.
7 #include <aros/debug.h>
9 #include <aros/symbolsets.h>
10 #include <proto/oop.h>
12 #include <hidd/hidd.h>
13 #include <hidd/keyboard.h>
20 static int AmigaKbd_Init(struct kbdbase
*LIBBASE
)
22 struct kbd_staticdata
*ksd
= &LIBBASE
->ksd
;
23 struct OOP_ABDescr attrbases
[] =
25 {IID_Hidd
, &HiddAttrBase
},
26 {IID_Hidd_Kbd
, &HiddKbdAB
},
30 OOP_Object
*drv
= NULL
;
32 EnterFunc(bug("AmigaKbd_Init\n"));
34 kbd
= OOP_NewObject(NULL
, CLID_Hidd_Kbd
, NULL
);
36 if (OOP_ObtainAttrBases(attrbases
))
38 HiddKbdBase
= OOP_GetMethodID(IID_Hidd_Kbd
, 0);
39 drv
= HIDD_Kbd_AddHardwareDriver(kbd
, LIBBASE
->ksd
.kbdclass
, NULL
);
41 OOP_DisposeObject(kbd
);
47 LIBBASE
->library
.lib_OpenCnt
= 1;
49 ReturnInt("AmigaKbd_Init", int, TRUE
);
52 static int AmigaKbd_Expunge(struct kbdbase
*LIBBASE
)
54 struct kbd_staticdata
*ksd
= &LIBBASE
->ksd
;
55 struct OOP_ABDescr attrbases
[] =
57 {IID_Hidd_Kbd
, &LIBBASE
->ksd
.hiddKbdAB
},
61 EnterFunc(bug("AmigaKbd_Expunge\n"));
63 OOP_ReleaseAttrBases(attrbases
);
65 ReturnInt("AmigaKbd_Expunge", int, TRUE
);
68 ADD2INITLIB(AmigaKbd_Init
, 0)
69 ADD2EXPUNGELIB(AmigaKbd_Expunge
, 0)