[PATCH wayland v3 2/4] protocol: specify enum and bitfield attributes

Erik De Rijcke derijcke.erik at gmail.com
Mon Oct 26 13:20:25 PDT 2015


This is just some small FYI status feedback from the Java bindings, so it
doesn't get lost/people know.


from irc #wayland:

19:57 < bryce> anyone working on or interested in language bindings, would
be great to get your Reviewed-by or even just Acked-by on Auke's enum
patchset from today.
19:58 < bryce> We're about ready to land it, but since it's a change to the
protocol syntax want to just check that we've had a wide enough array of
folks take a look at it.

19:59 < zubzub> if I understand correctly they don't implement open/closed
enums yet right?
19:59 < zubzub> and they don't guarentee order right?
20:02 < zubzub> and the order thing will probably be never guaranteed as I
understand it(?)
20:02 < zubzub> at least it's not formally agreed like that aside from "be
compatible" whatever that means

20:19 < bryce> closed enums are left for future work
20:20 < bryce> I'd need to doublecheck on the ordering implications

21:00 < zubzub> so yeah, as lang as the 2 things I mentioned arent
resolved, the whole enum thing will not be applicable for me (Java)

21:08 < bryce> zubzub, mind commenting so on the list?

21:17 < zubzub> bryce: sure I'll c/p the irc convo for record keeping


On Sat, Oct 24, 2015 at 1:07 PM, Auke Booij <auke at tulcod.com> wrote:

