JSGetAttributesList(3)

NAME

JSGetAttributesList - Joystick device attribute retrieving

SYNTAX

#include <jsw.h>

js_attribute_struct *JSGetAttributesList(
        int *total,
        const char *calibration
)

typedef struct {

        char *name; /* Descriptive name. */
        char *device_name; /* Device name. */

        /* Specifies that this joystick device
         * is configured and calibrated properly.
         */
        int is_configured;

        /* If true then suggests device may
         * already be opened.
         */
        int is_in_use;

        /* Device may not disconnected at the
         * moment, turned off, or driver not
         * loaded.
         */
        int not_accessable;

} js_attribute_struct;

ARGUMENTS

total
    Specifies the pointer to a int return value for the total number of device attributes loaded.

calibration
    Specifies the calibration file.

DESCRIPTION

The JSGetAttributesList function fetches attributes for all joysticks accessable (not just configured/calibrated) on the system. Regardless if the joystick is already initialized, in use, or available.

If calibration is NULL then some values may be set to 0 or NULL in the js_attribute_struct structure (ie members is_configured and name).

RETURN VALUE

The JSGetAttributesList function returns a pointer to a list of js_attribute_struct structures, the number of items indicated by the value set to total.

The returned list needs to be deleted with a call to JSFreeAttributesList(3).

SEE ALSO

JSIntro(3) JSFreeAttributesList(3)