---
name: "JSGetAttributesList"
section: "3"
platform: "linux"
package: "libjsw-dev"
version: "1:1.5.5-1+b1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/JSGetAttributesList"
---

# JSGetAttributesList(3)

Joystick device attribute retrieving

## 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 attrib 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 deallocated with a call to [JSFreeAttributesList(3)](/JSFreeAttributesList/3.md).

## SEE ALSO

[JSIntro(3)](/JSIntro/3.md) [JSFreeAttributesList(3)](/JSFreeAttributesList/3.md)
