<div dir="ltr"><div>Hi All,</div><div><br></div><div>I'm putting together a set of C# bindings for Wayland and it's coming along nicely but I've hit an issue with wl_registry_bind where its implementation doesn't seem to match the xml.</div><div><br></div><div>The wayland.xml file declares it as: (essentially one input parameter - name)<br></div><div><pre class="gmail-code gmail-highlight" lang="xml"><span id="gmail-LC137" class="gmail-line" lang="xml"> <span class="gmail-nt"><request</span> <span class="gmail-na">name=</span><span class="gmail-s">"bind"</span><span class="gmail-nt">></span></span>
<span id="gmail-LC138" class="gmail-line" lang="xml"> <span class="gmail-nt"><description</span> <span class="gmail-na">summary=</span><span class="gmail-s">"bind an object to the display"</span><span class="gmail-nt">></span></span>
<span id="gmail-LC139" class="gmail-line" lang="xml"> Binds a new, client-created object to the server using the</span>
<span id="gmail-LC140" class="gmail-line" lang="xml"> specified name as the identifier.</span>
<span id="gmail-LC141" class="gmail-line" lang="xml"> <span class="gmail-nt"></description></span></span>
<span id="gmail-LC142" class="gmail-line" lang="xml"> <span class="gmail-nt"><arg</span> <span class="gmail-na">name=</span><span class="gmail-s">"name"</span> <span class="gmail-na">type=</span><span class="gmail-s">"uint"</span> <span class="gmail-na">summary=</span><span class="gmail-s">"unique numeric name of the object"</span><span class="gmail-nt">/></span></span>
<span id="gmail-LC143" class="gmail-line" lang="xml"> <span class="gmail-nt"><arg</span> <span class="gmail-na">name=</span><span class="gmail-s">"id"</span> <span class="gmail-na">type=</span><span class="gmail-s">"new_id"</span> <span class="gmail-na">summary=</span><span class="gmail-s">"bounded object"</span><span class="gmail-nt">/></span></span>
<span id="gmail-LC144" class="gmail-line" lang="xml"> <span class="gmail-nt"></request></span></span>
<span id="gmail-LC145" class="gmail-line" lang="xml"></span>
</pre></div><div><br></div><div>But the C implementation has additional version and interface parameters and uses the wl_proxy_marshal_constructor_versioned - with apparently no hints in the xml as to why.</div><div><span style="font-family:monospace"><br></span><div><span style="font-family:monospace">static inline void *<br>wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const struct wl_interface *interface, uint32_t version)<br>{</span></div><span style="font-family:monospace"> struct wl_proxy *id;<br><br> id = wl_proxy_marshal_constructor_versioned((struct wl_proxy *) wl_registry,<br> WL_REGISTRY_BIND, interface, version, name, interface->name, version, NULL);<br><br> return (void *) id;<br>}</span><br></div><div><br></div><div>Similarly the xml file would suggest the message signature should be "un", but the C bindings have it as "usun".<br></div><div><br></div><div><div>What's going on here? Is this a special case for this one method?<br></div><div><br></div></div><div>Brad<br></div><div><br></div><div><br></div></div>