Commit graph

79 commits

Author SHA1 Message Date
tomaka 342d5d8587 Remove api_transition macro (#279)
* Remove api_transition macro

* Rename Window2 to Window

* Try fix X11 code
2017-09-06 17:32:24 +02:00
tomaka 3d1c18ded9 Events loop backend (#269)
* Don't use UNIX_BACKEND in Window2::new

* Move get_available_monitors and get_primary_monitor to EventsLoop

* Remove UNIX_BACKEND

* Restore choosing the Linux backend

* Return a XNotSupported for new_x11()

* Fix fullscreen example
2017-09-01 11:04:57 +02:00
tomaka 7dc6fcdedc Rework MonitorId::get_native_identifier (#267)
* Rework MonitorId::get_native_identifier

* Try fix compilation

* Returns the monitor ID on wayland as well

* Try fix compilation

* Fix iOS compilation
2017-08-30 08:49:18 +02:00
Pedro Côrte-Real 60b575a7c1 Get rid of FullScreenState::get_monitor() 2017-08-29 02:53:13 +01:00
Pedro Côrte-Real 9693f7caa9 Convert new fullscreen API in all platforms 2017-08-29 02:16:16 +01:00
Pedro Côrte-Real 1382adbf11 Unify fullscreen and fullscreen_windowed APIs
Use the enum to make a single fullscreen API that's much more
consistent. Both set_fullscreen() and with_fullscreen() take the
same enum and support all the variations so you can build the window
however you want and switch between the modes at runtime.
2017-08-29 01:36:24 +01:00
Pedro Côrte-Real 1d97a2a506 Implement Windowed Fullscreen
There are two kinds of fullscreen. One where you take over the whole
output the other where you just set the window size to the screen
size and get rid of decorations. The first one already existed,
implement the second which is more common for normal desktop apps.
Use an enum to consolidate all the fullscreen states.
2017-08-28 02:23:55 +01:00
Pedro Côrte-Real a4052b8693 Add window maximization API
Implement a simple API to set a window to maximized. Implement it
only for the X11 backend.
2017-08-28 01:28:42 +01:00
Lloyd Cunningham 24f5b0b591 Derive Clone for MonitorId 2017-08-05 18:15:50 -05:00
Alex Butler 3a89843767 Add WINIT_UNIX_BACKEND documentation 2017-06-21 20:10:23 +01:00
mitchmindtree f2dd2f0752 WIP - Make poll_events and run_forever take &mut self
This removes the need for the EventsLoop::interrupt method by inroducing
a ControlFlow type. This new type is to be returned by the user's
callback and indicates whether the `EventsLoop` should continue waiting
for events or break from the loop.

Only the wayland, x11 and api_transition backends have been updated so
far, and only the wayland backend has actually been tested.
2017-06-02 21:19:45 +10:00
vanderlokken 5645941a14 Fixed obsolete comments 2017-05-11 03:10:07 +03:00
mitchmindtree be09639b69 Update the macOS backend to the new futures-compatible API.
This is a follow up to the new API introduced in #20.

This also fixes the issue where window resize events would not be
emitted until the end of the resize. This PR fixese #39 by ensuring that
the user callback given to either `EventsLoop::poll_events` or
`EventsLoop::run_forever` can be called by each window delegate's resize
callback directly.
2017-02-03 23:05:57 +11:00
Pierre Krieger b988c174fe Add WindowId type 2017-02-03 09:13:11 +01:00
Pierre Krieger 9cd0430ec7 Remove stuff from Window's API 2017-02-03 06:48:58 +01:00
Pierre Krieger bcb242983b Add documentation for the new API 2017-01-28 15:33:54 +01:00
Pierre Krieger e7d43174e7 Implement the transition API 2017-01-28 15:05:36 +01:00
Pierre Krieger 422b332c1b Add a transition macro system 2017-01-28 15:00:17 +01:00
tomaka f1d70d351e Merge pull request #82 from tomaka/documentation
Some documentation improvements
2017-01-28 13:31:36 +01:00
k-brac 3e2154a922 child window created using a winapi::HWND instead of a WindowProxy 2016-11-29 13:02:42 +01:00
k-brac 2b25bf1480 child window creation improvement 2016-11-28 13:50:07 +01:00
k-brac 5a09e8ba21 first try to allow child window on windows 2016-11-25 17:05:39 +01:00
mitchmindtree 53065bda40 Move resize_callback field from WindowBuilder into WindowAttributes struct 2016-11-12 02:55:21 +11: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
Pierre Krieger 2c58e85584 Some documentation improvements 2016-11-06 09:51:20 +01: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
mitchmindtree 561349669a Addresses several warnings emitted on OS X by removing unused imports and allowing non_upper_case_globals in cocoa event conversion function. 2016-06-22 12:40:48 +10:00
Ivan Ukhov 54f442ea06 Generalize WindowBuilder::with_title 2016-05-08 09:28:42 +02:00
Corey Farwell dc49156fe6 Allow OSX WindowBuilder to specify 'activation behavior'. 2016-04-29 10:43:30 -04:00
Pierre Krieger 10bb03c5f0 Remove most OpenGL stuff and make it compile on win32 2016-02-23 12:56:23 +01:00
Pierre Krieger ec76d991ad Unlocks platform-specific attributes 2016-02-10 17:39:35 +01:00
Pierre Krieger 0b6418fabb Change PixelFormatRequirements 2015-12-19 11:32:51 +01:00
Aceeri 78eb4a5990 Minimum/maximum dimensions for windows in win32 api 2015-11-09 01:42:54 -08:00
Pierre Krieger 37262fb228 Remove public exports of gl_common and libc 2015-11-09 08:46:52 +01:00
Pierre Krieger 8c6a27d426 Add an os module containing platform-specific traits 2015-10-03 09:53:37 +02:00
Pierre Krieger 86fa1b58e5 Rename MonitorID -> MonitorId 2015-09-24 09:11:59 +02:00
Pierre Krieger aa9cb99929 Add #[inline] attributes 2015-09-23 13:11:47 +02:00
Pierre Krieger e466cfb2d6 Make some fields in WindowBuilder and HeadlessRendererBuilder public 2015-09-21 15:42:24 +02:00
Pierre Krieger 62bafe2130 Remove BuilderAttribs 2015-09-21 14:03:05 +02:00
Pierre Krieger 58b3bfb4fb Extract PixelFormatRequirements from BuilderAttribs 2015-09-21 12:03:56 +02:00
Pierre Krieger 48fe9b2644 Extract WindowAttributes from the BuilderAttribs 2015-09-21 12:03:55 +02:00
Pierre Krieger c244f8c033 Extract GlAttributes from BuilderAttribs 2015-09-21 12:03:55 +02:00
Sven Nilsen 79b8cf2cc8 Keep existing function for backward compatibility 2015-07-25 13:57:52 +02:00
Sven Nilsen 05175c1d80 Split get_inner_size
Closes https://github.com/tomaka/glutin/issues/542

* Splits `get_inner_size` into `get_inner_size_points` and
`get_inner_size_pixels`

This is a breaking change.
2015-07-25 13:40:33 +02:00
Sven Nilsen 5f98e510e4 Fixed docs for get_inner_size
Closes https://github.com/tomaka/glutin/issues/388
2015-07-25 12:01:20 +02:00
tomaka 836e53e55a Merge pull request #477 from rozaliev/feature/ios
[WIP] ios support
2015-06-29 09:29:46 +02:00
Pierre Krieger dbaca24cde Add with_robustness and handle robustness on all implementations 2015-06-22 19:42:03 +02:00
tomaka 7773996d7b Merge pull request #488 from tomaka/rem-is-closed
Remove the is_closed function
2015-06-17 07:36:16 +02:00
Pierre Krieger 39128dd7e1 Remove the is_closed function 2015-06-16 14:03:58 +02:00
Pierre Krieger f6c26ec593 Handle errors from MakeCurrent and SwapBuffers 2015-06-16 10:44:44 +02:00