dmxmap.h File Reference

Go to the source code of this file.

Functions

void dmxMapInsert (DMXLocalInputInfoPtr dmxLocal, int remoteEvent, int serverEvent)
void dmxMapClear (DMXLocalInputInfoPtr dmxLocal)
int dmxMapLookup (DMXLocalInputInfoPtr dmxLocal, int remoteEvent)

Detailed Description

Interface to XInput event mapping support.

See also:
dmxmap.c

Function Documentation

void dmxMapClear ( DMXLocalInputInfoPtr  dmxLocal)

Remove all mappings there were inserted with dmxMapInsert.

References DMX_MAP_ENTRIES, _DMXLocalInputInfo::map, _DMXLocalInputInfo::mapOptimize, and _DMXEventMap::remote.

void dmxMapInsert ( DMXLocalInputInfoPtr  dmxLocal,
int  remoteEvent,
int  serverEvent 
)

Create a mapping from remoteEvent to serverEvent. The remoteEvent is the type returned from the remote server. The serverEvent is from the XI_* list of events in include/extensions/XIproto.h.

References DMX_MAP_ENTRIES, DMX_MAP_MASK, dmxLog(), dmxWarning, _DMXLocalInputInfo::map, _DMXLocalInputInfo::mapOptimize, _DMXEventMap::remote, and _DMXEventMap::server.

int dmxMapLookup ( DMXLocalInputInfoPtr  dmxLocal,
int  remoteEvent 
)

Lookup a mapping for remoteEvent. The remoteEvent is the type returned from the remote server. The return value is that which was passed into dmxMapInsert (i.e., a value from the XI_* list in include/extensions/XIproto.h). If a mapping is not available, -1 is returned.

References DMX_MAP_ENTRIES, DMX_MAP_MASK, _DMXLocalInputInfo::map, _DMXLocalInputInfo::mapOptimize, _DMXEventMap::remote, and _DMXEventMap::server.

Referenced by dmxTranslateAndEnqueueExtEvent().