[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPIDMO - Set Input Device Mode

GPIDMO (wsid, class, device, state, deact, echosw, trigger, break, reset)

Purpose

Use GPIDMO to set the operating mode of the specified logical input device on the specified workstation.

The operating mode consists of six individual switches. Your application can set each of these switches individually to a specified value. Set a switch to zero to preserve its previous setting.

When an application process issues this subroutine and sets the mode of an inactive device to 2=ACTIVE , the application becomes the owner of the active device. While the device is owned, the graPHIGS API rejects any attempt by any other application process to activate the device. The application process is owner of the device until it performs some action that deactivates the device.

The graPHIGS API sends an input event to the application when the state switch (state) of the logical device is set to 2=ACTIVE and one of the following conditions exists:

  • The primary trigger of a logical device fires and the primary trigger switch (trigger) is set to 2=ON Additionally, if the auto deactivate switch (deact) is set to2=ON , then the graPHIGS API deactivates the device.

  • The workstation's break action fires and its break action switch (break) is set to 2=ON Additionally, the graPHIGS API deactivates the device.
  • For a description of the events returned as a result of a trigger firing or a break action, see The graPHIGS Programming Interface: Technical Reference

    Parameters

    wsid -- specified by user, fullword integer

    Workstation identifier.

    class -- specified by user, fullword integer

    Input device class (1=LOCATOR, 2=STROKE, 3=VALUATOR, 4=CHOICE, 5=PICK, 6=STRING )

    device -- specified by user, fullword integer

    Logical input device number (>=1)

    state -- specified by user, fullword integer

    State switch (1=DEVICE_INACTIVE, 2=DEVICE_ACTIVE ) Set this parameter to a value of zero to preserve the current state switch.

    deact -- returned by the graPHIGS API, fullword integer

    Auto deactivate switch (1=OFF, 2=ON ) Set this parameter to a value of zero to preserve the current auto deactivate switch.

    When the primary trigger of a logical device fires and an event is sent to the application, the graPHIGS API deactivates the device if its auto deactivate switch is set to 2=ON

    echosw -- returned by the graPHIGS API, fullword integer

    Echo switch (1=NOECHO, 2=ECHO )

    trigger -- returned by the graPHIGS API, fullword integer

    Primary trigger switch (1=OFF, 2=ON ) Set this parameter to a value of zero to preserve the current trigger switch.

    When the primary trigger of a logical device fires and its trigger switch is set to 2=ON , the graPHIGS API sends an input event to the application.

    break -- returned by the graPHIGS API, fullword integer

    Break switch (1=OFF, 2=ON ) Set this parameter to a value of zero to preserve the current break switch.

    When the workstation's break action fires, the graPHIGS API deactivates all active logical devices on the workstation that have their break swtiches set to 2=ON Additionally, the graPHIGS API sends a break action to the application for each of the devices.

    reset -- returned by the graPHIGS API, fullword integer

    Auto reset switch (1=OFF, 2=ON ) Set this parameter to a value of zero to preserve the current auto reset switch.

    When an input event is sent to the application for a logical input device, the graPHIGS API resets its device measure to its initial value if the auto reset switch is set to 2=ON

    Error Codes

    3
    FUNCTION REQUIRES STATE WSOP
    25
    SPECIFIED WORKSTATION DOES NOT EXIST
    140
    DEVICE NUMBER < ONE OR DEVICE NOT AVAILABLE
    168
    INPUT DEVICE IS CURRENTLY OWNED BY ANOTHER CONNECTION
    327
    ECHO SWITCH VALUE IS INVALID
    328
    INPUT CLASS VALUE IS INVALID
    329
    ONE OF THE SPECIFIED SWITCH VALUES IS INVALID

    Related Subroutines

    GPQID
    Inquire Input Device State

    RCP code

    201335814 (X'0C002406')


    [ Previous | Next | Contents | Glossary | Home | Search ]