Share via


Any-Control Enumeration

The following constants are used in the dwSemantic member of the DIACTION structure to map an action to any matching control on the device.

Syntax

typedef enum Any_Control
{
    DIAXIS_ANY_1,
    DIAXIS_ANY_2,
    DIAXIS_ANY_3,
    DIAXIS_ANY_3,
    DIAXIS_ANY_A_1,
    DIAXIS_ANY_A_1,
    DIAXIS_ANY_B_1,
    DIAXIS_ANY_B_2,
    DIAXIS_ANY_C_1,
    DIAXIS_ANY_C_2,
    DIAXIS_ANY_R_1,
    DIAXIS_ANY_R_2,
    DIAXIS_ANY_S_1,
    DIAXIS_ANY_S_2,
    DIAXIS_ANY_U_1,
    DIAXIS_ANY_U_2,
    DIAXIS_ANY_V_1,
    DIAXIS_ANY_V_2,
    DIAXIS_ANY_X_1,
    DIAXIS_ANY_X_2,
    DIAXIS_ANY_Y_1,
    DIAXIS_ANY_Y_2,
    DIAXIS_ANY_Z_1,
    DIAXIS_ANY_Z_2,
    DIBUTTON_ANY,
    DIPOV_ANY_1,
    DIPOV_ANY_2,
    DIPOV_ANY_3,
    DIPOV_ANY_4
} Any-Control, *LPAny-Control;

Constants

  Constant Description
DIAXIS_ANY_1 Any axis
DIAXIS_ANY_2 Any axis
DIAXIS_ANY_3 Any axis
DIAXIS_ANY_3 Any axis
DIAXIS_ANY_A_1 Any accelerator
DIAXIS_ANY_A_1 Any accelerator
DIAXIS_ANY_B_1 Any brake
DIAXIS_ANY_B_2 Any brake
DIAXIS_ANY_C_1 Any clutch
DIAXIS_ANY_C_2 Any clutch
DIAXIS_ANY_R_1 Any r-axis
DIAXIS_ANY_R_2 Any r-axis
DIAXIS_ANY_S_1 Any s-axis
DIAXIS_ANY_S_2 Any s-axis
DIAXIS_ANY_U_1 Any u-axis
DIAXIS_ANY_U_2 Any u-axis
DIAXIS_ANY_V_1 Any v-axis
DIAXIS_ANY_V_2 Any v-axis
DIAXIS_ANY_X_1 Any x-axis
DIAXIS_ANY_X_2 Any x-axis
DIAXIS_ANY_Y_1 Any y-axis
DIAXIS_ANY_Y_2 Any y-axis
DIAXIS_ANY_Z_1 Any z-axis
DIAXIS_ANY_Z_2 Any z-axis
DIBUTTON_ANY Any button. This is a constant macro that takes a button number as its argument. For example, DIBUTTON_ANY(3).
DIPOV_ANY_1 Any point-of-view controller
DIPOV_ANY_2 Any point-of-view controller
DIPOV_ANY_3 Any point-of-view controller
DIPOV_ANY_4 Any point-of-view controller

Remarks

These constants can be used to map an application action to a virtual control that is not defined in a genre. Such actions are mapped after genre-specific actions. If the mapper has already mapped all matching controls to genre-specific actions, the any-control action is left unmapped.

Any-control actions are treated with equal priority. If a device has one x-axis and the action array specifies DIAXIS_ANY_1 and DIAXIS_ANY_X_1, the action mapped to the x-axis is the one that appears first in the action array.

DIBUTTON_ANY(x) can accept any value from 0 through 255. Do not use an index more than once. For instance, the following set of DIACTION structures would be invalid.

{eB_MUTE,    DIBUTTON_ANY(0), 0, "Toggle Sound",},
{eB_VOLUP,   DIBUTTON_ANY(0), 0, "Volume Up",   }, 
{eB_VOLDOWN, DIBUTTON_ANY(0), 0, "Volume Down", }, 

The correct method uses different indexes, as shown below.

{eB_MUTE,    DIBUTTON_ANY(0), 0, "Toggle Sound",}
{eB_VOLUP,   DIBUTTON_ANY(1), 0, "Volume Up",   } 
{eB_VOLDOWN, DIBUTTON_ANY(2), 0, "Volume Down", }