Struct input::DeviceGroup[][src]

pub struct DeviceGroup { /* fields omitted */ }
Expand description

Device group

Some physical devices like graphics tablets are represented by multiple kernel devices and thus by multiple Devices.

libinput assigns these devices to the same DeviceGroup allowing the caller to identify such devices and adjust configuration settings accordingly. For example, setting a tablet to left-handed often means turning it upside down. A touch device on the same tablet would need to be turned upside down too to work correctly.

All devices are part of a device group though for most devices the group will be a singleton. A device is assigned to a device group on DeviceAddedEvent and removed from that group on DeviceRemovedEvent. It is up to the caller to track how many devices are in each device group.

Device groups do not get re-used once the last device in the group was removed, i.e. unplugging and re-plugging a physical device with grouped devices will return a different device group after every unplug.

Device groups are assigned based on the LIBINPUT_DEVICE_GROUP udev property, see Static device configuration via udev.

Trait Implementations

Receive a raw pointer representing this type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the underlying libinput context

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Create a new instance of this type from a raw pointer and it’s context. If the type of the struct is a valid libinput type, but is unknown to this library, it panics instead. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.