* Explicit mouse-related DeviceEvents
This makes the API more intuitive for common use-cases and allows us
to better propagate platform knowledge of motion semantics.
* Improve event naming consistency
* Clarify axis event forwards-compatibility
* Rename WindowEvent::MouseMoved/Entered/Left to CursorMoved/...
This emphasizes the difference between motion of the host GUI cursor,
as used for clicking on things, and raw mouse(-like) input data, as
used for first-person controls.
* Add support for windows and OSX, fix merging
* Fix warnings and errors on Linux
* Remove unnecessary breaking changes
* Add MouseWheel events to windows and OSX
* Fix bad push call.
* Fix docs, naming, and x11 events
* Remove mutability warning
* Add changelog entry
* wayland: upgrade wayland-window
This new version of wayland window considerably simplifies the
window handling for winit, meaning much of the previous juggling
is no longer needed, and the windows will appear even if nothing is
drawn.
* wayland: cleanup unused stuff
* Fix no primary monitor panic in XWayland
In this case try to use the first existing monitor instead of panicking.
Fixes#317
* Shift no monitor panic to x11::get_primary_monitor
* Update changelog with xll get_primary_monitor fallback
* Implement public API for high-DPI #105
* Recover get_inner_size_points and get_inner_size_pixels and change their implementation assuming get_inner_size() returns size in pixels
* Update changelog for high-DPI changes
This should trigger the compositor's mechanism for sending a
configure event, which should most of the time be processed
before any winit user actually tries to draw.
* Add an i386 target to travis
* Fix X11 on 32bit architectures
One would hope 32bit X11 was dead by now but apparently not :). Fix
the window hint setting code to not assume window IDs are 64bit as
apparently they are not in 32bit arches.
* wayland: don't create a second event_queue
As each EventsLoop has its own context, this is no longer necessary.
* wayland: buffer events rather than direct dispatch
Changes the behavior of the event loop to first internally
buffer the events generated by the wayland handlers, and then
dispatch them to the client's closure.
- It simplifies the event loop logic
- It makes it possible for the user to call window methods such as
`set_title()` or `set_inner_size()` without causing a deadlock
* wayland: add is_ready() & fix protocol errors
Adds a `is_ready()` method to the windows to advertize
when it is legal to start drawing, and fix a few wayland
protocol mishandling in the process.
* partial implementation for emscripten
this pull request contain a partial but working implementation of emscripten backend
some implementations may be controversial.
here some implementation detail:
* cursor state:
* on grab: emscripten request pointer lock deferred and also set a callback when pointer lock change
the callback request pointer lock deferred.
* on hide: `emscripten_hide_mouse` exist but not `emscripten_show_mouse`
a pull request has been open on october 2016 but never been merged
so I copied the javascript function and put it in emscripten_asm_const function
* fullscreen: if fullscreen is requested then it request fullscreen deferred and set a callback on fullscreen change
the callback request fullscreen deferred
* run forever: this method use emscripten main loop to run an infinite loop
* keyboard callback doesn't consume the event. I think it is more apopriate as in desktop environment it is the same, is it ?
* emscripten dir is added in example and contains html pages
Some things that are not implemented:
* lots of events
* min and max dimension can be implemented with a callback that listen to size change and resize if dimension out of bound
* title may be implemented using javascript to change document.title
* Use std::os::raw in the emscripten bindings
* Fix emscripten code
* Update code
* Add CI
* Remove the emscripten-specific examples
* Add some information to the README
* Fix X11 screen resolution change using XrandR
The previous XF86 resolution switching was broken and everything
seems to have moved on to xrandr. Use that instead while cleaning
up the code a bit as well.
* Use XRandR for actual multiscreen support in X11
* Use actual monitor names in X11
* Get rid of ptr::read usage in X11
* Use a bog standard Vec instead of VecDeque
* Get rid of the XRandR mode switching stuff
Wayland has made the decision that apps shouldn't change screen
resolutions and just take the screens as they've been setup. In the
modern world where GPU scaling is cheap and LCD panels are scaling
anyway it makes no sense to make "physical" resolution changes when
software should be taking care of it. This massively simplifies the
code and makes it easier to extend to more niche setups like MST and
videowalls.
* Rename fullscreen options to match new semantics
* Implement XRandR 1.5 support
* Get rid of the FullScreen enum
Moving to just having two states None and Some(MonitorId) and then
being able to set full screen in the current monitor with something
like:
window.set_fullscreen(Some(window.current_monitor()));
* Implement Window::get_current_monitor()
Do it by iterating over the available monitors and finding which
has the biggest overlap with the window. For this MonitorId needs
a new get_position() that needs to be implemented for all platforms.
* Add unimplemented get_position() to all MonitorId
* Make get_current_monitor() platform specific
* Add unimplemented get_current_monitor() to all
* Implement proper primary monitor selection in X11
* Shut up some warnings
* Remove libxxf86vm package from travis
Since we're no longer using XF86 there's no need to keep the package
around for CI.
* Don't use new struct syntax
* Fix indentation
* Adjust Android/iOS fullscreen/maximized
On Android and iOS we can assume single screen apps that are already
fullscreen and maximized so there are a few methods that are implemented
by just returning a fixed value or not doing anything.
* Mark OSX/Win fullscreen/maximized unimplemented()!
These would be safe as no-ops but we should make it explicit so
there is more of an incentive to actually implement them.
* Don't use UNIX_BACKEND in Window2::new
* Move get_available_monitors and get_primary_monitor to EventsLoop
* Remove UNIX_BACKEND
* Restore choosing the Linux backend
* Return a XNotSupported for new_x11()
* Fix fullscreen example
* Rework MonitorId::get_native_identifier
* Try fix compilation
* Returns the monitor ID on wayland as well
* Try fix compilation
* Fix iOS compilation