wlroots
wlroots copied to clipboard
consistently define protocol enums in wlr types
We have three patterns that I know of for defining enums that come from external protocols in wlr types.
- untyped enums (uint32_t)
- use external enums directly (like layer shell)
- use wrapped wlr types
We had a discussion at the hackathon and determined that we should use approach 2) in all parts of the library so the code should be refactored to use this pattern.
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/770
Note that we will need to keep using approach 1 for bitfields (e.g. cases where multiple enum values can be used at once (e.g. ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT)
This will require all users of the library to have the external headers available. Some of those aren't distributed in separatly in packages, what's the plan for those? Will wlr include the generated protocol headers for the application, or will applications be expected to provide them in their build environment?
will applications be expected to provide them in their build environment?
yes