Event documentation and tests
Prerequisite Checklist
- I searched for existing issues to prevent duplicates
- I searched for existing discussions on the forum to prevent duplicates
- I understand SFML's scope and believe the feature fits it
Describe your feature request here
Currently the event documentation is basically non-existent, they almost all just say "X event subtype" which is useless. The docs on the members give you a bit more information about the data the event contains, but there's still no information about what triggers events and when users should expect them to be sent
This information would not only be very useful for SFML users but also SFML contributors to help ensure the events behave as expected across platforms.
Some recent examples:
- Should
FocusGainedtrigger on window creation? - Should
MouseEnteredtrigger when a window is resized so that the mouse is over it? - Should
Resizedtrigger when the window is resized programmatically? - Should
MouseMovedtrigger when the mosue is moved programatically?
There are also some platform specific differences that should be documented, like how the focus events are used to indicate backgrounding on mobile platforms
It seems like we could also add tests to verify much of the documented behaviour
I would imagine it might be a bit of a can of worms once this work starts so trying to cover them all in one PR may get out of hand and we should probably look to update them incrementally
Source: SFML/SFML