mitchmindtree
06a5ec35b3
[WIP] Remove Sync and Clone from EventsLoop. Add EventsLoopProxy.
...
This commit only updates the top-level API to get some early feedback.
None of the platform-specific code has been updated yet. I'm hoping to
get around to this over the next couple days however if someone more
familiar with the windows backend would like to do a PR against this
fork that would be a great help.
Closes #187 .
2017-05-25 20:13:54 +10:00
Benjamin Saunders
22bc119cd7
Richer input events
...
This expands input events to represent sub-pixel mouse positions, devices responsible for generating events, and raw
device-oriented events. The X11 back end is refactored to make full use of the new expressiveness. Other backends have
had new functionality minimally stubbed out, save for the macos backend which already supports sub-pixel mouse
positions.
2017-04-23 01:08:15 -07:00
Erik Rigtorp
f3ccdb7aec
Add keyboard modifiers to input event
...
Making applications track modifier keys results in unnecessary work for
consumers, it's error prone, and it turns out to have unavoidable bugs.
For example, alt-tabbing with x11 results in the alt modifier state
getting stuck.
To resolve these problems, this patch adds a Mods value to the keyboard
input event.
Based on this patch: d287fa96e3
2017-02-27 13:36:11 -06:00
Pierre Krieger
b5d8d305fc
Fix unreachable patterns
2017-01-28 16:21:41 +01:00
Pierre Krieger
7da96121a2
Fix examples
2017-01-28 15:45:01 +01:00
Pierre Krieger
0242daa242
Add interrupting the events loop
2017-01-28 15:09:01 +01:00
Pierre Krieger
2c4db6b16e
Update window example
2017-01-28 15:01:59 +01:00
Pierre Krieger
422b332c1b
Add a transition macro system
2017-01-28 15:00:17 +01:00
Pierre Krieger
289bb7bc9f
Remove android_main! call
2016-11-23 19:33:44 +01:00
Corey Farwell
b500808d1a
Rename example, remove debug logging.
2016-11-23 10:51:15 -05:00
Corey Farwell
f8666a05fb
Add example demonstrating min/max window dimension constraints.
2016-11-23 09:41:53 -05:00
mitchmindtree
eb18b3d8b6
Add a WindowBuilder::with_window_resize_callback
method.
...
This allows for passing the window_resize_callback fn during the window
building stage. More importantly, this allows setting the callback
without the need for mutable access to the Window, making it possible
to set the callback in the downstream glium crate.
This may solve tomaka/glium#1232 for most folk.
2016-11-11 22:08:46 +11:00
Andrey Lesnikov
7f6ae8910e
Merge https://github.com/tomaka/glutin
...
Conflicts:
.travis.yml
Cargo.toml
examples/fullscreen.rs
src/api/android/mod.rs
src/api/cocoa/headless.rs
src/api/cocoa/helpers.rs
src/api/cocoa/mod.rs
src/api/glx/mod.rs
src/api/osmesa/mod.rs
src/api/win32/callback.rs
src/headless.rs
src/lib.rs
src/platform/linux/mod.rs
src/window.rs
2016-09-19 19:53:28 +03:00
Ivan Ukhov
54f442ea06
Generalize WindowBuilder::with_title
2016-05-08 09:28:42 +02:00
Richard Lettich
117069ef90
Changed MouseMoved((i32, i32)) to MouseMoved(i32, i32), breaking change
2016-03-27 14:39:20 -04:00
Pierre Krieger
007ad0f911
Fix the test and the examples
2016-03-26 18:10:19 +01:00
Pierre Krieger
10bb03c5f0
Remove most OpenGL stuff and make it compile on win32
2016-02-23 12:56:23 +01:00
Pierre Krieger
982279bc39
Update the emscripten port of glutin
2016-02-09 14:25:21 +01:00
Rengierof
d2ac6cfa11
Fixed grabbing example.
2015-12-26 16:47:25 +02:00
Rengierof
11e27889ae
Fixes cursor behavior with windows
2015-12-26 16:38:00 +02:00
Pierre Krieger
37262fb228
Remove public exports of gl_common and libc
2015-11-09 08:46:52 +01:00
mitchmindtree
947effd3a0
unwrap to fix unused result warning
2015-11-08 21:14:58 +11:00
Adam Badawy
9493458b8e
Fix issue #543
...
I added a match arm for the Escape key.
2015-10-24 21:44:43 -04:00
Adam Badawy
d6f44a7f56
Flush monitor prompt
2015-10-24 21:38:36 -04:00
Pierre Krieger
2b35a6c9d1
Fix the examples
2015-10-04 18:39:17 +02:00
Josh Matthews
77b3743117
Warning fixes for OS X.
2015-09-28 12:19:36 -04:00
Pierre Krieger
326ea3555b
Fix the triangle in the examples
2015-08-30 18:48:26 +02:00
Pierre Krieger
9261408cc8
Use modern GL code for the examples
2015-08-05 22:31:34 +02:00
Akos Kiss
07c8154cb7
Add aarch64-unknown-linux-gnu support
...
* Adding dependencies
* Replacing `i8` with `c_char` ot `_` (since `c_char` can be
unsigned on some platforms, aarch64 is one of them)
2015-07-23 06:19:54 +00:00
Pierre Krieger
39128dd7e1
Remove the is_closed function
2015-06-16 14:03:58 +02:00
Felix Kaaman
a8fef35dbf
Make legacy functions crash on osx core contexts
2015-06-16 09:00:02 +02:00
Robert Knight
f0bab95c4d
Express scroll deltas as either line or pixel deltas
...
Depending on the platform and device, scroll deltas may either
be represented as pixel deltas specifying the amount
in pixels to scroll or they may be expressed in 'lines' or 'chunks'
for low resolution devices (eg. a traditional mouse wheel).
Pixel deltas are currently available on OS X. X11 currently
supports only integer line deltas, though pixel deltas
are available via XInput2. Windows supports fractional
line deltas.
2015-06-13 23:19:31 +01:00
Pierre Krieger
81314f91d8
Add API for transparency and decorations and add support for win32
2015-05-24 09:10:44 +02:00
Pierre Krieger
05c24b39cc
Print the pixel format in the window
example
2015-05-04 09:23:43 +02:00
Pierre Krieger
2f9272e1cb
Fix the GLES code in examples/support/mod.rs
2015-04-30 23:04:07 +02:00
Pierre Krieger
e12f06ad48
Fix and re-enable the fullscreen example
2015-04-24 09:35:49 +02:00
Pierre Krieger
c68fdf3af2
Fix examples so that travis passes again
2015-04-17 15:23:13 +02:00
Steven Sheldon
9c21758bb7
Removed unused features from build and examples.
2015-04-03 02:31:15 -07:00
Pierre Krieger
d33c138164
Rustup
2015-04-02 22:41:35 +02:00
Pierre Krieger
bae1e42b8b
More work on win32 implementation
2015-03-30 11:42:19 +02:00
Pierre Krieger
3d692870e2
Change grab_cursor and ungrab_cursor to set_cursor_state
2015-03-26 17:15:18 +01:00
tomaka
d6ebaaaf5c
Merge pull request #227 from aepsil0n/grab-cursor
...
Implement grabbing of the mouse pointer for X11
2015-03-26 16:48:40 +01:00
Pierre Krieger
cedc85c550
Rustup
2015-03-25 20:27:18 +01:00
Eduard Bopp
77d033d672
Add an example for (un-)grabbing the mouse cursor
2015-03-25 13:17:47 +01:00
Pierre Krieger
106ca8a30a
Fix "fullscreen" example with latest rustc
2015-02-05 09:20:12 +01:00
Andrew Kelley
6a27fa9d26
fix for rust nightly
2015-01-28 12:43:44 -07:00
Pierre Krieger
b05ef16d81
Implement vsync for x11 and add vsync example
2015-01-23 09:33:22 +01:00
Pierre Krieger
8fcd676714
Iterators returned by wait_events and poll_events are now persistent
2015-01-19 13:11:33 +01:00
Brendan Zabarauskas
f5fb030c36
Squash some warnings
2015-01-18 20:11:33 +11:00
Andrey Lesnikov
5a4fee967a
x11, android, win32: [ui]size, [u]int -> [ui]32
2015-01-13 16:23:30 +03:00
Bryan Bell
b532b8c65f
Add mouse cursor support
...
Add a new api, window.set_cursor, for setting the cursor. The enum MouseCursor lists the possible cursors.
Only X11 is implemented. On OSX, Android, & Win32 the window.set_cursor function
either does nothing or calls the "unimplemented!" macro.
2015-01-12 16:22:37 -08:00
Pierre Krieger
469d0eafd1
Update for rust alpha 1.0
2015-01-10 08:23:20 +01:00
Pierre Krieger
dbdb43f077
Update for Rustc
2015-01-08 09:28:22 +01:00
Pierre Krieger
4c5e430dd3
Update for Rustc
2015-01-03 23:15:39 +01:00
Pierre Krieger
7f6f4f8d04
Update for gl_generator's changes
2014-12-24 08:12:10 +01:00
Pierre Krieger
dbb82968ba
Update for rustc
2014-12-23 17:12:29 +01:00
Michael Powell
6e9969ccc0
Add semicolons after macro invocations, as required by the latest nightly.
2014-12-19 21:34:20 -08:00
Glenn Watson
fa5cb66cff
Add resize example, fix warnings, make callback an option so it can be removed.
2014-12-19 05:44:47 +10:00
Pierre Krieger
19d120b8b1
Update for Rustc for win32
2014-12-15 14:06:32 +01:00
Jakob Fries
12d5d5beea
Avoid warning; if_let and tuple_indexing now part of language.
2014-12-08 21:12:03 +01:00
Brendan Zabarauskas
c86368291e
Implement Window::set_title for Cocoa
2014-11-10 20:12:32 +11:00
Tomaka17
7ce851dad9
Update for changes in gl-rs
2014-11-05 15:32:01 +01:00
Tomaka17
bbcb4c8bea
Remove call to glFlush() before swap_buffers
...
We may not want to call `swap_buffers` in the same thread as the
current thread, so we're moving the call to `glFlush` out of the scope
of glutin.
2014-10-29 19:01:58 +01:00
Tomaka17
2ff393fe62
Update for rustc and gl-rs
2014-10-22 11:23:21 +02:00
Tomaka17
e565bfeb13
Implement headless rendering
2014-10-09 15:55:42 +02:00
Tomaka17
0584ac184c
Vertex data for android is now static
2014-10-02 22:16:47 +02:00
Tomaka17
02ba9d33d7
Rename crate to glutin
2014-09-21 11:34:41 +02:00
Tomaka17
451b754e79
Add triangle to example
2014-09-12 10:20:15 +02:00
Tomaka17
3cad622ee8
Examples now using a support module to draw
2014-09-12 08:53:31 +02:00
Tomaka17
0bb82e8467
Add basic support for Android
2014-09-11 18:28:07 +02:00
Tomaka17
ca83db39c7
Rename gl-init-rs to gl_init
...
Fix #20
2014-08-13 13:42:59 +02:00
Tomaka17
87d62e5b6f
get_proc_address now returns a libc::c_void
2014-08-11 10:32:33 +02:00
Pierre Krieger
da5e372719
Multiwindow example now creates a third window
2014-08-07 18:15:09 +02:00
Tomaka17
2fdcc1840b
Examples now call glViewport
2014-08-07 09:32:13 +02:00
Tomaka17
92f90220a4
Fix events handling in examples
2014-08-07 08:53:21 +02:00
Tomaka17
c0912c9ec4
Add example for multiple simultaneous examples
2014-08-03 17:23:08 +02:00
Tomaka17
bfc5d3e63d
with_monitor -> with_fullscreen
2014-08-02 11:04:48 +02:00
Tomaka17
5dda167021
Add iterators for events and WindowBuilder
2014-08-02 08:29:37 +02:00
Tomaka17
d9d293667a
Add monitor support for win32
2014-07-31 11:13:40 +02:00
Tomaka17
db8955a9d8
Add API for monitors
2014-07-31 10:02:01 +02:00
Tomaka17
270e290af9
make_current() is now unsafe
2014-07-30 18:12:39 +02:00
Tomaka17
6d9c5eb2bd
should_close() renamed to is_closed()
2014-07-30 13:29:28 +02:00
Tomaka17
1249ebed80
Remove printing position in example
2014-07-30 13:27:31 +02:00
Tomaka17
66f6b003d0
The example now prints OpenGL version
2014-07-30 13:05:58 +02:00
Tomaka17
d824fb94db
Draft for monitor API
2014-07-27 20:41:25 +02:00
Tomaka17
6030062881
Example now displays windows events
2014-07-27 13:10:43 +02:00
Tomaka17
1cc0447c5e
Initial commit
2014-07-27 11:41:26 +02:00