Commit graph

153 commits

Author SHA1 Message Date
Pierre Krieger 677e69fd3a Fix compilation on linux 2015-04-17 17:59:37 +02:00
tomaka 2d7a800aee Merge pull request #368 from Daggerbot/wip
Using `x11-rs` and `osmesa-rs`.
2015-04-17 17:42:46 +02:00
Dzmitry Malyshau ac23d3114c Implemented get_pixel_format for X11 2015-04-12 13:45:41 -04:00
Daggerbot c9194e922e Fixes for x11-rs/osmesa-sys conversion. 2015-04-11 18:17:49 -07:00
Pierre Krieger 1e94d85d35 Adds get_pixel_format() to Window 2015-04-11 09:06:08 +02:00
Daggerbot 2d20050b89 Using x11-rs and osmesa-rs. 2015-04-09 10:38:58 +00:00
Pierre Krieger 5a31b2e438 Implement set_cursor_position() on X11 2015-04-07 21:54:53 +02:00
Pierre Krieger 80a9e2c316 Fix wait_events() not stopping when window is closed on X11 2015-04-06 16:47:39 +02:00
Pierre Krieger b99309bee2 Remove deprecated functions 2015-04-03 18:41:11 +02:00
Pierre Krieger 0f7bd9071e Remove all features for 1.0 beta 2015-04-03 09:42:45 +02:00
Pierre Krieger d33c138164 Rustup 2015-04-02 22:41:35 +02:00
Pierre Krieger aaa1c76841 Fix compilation on x11 2015-03-28 10:30:46 +01:00
Pierre Krieger 3d692870e2 Change grab_cursor and ungrab_cursor to set_cursor_state 2015-03-26 17:15:18 +01:00
Eduard Bopp 18f9bc44c9 Implement grabbing of the mouse pointer for X11
Contains new methods in the Window API that closely mirror the Xlib API. The
methods are left unimplemented for other platforms for now.
2015-03-25 13:10:55 +01:00
Brendan Zabarauskas 8a463f6643 Merge pull request #316 from binsoftware/cocoa-fixes
Cocoa fixes: memory leaks, monitor handling, is_current()
2015-03-24 18:33:53 +11:00
Nicholas Bishop 3413a2d973 Fix compilation by replacing "range" with ".." syntax 2015-03-22 18:54:18 -04:00
Ryan Stewart 1b2fd6e6d0 fix headless build by ensuring NativeMonitorId enum is available internally even without the window feature; add Eq/PartialEq to NativeMonitorId 2015-03-18 14:16:35 -07:00
Ryan Stewart 779f3ce888 fix X11 build issue due to missing import 2015-03-16 15:43:33 -07:00
Ryan Stewart 9914d826b8 expose platform-native monitor identifier 2015-03-16 14:11:49 -07:00
Pierre Krieger c61c33a833 Add set_cursor_position function 2015-03-10 10:29:07 +01:00
Pierre Krieger 689ace8b25 Add is_current function 2015-03-04 07:43:55 +01:00
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