Enums, bitfields and wl_arrays
Nils Chr. Brause
nilschrbrause at gmail.com
Thu Oct 1 12:00:30 PDT 2015
Hi,
On Thu, Oct 1, 2015 at 7:49 PM, Bryce Harrington <bryce at osg.samsung.com> wrote:
> The topic of adding better enum/bitfield support to the protocol has
> come up a few[0] times[1] in the past, and again more recently[2]. We
> also have several proposed patches in patchwork, but I'm not sure they
> reflect consensus and none have Reviewed-by's on them yet [3,4,5,6,7].
I think this topic was first brought up in September 2014, so it is
more than a year now.
> From what I gather of the discussions, no one is really against this
> feature conceptually, and impementationally the discussions appear to
> have moved further afield. It feels like we're real close to having
> something that could be landed, but it's not 100% clear to me what
> exactly to land. Since it's a protocol types change I would prefer to
> make sure it has a strong consensus before landing it.
>
> I know that several people have proposed patches on this - Bill, Nils
> and Auke at least. Since there's a definite need for this, and since
> agreement appears to be not far off, I would like to get this landed
> this release. And ideally I'd like to get this landed early in the
> release so we give plenty of time for testing.
That would be great.
> Since Auke's patchset proposalis the most recent, let's take that one as
> the candidate for landing. Gentlemen, I'd like to ask you to review
> these three patches [5,6,7] and either give your Reviewed-by's or flag
> specific improvements needed. If you have a more conceptual
> disagreement, and don't think the patchset is landable as implemented,
> please raise that issue asap too.
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.
The scanner code looks good to me and seems to work.
The documentation looks good to me, too.
>
> Bryce
>
> 0: http://lists.freedesktop.org/archives/wayland-devel/2015-April/021438.html
> 1: http://lists.freedesktop.org/archives/wayland-devel/2015-June/023008.html
> 2: http://lists.freedesktop.org/archives/wayland-devel/2015-September/024249.html
>
> 3: http://patchwork.freedesktop.org/patch/47726/
> 4: http://patchwork.freedesktop.org/patch/47727/
> 5: http://patchwork.freedesktop.org/patch/53018/
> 6: http://patchwork.freedesktop.org/patch/53019/
> 7: http://patchwork.freedesktop.org/patch/53020/
More information about the wayland-devel
mailing list