Enums, bitfields and wl_arrays
Bill Spitzak
spitzak at gmail.com
Thu Oct 1 13:52:28 PDT 2015
On Thu, Oct 1, 2015 at 12:00 PM, Nils Chr. Brause <nilschrbrause at gmail.com>
wrote:
>
> There are some enum attributes missing, namely:
> - wl_shm_pool::create_buffer::format (it's wl_shm::format)
> - wl_shell_surface::set_fullscreen::method (it's
> wl_shell_surface::fullscreen_method)
> - wl_surface::set_buffer_transform::transform (it's wl_output::transform)
>
> I would prefer, if the enum attributes would also name the interface,
> where the enum can be found, e.g.:
> <arg name="format" type="uint" enum="wl_shm.format"/>
> If two enums in different interfaces happen to have the same name (if
> that's possible?), this would lead to ambiguities otherwise. Also a
> scanner wouldn't have to look up the interface name that way.
>
Oh rats, it does look like you are right, and the current patch just
skipped all the cross-object enums. There will have to be changes to the
xml translators to handle these.
I'm not sure how hard it is to make xml translators change behaviour
depending on whether there is a period in the string. If so then the
current protocol file patches could continue to work, by making "no period"
mean "in the current object". But it might be easier to just add the object
name to all enum attributes, like you propose. That could also leave open
the possibility that "no period" means some future "global" namespace for
the enum.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151001/b81cfbdf/attachment.html>
More information about the wayland-devel
mailing list