sdl2/generated/lib_sdl_joystick library

Functions

sdlGetJoystickGuidInfo(SdlGuid guid, Pointer<Uint16> vendor, Pointer<Uint16> product, Pointer<Uint16> version, Pointer<Uint16> crc16) → void
Get the device information encoded in a SDL_JoystickGUID structure
sdlJoystickAttachVirtual(int type, int naxes, int nbuttons, int nhats) int
Attach a new virtual joystick.
sdlJoystickAttachVirtualEx(Pointer<SdlVirtualJoystickDesc> desc) int
Attach a new virtual joystick with extended properties.
sdlJoystickClose(Pointer<SdlJoystick> joystick) → void
Close a joystick previously opened with SDL_JoystickOpen().
sdlJoystickCurrentPowerLevel(Pointer<SdlJoystick> joystick) int
Get the battery level of a joystick as SDL_JoystickPowerLevel.
sdlJoystickDetachVirtual(int deviceIndex) int
Detach a virtual joystick.
sdlJoystickEventState(int state) int
Enable/disable joystick event polling.
sdlJoystickFromInstanceId(int instanceId) Pointer<SdlJoystick>
Get the SDL_Joystick associated with an instance id.
sdlJoystickFromPlayerIndex(int playerIndex) Pointer<SdlJoystick>
Get the SDL_Joystick associated with a player index.
sdlJoystickGetAttached(Pointer<SdlJoystick> joystick) bool
Get the status of a specified joystick.
sdlJoystickGetAxis(Pointer<SdlJoystick> joystick, int axis) int
Get the current state of an axis control on a joystick.
sdlJoystickGetAxisInitialState(Pointer<SdlJoystick> joystick, int axis, Pointer<Int16> state) bool
Get the initial state of an axis control on a joystick.
sdlJoystickGetBall(Pointer<SdlJoystick> joystick, int ball, Pointer<Int32> dx, Pointer<Int32> dy) int
Get the ball axis change since the last poll.
sdlJoystickGetButton(Pointer<SdlJoystick> joystick, int button) int
Get the current state of a button on a joystick.
sdlJoystickGetDeviceGuid(int deviceIndex) SdlGuid
Get the implementation-dependent GUID for the joystick at a given device index.
sdlJoystickGetDeviceInstanceId(int deviceIndex) int
Get the instance ID of a joystick.
sdlJoystickGetDevicePlayerIndex(int deviceIndex) int
Get the player index of a joystick, or -1 if it's not available This can be called before any joysticks are opened.
sdlJoystickGetDeviceProduct(int deviceIndex) int
Get the USB product ID of a joystick, if available.
sdlJoystickGetDeviceProductVersion(int deviceIndex) int
Get the product version of a joystick, if available.
sdlJoystickGetDeviceType(int deviceIndex) int
Get the type of a joystick, if available.
sdlJoystickGetDeviceVendor(int deviceIndex) int
Get the USB vendor ID of a joystick, if available.
sdlJoystickGetFirmwareVersion(Pointer<SdlJoystick> joystick) int
Get the firmware version of an opened joystick, if available.
sdlJoystickGetGuid(Pointer<SdlJoystick> joystick) SdlGuid
Get the implementation-dependent GUID for the joystick.
sdlJoystickGetGuidFromString(String? pchGuid) SdlGuid
Convert a GUID string into a SDL_JoystickGUID structure.
sdlJoystickGetGuidString(SdlGuid guid, Pointer<Int8> pszGuid, int cbGuid) → void
Get an ASCII string representation for a given SDL_JoystickGUID.
sdlJoystickGetHat(Pointer<SdlJoystick> joystick, int hat) int
Get the current state of a POV hat on a joystick.
sdlJoystickGetPlayerIndex(Pointer<SdlJoystick> joystick) int
Get the player index of an opened joystick.
sdlJoystickGetProduct(Pointer<SdlJoystick> joystick) int
Get the USB product ID of an opened joystick, if available.
sdlJoystickGetProductVersion(Pointer<SdlJoystick> joystick) int
Get the product version of an opened joystick, if available.
sdlJoystickGetSerial(Pointer<SdlJoystick> joystick) String?
Get the serial number of an opened joystick, if available.
sdlJoystickGetType(Pointer<SdlJoystick> joystick) int
Get the type of an opened joystick.
sdlJoystickGetVendor(Pointer<SdlJoystick> joystick) int
Get the USB vendor ID of an opened joystick, if available.
sdlJoystickHasLed(Pointer<SdlJoystick> joystick) bool
Query whether a joystick has an LED.
sdlJoystickHasRumble(Pointer<SdlJoystick> joystick) bool
Query whether a joystick has rumble support.
sdlJoystickHasRumbleTriggers(Pointer<SdlJoystick> joystick) bool
Query whether a joystick has rumble support on triggers.
sdlJoystickInstanceId(Pointer<SdlJoystick> joystick) int
Get the instance ID of an opened joystick.
sdlJoystickIsVirtual(int deviceIndex) bool
Query whether or not the joystick at a given device index is virtual.
sdlJoystickName(Pointer<SdlJoystick> joystick) String?
Get the implementation dependent name of a joystick.
sdlJoystickNameForIndex(int deviceIndex) String?
Get the implementation dependent name of a joystick.
sdlJoystickNumAxes(Pointer<SdlJoystick> joystick) int
Get the number of general axis controls on a joystick.
sdlJoystickNumBalls(Pointer<SdlJoystick> joystick) int
Get the number of trackballs on a joystick.
sdlJoystickNumButtons(Pointer<SdlJoystick> joystick) int
Get the number of buttons on a joystick.
sdlJoystickNumHats(Pointer<SdlJoystick> joystick) int
Get the number of POV hats on a joystick.
sdlJoystickOpen(int deviceIndex) Pointer<SdlJoystick>
Open a joystick for use.
sdlJoystickPath(Pointer<SdlJoystick> joystick) String?
Get the implementation dependent path of a joystick.
sdlJoystickPathForIndex(int deviceIndex) String?
Get the implementation dependent path of a joystick.
sdlJoystickRumble(Pointer<SdlJoystick> joystick, int lowFrequencyRumble, int highFrequencyRumble, int durationMs) int
Start a rumble effect.
sdlJoystickRumbleTriggers(Pointer<SdlJoystick> joystick, int leftRumble, int rightRumble, int durationMs) int
Start a rumble effect in the joystick's triggers
sdlJoystickSendEffect(Pointer<SdlJoystick> joystick, Pointer<NativeType> data, int size) int
Send a joystick specific effect packet
sdlJoystickSetLed(Pointer<SdlJoystick> joystick, int red, int green, int blue) int
Update a joystick's LED color.
sdlJoystickSetPlayerIndex(Pointer<SdlJoystick> joystick, int playerIndex) → void
Set the player index of an opened joystick.
sdlJoystickSetVirtualAxis(Pointer<SdlJoystick> joystick, int axis, int value) int
Set values on an opened, virtual-joystick's axis.
sdlJoystickSetVirtualButton(Pointer<SdlJoystick> joystick, int button, int value) int
Set values on an opened, virtual-joystick's button.
sdlJoystickSetVirtualHat(Pointer<SdlJoystick> joystick, int hat, int value) int
Set values on an opened, virtual-joystick's hat.
sdlJoystickUpdate() → void
Update the current state of the open joysticks.
sdlLockJoysticks(Pointer<NativeType> arg0) → void
Locking for multi-threaded access to the joystick API
sdlNumJoysticks() int
Count the number of joysticks attached to the system.
sdlUnlockJoysticks(Pointer<NativeType> arg0) → void
Unlocking for multi-threaded access to the joystick API