NAME
Logitech Joystick SDK
COPYRIGHT
The Logitech Joystick SDK, including all accompanying documentation, is protected by intellectual property laws. All rights not expressly granted by Logitech are reserved.
PURPOSE
The Logitech Joystick SDK's purpose is to control the LEDs on the buttons of the Logitech G940 joystick's throttle. The SDK provides a simple interface for: - setting button colors. - checking what the current state of color of the buttons is.
EXAMPLE
Build and run the demo program to see some of the code usage, or run JoystickSDKDemo.exe to quickly see what it can do.
AUTHOR
Christophe Juncker (cj@wingmanteam.com)
NAME
DWORD SetButtonColor(LPDIRECTINPUTDEVICE8 device, LogiPanelButton button, LogiColor color) - Sets the color of the specified button.
INPUTS
device - DirectInput handle to the device. button - Button to be set. Possible buttons are: LOGI_P1, LOGI_P2, LOGI_P3, LOGI_P4, LOGI_P5, LOGI_P6, LOGI_P7, LOGI_P8. color - Color to be set. Possible colors are: LOGI_OFF, LOGI_GREEN, LOGI_AMBER, LOGI_RED.
RETURN VALUE
ERROR_SUCCESS if successful. Error code otherwise.
NAME
DWORD SetAllButtonsColor(LPDIRECTINPUTDEVICE8 device, LogiColor color) - Sets the color of all the buttons.
INPUTS
device - DirectInput handle to the device. color - Color to be set. Possible colors are: LOGI_OFF, LOGI_GREEN, LOGI_AMBER, LOGI_RED.
RETURN VALUE
ERROR_SUCCESS if successful. Error code otherwise.
NAME
BOOL IsButtonColor(LPDIRECTINPUTDEVICE8 device, LogiPanelButton button, LogiColor color) - Checks if the button has the specified color.
INPUTS
device - DirectInput handle to the device. button - Button to check. Possible buttons are: LOGI_P1, LOGI_P2, LOGI_P3, LOGI_P4, LOGI_P5, LOGI_P6, LOGI_P7, LOGI_P8. color - Color to check. Possible colors are: LOGI_OFF, LOGI_GREEN, LOGI_AMBER, LOGI_RED.
RETURN VALUE
TRUE if button currently has specified color. FALSE otherwise.
NAME
DWORD SetLEDs(LPDIRECTINPUTDEVICE8 device, BYTE redLEDs, BYTE greenLEDs) - Sets the LEDs in the buttons.
DESCRIPTION
Each button has a red and a green LED. This enables 3 colors in addition to off. The third color in addition to red and green is amber, which is the result of both red and green LEDs being turned on at the same time.
INPUTS
device - DirectInput handle to the device. redLEDs - Byte corresponding to which of the 8 red LEDs need to be turned on or off. greenLEDs - Byte corresponding to which of the 8 green LEDs need to be turned on or off.
RETURN VALUE
ERROR_SUCCESS if successful. Error code otherwise.
NAME
DWORD GetLEDs(LPDIRECTINPUTDEVICE8 device, BYTE& redLEDs, BYTE& greenLEDs) - Gets the current state of the LEDs in the buttons.
DESCRIPTION
Each button has a red and a green LED. This enables 3 colors in addition to off. The third color in addition to red and green is amber, which is the result of both red and green LEDs being turned on at the same time.
INPUTS
device - DirectInput handle to the device. redLEDs - Byte corresponding to which of the 8 red LEDs are currently turned on or off. greenLEDs - Byte corresponding to which of the 8 green LEDs are currently turned on or off.
RETURN VALUE
ERROR_SUCCESS if successful. Error code otherwise.