| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
The code to do this was already in place, but was only being run on the
very first frame of the program. Programs will now sleep if the previous
frame completed in fewer than 1 millisecond, to prevent processor time
from being wasted by a rapidly spinning program.
|
|
|
|
|
|
| |
This is to allow a user to drag an element inside the program window
and for the mouse cursor to move in and out of the window during the
drag operation. This is the intuitive and expected behaviour.
|
|
|
|
|
| |
MouseButton events will now also trigger when the 'back' and 'forward'
mouse buttons are pressed. These buttons aren't present on all mice.
|
|
The previous version of the library passed events to an implementation
of a WindowController trait by calling the trait method associated with
each event, and received requests by calling different trait methods and
reading the returned values. This had the downside of requiring that any
data received from one event had to be stored in the type so that it
could be passed back to Phosphor when a request method was called.
The new library structure uses a single handle_event method on a trait,
which is passed data representing any single event when it is called.
Data is returned via a passed mutable reference to an EventQueue,
meaning that any number of responses for any event can be immediately
returned to Phosphor without having to wait in storage.
|