Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Better support for KMS enums and bitfields #39

Open
emersion opened this issue Jan 13, 2020 · 2 comments
Open

Better support for KMS enums and bitfields #39

emersion opened this issue Jan 13, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@emersion
Copy link
Owner

emersion commented Jan 13, 2020

Enum and bitfield properties may have different definitions across planes. This would be silly and annoying, but could happen. For instance, plane 1 may have "rotation": bitmask {"rotate-90" = 0x1, "rotate-180" = 0x2} and plane 2 may have "rotation": bitmask {"rotate-180" = 0x1}.

In this case, library users don't know which value needs to be set without knowing the plane that will be used. In the rotation example, rotate-180 has value 0x1 or 0x2 depending on the plane used.

I'm not aware of any property that behaves like this.

@emersion emersion added the enhancement New feature or request label Jan 13, 2020
@emersion emersion added this to the Long-term milestone Jan 13, 2020
@emersion
Copy link
Owner Author

emersion commented Apr 3, 2020

@emersion
Copy link
Owner Author

The result of the discussion is that libliftoff needs to handle this. Something among these lines was suggested:

void liftoff_layer_set_enum(struct liftoff_layer *layer, const char *name, const char *value);

But it would also need to handle bitfields with zero or multiple values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant