@@ -2,7 +2,7 @@ use std::ffi::{CString, CStr};
2
2
use sys;
3
3
use libc:: c_char;
4
4
5
- const VIDEO_MINIMIZE_ON_FOCUS_LOST : & ' static str = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST " ;
5
+ const VIDEO_MINIMIZE_ON_FOCUS_LOSS : & ' static str = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS " ;
6
6
7
7
pub enum Hint {
8
8
Default ,
@@ -20,13 +20,13 @@ pub enum Hint {
20
20
///
21
21
/// # Example
22
22
/// ```rust,no_run
23
- /// sdl2::hint::set_video_minimize_on_focus_lost (false);
23
+ /// sdl2::hint::set_video_minimize_on_focus_loss (false);
24
24
/// ```
25
25
///
26
26
/// * `value`: `true` to enable minimizing of the Window if it loses key focus when in fullscreen mode,
27
27
/// `false` to disable this feature.
28
- pub fn set_video_minimize_on_focus_lost ( value : bool ) -> bool {
29
- set ( VIDEO_MINIMIZE_ON_FOCUS_LOST , if value { "1" } else { "0" } )
28
+ pub fn set_video_minimize_on_focus_loss ( value : bool ) -> bool {
29
+ set ( VIDEO_MINIMIZE_ON_FOCUS_LOSS , if value { "1" } else { "0" } )
30
30
}
31
31
32
32
/// A hint that specifies whether a fullscreen [Window](../video/Window.t.html) will be
@@ -36,16 +36,16 @@ pub fn set_video_minimize_on_focus_lost(value: bool) -> bool {
36
36
///
37
37
/// # Example
38
38
/// ```rust,no_run
39
- /// sdl2::hint::set_video_minimize_on_focus_lost_with_priority (false, &sdl2::hint::Hint::Override);
39
+ /// sdl2::hint::set_video_minimize_on_focus_loss_with_priority (false, &sdl2::hint::Hint::Override);
40
40
/// ```
41
41
///
42
42
/// * `value`: `true` to enable minimizing of the Window if it loses key focus when in fullscreen mode,
43
43
/// `false` to disable this feature.
44
44
/// * `priority`: The priority controls the behavior when setting a hint that already has a value.
45
45
/// Hints will replace existing hints of their priority and lower.
46
46
/// Environment variables are considered to have override priority.
47
- pub fn set_video_minimize_on_focus_lost_with_priority ( value : bool , priority : & Hint ) -> bool {
48
- set_with_priority ( VIDEO_MINIMIZE_ON_FOCUS_LOST , if value { "1" } else { "0" } , priority)
47
+ pub fn set_video_minimize_on_focus_loss_with_priority ( value : bool , priority : & Hint ) -> bool {
48
+ set_with_priority ( VIDEO_MINIMIZE_ON_FOCUS_LOSS , if value { "1" } else { "0" } , priority)
49
49
}
50
50
51
51
/// A hint that specifies whether a fullscreen [Window](../video/Window.t.html) will be
@@ -58,13 +58,13 @@ pub fn set_video_minimize_on_focus_lost_with_priority(value: bool, priority: &Hi
58
58
///
59
59
/// # Example
60
60
/// ```rust,no_run
61
- /// assert_eq!(sdl2::hint::get_video_minimize_on_focus_lost (), true);
61
+ /// assert_eq!(sdl2::hint::get_video_minimize_on_focus_loss (), true);
62
62
///
63
- /// sdl2::hint::set_video_minimize_on_focus_lost (false);
64
- /// assert_eq!(sdl2::hint::get_video_minimize_on_focus_lost (), false);
63
+ /// sdl2::hint::set_video_minimize_on_focus_loss (false);
64
+ /// assert_eq!(sdl2::hint::get_video_minimize_on_focus_loss (), false);
65
65
/// ```
66
- pub fn get_video_minimize_on_focus_lost ( ) -> bool {
67
- match get ( VIDEO_MINIMIZE_ON_FOCUS_LOST ) {
66
+ pub fn get_video_minimize_on_focus_loss ( ) -> bool {
67
+ match get ( VIDEO_MINIMIZE_ON_FOCUS_LOSS ) {
68
68
Some ( value) => match & * value {
69
69
"1" => true ,
70
70
_ => false ,
0 commit comments