wayland::seat_t(3)

πŸ’– wayland::seat_t(3) β€” Wayland++ πŸ’–

okay so first thing, bestie, this is the wayland::seat_t(3) page from Wayland++ (that's the manual name, slay) β€” and it's giving "group of input devices" energy. Let's go. πŸŽ€


✨ NAME ✨

wayland::seat_t β€” group of input devices πŸ–±οΈβŒ¨οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <wayland-client-protocol.hpp>

Inherits wayland::proxy_t. yep, that's the parent, we love a legacy. πŸ’…

🌸 Public Types 🌸

  • enum class wrapper_type { standard, display, foreign, proxy_wrapper } β€” the little enum that tells you what flavor of underlying C pointer you're dealing with ✨

🌈 Public Member Functions 🌈

  • pointer_t get_pointer () β€” hands you the pointer object πŸ–±οΈ
  • keyboard_t get_keyboard () β€” hands you the keyboard object ⌨️
  • touch_t get_touch () β€” hands you the touch object πŸ‘†
  • void release () β€” releases the seat object, bye bestie πŸ‘‹
  • bool can_release () const β€” checks whether the release function is even available with the version of the protocol you've currently bound. lowkey important before you try it 😌
  • std::function< void(seat_capability)> & on_capabilities () β€” fired when the seat capabilities change
  • std::function< void(std::string)> & on_name () β€” the unique identifier for this seat
  • uint32_t get_id () const β€” gets the id of a proxy object πŸͺͺ
  • std::string get_class () const β€” gets the interface name (class) of a proxy object
  • uint32_t get_version () const β€” gets the protocol object version of a proxy object
  • wrapper_type get_wrapper_type () const β€” gets the type of a proxy object
  • void set_queue (event_queue_t queue) β€” assigns a proxy to an event queue πŸ“₯
  • wl_proxy * c_ptr () const β€” gets a pointer to the underlying C struct
  • bool proxy_has_object () const β€” checks whether this wrapper actually wraps an object
  • operator bool () const β€” also checks whether this wrapper actually wraps an object (same vibe, different syntax πŸ’€)
  • bool operator== (const proxy_t &right) const β€” checks whether two wrappers refer to the same object
  • bool operator!= (const proxy_t &right) const β€” checks whether two wrappers refer to different objects
  • void proxy_release () β€” releases the wrapped object (if there is one), leaving you with an empty wrapper πŸ«™

⭐ Static Public Attributes ⭐

  • static constexpr std::uint32_t get_pointer_since_version = 1 β€” the minimum protocol version required for the get_pointer function
  • static constexpr std::uint32_t get_keyboard_since_version = 1 β€” the minimum protocol version required for the get_keyboard function
  • static constexpr std::uint32_t get_touch_since_version = 1 β€” the minimum protocol version required for the get_touch function
  • static constexpr std::uint32_t release_since_version = 5 β€” the minimum protocol version required for the release function πŸ‘€ (five, not one β€” noted)

πŸ‘‘ Detailed Description πŸ‘‘

group of input devices. periodt.

A seat is a group of keyboards, pointer and touch devices. This object is published as a global during start up, or when such a device is hot plugged. A seat typically has a pointer and maintains a keyboard focus and a pointer focus. iykyk 🧚

Examples: egl.cpp, and proxy_wrapper.cpp. (yes those are real files, go look πŸ‘€)

Definition at line 2491 of file wayland-client-protocol.hpp. πŸ“


πŸ’œ Member Enumeration Documentation πŸ’œ

πŸ¦‹ enum class wayland::proxy_t::wrapper_type [strong], [inherited] πŸ¦‹

Underlying wl_proxy type and properties of a proxy_t that affect construction, destruction, and event handling. this is the lore you need, fr fr πŸ“–

Enumerator:

  • standard β€” the C pointer is a standard type compatible with wl_proxy*. Events are dispatched and it is destructed when the proxy_t is destructed. User data is set. ✨
  • display β€” the C pointer is a wl_display*. No events are dispatched, wl_display_disconnect is called when the proxy_t is destructed. User data is set. πŸ–₯️
  • foreign β€” the C pointer is a standard type compatible with wl_proxy*, but another library owns it and it should not be touched in a way that could affect the operation of the other library. No events are dispatched, wl_proxy_destroy is not called when the proxy_t is destructed, user data is not touched. Consequently, there is no reference counting for the proxy_t. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy the wl_proxy. 🫢 (respect other people's objects, bestie)
  • proxy_wrapper β€” the C pointer is a wl_proxy* that was constructed with wl_proxy_create_wrapper. No events are dispatched, wl_proxy_wrapper_destroy is called when the proxy_t is destroyed. Reference counting is active. A reference to the proxy_t creating this proxy wrapper is held to extend its lifetime until after the proxy wrapper is destroyed. πŸŽ€

Definition at line 117 of file wayland-client.hpp. πŸ“


okay that's the tea so far β€” more coming, don't go anywhere πŸ’–

🫢 wl_proxy * wayland::proxy_t::c_ptr () const [inherited]

The "hand me the actual C struct" button πŸ’… β€” this one gives you back the raw wl_proxy that this proxy_t is all wrapped up in.

  • Returns β€” the underlying wl_proxy that this proxy_t is carrying around... assuming it has one. If it doesn't? An exception gets thrown. No quiet nullptr, no vibes, just an exception. 😭

✨ bool seat_t::can_release () const

A lil vibe check on whether you're allowed to call release: it tells you if the release function is actually available with the protocol version you're currently bound to. πŸŽ€

Definition at line 2875 of file wayland-client-protocol.cpp.


🌸 std::string wayland::proxy_t::get_class () const [inherited]

Wanna know what your proxy actually is? This gives you the interface name (aka the class) of a proxy object.

  • Returns β€” the interface name of the object that the proxy is associated with

πŸ¦‹ uint32_t wayland::proxy_t::get_id () const [inherited]

Grabs the id of a proxy object.

  • Returns β€” the id of the object the proxy is associated with

πŸ‘‘ keyboard_t seat_t::get_keyboard ()

Returns you a keyboard object, bestie. ⌨️

  • Returns β€” the seat keyboard

The ID you hand in gets initialized to the wl_keyboard interface for this seat.

Now this is the part where you gotta pay attention: this request only takes effect if the seat has the keyboard capability, or has had it in the past. Issuing this request on a seat that has never had the keyboard capability is a protocol violation, and the missing_capability error will be sent in that case. 🚨

Examples: proxy_wrapper.cpp.

Definition at line 2856 of file wayland-client-protocol.cpp.


πŸ“ pointer_t seat_t::get_pointer ()

Returns you a pointer object. πŸ–±οΈ

  • Returns β€” the seat pointer

The ID you hand in gets initialized to the wl_pointer interface for this seat.

Same deal as the keyboard: this request only takes effect if the seat has the pointer capability, or has had it in the past. Asking for a pointer on a seat that has never had the pointer capability is a protocol violation β€” missing_capability error, incoming. πŸ’€

Definition at line 2849 of file wayland-client-protocol.cpp.


🧚 touch_t seat_t::get_touch ()

Returns you a touch object. πŸ‘†

  • Returns β€” the seat touch interface

The ID you hand in gets initialized to the wl_touch interface for this seat.

And yep, the same rule a third time: it only takes effect if the seat has the touch capability, or has had it in the past. Doing this on a seat that has never had the touch capability is a protocol violation, and missing_capability gets sent. πŸ™ˆ

Definition at line 2863 of file wayland-client-protocol.cpp.


🌈 uint32_t wayland::proxy_t::get_version () const [inherited]

Asks a proxy object what protocol object version it's running. If the proxy was created with the unversioned API, you get 0 back.

Lowkey important: a return of 0 means there's no version info available, so you have to make safe assumptions about the object's real version. No cap.

Also, display_t will always return version 0.

  • Returns β€” the protocol object version of the proxy, or 0

πŸ’œ wrapper_type wayland::proxy_t::get_wrapper_type () const [inline], [inherited]

Tells you the type of a proxy object.

Definition at line 303 of file wayland-client.hpp.


πŸ’– std::function< void(seat_capability)> & seat_t::on_capabilities ()

Seat capabilities changed, bestie β€” this is the event that fires for it. πŸ””

  • Parameters β€” capabilities: the capabilities of the seat

This fires whenever a seat gains or loses the pointer, keyboard or touch capabilities. The argument is a capability enum containing the complete set of capabilities this seat has. (Complete set, not a diff β€” important!)

When the pointer capability gets added, a client may create a wl_pointer object using the wl_seat.get_pointer request. That object will receive pointer events until the capability is removed in the future.

When the pointer capability gets removed, a client should destroy the wl_pointer objects associated with the seat where the capability was removed, using the wl_pointer.release request. No further pointer events will be received on those objects. 🫢

In some compositors, if a seat regains the pointer capability and a client has a previously obtained wl_pointer object of version 4 or less, that object may start sending pointer events again. This behavior is considered a misinterpretation of the intended behavior and must not be relied upon by the client. wl_pointer objects of version 5 or later must not send events if they were created before the most recent event notifying the client of an added pointer capability. ⚠️

All of the above also applies to wl_keyboard and wl_touch, with the keyboard and touch capabilities respectively.

Definition at line 2881 of file wayland-client-protocol.cpp.


πŸŽ€ std::function< void(std::string)> & seat_t::on_name ()

A unique identifier for this seat β€” the name event. 🏷️

  • Parameters β€” name: the seat identifier

In a multi-seat configuration, the seat name can be used by clients to help identify which physical devices the seat represents.

The seat name is a UTF-8 string with no convention defined for its contents. Each name is unique among all wl_seat globals, and it's only guaranteed to be unique for the current compositor instance.

The same seat names are used for all clients β€” so the name can be shared across processes to refer to a specific wl_seat global. Slay, cross-process communication. πŸ¦‹

The name event is sent after binding to the seat global. It's sent only once per seat object, and the name does not change over the lifetime of the wl_seat global.

Compositors may re-use the same seat name if the wl_seat global is destroyed and re-created later.

Definition at line 2886 of file wayland-client-protocol.cpp.


⭐ wayland::proxy_t::operator bool () const [inherited]

Checks whether this wrapper actually wraps an object β€” the realest question you can ask.

  • Returns β€” true if there is an underlying object, false if this wrapper is empty

πŸ’« bool wayland::proxy_t::operator!= (const proxy_t & right) const [inherited]

Checks whether two wrappers refer to different objects.


πŸ’« bool wayland::proxy_t::operator== (const proxy_t & right) const [inherited]

Checks whether two wrappers refer to the same object.


🌸 bool wayland::proxy_t::proxy_has_object () const [inherited]

Checks whether this wrapper actually wraps an object.

  • Returns β€” true if there is an underlying object, false if this wrapper is empty

πŸ”₯ void wayland::proxy_t::proxy_release () [inherited]

Releases the wrapped object (if there is one), leaving this as an empty wrapper.

Heads up: display_t instances cannot be released this way. Attempts to do so are just ignored. πŸ’€

Examples: foreign_display.cpp.


πŸ•ŠοΈ void seat_t::release ()

Releases the seat object. Using this request, a client can tell the server that it is not going to use the seat object anymore. Bye bestie πŸ‘‹

Definition at line 2870 of file wayland-client-protocol.cpp.


🎧 void wayland::proxy_t::set_queue (event_queue_t queue) [inherited]

Assigns a proxy to an event queue.

  • Parameters β€” queue: the event queue that will handle this proxy

Assigns the proxy to the event queue. Events coming from the proxy get queued in queue instead of the display's main queue.

See also: display_t::dispatch_queue().

Examples: proxy_wrapper.cpp.


πŸ’Ž MEMBER DATA DOCUMENTATION πŸ’Ž

⭐ std::uint32_t wayland::seat_t::get_keyboard_since_version = 1 [static], [constexpr]

The minimum protocol version required for the get_keyboard function.

Definition at line 2551 of file wayland-client-protocol.hpp.


⭐ std::uint32_t wayland::seat_t::get_pointer_since_version = 1 [static], [constexpr]

The minimum protocol version required for the get_pointer function.

Definition at line 2532 of file wayland-client-protocol.hpp.


⭐ std::uint32_t wayland::seat_t::get_touch_since_version = 1 [static], [constexpr]

The minimum protocol version required for the get_touch function.

Definition at line 2570 of file wayland-client-protocol.hpp.


πŸ‘‘ std::uint32_t wayland::seat_t::release_since_version = 5 [static], [constexpr]

The minimum protocol version required for the release function. Not 1 β€” it's 5, note it and remember it. πŸŽ€

Definition at line 2582 of file wayland-client-protocol.hpp.


🌟 AUTHOR 🌟

Generated automatically by Doxygen for Wayland++ from the source code. (Doxygen really said "I'll write your docs for you" and honestly? iconic.)


That's the whole page, bestie β€” you ate that πŸ’…βœ¨ This was wayland::seat_t(3) from Wayland++, Version 1.0.1, dated Fri Mar 27 2026 13:15:00. Go forth and seat responsibly πŸ¦‹πŸ’–

πŸ“¦ where this page comes from