gi-gdk-4.0.3: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gdk.Objects.Seat

Description

The Seat object represents a collection of input devices that belong to a user.

Synopsis

Exported types

newtype Seat Source #

Memory-managed wrapper type.

Constructors

Seat (ManagedPtr Seat) 

Instances

Instances details
Eq Seat Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

Methods

(==) :: Seat -> Seat -> Bool #

(/=) :: Seat -> Seat -> Bool #

GObject Seat Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

ManagedPtrNewtype Seat Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

Methods

toManagedPtr :: Seat -> ManagedPtr Seat

TypedObject Seat Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

Methods

glibType :: IO GType

HasParentTypes Seat Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

IsGValue (Maybe Seat) Source #

Convert Seat to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Objects.Seat

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Seat -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Seat)

type ParentTypes Seat Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

type ParentTypes Seat = '[Object]

class (GObject o, IsDescendantOf Seat o) => IsSeat o Source #

Type class for types which can be safely cast to Seat, for instance with toSeat.

Instances

Instances details
(GObject o, IsDescendantOf Seat o) => IsSeat o Source # 
Instance details

Defined in GI.Gdk.Objects.Seat

toSeat :: (MonadIO m, IsSeat o) => o -> m Seat Source #

Cast to Seat, for types for which this is known to be safe. For general casts, use castTo.

Methods

getCapabilities

seatGetCapabilities Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m [SeatCapabilities]

Returns: the seat capabilities

Returns the capabilities this Seat currently has.

getDevices

seatGetDevices Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> [SeatCapabilities]

capabilities: capabilities to get devices for

-> m [Device]

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.

Returns the devices that match the given capabilities.

getDisplay

seatGetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m Display

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

Returns the Display this seat belongs to.

getKeyboard

seatGetKeyboard Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m (Maybe Device)

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

Returns the device that routes keyboard events.

getPointer

seatGetPointer Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m (Maybe Device)

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

Returns the device that routes pointer events.

getTools

seatGetTools Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: A Seat

-> m [DeviceTool]

Returns: A list of tools. Free with g_list_free().

Returns all GdkDeviceTools that are known to the application.

Properties

display

Display of this seat.

constructSeatDisplay :: (IsSeat o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “display” property. This is rarely needed directly, but it is used by new.

getSeatDisplay :: (MonadIO m, IsSeat o) => o -> m Display Source #

Get the value of the “display” property. When overloading is enabled, this is equivalent to

get seat #display

Signals

deviceAdded

type C_SeatDeviceAddedCallback = Ptr () -> Ptr Device -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type SeatDeviceAddedCallback Source #

Arguments

 = Device

device: the newly added Device.

-> IO () 

The deviceAdded signal is emitted when a new input device is related to this seat.

afterSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the deviceAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after seat #deviceAdded callback

genClosure_SeatDeviceAdded :: MonadIO m => SeatDeviceAddedCallback -> m (GClosure C_SeatDeviceAddedCallback) Source #

Wrap the callback into a GClosure.

onSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the deviceAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on seat #deviceAdded callback

deviceRemoved

type C_SeatDeviceRemovedCallback = Ptr () -> Ptr Device -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type SeatDeviceRemovedCallback Source #

Arguments

 = Device

device: the just removed Device.

-> IO () 

The deviceRemoved signal is emitted when an input device is removed (e.g. unplugged).

afterSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the deviceRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after seat #deviceRemoved callback

genClosure_SeatDeviceRemoved :: MonadIO m => SeatDeviceRemovedCallback -> m (GClosure C_SeatDeviceRemovedCallback) Source #

Wrap the callback into a GClosure.

onSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the deviceRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on seat #deviceRemoved callback

toolAdded

type C_SeatToolAddedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type SeatToolAddedCallback Source #

Arguments

 = DeviceTool

tool: the new DeviceTool known to the seat

-> IO () 

The toolAdded signal is 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 toolChanged signal accordingly.

A same tool may be used by several devices.

afterSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the toolAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after seat #toolAdded callback

genClosure_SeatToolAdded :: MonadIO m => SeatToolAddedCallback -> m (GClosure C_SeatToolAddedCallback) Source #

Wrap the callback into a GClosure.

mk_SeatToolAddedCallback :: C_SeatToolAddedCallback -> IO (FunPtr C_SeatToolAddedCallback) Source #

Generate a function pointer callable from C code, from a C_SeatToolAddedCallback.

onSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the toolAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on seat #toolAdded callback

toolRemoved

type C_SeatToolRemovedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type SeatToolRemovedCallback Source #

Arguments

 = DeviceTool

tool: the just removed DeviceTool

-> IO () 

This signal is emitted whenever a tool is no longer known to this seat.

afterSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the toolRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after seat #toolRemoved callback

genClosure_SeatToolRemoved :: MonadIO m => SeatToolRemovedCallback -> m (GClosure C_SeatToolRemovedCallback) Source #

Wrap the callback into a GClosure.

onSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the toolRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on seat #toolRemoved callback