gtkmm: Gdk::Seat Class Reference

gtkmm 4.2.0

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gdk::Seat Class Reference

A Gdk::Seat object represents a collection of input devices that belong to a user. More...

`#include <gdkmm/seat.h>`

Inheritance diagram for Gdk::Seat:
[legend]

## Public Types
enum class | Capabilities { NONE = 0x0 , POINTER = 1 << 0 , TOUCH = 1 << 1 , TABLET_STYLUS = 1 << 2 , KEYBOARD = 1 << 3 , TABLET_PAD = 1 << 4 , ALL_POINTING = 0x7 , ALL = 0xF }
| Flags describing the seat capabilities. More...
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)

## Public Member Functions
| Seat (Seat&& src) noexcept
Seat& | operator= (Seat&& src) noexcept
| ~Seat () noexcept override
GdkSeat* | gobj ()
| Provides access to the underlying C GObject. More...
const GdkSeat* | gobj () const
| Provides access to the underlying C GObject. More...
GdkSeat* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::RefPtr< Display > | get_display ()
| Returns the `GdkDisplay` this seat belongs to. More...
Glib::RefPtr< const Display > | get_display () const
| Returns the `GdkDisplay` this seat belongs to. More...
Capabilities | get_capabilities () const
| Returns the capabilities this `GdkSeat` currently has. More...
std::vector< Glib::RefPtr< Device > > | get_devices (Capabilities capabilities)
| Returns the devices that match the given capabilities. More...
std::vector< Glib::RefPtr< const Device > > | get_devices (Capabilities capabilities) const
| Returns the devices that match the given capabilities. More...
std::vector< Glib::RefPtr< DeviceTool > > | get_tools ()
| Returns all `GdkDeviceTools` that are known to the application. More...
std::vector< Glib::RefPtr< const DeviceTool > > | get_tools () const
| Returns all `GdkDeviceTools` that are known to the application. More...
Glib::RefPtr< Device > | get_pointer ()
| Returns the device that routes pointer events. More...
Glib::RefPtr< const Device > | get_pointer () const
| Returns the device that routes pointer events. More...
Glib::RefPtr< Device > | get_keyboard ()
| Returns the device that routes keyboard events. More...
Glib::RefPtr< const Device > | get_keyboard () const
| Returns the device that routes keyboard events. More...
Glib::SignalProxy< void(const Glib::RefPtr< Device >&)> | signal_device_added ()
Glib::SignalProxy< void(const Glib::RefPtr< Device >&)> | signal_device_removed ()
Glib::SignalProxy< void(const Glib::RefPtr< DeviceTool >&)> | signal_tool_added ()
Glib::SignalProxy< void(const Glib::RefPtr< DeviceTool >&)> | signal_tool_removed ()
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Display > > | property_display () const
| `GdkDisplay` of this seat. More...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
PropertyType | get_property (const Glib::ustring &property_name) const
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions
| Seat ()
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexcept override
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gdk::Seat > | wrap (GdkSeat* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Detailed Description

A Gdk::Seat object represents a collection of input devices that belong to a user.

Since gtkmm 3.20:

## Constructor & Destructor Documentation

## ◆ Seat() [1/2]

Gdk::Seat::Seat | ( | Seat&& | src | ) |
| noexcept

## ◆ ~Seat()

Gdk::Seat::~Seat | ( |  | ) |
| overridenoexcept

## ◆ Seat() [2/2]

Gdk::Seat::Seat | ( |  | ) |
| protected

## Member Function Documentation

## ◆ get_capabilities()

Capabilities Gdk::Seat::get_capabilities | ( |  | ) | const

Returns the capabilities this `GdkSeat` currently has.

Returns
  The seat capabilities.

## ◆ get_devices() [1/2]

std::vector<Glib::RefPtr<Device> > Gdk::Seat::get_devices | ( | Capabilities | capabilities | ) |

Returns the devices that match the given capabilities.

Parameters

  capabilities | Capabilities to get devices for.

Returns
  A list of `GdkDevices`.

## ◆ get_devices() [2/2]

std::vector<Glib::RefPtr<const Device> > Gdk::Seat::get_devices | ( | Capabilities | capabilities | ) | const

Returns the devices that match the given capabilities.

Parameters

  capabilities | Capabilities to get devices for.

Returns
  A list of `GdkDevices`.

## ◆ get_display() [1/2]

Glib::RefPtr<Display> Gdk::Seat::get_display | ( |  | ) |

Returns the `GdkDisplay` this seat belongs to.

Returns
  A `GdkDisplay`. This object is owned by GTK and must not be freed.

## ◆ get_display() [2/2]

Glib::RefPtr<const Display> Gdk::Seat::get_display | ( |  | ) | const

Returns the `GdkDisplay` this seat belongs to.

Returns
  A `GdkDisplay`. This object is owned by GTK and must not be freed.

## ◆ get_keyboard() [1/2]

Glib::RefPtr<Device> Gdk::Seat::get_keyboard | ( |  | ) |

Returns the device that routes keyboard events.

Returns
  A `GdkDevice` with keyboard capabilities. This object is owned by GTK and must not be freed.

## ◆ get_keyboard() [2/2]

Glib::RefPtr<const Device> Gdk::Seat::get_keyboard | ( |  | ) | const

Returns the device that routes keyboard events.

Returns
  A `GdkDevice` with keyboard capabilities. This object is owned by GTK and must not be freed.

## ◆ get_pointer() [1/2]

Glib::RefPtr<Device> Gdk::Seat::get_pointer | ( |  | ) |

Returns the device that routes pointer events.

Returns
  A `GdkDevice` with pointer capabilities. This object is owned by GTK and must not be freed.

## ◆ get_pointer() [2/2]

Glib::RefPtr<const Device> Gdk::Seat::get_pointer | ( |  | ) | const

Returns the device that routes pointer events.

Returns
  A `GdkDevice` with pointer capabilities. This object is owned by GTK and must not be freed.

## ◆ get_tools() [1/2]

std::vector<Glib::RefPtr<DeviceTool> > Gdk::Seat::get_tools | ( |  | ) |

Returns all `GdkDeviceTools` that are known to the application.

Returns
  A list of tools.

## ◆ get_tools() [2/2]

std::vector<Glib::RefPtr<const DeviceTool> > Gdk::Seat::get_tools | ( |  | ) | const

Returns all `GdkDeviceTools` that are known to the application.

Returns
  A list of tools.

## ◆ get_type()

static GType Gdk::Seat::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ gobj() [1/2]

GdkSeat* Gdk::Seat::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GdkSeat* Gdk::Seat::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

GdkSeat* Gdk::Seat::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## ◆ operator=()

Seat& Gdk::Seat::operator= | ( | Seat&& | src | ) |
| noexcept

## ◆ property_display()

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > Gdk::Seat::property_display | ( |  | ) | const

`GdkDisplay` of this seat.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ signal_device_added()

Glib::SignalProxy<void(const Glib::RefPtr<Device>&)> Gdk::Seat::signal_device_added | ( |  | ) |

Slot Prototype:
  `void on_my_device_added(const Glib::RefPtr<Device>& device)`

Flags: Run Last

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

Parameters

  device | The newly added `GdkDevice`.

## ◆ signal_device_removed()

Glib::SignalProxy<void(const Glib::RefPtr<Device>&)> Gdk::Seat::signal_device_removed | ( |  | ) |

Slot Prototype:
  `void on_my_device_removed(const Glib::RefPtr<Device>& device)`

Flags: Run Last

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

Parameters

  device | The just removed `GdkDevice`.

## ◆ signal_tool_added()

Glib::SignalProxy<void(const Glib::RefPtr<DeviceTool>&)> Gdk::Seat::signal_tool_added | ( |  | ) |

Slot Prototype:
  `void on_my_tool_added(const Glib::RefPtr<DeviceTool>& device)`

Flags: Run Last

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 [signalGdkDevice::tool-changed] signal accordingly.

A same tool may be used by several devices.

Since gtkmm 3.94:

Parameters

  device | The new `GdkDeviceTool` known to the seat.

## ◆ signal_tool_removed()

Glib::SignalProxy<void(const Glib::RefPtr<DeviceTool>&)> Gdk::Seat::signal_tool_removed | ( |  | ) |

Slot Prototype:
  `void on_my_tool_removed(const Glib::RefPtr<DeviceTool>& device)`

Flags: Run Last

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

Since gtkmm 3.94:

Parameters

  device | The just removed `GdkDeviceTool`.

## Friends And Related Function Documentation

## ◆ wrap()

Glib::RefPtr< Gdk::Seat > wrap | ( | GdkSeat * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.