Top |
gboolean | manette_device_has_input () |
const gchar * | manette_device_get_name () |
const gchar * | manette_device_get_guid () |
char * | manette_device_get_mapping () |
gboolean | manette_device_has_user_mapping () |
void | manette_device_save_user_mapping () |
void | manette_device_remove_user_mapping () |
gboolean | manette_device_has_rumble () |
gboolean | manette_device_rumble () |
void | absolute-axis-event | Run Last |
void | button-press-event | Run Last |
void | button-release-event | Run Last |
void | disconnected | Run Last |
void | event | Run Last |
void | hat-axis-event | Run Last |
gboolean manette_device_has_input (ManetteDevice *self
,guint type
,guint code
);
Gets whether the device has the given input. If the input is present it means that the device can send events for it regardless of whether the device is mapped or not.
const gchar *
manette_device_get_name (ManetteDevice *self
);
Gets the device's name.
const gchar *
manette_device_get_guid (ManetteDevice *self
);
Gets the identifier used by SDL mappings to discriminate game controller devices.
Since: 0.3
char *
manette_device_get_mapping (ManetteDevice *self
);
Gets the user mapping for self
, or default mapping if there isn't any. Can
return NULL
if there's no mapping.
Since: 0.3
gboolean
manette_device_has_user_mapping (ManetteDevice *self
);
Gets whether self
has a user mapping.
void manette_device_save_user_mapping (ManetteDevice *self
,const gchar *mapping_string
);
Saves mapping_string
as the user mapping for self
.
void
manette_device_remove_user_mapping (ManetteDevice *self
);
Removes the user mapping for self
.
gboolean
manette_device_has_rumble (ManetteDevice *self
);
Gets whether self
supports rumble.
gboolean manette_device_rumble (ManetteDevice *self
,guint16 strong_magnitude
,guint16 weak_magnitude
,guint16 milliseconds
);
Make self
rumble during milliseconds
milliseconds, with the heavy and light
motors rumbling at their respectively defined magnitudes.
The duration cannot exceed 32767 milliseconds.
“absolute-axis-event”
signalvoid user_function (ManetteDevice *self, ManetteEvent *event, gpointer user_data)
Emitted when an absolute axis' value changes.
self |
||
event |
the event emitted by the manette device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“button-press-event”
signalvoid user_function (ManetteDevice *self, ManetteEvent *event, gpointer user_data)
Emitted when a button is pressed.
self |
||
event |
the event emitted by the manette device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“button-release-event”
signalvoid user_function (ManetteDevice *self, ManetteEvent *event, gpointer user_data)
Emitted when a button is released.
self |
||
event |
the event emitted by the manette device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“disconnected”
signalvoid user_function (ManetteDevice *self, gpointer user_data)
Emitted when the device is disconnected.
Flags: Run Last
“event”
signalvoid user_function (ManetteDevice *self, ManetteEvent *event, gpointer user_data)
Emitted for any kind of event before mapping it.
self |
||
event |
the event emitted by the manette device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“hat-axis-event”
signalvoid user_function (ManetteDevice *self, ManetteEvent *event, gpointer user_data)
Emitted when a hat axis' value changes.
self |
||
event |
the event emitted by the manette device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last