protocol rules question: is an array arg of object ids legal?
Is it legal for a protocol message to contain an array arg where the contents of the array are Wayland object ids? I don't see any instance of this in any current protocol descriptions I have.
Re: protocol rules question: is an array arg of object ids legal?
On Wednesday, December 27th, 2023 at 19:09, jleivent wrote: > Is it legal for a protocol message to contain an array arg where the > contents of the array are Wayland object ids? I don't see any instance > of this in any current protocol descriptions I have. Technically nothing prevents this, but this will be pretty awkward since client and server will need to convert to/from IDs (plus wrapping/unwrapping the wl_proxy for the client) and there won't be any type safety. In general it's better to have a request/event carrying a single object which can be sent multiple times to accumulate a list of objects.
Re: protocol rules question: is an array arg of object ids legal?
Thanks for the prompt answer! On Wed, 27 Dec 2023 18:17:32 + Simon Ser wrote: > On Wednesday, December 27th, 2023 at 19:09, jleivent > wrote: > > > Is it legal for a protocol message to contain an array arg where the > > contents of the array are Wayland object ids? I don't see any > > instance of this in any current protocol descriptions I have. > > Technically nothing prevents this, but this will be pretty awkward > since client and server will need to convert to/from IDs (plus > wrapping/unwrapping the wl_proxy for the client) and there won't be > any type safety. In general it's better to have a request/event > carrying a single object which can be sent multiple times to > accumulate a list of objects.