smithay
smithay copied to clipboard
Document what types are available where in SurfaceData
It isn't clear what types can be accessed in SurfaceData. Do the SurfaceAttributes live in the data map, the multi cache?
Actually it's a RefCell<SurfaceAttributes> inside the multi cache.
What would be nice is to document in each module which adds stuff to the surface attributes what type it is (including a wrapping Mutex/RefCell) and whether it's in the data map or multi cache.
I kinda stated this in https://github.com/Smithay/smithay/pull/709 would like to continue doing it this way. Type aliases mostly solve this problem, are self documenting, and give us a place where we can write docs related to surface data of certain module.
EDIT: If someone notices that I missed some surface data types, PRs/Issues are welcome.