Commit graph

2967 commits

Author SHA1 Message Date
Osspial
b1b5aefc4b
Implement fix described in #851 (#945)
* Implement fix described in #851

* Add changelog entry
2019-06-20 23:59:27 -04:00
Osspial
06244dd492
Remove window resize call in timer example (#938)
* Remove window resize call in timer example

* Move timer_length to separate variable

* Re-add _window
2019-06-19 22:06:09 -04:00
Osspial
de2f0740f7
Move contributors table to wiki (#934)
* Add stub wiki link instead of inline table

* Replace with real link

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2019-06-19 15:12:27 -04:00
Felix Rabe
c56a66cb90 Fix warnings (#929)
* Fix warnings

* Bring back derivatives crate for Windows
2019-06-19 15:12:01 -04:00
Felix Rabe
c1329ff156 Linkify HALL_OF_CHAMPIONS.md (#935) 2019-06-18 16:30:37 -06:00
Osspial
72509b5b42
Update example in README.md and add move prefix to window.rs example closure (#921)
* Update example in README.md and add move prefix to window.rs example

* Make Window and README example trivially capture window

* Update README.md
2019-06-18 11:15:55 -04:00
Aleksi Juvani
c35fdc8d61 Fix thread-safety of set_maximized and set_title on macOS (#922) 2019-06-18 00:34:27 -06:00
Ben Merritt
5d31f73302
Clean up Cargo.toml after incorrect rebase 2019-06-17 22:56:37 -07:00
Ben Merritt
7de1261555
Fix some warnings 2019-06-17 22:54:07 -07:00
Ben Merritt
91a511ba8c
Replace JS snippet with throw_str 2019-06-17 22:54:07 -07:00
Ben Merritt
94f6294c0a
Prevent callbacks from being destroyed too early 2019-06-17 22:54:07 -07:00
Ben Merritt
77cd3adb01
TEMPORARY: add testing example 2019-06-17 22:54:07 -07:00
Ben Merritt
7dabad4d71
Fix throwToEscapeEventLoop function 2019-06-17 22:51:23 -07:00
Ben Merritt
54b4074369
Port remaining modules to web_sys 2019-06-17 22:51:23 -07:00
Ben Merritt
e4d8e22846
Start implementing web-sys backend 2019-06-17 22:51:23 -07:00
Felix Rabe
403dcc02f4 CONTRIBUTING.md: Linkify project members (#933) 2019-06-17 16:52:30 -06:00
Felix Rabe
64be6e5c5e Typo (#932) 2019-06-17 16:22:01 -06:00
Felix Rabe
c661006683 Use dbg!() macro in monitor list example (#931) 2019-06-17 16:13:35 -06:00
CrLF0710
f879bca21c Migrate to 2018 edition. (#924)
* Migrate to 2018 edition.

* Use impl Iterator at one site.

* Fix more rust 2018 idioms.
2019-06-17 14:27:00 -04:00
Ryan Goldstein
182beb4f8b Indicate that I will be maintaing the stdweb backend 2019-06-16 21:34:54 -07:00
Ryan Goldstein
2690306f4a Implement Poll and WaitUntil in the stdweb backend 2019-06-16 21:30:05 -07:00
Ryan Goldstein
b59e3c670b WIP 2019-06-14 21:15:43 -07:00
Osspial
2e0bbc091f
Set CHANGELOG.md merge style to union (#919) 2019-06-13 16:11:44 -04:00
Aleksi Juvani
91f05e940f Fix initial dimensions of a fullscreen window on Windows (#909) 2019-06-13 15:17:56 -04:00
Aleksi Juvani
db794b976c Disable caching on Travis (#918) 2019-06-13 14:24:44 -04:00
Victor Berger
9a11f90a02 x11/wayland: Don't reset control flow between loop ticks (#916) 2019-06-13 12:52:10 -04:00
Osspial
412516159f
Document the caveats of run_return (#914) 2019-06-13 12:51:44 -04:00
Victor Berger
65587ef43a wayland: use an invisible surface as shell surface (#835)
This decorelates the window management from the actual user content,
meaning:

- the created window no longer needs the user to draw something to
  start existing
- it reduces our need to do roundtrips during initialization to
  avoid protocol errors
2019-06-13 12:50:02 -04:00
Osspial
cf713bef31 Remove CircleCI (#915)
None of the platforms that use it are supported right now, so it seems
silly to fail builds for other platforms when these ones can't possibly
succeed.

This should be reverted in stages as the platforms regain support.
2019-06-13 00:34:21 -06:00
Osspial
ea5c21950c Change Monitor dimensions functions to size functions (#911) 2019-06-13 00:33:44 -06:00
Aleksi Juvani
47b5dfa034 Support listing available video modes for a monitor (#896)
* Support listing available video modes for a monitor

* Use derivative for Windows `MonitorHandle`

* Update FEATURES.md

* Fix multiline if statement

* Add documentation for `VideoMode` type
2019-06-12 14:07:25 -04:00
Osspial
2b89ddec15
Fix WindowBuilder function names that missed first pass (#910) 2019-06-12 13:34:09 -04:00
Nikolai Vazquez
f256ff7d58 Make ns identifiers use snake_case on macOS (#904)
This makes the macOS API style consistent with that of iOS.
2019-06-10 19:09:38 -04:00
Christian Duerr
07356b9634 Update cursor visibility docs (#893)
The cursor visibility docs were still outdated from the rename and
talking about setting the invisibility, rather than visibility.

The platform-specific docs are unchanged since those should be fine and
the rest has been adapted using similar docs.
2019-06-01 18:06:41 -06:00
Ryan Goldstein
f2b6ef2edd Merge master into stdweb-eventloop-2
Update the internal APIs to match the new API changes
2019-06-01 13:21:50 -07:00
Ryan Goldstein
1409f83fb9 Add support for mouse wheel 2019-05-31 21:50:34 -07:00
Ryan Goldstein
37dadab745 Add access to the canvas in the Window 2019-05-31 21:50:25 -07:00
Osspial
0eefa3ba42
Fix compiler warning of potential undefined behavior (#892) 2019-05-30 20:42:53 -04:00
aloucks
08f8f89702 Fix control flow issues with Window::request_redraw (eventloop-2.0) (#890)
* Fix request_redraw with Poll and WaitUntil(time_in_the_past) on Windows

`Window::request_redraw` now fires a `RedrawRequested` event when
called from an `Event::EventsCleared` callback while the control
flow is set to `Poll`. A control flow of `WaitUntil(resume_time)`,
will now also fire the `RedrawRequested` event when `resume_time`
is in the past.

* Prevent panic on x11 when WaitUntil(resume_time) is in the past

* Prevent panic on wayland when WaitUntil(resume_time) is in the past
2019-05-29 22:33:52 -06:00
Osspial
0df436901a
Refine function names and type signatures (#886)
* First name consistency pass. More to come!

* Remove multitouch variable (hopefully this compiles!)

* Remove CreationError::NotSupported

* Add new error handling types

* Remove `get_` prefix from getters.

This is as per the Rust naming conventions recommended in
https://rust-lang-nursery.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter

* Make changes to Window position and size function signatures

* Remove CreationError in favor of OsError

* Begin updating iOS backend

* Change MonitorHandle::outer_position to just position

* Fix build on Windows and Linux

* Add Display and Error implementations to Error types

* Attempt to fix iOS build.

I can't actually check that this works since I can't cross-compile to
iOS on a Windows machine (thanks apple :/) but this should be one of
several commits to get it working.

* Attempt to fix iOS errors, and muck up Travis to make debugging easier

* More iOS fixins

* Add Debug and Display impls to OsError

* Fix Display impl

* Fix unused code warnings and travis

* Rename set_ime_spot to set_ime_position

* Add CHANGELOG entry

* Rename set_cursor to set_cursor_icon and MouseCursor to CursorIcon

* Organize Window functions into multiple, categorized impls

* Improve clarity of function ordering and docs in EventLoop
2019-05-29 21:29:54 -04:00
Osspial
ae63fbdbbb Merge branch 'eventloop-2.0' of https://github.com/tomaka/winit into eventloop-2.0 2019-05-29 21:28:39 -04:00
Osspial
4f29618c73 I forgot to remove the backtrace dependency in the EL2 rework 2019-05-29 21:22:35 -04:00
Osspial
76660f3621
Fix Windows backend invoking unreachable! with Exit and run_return (#887) 2019-05-27 13:45:26 -04:00
mtak-
3a7350cbb9 El2.0 ios (#871)
* port ios winit el2.0 implementation to the new rust-windowing repo

* unimplemented! => unreachable
trailing comma in CFRunLoopTimerCallback

* implement get_fullscreen

* add iOS specific platform documentation. Add a TODO about how to possibly extend the iOS backend to work have methods callable from more than just the main thread

* assert that window is only dropped from the main thread

* assert_main_thread called from fewer places
2019-05-25 21:10:41 -04:00
aloucks
e5aa906b01 Fix macos compile error in fullscreen example (#885) 2019-05-25 15:23:54 -06:00
aloucks
4b0162a013 Update parking_lot to 0.8 (for windows, too) (#884)
The previous attempt to update parking_lot missed the windows platform.

The parking_lot dependency is now no longer specified twice to help
prevent that mistake from happening again.
2019-05-25 15:23:09 -06:00
Bastien Orivel
5be88e79b0 Update parking_lot to 0.8 (#882) 2019-05-25 10:12:07 -06:00
Lucas Kent
93502e0cda Fix warning (#880) 2019-05-24 05:10:31 -06:00
Osspial
8d6a857ba5 Merge branch 'evl2' into eventloop-2.0 2019-05-16 00:26:59 -04:00
Osspial
6ff1370035
Fix crash caused by WM_PAINT getting invoked at inopportune times. (#866) 2019-05-16 00:00:30 -04:00