wayland::callback_t(3)
πΈ NAME πΈ
wayland::callback_t β the callback object, bestie β¨
π¦ SYNOPSIS π¦
#include <wayland-client-protocol.hpp>
Inherits wayland::proxy_t. That's its whole lineage, no cap π
π Public Types π
enum class wrapper_type { standard, display, foreign, proxy_wrapper }β the four flavors of proxy-wrapper energy, explained in full down below π
π«Ά Public Member Functions π«Ά
std::function< void(uint32_t)> & on_done ()β the done event, aka the "we're so back" notificationuint32_t get_id () constβ grab the id of a proxy objectstd::string get_class () constβ grab the interface name (class) of a proxy objectuint32_t get_version () constβ grab the protocol object version of a proxy objectwrapper_type get_wrapper_type () constβ find out what type of proxy object this isvoid set_queue (event_queue_t queue)β assign a proxy to an event queuewl_proxy * c_ptr () constβ get a pointer to the underlying C structbool proxy_has_object () constβ check whether this wrapper actually wraps an objectoperator bool () constβ same vibe check, but bool-flavoredbool operator== (const proxy_t &right) constβ check whether two wrappers refer to the same objectbool operator!= (const proxy_t &right) constβ check whether two wrappers refer to different objectsvoid proxy_release ()β release the wrapped object (if there is one), leaving you with an empty wrapper
π DETAILED DESCRIPTION π
callback_t is a callback object, periodt.
Clients can handle the 'done' event to get notified when the related request is done. That's literally the entire personality, and honestly? Iconic. π₯
Examples: egl.cpp.
Definition at line 212 of file wayland-client-protocol.hpp.
π MEMBER ENUMERATION DOCUMENTATION π
enum class wayland::proxy_t::wrapper_type [strong], [inherited]
This enum tells you the underlying wl_proxy type and the properties of a proxy_t that affect construction, destruction, and event handling. Basically the astrology of proxies π
Enumerator:
standardβ the C pointer is a standard type compatible withwl_proxy*. Events are dispatched and it is destructed when theproxy_tis destructed. User data is set.displayβ the C pointer is awl_display*. No events are dispatched,wl_display_disconnectis called when theproxy_tis destructed. User data is set.foreignβ the C pointer is a standard type compatible withwl_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_destroyis not called when theproxy_tis destructed, user data is not touched. Consequently, there is no reference counting for theproxy_t. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy thewl_proxy. π«£ (hands off, it's not yours!!)proxy_wrapperβ the C pointer is awl_proxy*that was constructed withwl_proxy_create_wrapper. No events are dispatched,wl_proxy_wrapper_destroyis called when theproxy_tis destroyed. Reference counting is active. A reference to theproxy_tcreating 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.
β¨ MEMBER FUNCTION DOCUMENTATION β¨
wl_proxy * wayland::proxy_t::c_ptr () const [inherited]
Get a pointer to the underlying C struct.
Returns: the underlying wl_proxy wrapped by this proxy_t if it exists β otherwise an exception is thrown π (so maybe don't be surprised-pikachu when it throws)
std::string wayland::proxy_t::get_class () const [inherited]
Get the interface name (class) of a proxy object.
Returns: the interface name of the object associated with the proxy
uint32_t wayland::proxy_t::get_id () const [inherited]
Get the id of a proxy object.
Returns: the id of the object associated with the proxy
uint32_t wayland::proxy_t::get_version () const [inherited]
Get the protocol object version of a proxy object. Gets the protocol object version of a proxy object, or 0 if the proxy was created with unversioned API.
A returned value of 0 means that no version information is available, so the caller must make safe assumptions about the object's real version. β οΈ no vibes-based guessing, make safe assumptions.
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]
Get the type of a proxy object.
Definition at line 303 of file wayland-client.hpp.
std::function< void(uint32_t)> & callback_t::on_done ()
The done event π
Parameters: callback_data β request-specific data for the callback
Notify the client when the related request is done. That's the whole thing. You get pinged, you move on, slay.
Definition at line 1680 of file wayland-client-protocol.cpp.
wayland::proxy_t::operator bool () const [inherited]
Check whether this wrapper actually wraps an object.
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]
Check whether two wrappers refer to different objects.
bool wayland::proxy_t::operator== (const proxy_t & right) const [inherited]
Check whether two wrappers refer to the same object.
bool wayland::proxy_t::proxy_has_object () const [inherited]
Check 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]
Release the wrapped object (if any), making this an empty wrapper. Note that display_t instances cannot be released this way. Attempts to do so are ignored. π (it's giving "I'm not doing that and you can't make me")
Examples: foreign_display.cpp.
void wayland::proxy_t::set_queue (event_queue_t queue) [inherited]
Assign a proxy to an event queue.
Parameters: queue β the event queue that will handle this proxy
Assign proxy to event queue. Events coming from proxy will be queued in queue instead of the display's main queue.
See also: display_t::dispatch_queue().
Examples: proxy_wrapper.cpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code. (Not a human, just very efficient π )
Ok that's the whole page, bestie β auto-generated by Doxygen for Wayland++ π§, Version 1.0.1, dated Fri Mar 27 2026 13:15:00. Go forth and let your callbacks tell you when things are done π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms