Today we have an event mask for each specific type of event that a window may generate. This is perfect because it lets users be notified only of the events that they will actually use (more efficient).
Many cases do not require such performance, however typing out the bitmasks is sometimes more tedious than it needs to be, for example:
This can apply to keyboard, mouse, and cursor events. It would require adding just three new EventMask constants CursorEventsMouseEvents and KeyboardEvents:
EventMask Groups
Today we have an event mask for each specific type of event that a window may generate. This is perfect because it lets users be notified only of the events that they will actually use (more efficient).
Many cases do not require such performance, however typing out the bitmasks is sometimes more tedious than it needs to be, for example:
versus just
This can apply to keyboard, mouse, and cursor events. It would require adding just three new EventMask constants
CursorEvents
MouseEvents
andKeyboardEvents
:Note that there is already a
MouseEvents
constant, which would have to be renamed to a more correct formMouseButtonEvents
, instead.window.MouseEvents
Better Event Names.
This is primarily renaming keyboard state event to keyboard button event, and mouse event to mouse button event.
window.MouseEvents
window.MouseButtonEvents
(proper)mouse.Event
mouse.ButtonEvent
(proper)window.KeyboardStateEvents
window.KeyboardButtonEvents
(matchesMouseButtonEvents
)keyboard.StateEvent
keyboard.ButtonEvent
(matchesmouse.ButtonEvent
)keyboard.TypedEvent
keyboard.Typed
(matchesmouse.Scrolled
)Conclusion
I think this gives us better and more clear event names and easier selection of common event mask groups.