mitchmindtree
1055eed078
Removed as_slice_with_nul as CString now derefs to a CStr
2015-02-22 01:17:47 +11:00
mitchmindtree
0389c834e4
RingBuf -> VecDeque for other platforms, as_slice_with_nul -> as_bytes_with_nul
2015-02-22 00:40:23 +11:00
Ryan Stewart
25ce029cf6
expose the platform-specific window handle (currently Win only)
2015-02-20 12:33:25 -08:00
Pierre Krieger
f4f84c6566
Improve the OpenGL context request system
2015-02-18 17:15:01 +01:00
Pierre Krieger
ba7f2a923f
Don't call MakeCurrent(null, null) when destroying
2015-02-18 09:00:00 +01:00
tomaka
59220d35ce
Fix poll_events returning None when it shouldn't
2015-02-12 18:42:02 +01:00
tomaka
4500702a02
Merge pull request #70 from tomaka/fix-iterators
...
Use platform-specific iterators instead
2015-02-10 22:34:18 +01:00
tomaka
4c8628ed67
Implement get_outer_size() on x11
2015-02-10 14:40:03 +01:00
Pierre Krieger
4bfcedad3e
X11: use platform specific iterators instead
2015-02-10 08:31:31 +01:00
tomaka
6b52bf95a4
Merge pull request #254 from aepsil0n/mousebutton-renaming
...
Rename enum variants of MouseButton
2015-02-05 18:37:53 +01:00
Manish Goregaokar
256645cc3c
Add some more support for X11 keys (partially fixes #251 )
2015-02-05 22:28:54 +05:30
Eduard Bopp
b2367fe2e6
Rename enum variants of MouseButton
...
With enums that are namespaced by default, it seems reasonable to be less
redundant in the variant naming here.
2015-02-05 16:52:53 +01:00
Akos Kiss
e4469cfce7
Reorder the fields of XErrorEvent
to match the struct layout found in recent Xlib.h
...
Fixes #244
2015-02-01 22:08:34 +00:00
Glenn Watson
1b73aeaa24
On some X11 driver implementations, calling XCloseDisplay from a different thread
...
causes memory corruption, resulting in a crash. Change window proxy to be a weak
reference so that the XCloseDisplay is always called from the main window.
2015-01-30 07:11:55 +10:00
tomaka
f8c66ff2a9
Merge pull request #220 from tomaka/x11-vsync
...
Implement vsync for x11 and add vsync example
2015-01-25 12:56:15 +01:00
tomaka
a2e03e7c15
Merge pull request #221 from tomaka/fix-rc
...
Fix race condition with XOpenIM
2015-01-25 12:55:58 +01:00
Andrew Kelley
02a57e0422
fix for latest rustc
2015-01-23 19:18:22 -07:00
Pierre Krieger
56c6afd03c
Fix race condition with XOpenIM
2015-01-23 11:10:23 +01:00
Pierre Krieger
b05ef16d81
Implement vsync for x11 and add vsync example
2015-01-23 09:33:22 +01:00
Glenn Watson
de3f354566
Fix log prefix
2015-01-23 06:01:22 +10:00
Glenn Watson
19475f8521
Some GPU/driver combinations have glxCreateContextAttribsARB present, but it fails with an X error. In this case, catch the X error and fall back to the old method of creating a context.
2015-01-22 12:07:31 +10:00
Akos Kiss
935e5a36a2
c_char
isn't always i8
2015-01-20 21:49:23 +00:00
Glenn Watson
fd5e77f23e
Add missing get_api stubs.
...
Add hidpi_factor() support for retina displays.
Fix Resize and MouseMoved events to handle retina displays.
Fix inverted y position for MouseMoved events on mac.
Fix initial painting on retina display.
2015-01-19 11:54:11 +10:00
Andrey Lesnikov
5a4fee967a
x11, android, win32: [ui]size, [u]int -> [ui]32
2015-01-13 16:23:30 +03:00
tomaka
05a03fb6a1
Merge pull request #192 from bjwbell/mouse-cursors
...
Add mouse cursor support
2015-01-13 10:43:46 +01:00
Bryan Bell
995bd37c78
Change uint/int to usize/isize
...
From https://github.com/rust-lang/rfcs/pull/544 the types uint/int were
renamed to usize/isize.
2015-01-12 19:33:31 -08:00
Bryan Bell
95f0990074
Refine X11 cursor selections
...
For MouseCursor::Cell, NotAllowed, NoDrop, Grab, Grabbing, ... set the
appropriate X11 cursor.
Also alphabetize the cursors listed in the MouseCursor enum.
2015-01-12 19:00:45 -08: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
Austin Bonander
8d9133d331
Update to latest Rust nightly
2015-01-08 03:45:46 -08:00
Pierre Krieger
885d5e9c38
Update for Rustc
2015-01-05 14:39:58 +01:00
Pierre Krieger
4c5e430dd3
Update for Rustc
2015-01-03 23:15:39 +01:00
Ty Overby
a698146943
Change the way that events are represented.
...
The bulk of this commit is changing instances of Vec to RingBuf which is
optimized for the push_back() / pop_front() strategy that is used
internaly in the event system.
The glutin custom iterators are now just wrappers around the RingBuf
iterator type. This will bring the running time of iterator traversal from
O(n^2) to O(n) because shifting-on-delete won't be performed.
2015-01-01 23:44:02 -08:00
Pierre Krieger
b9710f05a9
Unify WindowBuilder and HeadlessRendererBuilder for easier implementations
2014-12-31 07:34:26 +01:00
Pierre Krieger
b9a6366f96
Update for changes in Send/Sync traits
2014-12-30 08:20:50 +01:00
Pierre Krieger
7f6f4f8d04
Update for gl_generator's changes
2014-12-24 08:12:10 +01: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
Glenn Watson
0ad9c3d453
Add callback function to allow resize messages to be sent on mac.
2014-12-19 05:44:20 +10:00
tomaka
0164449955
Merge pull request #161 from glennw/thread-proxy
...
Introduce a WindowProxy for accessing a subset of functionality
2014-12-18 20:36:37 +01:00
Glenn Watson
435c64f473
Fix event name
2014-12-18 10:57:12 +10:00
Pierre Krieger
03d6a41ba3
Update for rustc for x11
2014-12-17 10:25:38 +01:00
Glenn Watson
9dc5689eef
Introduce a WindowProxy for accessing a subset of functionality
...
from other threads. This currently provides a way for other threads
to wakeup a blocked event loop on X11. Other platforms have stub
functions that need to be implemented. This is similar to
the functionality of glfwPostEmptyEvent.
2014-12-17 14:50:05 +10:00
Pierre Krieger
c893e4faec
Add get_api() function
2014-12-07 13:52:08 +01:00
tomaka
6652cd0bdf
Merge pull request #154 from tomaka/fix-warning-x11
...
Fix deprecation warning on X11
2014-12-02 20:48:15 +01:00
Pierre Krieger
7b84121500
Fix deprecation warning on X11
2014-12-02 20:44:38 +01:00
Pierre Krieger
f8aa6d676c
Fix multisampling not working on X11
2014-12-02 20:41:46 +01:00
Pierre Krieger
729551f828
Implement multisampling for x11
2014-11-27 15:26:42 +01:00
Pierre Krieger
71d463f865
Update for rustc
2014-11-26 21:22:44 +01:00
Pierre Krieger
4c0413bc7c
Implement lists sharing
2014-11-24 20:13:52 +01:00
Glenn Watson
583506dca0
Fix some rustc warnings
2014-11-24 07:36:13 +10:00
Pierre Krieger
ff3a29aaf5
Update for rustc
2014-11-19 07:06:27 +01:00