Remove enum="capability" from stylus (bind_)tool_capabilities

Placing the 'enum' attribute on the args to bind_tool_capabilities
and tool_capabilities causes problems for the code autogenerated
by reis. In particular, args with the enum attribute end up using
a variable of the associated enumerated type rather than (for
example) u32. This prevents us from OR-ing together flags since
such combined values are not considered valid in the type system.

Maybe the XML should have something similar to 'enum' but which
explicitly has flag-like semantics... This would allow autogen
code to still refer back to the enum, but also ensure that
appropriate (boolean-combinable) types are used for storage. But
such an addition is outside the direct scope of this patchset...
This commit is contained in:
Jason Gerecke 2025-07-18 13:52:45 -07:00
parent 9d0bda0839
commit 89e27dec59

View file

@ -1747,7 +1747,7 @@
It is a protocol violation to send requests or events for unbound
capabilities.
</description>
<arg name="capabilities" type="uint32" enum="capability" summary="A mask of capabilities that the client wishes to handle"/>
<arg name="capabilities" type="uint32" summary="A mask of 'capability' flags that the client wishes to handle"/>
</request>
<request name="proximity_in" since="1" context-type="sender">
@ -2037,7 +2037,7 @@
ei_stylus.bind_tool_capabilities request before the device will
send events.
</description>
<arg name="capabilities" type="uint32" enum="capability" summary="A capability mask for the events available through this interface"/>
<arg name="capabilities" type="uint32" summary="A mask of 'capability' flags for the events available through this interface"/>
</event>
<event name="proximity_in" since="1" context-type="receiver">