> Signed-off-by: Auke Booij <auke at tulcod.com>
> ---
>  protocol/wayland.xml | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 59819e9..9c22d45 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -367,7 +367,7 @@
>         can be used for buffers. Known formats include
>         argb8888 and xrgb8888.
>        </description>
> -      <arg name="format" type="uint"/>
> +      <arg name="format" type="uint" enum="format"/>
>      </event>
>    </interface>
>
> @@ -746,7 +746,7 @@
>        <arg name="serial" type="uint" summary="serial of the implicit grab
> on the pointer"/>
>      </request>
>
> -    <enum name="resize">
> +    <enum name="resize" bitfield="true">
>        <description summary="edge values for resizing">
>         These values are used to indicate which edge of a surface
>         is being dragged in a resize operation. The server may
> @@ -774,7 +774,7 @@
>        </description>
>        <arg name="seat" type="object" interface="wl_seat" summary="the
> wl_seat whose pointer is used"/>
>        <arg name="serial" type="uint" summary="serial of the implicit grab
> on the pointer"/>
> -      <arg name="edges" type="uint" summary="which edge or corner is
> being dragged"/>
> +      <arg name="edges" type="uint" enum="resize" summary="which edge or
> corner is being dragged"/>
>      </request>
>
>      <request name="set_toplevel">
> @@ -785,7 +785,7 @@
>        </description>
>      </request>
>
> -    <enum name="transient">
> +    <enum name="transient" bitfield="true">
>        <description summary="details of transient behaviour">
>         These flags specify details of the expected behaviour
>         of transient surfaces. Used in the set_transient request.
> @@ -807,7 +807,7 @@
>        <arg name="parent" type="object" interface="wl_surface"/>
>        <arg name="x" type="int"/>
>        <arg name="y" type="int"/>
> -      <arg name="flags" type="uint"/>
> +      <arg name="flags" type="uint" enum="transient"/>
>      </request>
>
>      <enum name="fullscreen_method">
> @@ -858,7 +858,7 @@
>         with the dimensions for the output on which the surface will
>         be made fullscreen.
>        </description>
> -      <arg name="method" type="uint"/>
> +      <arg name="method" type="uint" enum="fullscreen_method"/>
>        <arg name="framerate" type="uint"/>
>        <arg name="output" type="object" interface="wl_output"
> allow-null="true"/>
>      </request>
> @@ -891,7 +891,7 @@
>        <arg name="parent" type="object" interface="wl_surface"/>
>        <arg name="x" type="int"/>
>        <arg name="y" type="int"/>
> -      <arg name="flags" type="uint"/>
> +      <arg name="flags" type="uint" enum="transient"/>
>      </request>
>
>      <request name="set_maximized">
> @@ -972,7 +972,7 @@
>         in surface local coordinates.
>        </description>
>
> -      <arg name="edges" type="uint"/>
> +      <arg name="edges" type="uint" enum="resize"/>
>        <arg name="width" type="int"/>
>        <arg name="height" type="int"/>
>      </event>
> @@ -1337,7 +1337,7 @@
>        maintains a keyboard focus and a pointer focus.
>      </description>
>
> -    <enum name="capability">
> +    <enum name="capability" bitfield="true">
>        <description summary="seat capability bitmask">
>          This is a bitmask of capabilities this seat has; if a member is
>          set, then it is present on the seat.
> @@ -1353,7 +1353,7 @@
>         keyboard or touch capabilities.  The argument is a capability
>         enum containing the complete set of capabilities this seat has.
>        </description>
> -      <arg name="capabilities" type="uint"/>
> +      <arg name="capabilities" type="uint" enum="capability"/>
>      </event>
>
>      <request name="get_pointer">
> @@ -1530,7 +1530,7 @@
>        <arg name="serial" type="uint"/>
>        <arg name="time" type="uint" summary="timestamp with millisecond
> granularity"/>
>        <arg name="button" type="uint"/>
> -      <arg name="state" type="uint"/>
> +      <arg name="state" type="uint" enum="button_state"/>
>      </event>
>
>      <enum name="axis">
> @@ -1562,7 +1562,7 @@
>        </description>
>
>        <arg name="time" type="uint" summary="timestamp with millisecond
> granularity"/>
> -      <arg name="axis" type="uint"/>
> +      <arg name="axis" type="uint" enum="axis"/>
>        <arg name="value" type="fixed"/>
>      </event>
>
> @@ -1602,7 +1602,7 @@
>         This event provides a file descriptor to the client which can be
>         memory-mapped to provide a keyboard mapping description.
>        </description>
> -      <arg name="format" type="uint"/>
> +      <arg name="format" type="uint" enum="keymap_format"/>
>        <arg name="fd" type="fd"/>
>        <arg name="size" type="uint"/>
>      </event>
> @@ -1647,7 +1647,7 @@
>        <arg name="serial" type="uint"/>
>        <arg name="time" type="uint" summary="timestamp with millisecond
> granularity"/>
>        <arg name="key" type="uint"/>
> -      <arg name="state" type="uint"/>
> +      <arg name="state" type="uint" enum="key_state"/>
>      </event>
>
>      <event name="modifiers">
> @@ -1828,17 +1828,17 @@
>            summary="width in millimeters of the output"/>
>        <arg name="physical_height" type="int"
>            summary="height in millimeters of the output"/>
> -      <arg name="subpixel" type="int"
> +      <arg name="subpixel" type="int" enum="subpixel"
>            summary="subpixel orientation of the output"/>
>        <arg name="make" type="string"
>            summary="textual description of the manufacturer"/>
>        <arg name="model" type="string"
>            summary="textual description of the model"/>
> -      <arg name="transform" type="int"
> +      <arg name="transform" type="int" enum="transform"
>            summary="transform that maps framebuffer to output"/>
>      </event>
>
> -    <enum name="mode">
> +    <enum name="mode" bitfield="true">
>        <description summary="mode information">
>         These flags describe properties of an output mode.
>         They are used in the flags bitfield of the mode event.
> @@ -1865,7 +1865,7 @@
>          the output may be scaled, as described in wl_output.scale,
>          or transformed , as described in wl_output.transform.
>        </description>
> -      <arg name="flags" type="uint" summary="bitfield of mode flags"/>
> +      <arg name="flags" type="uint" enum="mode" summary="bitfield of mode
> flags"/>
>        <arg name="width" type="int" summary="width of the mode in hardware
> units"/>
>        <arg name="height" type="int" summary="height of the mode in
> hardware units"/>
>        <arg name="refresh" type="int" summary="vertical refresh rate in
> mHz"/>
> --
> 2.6.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151026/e893a0c9/attachment-0001.html>


More information about the wayland-devel mailing list