Manette.Device – manette-0.2 Reference Manual
Packages
manette-0.2
Manette
Device
Device
get_device_type
get_guid
get_mapping
get_name
has_input
has_rumble
has_user_mapping
remove_user_mapping
rumble
save_user_mapping
supports_mapping
absolute_axis_event
button_press_event
button_release_event
disconnected
event
hat_axis_event
Device
Object Hierarchy:
Description:
[
CCode
( type_id =
"manette_device_get_type ()"
) ]
public
class
Device
:
Object
An object representing a physical gamepad.
See also: [class@Monitor].
Namespace:
Manette
Package:
manette-0.2
Content:
Creation methods:
protected
Device
()
Methods:
public
DeviceType
get_device_type
()
Gets the device type of
this
.
public
unowned
string
get_guid
()
Gets the identifier used by SDL mappings to discriminate game controller devices.
public
string
?
get_mapping
()
Gets the user mapping for
this
, or default mapping if there isn't any.
public
unowned
string
get_name
()
Gets the device's name.
public
bool
has_input
(
uint
type,
uint
code)
Gets whether the device has the given input.
public
bool
has_rumble
()
Gets whether
this
supports rumble.
public
bool
has_user_mapping
()
Gets whether
this
has a user mapping.
public
void
remove_user_mapping
()
Removes the user mapping for
this
.
public
bool
rumble
(
uint16
strong_magnitude,
uint16
weak_magnitude,
uint16
milliseconds)
Make
this
rumble during
milliseconds
milliseconds.
public
void
save_user_mapping
(
string
mapping_string)
Saves
mapping_string
as the user mapping for
this
.
public
bool
supports_mapping
()
Gets whether
this
supports mapping.
Signals:
public
signal
void
absolute_axis_event
(
Event
event)
Emitted when an absolute axis' value changes.
public
signal
void
button_press_event
(
Event
event)
Emitted when a button is pressed.
public
signal
void
button_release_event
(
Event
event)
Emitted when a button is released.
public
signal
void
disconnected
()
Emitted when the device is disconnected.
public
signal
void
event
(
Event
event)
Emitted for any kind of event before mapping it.
public
signal
void
hat_axis_event
(
Event
event)
Emitted when a hat axis' value changes.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref