Trait gdk4::prelude::SeatExt

source ·
pub trait SeatExt: IsA<Seat> + Sealed + 'static {
    // Provided methods
    fn capabilities(&self) -> SeatCapabilities { ... }
    fn devices(&self, capabilities: SeatCapabilities) -> Vec<Device> { ... }
    fn display(&self) -> Display { ... }
    fn keyboard(&self) -> Option<Device> { ... }
    fn pointer(&self) -> Option<Device> { ... }
    fn tools(&self) -> Vec<DeviceTool> { ... }
    fn connect_device_added<F: Fn(&Self, &Device) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
    fn connect_device_removed<F: Fn(&Self, &Device) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
    fn connect_tool_added<F: Fn(&Self, &DeviceTool) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
    fn connect_tool_removed<F: Fn(&Self, &DeviceTool) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Seat methods.

Implementors

Seat

Provided Methods§

source

fn capabilities(&self) -> SeatCapabilities

Returns the capabilities this Seat currently has.

Returns

the seat capabilities

source

fn devices(&self, capabilities: SeatCapabilities) -> Vec<Device>

Returns the devices that match the given capabilities.

capabilities

capabilities to get devices for

Returns

A list of GdkDevices. The list must be freed with g_list_free(), the elements are owned by GTK and must not be freed.

source

fn display(&self) -> Display

Returns the Display this seat belongs to.

Returns

a Display. This object is owned by GTK and must not be freed.

source

fn keyboard(&self) -> Option<Device>

Returns the device that routes keyboard events.

Returns

a Device with keyboard capabilities. This object is owned by GTK and must not be freed.

source

fn pointer(&self) -> Option<Device>

Returns the device that routes pointer events.

Returns

a Device with pointer capabilities. This object is owned by GTK and must not be freed.

source

fn tools(&self) -> Vec<DeviceTool>

Returns all GdkDeviceTools that are known to the application.

Returns

A list of tools. Free with g_list_free().

source

fn connect_device_added<F: Fn(&Self, &Device) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when a new input device is related to this seat.

device

the newly added Device.

source

fn connect_device_removed<F: Fn(&Self, &Device) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when an input device is removed (e.g. unplugged).

device

the just removed Device.

source

fn connect_tool_added<F: Fn(&Self, &DeviceTool) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted whenever a new tool is made known to the seat.

The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the tool-changed signal accordingly.

A same tool may be used by several devices.

tool

the new DeviceTool known to the seat

source

fn connect_tool_removed<F: Fn(&Self, &DeviceTool) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted whenever a tool is no longer known to this @seat.

tool

the just removed DeviceTool

Implementors§

source§

impl<O: IsA<Seat>> SeatExt for O