Build version 1 of all catalogs.
[AROS.git] / rom / hidds / serialmouse / startup.c
blob8f34de64063f6b8f7ebf78bd4af113afef9f4211
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/symbolsets.h>
7 #include <hidd/hidd.h>
8 #include <hidd/mouse.h>
9 #include <proto/oop.h>
11 #include "mouse.h"
13 #undef HiddAttrBase
14 #undef HWBase
15 #undef OOPBase
16 #define HiddAttrBase (LIBBASE->msd.hiddAttrBase)
17 #define HWBase (LIBBASE->msd.hwMethodBase)
18 #define OOPBase (LIBBASE->msd.oopBase)
20 static int init_mouse(struct mousebase *LIBBASE)
22 /* FIXME: implement proper detection. See TODO notice in mouseclass.c */
23 struct TagItem tags[] =
25 {aHidd_Name , (IPTR)"SerMouse" },
26 {aHidd_HardwareName, (IPTR)"Serial mouse"},
27 {TAG_DONE , 0 }
29 OOP_Object *ms = OOP_NewObject(NULL, CLID_HW_Mouse, NULL);
31 if (!ms)
32 return FALSE;
34 if (!HW_AddDriver(ms, LIBBASE->msd.mouseclass, tags))
35 return FALSE;
37 LIBBASE->library.lib_OpenCnt = 1;
38 return TRUE;
41 ADD2INITLIB(init_mouse, 10);