/************************************************************************************************** * This file is a part of Ultralight, an ultra-portable web-browser engine. * * * * See for licensing and more. * * * * (C) 2024 Ultralight, Inc. * **************************************************************************************************/ /// /// @file CAPI_GamepadEvent.h /// /// Gamepad event interface. /// /// `#include ` /// /// This file defines the C API for gamepad events. /// /// @see ulFireGamepadEvent /// #ifndef ULTRALIGHT_CAPI_GAMEPADEVENT_H #define ULTRALIGHT_CAPI_GAMEPADEVENT_H #include #ifdef __cplusplus extern "C" { #endif /****************************************************************************** * Gamepad Event *****************************************************************************/ /// /// Create a gamepad event, see GamepadEvent for help using this function. /// ULExport ULGamepadEvent ulCreateGamepadEvent(unsigned int index, ULGamepadEventType type); /// /// Destroy a gamepad event. /// ULExport void ulDestroyGamepadEvent(ULGamepadEvent evt); /****************************************************************************** * Gamepad Axis Event *****************************************************************************/ /// /// Create a gamepad axis event, see GamepadAxisEvent for help using this function. /// ULExport ULGamepadAxisEvent ulCreateGamepadAxisEvent(unsigned int index, unsigned int axis_index, double value); /// /// Destroy a gamepad axis event. /// ULExport void ulDestroyGamepadAxisEvent(ULGamepadAxisEvent evt); /****************************************************************************** * Gamepad Button Event *****************************************************************************/ /// /// Create a gamepad button event, see GamepadButtonEvent for help using this function. /// ULExport ULGamepadButtonEvent ulCreateGamepadButtonEvent(unsigned int index, unsigned int button_index, double value); /// /// Destroy a gamepad button event. /// ULExport void ulDestroyGamepadButtonEvent(ULGamepadButtonEvent evt); #ifdef __cplusplus } // extern "C" #endif #endif // ULTRALIGHT_CAPI_GAMEPADEVENT_H