2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
14 #include <libraries/commodities.h>
15 #include <exec/libraries.h>
16 #include <proto/exec.h>
18 AROS_LH2(VOID
, SetTranslate
,
22 AROS_LHA(CxObj
* , translator
, A0
),
23 AROS_LHA(struct InputEvent
*, events
, A1
),
27 struct Library
*, CxBase
, 19, Commodities
)
31 Set translation (a list of input events) for a commodity translator
36 translator -- the commodity translator the translation result of which
38 events -- the new input event list
44 If events is set to NULL, all commodity messages passed to the object
45 are swallowed. Neither commodities.library nor any other commodities
46 user will change your list of InputEvents; however, it will be used
47 asynchronously to the application program which means you shouldn't
48 in any way corrupt the chain.
56 cx_lib/CxTranslate(), <devices/inputevent.h>
62 ******************************************************************************/
67 if (translator
== NULL
)
72 ObtainSemaphore(&GPB(CxBase
)->cx_SignalSemaphore
);
74 if (CXOBJType(translator
) != CX_TRANSLATE
)
76 translator
->co_Error
|= COERR_BADTYPE
;
80 translator
->co_Ext
.co_IE
= events
;
83 ReleaseSemaphore(&GPB(CxBase
)->cx_SignalSemaphore
);