---
name: "NJB_Reset_Get_EAX_Type"
section: "3"
platform: "linux"
package: "libnjb-dev"
version: "1.2-2"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Reset_Get_EAX_Type"
---

# NJB\_Reset\_Get\_EAX\_Type(3)

Get possible EAX controls from the NJB.

## NAME

NJB\_Reset\_Get\_EAX\_Type, NJB\_Get\_EAX\_Type, NJB\_Destroy\_EAX\_Type -  Get possible EAX controls from the NJB.

## LIBRARY

libnjb

## SYNOPSIS

\#include \<libnjb.h\>

extern int njb\_error

void NJB\_Reset\_Get\_EAX\_Type(njb\_t **\*njb**)

njb\_eax\_t \*NJB\_Get\_EAX\_Type(njb\_t **\*njb**)

void NJB\_Destroy\_EAX\_Type(njb\_eax\_t **\*eax**)

## DESCRIPTION

NJB\_Get\_EAX\_Type is used to fetch the available EAX control types and  min/max values for the current device. Different devices present different number and types of controls, and e.g. GUI:s must therefore be built dynamically by using these types as prototypes.

NJB\_Reset\_Get\_EAX\_Type should be called first to initialize the fetch operation.

Any retrieved and used types must be destroyed using  NJB\_Destroy\_EAX\_Type afterwards.

The values can thereafter be modified using the [NJB\_Adjust\_EAX(3)](/NJB_Adjust_EAX/3.md) function.

When the last EAX type has been fetched, NJB\_Get\_EAX\_Type returns a NULL pointer.

## RETURN VALUES

A  **njb\_eax\_t** object is returned from a successful query.  If no more tags remain, or an error is encountered, a NULL pointer is returned.

## EAX TYPE STRUCTURE

The EAX type struct has the following form:

typedef struct {\
         u\_int16\_t number;\
         char \*name;\
         u\_int8\_t exclusive;\
         u\_int8\_t group;\
         u\_int8\_t selectable;\
         u\_int16\_t current\_selectionvalue;\
         u\_int16\_t min\_selectionvalue;\
         u\_int16\_t max\_selectionvalue;\
         char \*\*selection\_names;\
         u\_int8\_t scaleable;\
         int16\_t current\_scalevalue;\
         int16\_t min\_scalevalue;\
         int16\_t max\_scalevalue; } njb\_eax\_t;

- **number**

  The unique ID number of this EAX type, which shall be used in all calls to [NJB\_Adjust\_EAX(3)](/NJB_Adjust_EAX/3.md).

- **name**

  The name of this EAX type, as a zero-terminated string.

- **exclusive**

  The "exclusive" attribute signifies if this effect can be used in parallell with other EAX effects, GUI:s shall make sure  all other exclusive effects are reset to default values when  one exclusive effect is chosen. A value of  **0** signifies that the effect is not exclusive, any other value means it is exclusive.

- **group**

  The visual group for this effect - effects appearing  after each other are grouped if their group numbers are identical. This is used e.g. when grouping controls in a GUI.

- **selectable**

  If this value is different from **0** it means that this effect has several selectable patches.

- **current\_selectionvalue**

  If the effect has selectable patches, this is the current patch index selected.

- **min\_selectionvalue**

  If the effect has selectable patches, this is the minimum value for selecting a patch with [NJB\_Adjust\_EAX(3)](/NJB_Adjust_EAX/3.md).

- **max\_selectionvalue**

  If the effect has selectable patches, this is the maximum value for selecting a patch with [NJB\_Adjust\_EAX(3)](/NJB_Adjust_EAX/3.md).

- **selection\_names**

  If the effect has selectable patches, this is an array of names for the individual patches, indexed from  **0** and upwards. The expression **max\_selectionvalue - min\_selectionvalue + 1** gives the number of available patches. (The zero:th value is thus included.)

- **scaleable**

  If this value is different from  **0** the effect can be slided on a scale. (It is in theory possible for an effect to be both **selectable** and **scaleable** though this phenomenon has not occured in the wild.) A scaleable effect can take both negative and positive values.

- **current\_scalevalue**

  If the effect can be slided on a scale, this indicates the current value of the value on that scale. Observe that this number can be negative!

- **min\_scalevalue**

  If the effect can be slided on a scale, this indicates the minimum value the value can take on that scale. Observe that this number can be negative!

- **max\_scalevalue**

  If the effect can be slided on a scale, this indicates the maximum value the value can take on that scale. This number is typically not negative, though there is no guarantee that it will never be.

## SEE ALSO

[NJB\_Adjust\_EAX(3)](/NJB_Adjust_EAX/3.md)
