Interface IJoystickComponent
Interface for interacting with joysticks.
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public interface IJoystickComponent : IPalComponent
Methods
Close(JoystickHandle)
Declaration
void Close(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
GetAxis(JoystickHandle, int)
Declaration
float GetAxis(JoystickHandle joystick, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick | |
| int | axis |
Returns
| Type | Description |
|---|---|
| float |
GetButton(JoystickHandle, int)
Declaration
bool GetButton(JoystickHandle joystick, int button)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick | |
| int | button |
Returns
| Type | Description |
|---|---|
| bool |
GetCapabilities(JoystickHandle)
Declaration
JoystickCapabilities GetCapabilities(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
Returns
| Type | Description |
|---|---|
| JoystickCapabilities |
GetGuid(JoystickHandle)
Declaration
Guid GetGuid(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
Returns
| Type | Description |
|---|---|
| Guid |
GetHat(JoystickHandle, int)
Declaration
HatState GetHat(JoystickHandle joystick, int hat)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick | |
| int | hat |
Returns
| Type | Description |
|---|---|
| HatState |
GetJoystickCount()
Declaration
int GetJoystickCount()
Returns
| Type | Description |
|---|---|
| int |
GetName(JoystickHandle)
Declaration
string GetName(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
Returns
| Type | Description |
|---|---|
| string |
GetNumberOfAxes(JoystickHandle)
Declaration
int GetNumberOfAxes(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
Returns
| Type | Description |
|---|---|
| int |
GetNumberOfButtons(JoystickHandle)
Declaration
int GetNumberOfButtons(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
Returns
| Type | Description |
|---|---|
| int |
GetNumberOfHats(JoystickHandle)
Declaration
int GetNumberOfHats(JoystickHandle joystick)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick |
Returns
| Type | Description |
|---|---|
| int |
Open(int)
Declaration
JoystickHandle Open(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Returns
| Type | Description |
|---|---|
| JoystickHandle |
SetRumble(JoystickHandle, float, float)
Declaration
bool SetRumble(JoystickHandle joystick, float lowFrequencyIntensity, float highFrequencyIntensity)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick | |
| float | lowFrequencyIntensity | |
| float | highFrequencyIntensity |
Returns
| Type | Description |
|---|---|
| bool |
TryGetBatteryInfo(JoystickHandle, out GamepadBatteryInfo)
Declaration
bool TryGetBatteryInfo(JoystickHandle joystick, out GamepadBatteryInfo batteryInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| JoystickHandle | joystick | |
| GamepadBatteryInfo | batteryInfo |
Returns
| Type | Description |
|---|---|
| bool |