Check for SYS/GL during library init. Reason is that
[AROS.git] / rom / hidds / hidd / include / hidd.h
blob9aab229951c9b5e87ebd55fa5bc25c19a8f785d8
1 #ifndef HIDD_HIDD_H
2 #define HIDD_HIDD_H
4 /*
5 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Main HIDD Include File
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
15 #ifndef UTILITY_TAGITEM_H
16 # include <utility/tagitem.h>
17 #endif
19 /* ---------------------------------------------------------------------
20 Main HIDD Class Interface
21 --------------------------------------------------------------------- */
23 #define CLID_Hidd "hiddclass" /* Topmost HIDD class */
24 #define CLID_HW "hwclass" /* Topmost hardware class */
25 #define CLID_HW_Root "hw.root" /* Root of subsystem of hardware classes */
27 /* Meta class for the HIDDs */
28 /* Just set it to the mimetaclass for now */
29 #define CLID_HiddMeta "simetaclass"
31 #ifndef __typedef_HIDD
32 # define __typedef_HIDD
33 typedef APTR HIDD;
34 #endif
36 #include <interface/Hidd.h>
37 #include <interface/HW.h>
39 /* Values for the HIDD_Type Tag */
40 #define vHidd_Type_Any -1 /* match any type */
42 #define vHidd_Type_Root 0 /* hiddclass */
43 #define vHidd_Type_Config 1 /* configuration plugins */
44 #define vHidd_Type_Timer 2 /* clocks and alarms */
46 /* Values for the aHidd_Subtype Tag */
47 #define vHidd_Subtype_Any -1 /* match any subtype */
48 #define vHidd_Subtype_Root 0 /* main class of a type */
50 /* Values for the aHidd_Locking tag */
51 #define vHidd_LockShared 0
52 #define vHidd_LockExclusive 1
53 #define vHidd_Try 0x80 /* Flag */
55 /* Values for aHidd_Status tag */
56 #define vHidd_StatusUnknown -1
58 /* Error codes defined for the HIDD */
59 enum {
60 HIDDE_NotInList, /* HIDD wasn't in a list */
63 enum {
64 moHidd_Class_Get, /* Get a value from a Class */
65 moHidd_Class_MGet, /* Get a number of values from a Class */
66 moHidd_BeginIO, /* Send a device like command */
67 moHidd_AbortIO, /* Abort a device like command */
69 moHidd_LoadConfigPlugin, /* HIDDT_Config M ( hmPlugin *) */
70 moHidd_Lock, /* Lock a HIDD */
71 moHidd_Unlock, /* UnLock a HIDD */
72 moHidd_AddHIDD, /* Add a subclass HIDD */
73 moHidd_RemoveHIDD, /* Remove a subclass HIDD */
74 moHidd_FindHIDD /* Find a suitable HIDD */
78 /* Used for HIDDM_BeginIO, HIDDM_AbortIO */
79 typedef struct hmIO
81 STACKED ULONG MethodID;
82 STACKED struct IORequest *hmi_ioRequest;
83 } hmIO;
85 #if 0
86 /* Used for HIDDM_LoadConfigPlugin */
87 typedef struct hmPlugin
89 STACKED ULONG MethodID;
90 STACKED IPTR hmp_PluginData;
91 } hmPlugin;
92 #endif
94 /* Combined structure for HIDDM_Lock, HIDDM_Unlock */
95 typedef struct hmLock
97 STACKED ULONG MethodID;
98 STACKED ULONG hml_LockMode;
99 STACKED IPTR hml_LockData;
100 } hmLock;
102 /* Used for HIDDM_AddHidd, HIDDM_RemoveHidd */
103 typedef struct hmAdd
105 STACKED ULONG MethodID;
106 STACKED APTR *hma_Class;
107 } hmAdd;
109 /* Used for HIDDM_FindHIDD */
110 typedef struct hmFind
112 STACKED ULONG MethodID;
113 STACKED UWORD hmf_Type; /* Use vHidd_Type_Any to match all */
114 STACKED UWORD hmf_Subtype; /* Use vHidd_Subtype_Any to match all */
115 } hmFind;
117 #endif /* HIDD_HIDD_H */