| Top |
| gint16 | retro_controller_get_input_state () |
| RetroControllerType | retro_controller_get_controller_type () |
| guint64 | retro_controller_get_capabilities () |
| gboolean | retro_controller_has_capability () |
| gboolean | retro_controller_get_supports_rumble () |
| void | retro_controller_set_rumble_state () |
| void | retro_controller_emit_state_changed () |
gint16 retro_controller_get_input_state (RetroController *self,RetroInput *input);
Gets the state of an input of self
.
RetroControllerType
retro_controller_get_controller_type (RetroController *self);
Gets the main type of the controller.
guint64
retro_controller_get_capabilities (RetroController *self);
Gets a flag representing the capabilities of self
. Each bit index matches
the RetroControllerType of same number.
For example, if self
is an analog gamepad, the value would be: (1 <<
RETRO_CONTROLLER_TYPE_JOYPAD) | (1 << RETRO_CONTROLLER_TYPE_ANALOG).
gboolean retro_controller_has_capability (RetroController *self,RetroControllerType controller_type);
Gets whether self
has the capability to represent the given controller type.
gboolean
retro_controller_get_supports_rumble (RetroController *self);
Gets whether self
supports rumble effects.
void retro_controller_set_rumble_state (RetroController *self,RetroRumbleEffect effect,guint16 strength);
Sets the rumble state of self
.
void
retro_controller_emit_state_changed (RetroController *self);
struct RetroControllerInterface {
GTypeInterface parent_iface;
gint16 (*get_input_state) (RetroController *self,
RetroInput *input);
RetroControllerType (*get_controller_type) (RetroController *self);
guint64 (*get_capabilities) (RetroController *self);
gboolean (*get_supports_rumble) (RetroController *self);
void (*set_rumble_state) (RetroController *self,
RetroRumbleEffect effect,
guint16 strength);
};
An interface for a controller, e.g. a gamepad.
“state-changed” signalvoid user_function (RetroController *retrocontroller, gpointer user_data)
Flags: Run First