giiQueryDeviceInfo, giiQueryDeviceInfoByNumber : Get information about input sources
#include <ggi/gii.h>` int giiQueryDeviceInfo (gii_input_t inp, uint32 origin, gii_cmddata_getdevinfo *info); int giiQueryDeviceInfoByNumber(gii_input_t inp, uint32 number, uint32 *origin, gii_cmddata_getdevinfo *info);
Though when using GII inputs the exact type of device is fully transparent to the program, information about the device that is actually attached to a given gii input and origin id can be queried, e.g. for configuration interfaces.
For giiQueryDeviceInfo the parameters :p:`inp` and :p:`origin` select the input to query. This version is usually used, if you want to identify a device after getting an event from it.
For giiQueryDeviceInfoByNumber the parameters :p:`inp` and :p:`number` select the input to query - :p:`origin` gets set to the origin ID the queried device has. This version is used, when you want to query all known devices.
The queried data is put into :p:`info`. See :man:`gii_cmddata_getdevinfo(3)` for the description of the structure.
Returns 0 on success (info is valid, then) or -1 otherwise.