Commit graph

52 commits

Author SHA1 Message Date
Bryan Bell
5389c73b85 Fix OS X & Win32 builds 2015-01-12 19:45:20 -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
Sam Ward
879f61dbbc OSX compatibility for Rust 1.0 alpha 2015-01-10 01:56:47 -08: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
Glenn Watson
bd28ebb34f Fix passing visibility through for mac. 2014-12-23 10:08:50 +10:00
Glenn Watson
f8d3b232a5 Add support for visible parameter on mac. 2014-12-19 08:44:45 +10: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
3c1a803d8d Add scroll wheel events for mac. 2014-12-18 15:18:22 +10:00
Glenn Watson
2c150143d8 Add mac implementation of wakeup_event_loop. 2014-12-18 14:26:02 +10: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
Ruben Bakker
e979f316e7 Qualify enum namespacing for NSOpenGLCPSwapInterval 2014-12-03 20:54:10 +02:00
David Partouche
3ae8352464 Fixed issue with menu bar showing in fullscreen 2014-11-28 19:13:58 +01:00
tomaka
596132dc93 Merge pull request #138 from DavidPartouche/cocoa_offscreen
Added headless rendering on osx
2014-11-27 10:48:53 +01:00
David Partouche
23b108d436 Added swap interval to osx 2014-11-26 14:53:08 +01:00
David Partouche
f865d9ac01 Added headless rendering on osx 2014-11-25 23:55:39 +01:00
Pierre Krieger
4c0413bc7c Implement lists sharing 2014-11-24 20:13:52 +01:00
Glenn Watson
d8a1fe5c97 Implement get_inner_size() for mac. 2014-11-21 07:47:08 +10:00
Glenn Watson
cac0025abb Add support for setting a window delegate, and implement close event on mac. 2014-11-21 07:08:05 +10:00
David Partouche
29892fbb7c Fixed some compilation errors on osx 2014-11-19 16:55:44 +01:00
Pierre Krieger
ff3a29aaf5 Update for rustc 2014-11-19 07:06:27 +01:00
David Partouche
77d00a8e5a Fixed an issue with the updated rust-cocoa crate 2014-11-11 23:45:20 +01:00
Brendan Zabarauskas
c86368291e Implement Window::set_title for Cocoa 2014-11-10 20:12:32 +11:00
Tomaka17
2be71306ec Remove key modifiers in KeyboardInput 2014-11-06 19:09:07 +01:00
David Partouche
2d76e0666f Added fullscreen support to osx 2014-11-06 16:40:30 +01:00
Tomaka17
584bb3e7df Use a proper error type for window creation 2014-11-05 16:42:18 +01:00
David Partouche
9dd592600a Retrieve the monitors and their info for osx 2014-11-04 18:03:38 +01:00
Tomaka17
b6f7491157 Add visibility-related functions to window 2014-11-01 09:03:21 +01:00
Tomaka17
0eda82c28f Add platform_display impls for win32 and android
Fix the cocoa function
2014-10-24 12:54:58 +02:00
Glenn Watson
5693fbcce3 Add accessor for underlying display handle on Linux. Although unimplemented on other platforms, this applies to at least android as well. 2014-10-24 15:20:25 +10:00
David Partouche
f86af01a99 Added the Alt key modifier 2014-10-23 18:01:09 +02:00
David Partouche
6f46c0c2dd Added the modifiers key as input 2014-10-23 17:30:17 +02:00
David Partouche
271b688910 Fixed switch from atomics to atomic in rust 2014-10-23 17:30:16 +02:00
David Partouche
86e8480550 Added the KeyPress and KeyRelease events 2014-10-23 17:30:16 +02:00
David Partouche
dad539114d Added ReceivedCharacter event for cocoa 2014-10-23 17:30:16 +02:00
David Partouche
ba8f55547f Added is_closed to osx window 2014-10-23 17:30:16 +02:00
David Partouche
421beefe67 Added mose move event 2014-10-23 17:30:16 +02:00
David Partouche
5969cfe886 Fixed a compilation error: setContentview changed setContentView_ 2014-10-23 12:04:39 +02:00
Tomaka17
e565bfeb13 Implement headless rendering 2014-10-09 15:55:42 +02:00
DavidPartouche
dc80f57bc2 Fixed a space missing 2014-10-06 18:37:06 +02:00
David Partouche
989fd1b505 Added events handling for left/right mouse clicking 2014-10-06 18:23:31 +02:00
David Partouche
db578e6e1c Refactored window initialisation code for cocoa, making it more memory safe 2014-10-06 18:23:31 +02:00
David Partouche
c38110cac7 Cocoa opens a window with OpenGL context inside 2014-10-06 18:23:31 +02:00
Tomaka17
391c4e525c Now using compile_msg crate instead of static_assert 2014-08-12 09:16:08 +02:00
Pierre Krieger
e567d7f4fd set_position now takes ints
Fix #12
2014-08-07 18:07:48 +02:00