WAYLAND_SERVER_GLOBAL_T(3)
π wayland::server::global_t< resource > β Wayland++ manual, section 3 π¦
okay bestie so this is from the Wayland++ manual pages (section 3), and it's literally the whole wayland::server::global_t< resource > situation. it's a C++ class page, generated by Doxygen, and yes it's giving "template soup" but stick with me β it's actually super clean once you see it π
β¨ NAME β¨
wayland::server::global_t< resource > β the global object class, no cap π
πΈ SYNOPSIS πΈ
#include <wayland-server.hpp>
she inherits wayland::server::global_base_t β that's her mother, respect her π«Ά
π Public Member Functions
global_t (display_t &display, unsigned int version=resource::max_version)β the constructor, aka where the global gets born β¨std::function< void(client_t, resource)> & on_bind ()β hands you a reference to the bind-signal listener slot, so clients binding to you actually do something πtemplate<typename resource> bool has_interface ()β vibe check: does this global speak a specific interface? π
π Detailed Description π
template<class resource>
class wayland::server::global_t< resource >
it's a Global object, periodt π
π§ Template Parameters
- resource β the resource class whose interface shall be used. that's the whole personality of this template, fr fr β
Definition at line 625 of file wayland-server.hpp β go look, she's really there π
π Constructor & Destructor Documentation π
π« template<class resource> wayland::server::global_t< resource >::global_t
(display_t & display, unsigned int version = resource::max_version)
[inline]
Create a global object β that's the whole job, and she ate π₯
Parameters
- display β the parent display object, i.e. her home base π
- version β the interface version. defaults to
resource::max_versionin case you didn't clock it in the signature π
Definition at line 650 of file wayland-server.hpp
π Member Function Documentation π
π template<typename resource> bool wayland::server::global_base_t::has_interface ()
[inline], [inherited]
Check for specific interface. lowkey the most useful little function ever, inherited so you don't even have to write it yourself π«Ά
Template Parameters
- resource β the resource class you're comparing against π§
Returns
true if the global has the same interface as the resource class. yes, a real bool, not vibes π―
Definition at line 614 of file wayland-server.hpp
π§ template<class resource> std::function< void(client_t, resource)> & wayland::server::global_t< resource >::on_bind ()
[inline]
Adds a listener for the bind signal. this is the main character function honestly π
when a client binds to a global object, registered listeners will be notified, carrying the client_t object and the new resource_t object. so you get both the who and the what, iconic π
Definition at line 661 of file wayland-server.hpp
π Author π
Generated automatically by Doxygen for Wayland++ from the source code. not a human, a little documentation robot, and honestly she's doing great π€π
π quick heads up bestie: this page is auto-generated from the source, so if something looks weird in the signature (we've all seen wayland::serv..._t< resource >), that's the truncation talking, not you π
and that's the page!! Version 1.0.1, dated Fri Mar 27 2026 β mwah, go bind some globals, you're gonna slay πβ¨π¦
π¦ 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