Sujet : Re: Help requested with P99-based macro to create Wayland listeners
De : bluemanedhawk (at) *nospam* invalid.invalid (Blue-Maned_Hawk)
Groupes : comp.lang.cDate : 09. Apr 2024, 21:20:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <pan$57aa8$bcee1756$62f53bf3$9223a50a@invalid.invalid>
References : 1 2 3 4
User-Agent : Pan/0.154 (Izium; 517acf4)
David Brown wrote:
On 09/04/2024 20:17, Blue-Maned_Hawk wrote:
Tim Rentsch wrote:
What is it that you want to accomplish?
As i stated in the subject line, i am trying to create a macro to
create Wayland listeners.
Assume, for the sake of argument, that no one knows or cares anything
about Wayland or listeners.
<
https://xkcd.com/1432/>
You are trying to use a set macros to expand to some code. Start by
showing what code you want to get from examples of using your macros -
then people can try to help get the macros right.
MAKE_LISTENER(wl_registry, global, global_remove);
→
static const struct wl_registry_listener wl_registry_listener = { .global
= callback_wl_registry_global, .global_remove =
callback_wl_registry_global_remove };
–
MAKE_LISTENER(xdg_wm_base, configure, close, configure_bounds,
wm_capabilities);
→
static const struct xdg_wm_base_listener xdg_wm_base_listener =
{ .configure = callback_xdg_wm_base_configure, .close =
callback_xdg_wm_base_close, .configure_bounds =
callback_xdg_wm_base_configure_bounds, .wm_capabilities =
callback_xdg_wm_base_wm_capabilities };
-- Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr.blue-maned_hawk.srht.siteEating carpets strictly prohibited!